/* ═══════════════════════════════════════════════════════════════════════════
   estate.css — shared across all nine shops. Loaded BEFORE each shop's own
   storefront.css, so a tenant layer (rapclub's atelier rules, for one) always
   wins. Everything here is token-driven: --ds-* comes from the shop's theme
   and its own colours, so the same rules read as navy-and-gold on rapclub and
   as a dairy's blue on kbk without a single hard-coded colour.

   Two things live here:
     1. CAMPAIGNS — the bands an owner places from Store Settings: a story
        block, a brand statement, a promise stripe, or a slideshow; in the hero
        slot at the top of the shop or after the Nth product.
     2. A quiet polish for the grocery shops: rhythm, rules and hover states
        that make a listing feel like a store without touching its layout.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CAMPAIGN BANDS ─────────────────────────────────────────────────────── */
.cat-band{
  grid-column:1/-1;position:relative;overflow:hidden;
  display:grid;grid-template-columns:1fr;align-items:center;
  margin:16px 0;padding:44px 28px;border-radius:var(--ds-radius-lg,20px);
  background:var(--ds-surface-2,#f1f5f9);color:var(--ds-text,#101a26);
  box-shadow:var(--ds-e1,none);
}
.cat-band.has-media{grid-template-columns:minmax(0,5fr) minmax(0,7fr);padding:0;min-height:320px}
.cat-band-media{align-self:stretch;min-height:240px;background:var(--ds-surface-2,#eef2f7) center/cover no-repeat}
.cat-band.has-media .cat-band-text{padding:36px 32px}
.cat-band-text{position:relative;z-index:1;min-width:0}
/* Tones: the three names the settings screen offers, mapped onto the shop's
   own palette. A tenant stylesheet may repaint them (rapclub does). */
.cat-band.tone-navy{background:var(--ds-hero,var(--ds-primary,#1b8a5a));color:var(--ds-on-primary,#fff)}
.cat-band.tone-ivory{background:var(--ds-surface-2,#f1f5f9);color:var(--ds-text,#101a26)}
.cat-band.tone-gold{background:var(--ds-accent,#ff6b2c);color:#fff}
.cat-band-eyebrow{font-size:11px;letter-spacing:.2em;text-transform:uppercase;font-weight:700;opacity:.85;margin-bottom:12px}
.cat-band-title{
  font-family:var(--ds-font-display,inherit);font-weight:800;letter-spacing:-.01em;
  font-size:clamp(24px,4vw,40px);line-height:1.08;margin:0;max-width:20ch;
}
.cat-band-sub{margin:12px 0 0;font-size:15px;line-height:1.5;max-width:52ch;opacity:.92}
.cat-band-cta{
  margin-top:22px;display:inline-flex;align-items:center;gap:8px;cursor:pointer;
  padding:12px 20px;border-radius:var(--ds-radius-pill,999px);font:inherit;font-weight:700;font-size:13.5px;
  background:#fff;color:var(--ds-primary,#111);border:1px solid rgba(255,255,255,.6);
  box-shadow:var(--ds-e2,0 6px 18px rgba(0,0,0,.12));transition:transform .15s ease;
}
.cat-band-cta:hover{transform:translateY(-1px)}
.cat-band.tone-ivory .cat-band-cta{background:var(--ds-chip-on,var(--ds-primary,#111));color:var(--ds-on-primary,#fff);border-color:transparent}
.cat-band--quote{text-align:center}
.cat-band--quote .cat-band-title{font-weight:600;font-style:italic;max-width:28ch;margin:0 auto}
.cat-band--quote .cat-band-sub,.cat-band--quote .cat-band-cta{margin-left:auto;margin-right:auto}
.cat-band--stripe{
  padding:16px 20px;text-align:center;background:var(--ds-surface,#fff);color:var(--ds-text,#101a26);
  border:1px solid var(--ds-border,#e7ecf2);box-shadow:none;
}
.cat-band--stripe .cat-band-eyebrow{display:none}
.cat-band--stripe .cat-band-title{font-family:inherit;font-size:12.5px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;max-width:none;margin:0 auto}
.cat-band--stripe .cat-band-sub{font-size:13px;margin:6px auto 0}

/* ── SLIDESHOW ──────────────────────────────────────────────────────────── */
.cat-band--slideshow{
  padding:0;display:block;min-height:clamp(240px,42vw,480px);
  background:var(--ds-surface-2,#eef2f7);color:#fff;
}
.cb-slide{
  position:absolute;inset:0;display:flex;align-items:flex-end;
  background:var(--ds-hero,var(--ds-primary,#1b8a5a)) center/cover no-repeat;
  opacity:0;transition:opacity .7s ease;pointer-events:none;
}
.cb-slide.on{opacity:1;pointer-events:auto}
/* A scrim so type reads on any photograph; lighter when there is none. */
.cb-slide.has-media::before{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,0) 30%,rgba(0,0,0,.62) 100%),linear-gradient(90deg,rgba(0,0,0,.35),rgba(0,0,0,0) 60%);
}
.cb-text{position:relative;z-index:1;padding:36px 32px;max-width:60ch}
.cb-slide .cat-band-title{text-shadow:0 2px 14px rgba(0,0,0,.25)}
.cb-slide .cat-band-cta{background:#fff;color:var(--ds-primary,#111)}
.cb-nav{
  position:absolute;top:50%;transform:translateY(-50%);z-index:2;
  width:42px;height:42px;border-radius:50%;border:0;cursor:pointer;
  background:rgba(255,255,255,.85);color:#111;font-size:26px;line-height:1;
  display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s ease;
}
.cb-prev{left:14px}.cb-next{right:14px}
.cat-band--slideshow:hover .cb-nav,.cat-band--slideshow:focus-within .cb-nav{opacity:1}
@media(hover:none){.cb-nav{display:none}}
.cb-dots{position:absolute;left:0;right:0;bottom:14px;z-index:2;display:flex;justify-content:center;gap:6px}
.cb-dot{width:7px;height:7px;border-radius:999px;border:0;padding:0;cursor:pointer;background:rgba(255,255,255,.55);transition:width .25s ease,background .25s ease}
.cb-dot.on{width:22px;background:#fff}
@media(prefers-reduced-motion:reduce){.cb-slide{transition:none}}

/* The hero slot: full width of the content column, above the catalogue. */
.hero-campaign{margin:14px 12px 0}
.hero-campaign .cat-band{margin:0 0 12px}
.hero-campaign .cat-band--slideshow{min-height:clamp(260px,46vw,520px)}
@media(min-width:768px){.hero-campaign{margin:16px 24px 0;max-width:1200px;margin-left:auto;margin-right:auto}}

@media(max-width:767px){
  .cat-band{padding:32px 20px;margin:10px 0}
  .cat-band.has-media{grid-template-columns:1fr}
  .cat-band.has-media .cat-band-text{padding:24px 20px 30px}
  .cb-text{padding:24px 20px 40px}
  .cat-band-title{font-size:clamp(22px,6.4vw,32px)}
}

/* ── THE QUIET POLISH (grocery themes only; atelier has its own voice) ───── */
[data-theme="lumen"] .card,[data-theme="crisp"] .card,[data-theme="feather"] .card{
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
[data-theme="lumen"] .card:hover,[data-theme="crisp"] .card:hover,[data-theme="feather"] .card:hover{
  border-color:var(--ds-border,#e7ecf2);
}
[data-theme="lumen"] .p-name,[data-theme="crisp"] .p-name,[data-theme="feather"] .p-name{letter-spacing:-.005em}
[data-theme="lumen"] .hero-band h1,[data-theme="crisp"] .hero-band h1,[data-theme="feather"] .hero-band h1{letter-spacing:-.02em}
[data-theme="lumen"] .cs-head,[data-theme="crisp"] .cs-head,[data-theme="feather"] .cs-head,
[data-theme="lumen"] .ldg-section-label,[data-theme="crisp"] .ldg-section-label,[data-theme="feather"] .ldg-section-label{
  letter-spacing:.14em;text-transform:uppercase;font-size:11.5px;font-weight:700;color:var(--ds-muted,#5b6b7c);
}

/* ── FLOATING SEARCH ────────────────────────────────────────────────────── */
/* The magnifier floats bottom-left; the WhatsApp button owns bottom-right and
   the cart bar the bottom centre. Tap: a bottom sheet on a phone, a centred
   palette on a desktop. Once it has mounted, the header box steps back. */
body.xl-has-sfab .hdr-search{display:none}
.xl-sfab{
  position:fixed;left:16px;bottom:84px;z-index:1200;
  display:inline-flex;align-items:center;gap:8px;height:48px;padding:0 16px 0 13px;
  border:0;border-radius:999px;cursor:pointer;font:inherit;font-weight:700;font-size:14px;
  background:var(--ds-chip-on,var(--ds-primary,#1b8a5a));color:var(--ds-on-primary,#fff);
  box-shadow:var(--ds-e3,0 12px 32px rgba(0,0,0,.22));transition:transform .15s ease,box-shadow .15s ease;
}
.xl-sfab:hover{transform:translateY(-1px)}
.xl-sfab:active{transform:scale(.97)}
@media(min-width:768px){.xl-sfab{bottom:24px;left:24px}}
body.xl-search-open .xl-sfab{opacity:0;pointer-events:none}
.xl-search[hidden]{display:none}
.xl-search{position:fixed;inset:0;z-index:1300}
.xls-backdrop{position:absolute;inset:0;background:rgba(10,14,24,.45);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.xls-panel{
  position:absolute;left:0;right:0;bottom:0;max-height:88vh;display:flex;flex-direction:column;
  background:var(--ds-surface,#fff);color:var(--ds-text,#101a26);
  border-radius:var(--ds-radius-lg,22px) var(--ds-radius-lg,22px) 0 0;box-shadow:var(--ds-e3,0 -12px 40px rgba(0,0,0,.25));
  animation:xlsUp .22s ease-out;
}
@keyframes xlsUp{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
@media(min-width:768px){
  .xls-panel{left:50%;right:auto;top:10vh;bottom:auto;width:min(680px,92vw);max-height:76vh;transform:translateX(-50%);border-radius:var(--ds-radius-lg,22px);animation:xlsIn .18s ease-out}
  @keyframes xlsIn{from{transform:translateX(-50%) translateY(-10px);opacity:.6}to{transform:translateX(-50%);opacity:1}}
}
@media(prefers-reduced-motion:reduce){.xls-panel{animation:none}}
.xls-form{display:flex;align-items:center;gap:8px;padding:14px 14px 10px;border-bottom:1px solid var(--ds-border,#e7ecf2)}
.xls-ico{flex:none;color:var(--ds-muted,#5b6b7c)}
#xlSearchInput{
  flex:1;min-width:0;height:48px;padding:0 12px;border:0;outline:0;background:transparent;
  font:inherit;font-size:18px;color:inherit;
}
#xlSearchInput::-webkit-search-cancel-button{display:none}
.xls-clear{flex:none;width:34px;height:34px;border:0;border-radius:50%;background:var(--ds-surface-2,#f1f5f9);color:var(--ds-muted,#5b6b7c);font-size:20px;line-height:1;cursor:pointer}
.xls-close{flex:none;height:36px;padding:0 12px;border:1px solid var(--ds-border,#e7ecf2);border-radius:999px;background:transparent;color:inherit;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.xls-body{overflow-y:auto;padding:12px 14px 18px;-webkit-overflow-scrolling:touch}
.xls-label{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:var(--ds-muted,#5b6b7c);margin:6px 2px 8px}
.xls-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.xls-chip{
  height:36px;padding:0 13px;border-radius:999px;border:1px solid var(--ds-border,#e7ecf2);
  background:var(--ds-surface,#fff);color:inherit;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;
}
.xls-chip:hover{border-color:var(--ds-primary,#1b8a5a);color:var(--ds-primary,#1b8a5a)}
.xls-chip--cat span{margin-left:6px;font-weight:400;color:var(--ds-muted,#5b6b7c)}
.xls-hint{font-size:13px;color:var(--ds-muted,#5b6b7c);margin-top:4px}
.xls-hint kbd{font:inherit;font-size:12px;padding:1px 6px;border:1px solid var(--ds-border,#e7ecf2);border-radius:5px;background:var(--ds-surface-2,#f1f5f9)}
.xls-list{display:flex;flex-direction:column;gap:4px}
.xls-item{
  display:flex;align-items:center;gap:12px;padding:8px;border-radius:var(--ds-radius,14px);cursor:pointer;
  border:1px solid transparent;transition:background .12s ease;
}
.xls-item:hover,.xls-item.sel{background:var(--ds-surface-2,#f1f5f9);border-color:var(--ds-border,#e7ecf2)}
.xls-thumb{flex:none;width:52px;height:52px;border-radius:10px;object-fit:cover;background:var(--ds-surface-2,#f1f5f9)}
.xls-main{flex:1;min-width:0}
.xls-name{font-weight:700;font-size:15px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xls-meta{font-size:12.5px;color:var(--ds-muted,#5b6b7c);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xls-meta s{opacity:.7;margin-left:2px}
.xls-add{
  flex:none;height:36px;padding:0 16px;border:0;border-radius:999px;cursor:pointer;
  background:var(--ds-chip-on,var(--ds-primary,#1b8a5a));color:var(--ds-on-primary,#fff);font:inherit;font-size:13px;font-weight:700;
}
.xls-go{flex:none;font-size:13px;font-weight:700;color:var(--ds-primary,#1b8a5a)}
.xls-oos{flex:none;font-size:12px;font-weight:700;color:var(--ds-muted,#5b6b7c)}
.xls-all{
  display:block;width:100%;margin-top:12px;height:46px;border:1px solid var(--ds-border,#e7ecf2);border-radius:var(--ds-radius,14px);
  background:transparent;color:var(--ds-primary,#1b8a5a);font:inherit;font-weight:700;font-size:14px;cursor:pointer;
}
.xls-all:hover{background:var(--ds-surface-2,#f1f5f9)}
.xls-empty{text-align:center;padding:28px 10px}
.xls-empty-t{font-weight:700;font-size:16px}
.xls-empty-s{font-size:13.5px;color:var(--ds-muted,#5b6b7c);margin-top:6px}

/* ══ BRAND ══════════════════════════════════════════════════════════
   The line above a product's name, which is how every grocery and
   fashion site a shopper already uses presents it: small, uppercase,
   muted, and ABOVE the name rather than beside it. It reads as a
   provenance mark, not as part of the title, and it is the fastest
   thing on the card to scan down a column of.
   ⚠ No horizontal padding: it sits as a sibling of .p-name, which has
   none either — the card supplies it. */
.p-brand{font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;
  color:var(--ds-muted,#6b7280);margin:6px 0 -2px;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card--ed .p-brand,.ed-body .p-brand{margin:0 0 3px}
/* The detail page's brand line is styled in product.js instead: that page
   loads storefront.css and product.css, never this sheet. */
/* Past ten brands the chips become one select — see renderFilterBar. */
.flt-brand-sel{padding:7px 12px;border-radius:99px;border:1.5px solid var(--ds-border,#ddd);
  background:#fff;font-size:13px;max-width:200px;color:inherit}

/* A brand chip carrying its logo. Fixed height, contain, never crop: a
   brand supplies whatever aspect ratio it has and a squashed mark looks
   worse than no mark at all. */
.flt-chip-logo{padding:5px 12px;display:inline-flex;align-items:center;min-height:34px}
.flt-chip-logo .flt-logo{height:20px;max-width:86px;object-fit:contain;display:block}
.flt-chip-logo.on .flt-logo{filter:brightness(0) invert(1)}
