/* ============================================================
   Miró — Collections (all jewellery) page styles (mobile-first)
   ============================================================ */

/* Safety: keep [hidden] authoritative over any display rules */
[data-page="collections"] [hidden] { display: none !important; }

/* ---------- Listing hero — thin, white, minimalist (client feedback) ---------- */
.lhero {
  background: var(--white);
  padding-block: clamp(28px, 4.5vw, 52px) clamp(16px, 2.5vw, 26px);
}
.lhero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 400; }
.lhero__kicker {
  margin-top: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* Client feedback 2026-07-24: the listing reads narrower, so the product
   photographs sit smaller on the page. */
[data-page="collections"] .container { max-width: 1080px; }

/* ---------- Sticky toolbar — pins directly under the header
     (client feedback: "the categories banner should stick to the top") ---------- */
.ltoolbar {
  position: sticky;
  top: calc(var(--header-h) - 1px);
  z-index: 110;
  background: var(--paper);
}
.ltoolbar__inner {
  display: flex; align-items: center; gap: 10px;
  padding-block: 10px;
}

/* Search */
.lsearch { position: relative; flex: 1 1 auto; min-width: 0; }
.lsearch svg {
  position: absolute; left: 14px; top: 50%;
  width: 18px; height: 18px; transform: translateY(-50%);
  color: var(--ink-soft); pointer-events: none;
}
.lsearch__input { min-height: 48px; padding: 10px 14px 10px 42px; }
.lsearch__input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Desktop-only controls hidden on mobile (they live in the sheet) */
.ltoolbar__pills, .ltoolbar__price, .ltoolbar__sortwrap { display: none; }

/* Mobile "Filter & sort" trigger */
.lfilter-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 48px; padding: 0 16px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--navy); background: var(--white);
  border: 1px solid var(--navy); border-radius: var(--radius);
  transition: background 0.2s var(--ease);
}
.lfilter-btn:hover { background: var(--cream-soft); }
.lfilter-btn svg { width: 17px; height: 17px; }

/* Count bubbles (filter trigger + price toggle) */
.fcount {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--raspberry); color: var(--white);
  font-size: 11px; font-weight: 700; letter-spacing: 0;
  border-radius: 999px;
}

@media (min-width: 900px) {
  .ltoolbar__inner { flex-wrap: wrap; gap: 10px 16px; padding-block: 12px; }
  .lsearch { flex: 0 1 236px; }
  .lfilter-btn { display: none; }
  .ltoolbar__pills { display: flex; flex-wrap: wrap; gap: 8px; }
  .ltoolbar__price { display: block; position: relative; }
  .ltoolbar__sortwrap { display: block; margin-left: auto; }
  .ltoolbar__select { min-height: 48px; width: 205px; padding-block: 10px; }
}

/* Minimalist toolbar controls — quiet text instead of boxed chips */
.lsearch__input {
  border: none; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent;
}
.lsearch__input:focus { box-shadow: none; border-bottom-color: var(--navy); }
.ltoolbar__pills .chip {
  border-color: transparent; background: transparent;
  min-height: 44px; padding: 8px 12px;
  font-size: 13px; color: var(--ink);
}
.ltoolbar__pills .chip:hover { border-color: transparent; color: var(--navy); }
.ltoolbar__pills .chip[aria-pressed="true"] {
  background: transparent; color: var(--navy); border-color: transparent;
  font-weight: 600;
  text-decoration: underline; text-underline-offset: 7px;
  text-decoration-thickness: 1px;
}
.ltoolbar__select { border: none; background-color: transparent; }
.ltoolbar__select:focus { box-shadow: none; }
@media (min-width: 1200px) {
  .lsearch { flex-basis: 300px; }
  .ltoolbar__inner { gap: 10px 20px; }
}

/* Price toggle + popover (desktop)
   Client feedback 2026-07-29: no button around "Price" — it reads as plain
   text with a chevron, exactly like the "Featured" sort control beside it. */
.lprice-toggle {
  gap: 8px;
  min-height: 48px; min-width: 0; padding: 10px 2px;
  border: none; background: transparent;
  color: var(--ink); font-size: 16px; font-weight: 400;
}
.lprice-toggle:hover,
.lprice-toggle[aria-expanded="true"] { border: none; background: transparent; color: var(--navy); }
.lprice-toggle .lchev { transition: transform 0.25s var(--ease); }
.lprice-toggle[aria-expanded="true"] .lchev { transform: rotate(180deg); }
.pricepop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 5;
  width: min(312px, calc(100vw - 48px)); padding: 12px 8px 6px;
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}
.pricepop__hint {
  font-size: 12px; color: var(--ink-soft);
  padding: 0 10px 8px; border-bottom: 1px solid var(--line-soft);
  margin-bottom: 4px;
}
.pricepop__foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line-soft); margin-top: 4px; padding: 2px 4px 0;
}
.pricepop__btn {
  min-height: 48px; padding: 0 12px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); border-radius: var(--radius);
  transition: color 0.2s var(--ease);
}
.pricepop__btn:hover { color: var(--navy); }
.pricepop__btn--strong { color: var(--raspberry); font-weight: 700; }
.pricepop__btn--strong:hover { color: var(--raspberry-dark); }

/* Price / sort option rows (popover + sheet) */
.prow {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 4px 10px;
  border-radius: var(--radius); cursor: pointer;
  transition: background 0.2s var(--ease);
}
.prow:hover { background: var(--cream-soft); }
.prow input[type="checkbox"], .prow input[type="radio"] {
  width: 20px; height: 20px; flex: none; accent-color: var(--raspberry);
}
.prow__label { flex: 1; font-size: 14.5px; color: var(--ink); }
.prow__n { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------- Results area ---------- */
.lresults { padding: 24px 0 clamp(64px, 9vw, 110px); }
.lmeta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin-bottom: clamp(18px, 3vw, 28px); min-height: 32px;
}
.lcount {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-soft);
}
.lchips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fchip {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 48px; padding: 0 16px;
  background: var(--cream); color: var(--navy);
  font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.fchip:hover { border-color: var(--navy); background: var(--cream-soft); }
.fchip svg { width: 13px; height: 13px; flex: none; }
.lclear { font-size: 11px; min-height: 48px; }

/* ---------- Product grid — 3 columns max for larger images (client feedback) ---------- */
.plist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 14px; }
@media (min-width: 600px) { .plist { gap: 32px 20px; } }
@media (min-width: 900px) { .plist { grid-template-columns: repeat(3, 1fr); gap: 40px 24px; } }

/* Entrance animation — applied on filter changes, skipped while typing */
.plist--anim .pcard { animation: plist-in 0.5s var(--ease) backwards; }
.plist--anim .pcard:nth-child(2) { animation-delay: 0.05s; }
.plist--anim .pcard:nth-child(3) { animation-delay: 0.1s; }
.plist--anim .pcard:nth-child(4) { animation-delay: 0.15s; }
.plist--anim .pcard:nth-child(5) { animation-delay: 0.2s; }
.plist--anim .pcard:nth-child(6) { animation-delay: 0.25s; }
.plist--anim .pcard:nth-child(n+7) { animation-delay: 0.3s; }
@keyframes plist-in {
  from { opacity: 0; transform: translateY(12px); }
}

/* ---------- Empty state ---------- */
.lempty {
  text-align: center;
  padding: clamp(48px, 8vw, 88px) 20px;
  background: var(--white);
  border: 1px dashed var(--line); border-radius: var(--radius-lg);
}
.lempty .h-serif-italic {
  display: block; font-size: clamp(24px, 4vw, 32px); color: var(--navy);
}
.lempty p:not(.h-serif-italic) { max-width: 46ch; margin: 14px auto 0; }
.lempty__wa { color: var(--raspberry); text-decoration: underline; text-underline-offset: 3px; }
.lempty__wa:hover { color: var(--raspberry-dark); }
.lempty .btn { margin-top: 28px; }

/* ---------- Filter & sort bottom sheet (mobile) ---------- */
.fsheet { position: fixed; inset: 0; z-index: 150; visibility: hidden; pointer-events: none; }
.fsheet.is-open { visibility: visible; pointer-events: auto; }
.fsheet__scrim {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.fsheet.is-open .fsheet__scrim { opacity: 1; }
.fsheet__panel {
  position: absolute; inset-inline: 0; bottom: 0;
  display: flex; flex-direction: column;
  max-height: 86svh;
  background: var(--paper);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lift);
  transform: translateY(103%);
  transition: transform 0.35s var(--ease);
}
.fsheet.is-open .fsheet__panel { transform: translateY(0); }
.fsheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px 12px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.fsheet__title { font-family: var(--font-title); font-size: 20px; font-weight: 500; color: var(--navy); }
.fsheet__body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 22px 10px; }
.fgroup { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.fgroup:last-child { border-bottom: 0; }
.fgroup__label { margin-bottom: 12px; }
.fgroup--sort { border: 0; margin: 0; padding-inline: 0; }
.fgroup--sort legend { padding: 0; }
.fgroup .prow { margin-inline: -10px; min-height: 52px; }
.fsheet__foot {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-soft);
  background: var(--paper);
}
.fsheet__clear { align-self: center; font-size: 11px; border-bottom-color: transparent; }
.fsheet__clear:hover { border-bottom-color: var(--raspberry); }
@media (min-width: 900px) { .fsheet { display: none; } }
