/* ==========================================================================
   Catalogue (/catalogue/)
   A salesman's catalogue book: every product name on one sheet, in columns,
   with pack sizes. Text only, so the whole range is visible at a glance.
   ========================================================================== */

.catalogue-header { padding-bottom: clamp(28px, 3.5vw, 44px); }
.catalogue-header nav[aria-label="breadcrumb"] { margin-bottom: clamp(20px, 2.5vw, 32px); }
.catalogue-header-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; }
.catalogue-header .lede { margin-top: 12px; max-width: 52ch; }
.catalogue-total { font-size: var(--fs-md); color: rgba(248, 241, 228, .8); }
.catalogue-total strong { display: block; font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 700; line-height: 1; color: var(--gold-soft); }

.catalogue-body { padding-top: 28px; padding-bottom: clamp(48px, 6vw, 80px); }

/* ---------- Toolbar ------------------------------------------------------ */
.catalogue-toolbar { display: grid; grid-template-columns: minmax(240px, 420px) auto; justify-content: space-between; gap: 14px 20px; align-items: center; margin-bottom: 20px; }
.catalogue-search { position: relative; display: block; }
.catalogue-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.catalogue-search input {
  width: 100%; height: 46px; padding: 0 14px 0 42px;
  font: inherit; font-size: var(--fs-sm); color: var(--espresso);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md);
}
.catalogue-search input:focus { outline: 2px solid var(--forest); outline-offset: 1px; border-color: transparent; }
.catalogue-actions { display: flex; gap: 10px; }
.catalogue-actions .btn { white-space: nowrap; }

/* ---------- The sheet ---------------------------------------------------- */
.catalogue-sheet {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 2px rgba(45, 31, 16, .05), 0 18px 40px -24px rgba(45, 31, 16, .35);
  padding: clamp(22px, 3vw, 40px);
}
.catalogue-sheet::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 6px;
  background: linear-gradient(90deg,
    var(--shade-kesar) 0 12.5%, var(--shade-rose) 0 25%, var(--shade-pista) 0 37.5%, var(--shade-orange) 0 50%,
    var(--shade-khatta) 0 62.5%, var(--shade-pineapple) 0 75%, var(--shade-blue) 0 87.5%, var(--shade-cola) 0);
}
.catalogue-print-head { display: none; }

.catalogue-columns {
  column-width: 13rem;
  column-gap: clamp(28px, 3vw, 44px);
  column-rule: 1px solid var(--rule);
}

.catalogue-range { margin-bottom: 26px; scroll-margin-top: calc(var(--nav-height) + 16px); }
.catalogue-range h2 {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: var(--fs-lg); line-height: 1.15; color: var(--white);
  background: var(--range);
  padding: 9px 12px 8px; border-radius: var(--r-md) var(--r-md) 0 0;
  break-after: avoid;
}
.catalogue-range h2 a { color: inherit; }
.catalogue-range h2 a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.catalogue-count { flex: none; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 800; color: var(--range); background: var(--white); padding: 2px 8px; border-radius: var(--r-pill); }
.catalogue-note { margin: 0 0 6px; padding: 7px 12px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.4; color: color-mix(in srgb, var(--range) 80%, black); background: color-mix(in srgb, var(--range) 9%, var(--white)); border-radius: 0 0 var(--r-md) var(--r-md); break-after: avoid; }
.catalogue-range h2 + ul, .catalogue-range h2 + h3 { margin-top: 0; padding-top: 6px; border-top: 3px solid color-mix(in srgb, var(--range) 20%, var(--white)); }
.catalogue-range h3 { margin: 12px 0 2px; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 800; color: var(--range); break-after: avoid; }

.catalogue-range ul { margin-top: 4px; padding-left: 2px; }
.catalogue-range li { break-inside: avoid; }
.catalogue-range li a {
  display: flex; align-items: baseline; gap: 6px;
  padding: 4px 0;
  font-size: var(--fs-sm); line-height: 1.3; color: var(--espresso);
}
/* Dotted leader between the name and its pack sizes, as in a printed price list */
.catalogue-range li a::after { content: ''; order: 1; flex: 1 1 12px; min-width: 12px; border-bottom: 1.5px dotted rgba(45, 31, 16, .28); transform: translateY(-4px); }
.catalogue-name { font-weight: 700; }
/* A small bullet in the range colour; food colours get a swatch of the actual shade instead */
.catalogue-range li a::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--range); opacity: .7; transform: translateY(-2px); }
.catalogue-range li a:has(.catalogue-swatch)::before { display: none; }
.catalogue-swatch { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); transform: translateY(2px); }
/* No pack sizes on the line (the range note gives them): no leader either */
.catalogue-range li a:not(:has(.catalogue-sizes))::after { display: none; }
.catalogue-sizes { order: 2; flex: none; font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.catalogue-range li a:hover .catalogue-name { color: var(--range); text-decoration: underline; text-underline-offset: 3px; }
.catalogue-range li a:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 2px; }

.catalogue-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; background: var(--cream); border-radius: var(--r-md); }
.catalogue-empty[hidden] { display: none; }
.catalogue-footnote { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: var(--fs-xs); color: var(--text-muted); }

/* ---------- Smaller screens --------------------------------------------- */
@media (max-width: 640px) {
  .catalogue-toolbar { grid-template-columns: minmax(0, 1fr); }
  .catalogue-actions .btn { width: 100%; }
  .catalogue-sheet { padding: 18px 14px; border-radius: var(--r-md); }
  .catalogue-columns { column-width: auto; column-count: 2; column-gap: 16px; }
  .catalogue-range h2 { font-size: 1.05rem; padding: 7px 8px 6px; gap: 6px; }
  .catalogue-count { padding: 1px 6px; }
  .catalogue-note { padding: 6px 8px; }
  .catalogue-range li a { padding: 3px 0; font-size: .875rem; }
  /* Lines that still carry sizes stack them under the name in the narrow columns */
  .catalogue-range li a:has(.catalogue-sizes) { flex-direction: column; gap: 0; }
  .catalogue-range li a:has(.catalogue-sizes)::after { display: none; }
  .catalogue-range li a:has(.catalogue-sizes)::before { display: none; }
  .catalogue-total strong { display: inline; font-size: 2rem; margin-right: 4px; }
}

/* Phones: compact header so the search box and the list start near the top */
@media (max-width: 768px) {
  .catalogue-header { padding-top: 18px; padding-bottom: 22px; }
  .catalogue-header nav[aria-label="breadcrumb"] { margin-bottom: 12px; }
  .catalogue-header .lede { margin-top: 8px; font-size: var(--fs-base); }
  .catalogue-header-row { gap: 10px; }
  .catalogue-total strong { font-size: 1.5rem; }
}

/* ---------- Print / save as PDF: a one-page A4 sheet ------------------- */
.catalogue-print-foot { display: none; }

@media print {
  @page { size: A4; margin: 10mm 11mm; }
  html, body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-nav, .nav-spacer, .site-footer, footer, .skip-link, .whatsapp-float, .wa-float, [class*="whatsapp"],
  .catalogue-header, .catalogue-toolbar, .catalogue-empty, #quote-modal, .quote-modal { display: none !important; }
  .catalogue-body { padding: 0 !important; margin: 0; max-width: none; }

  .catalogue-sheet { display: block; box-shadow: none; border: 0; border-radius: 0; padding: 0; overflow: visible; }
  .catalogue-sheet::before { display: none; }

  /* Letterhead: logo, title, contact; the eight-shade stripe underneath */
  .catalogue-print-head {
    position: relative;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7mm;
    padding: 0 0 4mm; margin-bottom: 5mm;
  }
  .catalogue-print-head::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2.2mm; border-radius: 1mm;
    background: linear-gradient(90deg,
      var(--shade-kesar) 0 12.5%, var(--shade-rose) 0 25%, var(--shade-pista) 0 37.5%, var(--shade-orange) 0 50%,
      var(--shade-khatta) 0 62.5%, var(--shade-pineapple) 0 75%, var(--shade-blue) 0 87.5%, var(--shade-cola) 0);
  }
  .catalogue-print-head img { width: 42mm; height: auto; }
  .cph-title { padding-left: 7mm; border-left: 1px solid #ddd2bf; }
  .cph-kicker { font-size: 7.5pt; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--crimson); }
  .cph-name { margin: 1mm 0; font-family: var(--font-display); font-size: 24pt; font-weight: 700; line-height: 1; white-space: nowrap; color: var(--forest); }
  .cph-meta { font-size: 8.5pt; color: #6b5d4c; }
  .cph-contact { display: grid; gap: .8mm; text-align: right; font-size: 9pt; font-weight: 700; color: var(--espresso); }
  .cph-contact span { display: inline; margin-right: 1.5mm; font-size: 6.5pt; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9a8a74; }

  /* The list */
  .catalogue-columns { display: block; columns: 3 auto; column-count: 3; column-width: auto; column-gap: 9mm; column-rule: 1px solid #ece4d6; }
  .catalogue-range { margin-bottom: 4mm; }
  .catalogue-range h2 { font-size: 11.5pt; padding: 2mm 3mm; border-radius: 2mm 2mm 0 0; }
  .catalogue-count { font-size: 7.5pt; }
  .catalogue-note { padding: 1.4mm 3mm; font-size: 8pt; }
  .catalogue-range h3 { margin-top: 3mm; font-size: 7.5pt; letter-spacing: .08em; text-transform: uppercase; }
  .catalogue-range li a { padding: .7mm 0; font-size: 9.5pt; color: #2d1f10 !important; text-decoration: none !important; }
  .catalogue-name { font-weight: 600; }
  .catalogue-swatch { width: 3.2mm; height: 3.2mm; }
  .catalogue-range li a::after { border-color: #b9ad9a; }
  .catalogue-sizes { font-size: 8pt; }

  /* Footnote and ordering band, pushed to the foot of the page */
  .catalogue-footnote { margin-top: 2mm; padding-top: 3mm; border-top: 0; font-size: 7.5pt; text-align: center; color: #8a7b66; }
  .catalogue-print-foot {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6mm;
    margin-top: 3mm; padding: 4mm 6mm; border-radius: 2.5mm;
    background: var(--forest); color: #f8f1e4; font-size: 8.5pt;
  }
  .catalogue-print-foot p:last-child { text-align: right; color: rgba(248, 241, 228, .75); }
  .catalogue-print-foot strong { color: var(--gold-soft); }
  .cpf-phone { font-family: var(--font-display); font-size: 15pt; font-weight: 700; color: #fff; white-space: nowrap; }
}
