/* ═══════════════════════════════════════════════════════════════════════════
   PRICELY — Design System
   Aesthetic: Clean neutral commerce — scannable, trustworthy, category-agnostic
   Headings: Sora · Body: DM Sans
   ═══════════════════════════════════════════════════════════════════════════ */

/* DM Sans — normal (variable, 400–700) */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/dm-sans-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/dm-sans-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* DM Sans — italic 400 */
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/dm-sans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/dm-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Sora — all weights (variable, 400–800) */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/static/fonts/sora-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/static/fonts/sora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
  --cream:         #f5f3ef;
  --cream-warm:    #edeae3;
  --white:         #ffffff;
  --ink:           #18120a;
  --ink-soft:      #36291a;
  --muted:         #6b6358;
  --border:        #ddd8ce;
  --border-light:  #eae6de;

  --teal:          #0a7ea4;
  --teal-bg:       #e8f6fb;
  --teal-dark:     #075e7a;
  --teal-text:     #054e66;

  --green:         #1a6e3a;
  --green-bg:      #e8f5ee;

  --red:           #b03535;
  --red-bg:        #fdf0f0;

  --font-display:  'Sora', 'Helvetica Neue', Arial, sans-serif;
  --font-body:     'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  --r-sm:   4px;
  --r:      8px;
  --r-lg:  12px;
  --sh-sm:  0 1px 3px rgba(24,18,10,.06), 0 1px 2px rgba(24,18,10,.04);
  --sh:     0 3px 12px rgba(24,18,10,.08), 0 1px 4px rgba(24,18,10,.05);
  --sh-lg:  0 8px 32px rgba(24,18,10,.11), 0 3px 8px rgba(24,18,10,.06);
  --trans:  150ms ease;

  --content: 1240px;
  --sidebar: 240px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body.public {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.public > main {
  flex: 1;
}

body.public a {
  color: var(--teal-dark);
  text-decoration: none;
  transition: color var(--trans);
}
body.public a:hover { color: var(--teal); }

body.public h1, body.public h2, body.public h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--ink);
}

/* ── Skip link (accessibility) ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--teal);
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .9rem;
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ── Site header ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sh-sm);
}

.site-nav {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--muted);
  flex-wrap: nowrap;
  overflow: hidden;
}

.site-wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink) !important;
  letter-spacing: -.02em;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: .25rem;
}
.site-wordmark::after {
  content: '.';
  color: var(--teal);
}

.breadcrumb-sep {
  color: var(--border);
  font-weight: 400;
  flex-shrink: 0;
}

.breadcrumb-item {
  display: contents;
}

.site-nav .breadcrumb-link {
  color: var(--muted) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.site-nav .breadcrumb-link:hover { color: var(--ink) !important; }

.breadcrumb-current {
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Language switcher ───────────────────────────────────────────────────── */
.lang-switcher {
  margin-left: auto;
  display: flex;
  gap: .35rem;
  flex-shrink: 0;
}

.lang-switcher a {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted) !important;
  text-decoration: none;
  padding: .2rem .5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: all var(--trans);
}
.lang-switcher a:hover {
  color: var(--ink) !important;
  border-color: var(--ink);
  background: var(--cream);
}

/* ── Page container ──────────────────────────────────────────────────────── */
.page-container {
  max-width: var(--content);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Section headings ────────────────────────────────────────────────────── */
.section-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   HOME PAGE
   ══════════════════════════════════════════════════════════════════════════ */

.home-hero {
  text-align: center;
  padding: 2rem 1.5rem 0.75rem;
  max-width: 700px;
  margin: 0 auto;
}

.home-hero h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
  line-height: 1.2;
}

.hero-animated-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.hero-cat-cycle {
  display: inline-grid;
  vertical-align: baseline;
  align-items: baseline;
}

.hero-cat-cycle .hero-cat {
  grid-area: 1 / 1;
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: none;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-cat-cycle .hero-cat:hover {
  text-decoration: underline;
}

.hero-cat-cycle .hero-cat-active {
  opacity: 1;
  transform: translateY(0);
}

.home-hero .hero-desc {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ── Search form (shared: home, category, search page) ───────────────────── */
.search-form {
  margin-bottom: 2rem;
}

.home-hero .search-form {
  max-width: 600px;
  margin: 0 auto 1rem;
}

.search-form form {
  display: flex;
  gap: .3rem;
  flex-wrap: nowrap;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: .4rem;
  box-shadow: var(--sh);
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: .6rem .9rem;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: var(--r);
  outline: none;
}
.search-form input[type="search"]:focus {
  border: none;
  box-shadow: none;
}

.search-form select {
  padding: .55rem 2.2rem .55rem .75rem;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--ink-soft);
  background-color: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r);
  outline: none;
  cursor: pointer;
  transition: border-color var(--trans);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2336291a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
}
.search-form select:focus { border-color: var(--teal); }

.btn-search {
  padding: .7rem 1.4rem;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  color: var(--white);
  background: var(--teal);
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
}
.btn-search:hover {
  background: var(--teal-dark);
  box-shadow: 0 4px 12px rgba(10,126,164,.3);
  transform: translateY(-1px);
}
.btn-search:active { transform: translateY(0); }

/* ── Home sections (shared wrapper) ─────────────────────────────────────── */
.home-section {
  max-width: var(--content);
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
}

.home-section-header {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: .9rem;
}

.home-section-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .9rem;
  color: var(--ink);
}

.home-section-header .home-section-heading {
  margin-bottom: 0;
}

.home-section-sub {
  font-size: .78rem;
  color: var(--muted);
}

/* ── Category grid ───────────────────────────────────────────────────────── */
.home-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
  list-style: none;
}

.home-cat-card {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .9rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--ink) !important;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
  box-shadow: var(--sh-sm);
}

.home-cat-card:hover {
  border-color: var(--teal);
  box-shadow: var(--sh);
  transform: translateY(-2px);
  color: var(--teal-dark) !important;
}

.home-cat-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: .15rem;
}

.home-cat-name {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 600;
}

.home-cat-count {
  font-size: .75rem;
  color: var(--muted);
}

/* ── Price-drops strip ───────────────────────────────────────────────────── */
.home-deals {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 0 2rem;
}

.home-deals-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.home-deals-wrap {
  position: relative;
}
.home-deals-wrap::before,
.home-deals-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: .5rem;
  width: 3rem;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity var(--trans);
}
.home-deals-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--white), transparent);
}
.home-deals-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--white), transparent);
}
.home-deals-wrap.has-scroll-left::before  { opacity: 1; }
.home-deals-wrap.has-scroll-right::after  { opacity: 1; }

.home-deals-scroll,
.home-strip-products {
  cursor: grab;
}
.home-deals-scroll.scroll-dragging,
.home-strip-products.scroll-dragging {
  cursor: grabbing;
  user-select: none;
}

.home-deals-scroll {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.home-deals-scroll .product-card {
  width: 175px;
  flex-shrink: 0;
}

/* ── Per-category strips ─────────────────────────────────────────────────── */
.home-strips {
  max-width: var(--content);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.home-strip {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.home-strip:first-child {
  border-top: none;
  padding-top: 0;
}

.home-strip-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: .9rem;
}

.home-strip-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.home-strip-title a {
  color: var(--ink) !important;
  text-decoration: none;
}
.home-strip-title a:hover {
  color: var(--teal-dark) !important;
}

.home-strip-view-all {
  font-size: .78rem;
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
}

.home-strip-view-all:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}

.home-strip-body {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.home-strip-products-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}
.home-strip-products-wrap::before,
.home-strip-products-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: .5rem;
  width: 3rem;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity var(--trans);
}
.home-strip-products-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--cream), transparent);
}
.home-strip-products-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--cream), transparent);
}
.home-strip-products-wrap.has-scroll-left::before  { opacity: 1; }
.home-strip-products-wrap.has-scroll-right::after  { opacity: 1; }

.home-strip-products {
  display: flex;
  gap: .625rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.home-strip-products .product-card {
  width: 175px;
  flex-shrink: 0;
}

.home-strip-more-card {
  width: 140px;
  flex-shrink: 0;
  align-self: stretch;
}
.home-strip-more-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 180px;
  padding: 1rem;
  background: var(--teal-bg);
  border: 1px solid var(--teal);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--teal-dark) !important;
  gap: .6rem;
  text-align: center;
  transition: background var(--trans), box-shadow var(--trans), transform var(--trans);
  box-shadow: var(--sh-sm);
}
.home-strip-more-link:hover {
  background: var(--teal);
  color: var(--white) !important;
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
}
.home-strip-more-label {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
}

.home-strip-article {
  width: 200px;
  flex-shrink: 0;
}

.home-article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink) !important;
  transition: border-color var(--trans), box-shadow var(--trans);
  box-shadow: var(--sh-sm);
}

.home-article-card .article-card-thumbs {
  height: 65px;
  padding: .5rem .5rem 0;
}

.home-article-card .article-card-thumb {
  aspect-ratio: unset;
}

.home-article-card .article-card-thumb img {
  padding: .2rem;
}

.home-article-card .article-card-body {
  padding: .5rem .65rem .65rem;
}

.home-article-card:hover {
  border-color: var(--teal);
  box-shadow: var(--sh);
}

.article-card-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--teal);
}

.article-card-title {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-date {
  font-size: .72rem;
  color: var(--muted);
  margin-top: auto;
}

/* ══════════════════════════════════════════════════════════════════════════
   CATEGORY PAGE
   ══════════════════════════════════════════════════════════════════════════ */

.category-page-header {
  margin-bottom: 1.5rem;
}

.category-page-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .35rem;
}

.category-description {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: .75rem;
}

/* ── Subcategories ───────────────────────────────────────────────────────── */
.subcategories-section {
  margin-bottom: 2rem;
}

.subcategories-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
}

.subcategories-list li a {
  display: inline-block;
  padding: .35rem .9rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-soft) !important;
  transition: all var(--trans);
}
.subcategories-list li a:hover {
  background: var(--teal-bg);
  border-color: var(--teal);
  color: var(--teal-dark) !important;
}

/* ── Category layout: sidebar + content ─────────────────────────────────── */
.category-layout {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .category-layout { grid-template-columns: 1fr; }
}

/* ── Filter sidebar ──────────────────────────────────────────────────────── */
.filter-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  position: sticky;
  top: 76px;
}

/* Checkbox toggle — hidden on desktop, acts as mobile filter toggle */
.filter-cb {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

body .filter-toggle {
  display: none;
}

@media (max-width: 768px) {
  .filter-sidebar { position: static; }

  body .filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-body);
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    padding: .1rem 0;
    user-select: none;
  }
  .filter-toggle::after {
    content: '▾';
    font-size: 1rem;
    color: var(--muted);
    transition: transform var(--trans);
  }
  .filter-cb:checked + .filter-toggle::after {
    transform: rotate(-180deg);
  }

  .filter-sidebar form {
    display: none;
    margin-top: 1rem;
  }
  .filter-cb:checked ~ form {
    display: block;
  }
}

.filter-sidebar fieldset {
  border: none;
  padding: 0;
  margin-bottom: 1.25rem;
}

.filter-sidebar fieldset:last-of-type {
  margin-bottom: 1rem;
}

.filter-sidebar legend {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .6rem;
  margin-bottom: .5rem;
  width: 100%;
  border-bottom: 1px solid var(--border-light);
}

.filter-sidebar label:not(.filter-toggle) {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: .2rem 0;
  line-height: 1.4;
}
.filter-sidebar label:not(.filter-toggle):hover { color: var(--ink); }

.filter-sidebar input[type="checkbox"] {
  accent-color: var(--teal);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.filter-sidebar input[type="number"] {
  width: 100%;
  padding: .4rem .6rem;
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color var(--trans);
  margin-top: .25rem;
  display: block;
}
.filter-sidebar input[type="number"]:focus { border-color: var(--teal); }

.btn-filter-apply {
  width: 100%;
  padding: .6rem;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-bg);
  border: 1.5px solid var(--teal);
  border-radius: var(--r);
  cursor: pointer;
  transition: all var(--trans);
}
.btn-filter-apply:hover {
  background: var(--teal);
  color: var(--white);
}

/* ── Sort bar ────────────────────────────────────────────────────────────── */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.sort-bar select {
  padding: .4rem .8rem .4rem .6rem;
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  cursor: pointer;
  transition: border-color var(--trans);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2336291a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .6rem center;
  padding-right: 1.8rem;
}
.sort-bar select:focus { border-color: var(--teal); }

.btn-sort {
  padding: .4rem .85rem;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--trans);
}
.btn-sort:hover { color: var(--ink); border-color: var(--ink-soft); }

/* ── Product grid ────────────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin-bottom: 2rem;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
  border-color: var(--border);
}

.product-card-img-wrap {
  aspect-ratio: 1;
  background: var(--white);
  overflow: hidden;
  position: relative;
}
.product-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .5rem;
  transition: transform .3s ease;
}
.product-card:hover .product-card-img-wrap img { transform: scale(1.04); }

.product-card-body {
  padding: .85rem 1rem 1rem;
}

.product-card h3 {
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: .5rem;
}

/* Stretch link to cover entire card */
.product-card h3 a {
  color: var(--ink) !important;
}
.product-card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.product-card h3 a:hover { color: var(--teal-dark) !important; }

.product-card-price {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .875rem;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-bg);
  padding: .2rem .55rem;
  border-radius: var(--r-sm);
}

/* ── Freshness badges ────────────────────────────────────────────────────── */
.badge-new,
.badge-drop {
  position: absolute;
  font-size: .65rem;
  font-weight: 800;
  padding: .18rem .45rem;
  border-radius: var(--r-sm);
  z-index: 2;
  pointer-events: none;
  top: .45rem;
}

.badge-new {
  left: .45rem;
  background: var(--teal);
  color: var(--white);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.badge-drop {
  right: .45rem;
  background: #e8f7ee;
  color: #1a7a3c;
  border: 1px solid #b8dfc5;
}

/* ── Category no results ─────────────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
  font-size: .95rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.pagination a {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-soft) !important;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all var(--trans);
}
.pagination a:hover {
  background: var(--teal-bg);
  border-color: var(--teal);
  color: var(--teal-dark) !important;
}

.pagination-label {
  font-size: .875rem;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ══════════════════════════════════════════════════════════════════════════ */

.product-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 2rem; }
}

.product-media {
  position: sticky;
  top: 80px;
}

@media (max-width: 900px) {
  .product-media {
    position: static;
  }
}

.product-media-inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(24,18,10,.10), 0 1px 4px rgba(24,18,10,.06);
}
.product-media-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.5rem;
}

.product-info h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}

.product-description-wrap {
  position: relative;
  margin-bottom: 2rem;
}

.product-description-wrap.is-collapsed {
  overflow: hidden;
  /* max-height set in pixels by JS to exactly 4 lines */
}

.product-description-toggle {
  display: none; /* shown via has-overflow class */
  background: none;
  border: none;
  padding: 0;
  font-size: .85rem;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
}

.product-description-toggle:hover { color: var(--teal-dark); }

.product-description-wrap.has-overflow .product-description-toggle {
  display: block;
}

/* When collapsed: sit at bottom-right, exactly one text line tall so bottom:0 aligns */
.product-description-wrap.is-collapsed .product-description-toggle {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: .975rem;  /* match .product-description so height = one line */
  line-height: 1.75;   /* match .product-description */
  background: linear-gradient(to right, transparent, var(--cream) 2.5rem);
  padding-left: 3rem;
}

.product-description {
  color: var(--ink-soft);
  font-size: .975rem;
  line-height: 1.75;
  margin-bottom: 0;
}

/* ── Category label ──────────────────────────────────────────────────────── */
.product-category-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--teal-dark);
  margin-bottom: .4rem;
}

/* ── Key stats bar ───────────────────────────────────────────────────────── */
.product-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .35rem .8rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-soft);
  box-shadow: var(--sh-sm);
}

/* ── Price hero ──────────────────────────────────────────────────────────── */
.price-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #0a7ea4 0%, #075e7a 100%);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(10,126,164,.3);
}

.price-hero-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.price-hero-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.75);
}

.price-hero-price {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.02em;
  line-height: 1;
}

.price-hero-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: rgba(255,255,255,.85);
  margin-top: .1rem;
}

.price-hero-shop { font-weight: 600; }

.price-hero-stock {
  background: rgba(255,255,255,.2);
  border-radius: 10px;
  padding: .1rem .4rem;
  font-size: .72rem;
  font-weight: 600;
}

.price-hero-cta-form { display: block; margin: 0; padding: 0; flex-shrink: 0; }

.price-hero-cta {
  display: block;
  background: var(--white);
  color: var(--teal-dark) !important;
  font-weight: 700;
  font-size: .9rem;
  font-family: inherit;
  padding: .7rem 1.25rem;
  border: none;
  border-radius: var(--r);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: transform var(--trans), box-shadow var(--trans);
  cursor: pointer;
  appearance: none;
}
.price-hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  color: var(--teal-dark) !important;
}

/* ── Shop comparison table ───────────────────────────────────────────────── */
.prices-section { margin-bottom: 2rem; }

.shops-table {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.shops-table-row {
  display: grid;
  grid-template-columns: 1fr 80px 64px 130px;
  align-items: center;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  gap: .75rem;
  position: relative;
}

/* Transparent overlay on the button's ::before covers the full row,
   making the whole row clickable without JS. */
.shop-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 0;
}

.shops-table-row:last-child { border-bottom: none; }
.shops-table-row--best { background: var(--teal-bg); }

.shop-name-cell {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}

.shop-favicon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
  object-fit: contain;
}

.shop-favicon-fallback {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 800;
  color: var(--white);
}

/* Deterministic palette — 8 colours, indexed by favicon_fallback_color_idx */
.favicon-color-0 { background: #e8511a; }
.favicon-color-1 { background: #0060a8; }
.favicon-color-2 { background: #5a3e8a; }
.favicon-color-3 { background: #1a7a3c; }
.favicon-color-4 { background: #c0392b; }
.favicon-color-5 { background: #d4920a; }
.favicon-color-6 { background: #2980b9; }
.favicon-color-7 { background: #6d4c41; }

.shop-name {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}

.shop-name-text {
  font-weight: 600;
  font-size: .88rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.shop-best-badge {
  background: var(--teal);
  color: var(--white);
  font-size: .58rem;
  font-weight: 700;
  padding: .08rem .38rem;
  border-radius: 10px;
  letter-spacing: .03em;
  white-space: nowrap;
}

.shop-delivery {
  font-size: .73rem;
  color: var(--green);
  font-weight: 500;
}

.shop-stock-inline {
  font-size: .73rem;
  color: var(--muted);
  display: none;
}

.shop-price {
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink-soft);
  text-align: right;
  white-space: nowrap;
}
.shop-price--best {
  color: var(--teal-dark);
  font-weight: 800;
}

.shop-stock-badge { text-align: center; }

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 700;
  padding: .18rem .5rem;
  border-radius: 20px;
  min-width: 48px;
  justify-content: center;
}
.stock-badge.in-stock {
  color: var(--green);
  background: var(--green-bg);
}
.stock-badge.out-of-stock {
  color: var(--red);
  background: var(--red-bg);
}

.shop-stock-dash {
  font-size: .8rem;
  color: var(--muted);
  display: inline-block;
  width: 48px;
  text-align: center;
}

.shop-cta-form { display: block; margin: 0; padding: 0; }

.shop-cta {
  display: block;
  text-align: center;
  font-weight: 600;
  font-size: .78rem;
  font-family: inherit;
  padding: .45rem .75rem;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
  background: var(--cream);
  color: var(--ink-soft) !important;
  border: 1px solid var(--border);
  transition: all var(--trans);
  cursor: pointer;
  appearance: none;
  width: 100%;
  box-sizing: border-box;
}
.shop-cta:hover { border-color: var(--ink-soft); color: var(--ink) !important; }

.shop-cta--best {
  background: var(--teal);
  color: var(--white) !important;
  border-color: var(--teal);
  box-shadow: 0 2px 6px rgba(10,126,164,.22);
}
.shop-cta--best:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white) !important;
  box-shadow: 0 4px 12px rgba(10,126,164,.3);
}

/* ── Price chart ─────────────────────────────────────────────────────────── */
.chart-section { margin-bottom: 2rem; }

.chart-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem;
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.chart-container svg {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* ── Attribute grid ──────────────────────────────────────────────────────── */
.attributes-section { margin-bottom: 2rem; }

.attribute-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.attribute-cell {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: .18rem;
}

.attribute-cell:nth-child(odd) { border-right: 1px solid var(--border-light); }

.attribute-cell--full {
  grid-column: 1 / -1;
  border-right: none;
}

.attribute-cell:last-child,
.attribute-cell:nth-last-child(2):not(.attribute-cell--full) {
  border-bottom: none;
}

.attribute-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.attribute-value {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
}

.attribute-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .1rem;
}

.attribute-pill {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .2rem .65rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ══════════════════════════════════════════════════════════════════════════
   SEARCH PAGE
   ══════════════════════════════════════════════════════════════════════════ */

.search-hero {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.search-page-container {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.search-status {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-size: .975rem;
}

.search-results-heading {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin-bottom: 2rem;
}

.search-card-crumb {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .35rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   ERROR PAGES
   ══════════════════════════════════════════════════════════════════════════ */

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: var(--cream);
  font-family: var(--font-body);
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: .5rem;
}

.error-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .75rem;
}

.error-desc {
  color: var(--muted);
  font-size: .975rem;
  margin-bottom: 2rem;
  max-width: 380px;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  padding: .7rem 1.6rem;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  color: var(--white) !important;
  background: var(--teal);
  border-radius: var(--r);
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  box-shadow: 0 2px 8px rgba(10,126,164,.25);
}
.btn-home:hover {
  color: var(--white) !important;
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(10,126,164,.35);
}

/* ══════════════════════════════════════════════════════════════════════════
   ARTICLE DETAIL PAGE
   ══════════════════════════════════════════════════════════════════════════ */

.article-content {
  max-width: 760px;
  margin: 0 auto;
}

.article-content > h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: .5rem;
}

.article-date {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

/* ── Article body typography ─────────────────────────────────────────────── */

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2rem 0 .75rem;
  line-height: 1.35;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem 1.25rem;
}

.article-body li {
  margin-bottom: .4rem;
}

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color var(--trans);
}

.article-body a:hover {
  color: var(--teal);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
}

.article-body thead th {
  font-family: var(--font-body);
  font-weight: 600;
  text-align: left;
  padding: .5rem .75rem;
  background: var(--bg-alt);
  border-bottom: 2px solid var(--border);
  color: var(--ink);
}

.article-body tbody td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.article-body tbody tr:last-child td {
  border-bottom: none;
}

/* ── Product block card (single product in article) ────────────────────────── */

.article-product-block {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin: 1.5rem auto;
  max-width: 480px;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--trans), border-color var(--trans);
}

.article-product-block:hover {
  box-shadow: var(--sh);
  border-color: var(--teal);
}

.article-card-image-link {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--bg-alt);
  position: relative;
}

.article-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .5rem;
  transition: transform var(--trans);
}

.article-product-block:hover .article-card-img {
  transform: scale(1.04);
}

.article-product-block-info {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.article-product-block-info .search-card-crumb {
  margin-bottom: 0;
}

.article-product-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink) !important;
  text-decoration: none;
  line-height: 1.35;
  transition: color var(--trans);
}

.article-product-name:hover {
  color: var(--teal-dark) !important;
}

.article-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .75rem;
  font-size: .8rem;
  color: var(--muted);
}

.article-card-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.article-card-cta {
  display: inline-block;
  padding: .45rem 1rem;
  background: var(--teal);
  color: var(--white) !important;
  border-radius: var(--r);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--trans), transform var(--trans);
  align-self: flex-start;
  margin-top: .25rem;
}

.article-card-cta:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

/* ── Product grid (consecutive products in article) ────────────────────────── */

.article-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}


.article-back-link {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.article-back-link a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-soft) !important;
  text-decoration: none;
  transition: color var(--trans), gap var(--trans);
}

.article-back-link a:hover {
  color: var(--teal-dark) !important;
  gap: .55rem;
}

.article-back-link a::before {
  content: '←';
  font-size: 1rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   ARTICLE MENTIONS (product & category pages)
   ══════════════════════════════════════════════════════════════════════════ */

.product-mentioned-in {
  margin-bottom: 2rem;
}

.category-articles {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.category-articles h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

/* ── Category SEO text block ─────────────────────────────────────────────── */
.category-seo-text {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.category-seo-text h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.category-seo-text p {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 72ch;
  margin-bottom: 1rem;
}

.category-seo-text p:last-child {
  margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   ARTICLE CARD GRID
   ══════════════════════════════════════════════════════════════════════════ */

.article-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh);
  border-color: var(--teal);
}

.article-card-thumbs {
  display: flex;
  height: 110px;
  overflow: hidden;
  background: var(--white);
  padding: .5rem .5rem 0;
}

.article-card-thumb {
  flex: 1;
  overflow: hidden;
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .5rem;
}

.article-card-thumb-placeholder {
  flex: 1;
  background: var(--border-light);
}

.article-card-body {
  padding: .65rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
}

.article-card-category {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.article-card-title {
  display: block;
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink) !important;
  text-decoration: none;
  line-height: 1.35;
  transition: color var(--trans);
}

.article-card .article-card-title::after {
  content: '';
  position: absolute;
  inset: 0;
}

.article-card:hover .article-card-title {
  color: var(--teal-dark) !important;
}

.article-card-date {
  font-size: .72rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: .25rem;
}

/* ── Home mobile: < 768px ────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .home-cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-deals-scroll .product-card,
  .home-strip-products .product-card {
    width: 130px;
  }

  .home-strip-body {
    flex-direction: column;
    gap: .75rem;
    align-items: stretch;
  }

  .home-strip-article {
    width: 100%;
  }

  .home-article-card {
    flex-direction: row;
    align-items: stretch;
  }

  .home-article-card .article-card-thumbs {
    flex-shrink: 0;
    width: 88px;
    height: auto;
    align-self: stretch;
    padding: .5rem 0 .5rem .5rem;
  }

  .home-article-card .article-card-thumb {
    aspect-ratio: unset;
    height: 100%;
  }

  .home-article-card .article-card-thumb:not(:first-child) {
    display: none;
  }

  .home-article-card .article-card-body {
    padding: .5rem .6rem;
  }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-product-block { grid-template-columns: 120px 1fr; gap: 1rem; }
  .article-product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .product-grid,
  .product-list { grid-template-columns: repeat(2, 1fr); gap: .75rem; }

  .site-nav .breadcrumb-item { display: none; }

  .search-form form { flex-direction: column; }
  .search-form input[type="search"],
  .search-form select,
  .btn-search { width: 100%; }

  .article-product-block {
    grid-template-columns: 1fr;
    gap: .75rem;
  }

  .article-product-block .article-card-image-link {
    max-width: 200px;
    justify-self: center;
  }

  .article-product-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }

  .article-cards { grid-template-columns: 1fr; }

  /* ── Product page mobile ──────────────────────────────────────────────── */
  .price-hero {
    flex-direction: column;
    align-items: stretch;
    gap: .85rem;
  }
  .price-hero-cta-form { width: 100%; }
  .price-hero-cta { text-align: center; width: 100%; box-sizing: border-box; }

  .shops-table-row { grid-template-columns: 1fr auto; }
  .shop-name-cell { grid-column: 1; }
  .shop-stock-badge { display: none; }
  .shop-stock-inline { display: inline; }
  .shop-cta-form { grid-column: 1 / -1; }
  .shop-cta { width: 100%; }

  .attribute-grid { grid-template-columns: 1fr; }
  .attribute-cell { border-right: none; }
  .attribute-cell--full { grid-column: 1; }
  .attribute-cell:nth-last-child(2):not(.attribute-cell--full) { border-bottom: 1px solid var(--border-light); }
  .attribute-cell:last-child { border-bottom: none; }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1rem;
}

.site-footer .footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.footer-wordmark::after {
  content: '.';
  color: var(--teal);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
}

.footer-nav a:hover {
  color: var(--teal);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .site-footer .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .prose-card {
    padding: 1.5rem;
    border-radius: var(--r);
  }
}

/* ── Contact page ────────────────────────────────────────────────────────── */
.contact-details {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  font-size: 0.95rem;
}

.contact-details dt {
  font-weight: 600;
  color: var(--muted);
}

/* -- FAQ page --------------------------------------------------------------- */
.page-subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-list dt {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.faq-list dt:first-child {
  margin-top: 0;
}

.faq-list dd {
  color: var(--ink-soft);
  line-height: 1.65;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-left: 0;
}

.faq-list dd:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* -- Prose pages (privacy, cookies) ---------------------------------------- */
.page-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.prose-card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 2rem 2.5rem 2.5rem;
}

.prose-intro {
  margin-bottom: 2rem;
}

.prose-section + .prose-section {
  margin-top: 2rem;
}

.prose-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.prose-section p {
  color: var(--ink-soft);
  line-height: 1.65;
}
