/* BestieClub Marketplace — shared stylesheet.
   Extends the palette already established in /bestieclub-soon.css
   (Fraunces + Manrope, violet/magenta/rose on warm ivory) with a gold
   accent reserved for the Wallet. Mobile-first: every layout below starts
   at phone width and only widens gracefully. */

:root {
  --paper:      #FFF8F9;
  --paper-warm: #FDEEF2;
  --ink:        #2C1B33;
  --ink-soft:   #7B6577;
  --line:       #F2DAE3;
  --violet:     #7B3FE4;
  --magenta:    #E5408C;
  --rose:       #F9C6D9;
  --gold:       #B4862C;
  --gold-light: #F3DFA8;
  --heart-red:  #E8384F;
  --green:      #1E9E6B;
  --white:      #FFFFFF;
  --shadow-soft: 0 18px 44px -30px rgba(124, 63, 228, .45);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Author rules that set their own `display` (.bc-btn, .bc-chip, etc.)
   otherwise win over the browser's default `[hidden]{display:none}` —
   author styles always beat UA styles regardless of selector specificity
   — silently un-hiding anything both `hidden` and one of those classes. */
[hidden] { display: none !important; }

body.bc-body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(120% 60% at 50% -10%, var(--paper-warm) 0%, var(--paper) 55%),
    var(--paper);
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.bc-serif {
  font-family: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50, "WONK" 1;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ── Top nav ─────────────────────────────────────────────────────────── */

.bc-nav {
  position: sticky;
  top: 40px; /* sits right below the shared top-header.js bar */
  z-index: 20;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.1rem;
  background: rgba(255, 248, 249, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.bc-nav__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 4px 14px -8px rgba(44, 27, 51, .3);
  flex-shrink: 0;
  text-decoration: none;
}
.bc-nav__back svg { width: 16px; height: 16px; stroke: var(--ink); }

.bc-nav__brand {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  background: linear-gradient(102deg, var(--violet), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  white-space: nowrap;
}

.bc-nav__title {
  flex: 1;
  min-width: 0;
  font-size: .98rem;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bc-nav__spacer { flex: 1; }

.bc-nav__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 4px 14px -8px rgba(44, 27, 51, .3);
  text-decoration: none;
  flex-shrink: 0;
}
.bc-nav__action svg { width: 17px; height: 17px; stroke: var(--ink); }
.bc-nav__badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--magenta);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bc-tabs {
  display: flex;
  gap: 1.3rem;
  padding: 0 1.1rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.bc-tabs a {
  padding: .8rem 0;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.bc-tabs a.is-active { color: var(--magenta); border-color: var(--magenta); }

/* ── Page shell ──────────────────────────────────────────────────────── */

.bc-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0 4rem;
}

.bc-section { padding: 1.1rem 1.1rem 0; }

/* ── Banner ──────────────────────────────────────────────────────────── */

.bc-banner {
  position: relative;
  margin: 1.1rem 1.1rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(120deg, var(--violet), var(--magenta));
  display: flex;
  align-items: flex-end;
}
.bc-banner img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.bc-banner__scrim {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1.4rem;
  background: linear-gradient(0deg, rgba(0,0,0,.42), transparent 65%);
}
.bc-banner__eyebrow {
  margin: 0 0 .2rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}
.bc-banner__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  font-weight: 500;
}

/* ── Home consolidated header — merges what used to be top-header.js's
   own separate fixed bar (account menu / brand / language) with this
   page's own search and messages/cart icons into ONE sticky row. The
   three #bctop-*-slot spans are populated by top-header.js itself the
   moment it loads (opt-in "slot" mounting — see that file's own
   comment); every other page that doesn't provide these slots keeps the
   original fixed 3-piece overlay bar completely unchanged. Sticky (not
   fixed+body-padding like the old bar), so this page needs none of that
   bar's usual top-padding compensation. */
.bc-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .5rem;
  padding: .55rem .75rem;
  background: linear-gradient(90deg, #FDF6F1, #FDEEF2 60%, #F3E7DE);
  border-bottom: 1px solid rgba(198, 155, 69, 0.25);
}
.bc-top__left,
.bc-top__right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bc-top__left { order: 1; }
.bc-top__right { order: 2; margin-left: auto; }
@media (min-width: 760px) {
  .bc-top { padding: .6rem 1.1rem; gap: .5rem .75rem; }
  .bc-top__left, .bc-top__right { gap: 8px; }
}
#bctop-account-slot,
#bctop-brand-slot,
#bctop-lang-slot,
#bctop-logout-slot {
  display: inline-flex;
  align-items: center;
}
/* Home-only: the decorative avatar+"BestieClub" brand bar is hidden
   entirely (the crown button below is the brand mark here now) — the
   #bctop-brand-slot element itself stays in the markup so top-header.js's
   own buildHeader() still detects it and mounts inline (never falling
   back to the old fixed-overlay bar); this purely hides the RESULT via
   CSS, touching neither that shared function nor any of the other 8
   pages that don't have this slot at all.
   visibility:hidden, deliberately NOT display:none — the latter would
   shrink .bc-top__left's own width (no brand content left to size
   against), which would then throw off .bc-top__search's flex
   margin:auto centering (it centers in the space AFTER left/right claim
   their own width, so a smaller left group visibly shifts the search
   bar) — visibility:hidden keeps this slot's normal box/width exactly as
   it always was, just invisible, so Search's centering is provably
   unaffected by this change. */
#bctop-brand-slot { visibility: hidden; }
/* Same account-menu button top-header.js already builds (☰ trigger +
   Logout-only dropdown, wireAuthEntry() — completely unchanged), just
   restyled here as a bigger, borderless BestieClub crown instead of the
   small circular "☰" — same crown_pro.png already used by the bottom
   nav's own Marketplace tab, for one consistent brand mark, not a new
   asset/design. Scoped to #bctop-account-slot only, so the other 8
   pages' small circular ☰ button (in the fixed .bctop-auth overlay,
   never inside this slot) is completely untouched. The "☰" text itself
   is still there for any assistive tech that reads raw textContent, just
   made invisible — the button's real accessible name is its own
   aria-label="Account" (unit already set in top-header.js), not this
   glyph. */
#bctop-account-slot .bctop-account__btn {
  width: 36px;
  height: 36px;
  border: none;
  background-color: transparent;
  background-image: url('/marketplace/assets/crown_pro.png');
  background-size: 28px 28px;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}
/* Mobile-first: search starts on its OWN full-width second row (order 3,
   basis 100% forces the wrap) — only promoted inline, center, between
   left/right at the desktop breakpoint below. */
.bc-top__search {
  order: 3;
  flex: 1 1 100%;
  min-width: 0;
}
.bc-top__search .bc-search {
  margin: 0;
  padding: .55rem .9rem;
}
@media (min-width: 760px) {
  .bc-top__search {
    order: 2;
    flex: 1 1 320px;
    max-width: 460px;
    margin: 0 auto;
  }
  .bc-top__right { order: 3; margin-left: 0; }
}

/* Messages/Cart in the new header — small rounded-RECTANGLE controls
   (not the circular .bc-nav__action icon buttons that class still is
   for the other 8 pages using .bc-nav — deliberately a separate,
   Home-only class so those pages stay completely untouched), matching
   the same premium look as the category-nav/bottom-nav buttons. */
.bc-top__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
}
.bc-top__icon svg { width: 16px; height: 16px; stroke: var(--ink); }
.bc-top__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--magenta);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Scoped to Home's slot only (never touches lib/top-header.css's shared
   .bctop-lang__btn rule, so the other 8 pages' fixed-corner language
   button keeps its existing pill shape) — same rounded-rectangle
   treatment as the two controls above, for one consistent header. */
#bctop-lang-slot .bctop-lang__btn {
  border-radius: 10px;
}

/* ── Home category navigation — Besties / BestieShop / Handmade / Курсове /
   Bestie Group. Replaces the old rotating announcement carousel entirely
   (this file no longer has any .bc-announce* rule — that carousel is
   gone, not hidden). No timer, no auto-rotation, no swipe/carousel: a
   plain click switches the active tab. Rounded RECTANGLES (moderate
   radius), deliberately not pill-shaped — same "gold = active/premium"
   language .bc-filter-btn.is-active already established, so it reads as
   the same product rather than a new one.
   5 tabs (2 of them, "BestieShop"/"Bestie Group", are long words) no
   longer fit one equal-width row on a narrow phone without either
   overflowing or shrinking the text past comfortable reading size — so on
   narrow screens the row becomes a horizontally-scrollable strip instead:
   every label keeps its full, legible size, she can swipe to see the rest,
   same pattern as any mobile chip/filter row. Desktop/tablet keeps the
   original equal-width, no-scroll row since 5 tabs fit comfortably there. */
.bc-category-nav {
  margin: 1.1rem 1.1rem 0;
  display: flex;
  gap: .5rem;
}
.bc-category-btn {
  flex: 1 1 0;
  padding: .7rem .5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink-soft);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.bc-category-btn.is-active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 120%);
  border-color: var(--gold);
  color: #fff;
}
@media (max-width: 640px) {
  .bc-category-nav {
    gap: .4rem;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bc-category-nav::-webkit-scrollbar { display: none; }
  .bc-category-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: .65rem .85rem;
    font-size: .78rem;
    white-space: nowrap;
  }
}

/* ── BestieShop gender sub-filter (Дамски/Мъжки/Детски) — a smaller sibling
   of .bc-category-btn, same rounded-rectangle + gold-active language, one
   step down in visual weight since it filters WITHIN the BestieShop tab
   rather than switching Home's main category. Дамски is pre-marked active
   in the markup (BestieShop's default). Never wraps/shrinks illegibly: at
   3 short one-word labels it always fits a single row even at 280px. */
.bc-subcategory-nav {
  margin: .9rem 1.1rem 0;
  display: flex;
  gap: .4rem;
}
.bc-subcategory-btn {
  flex: 1 1 0;
  padding: .5rem .5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink-soft);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.bc-subcategory-btn.is-active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 120%);
  border-color: var(--gold);
  color: #fff;
}
@media (max-width: 340px) {
  .bc-subcategory-nav { margin-left: .7rem; margin-right: .7rem; gap: .3rem; }
  .bc-subcategory-btn { padding: .5rem .3rem; font-size: .72rem; }
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.4rem;
  border: 0;
  border-radius: 999px;
  font-size: .93rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.bc-btn:active { transform: scale(.97); }
.bc-btn:disabled, .bc-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.bc-btn--primary {
  background: linear-gradient(102deg, var(--violet), var(--magenta));
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(229, 64, 140, .8);
}
.bc-btn--ghost {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}
.bc-btn--soft {
  background: var(--paper-warm);
  color: var(--magenta);
  border: 1px solid var(--line);
}
.bc-btn--block { width: 100%; }
.bc-btn--sm { padding: .55rem 1rem; font-size: .82rem; }

/* Wallet-only gold button, with a slow, deliberately subtle shimmer sweep —
   no blinking, no arcade glow, just a soft moving highlight. */
.bc-btn--gold {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #8A6A22, var(--gold) 45%, #D8B45E 100%);
  color: #FFF7E4;
  box-shadow: 0 14px 30px -16px rgba(180, 134, 44, .75);
}
.bc-btn--gold::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  animation: bc-shimmer 4.5s ease-in-out infinite;
}
@keyframes bc-shimmer {
  0%   { left: -60%; }
  45%  { left: 130%; }
  100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .bc-btn--gold::after { animation: none; }
}

/* ── Badges ──────────────────────────────────────────────────────────── */

.bc-badges { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.bc-badge { display: inline-block; border-radius: 4px; }

.bc-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.bc-pill--sale { background: #FDEDEF; color: var(--magenta); }
.bc-pill--sold { background: #F1EEF3; color: var(--ink-soft); }
.bc-pill--reserved { background: #FFF3E0; color: #B7791F; }
.bc-pill--gold { background: linear-gradient(135deg, var(--gold-light), #E9C572); color: #6B4F14; }
/* Owner-only — a hidden listing is unreadable by anyone else, so this
   pill only ever renders on her own product page. */
.bc-pill--hidden { background: #EDEBEF; color: var(--ink-soft); }

/* Real, server-maintained product view count (item.html) — plain small
   metadata text, not a status pill, deliberately quiet/compact. */
.bc-view-count {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .78rem;
  color: var(--ink-soft);
}

/* Product like — detail page (item.html), inline metadata style like
   .bc-view-count above rather than the card overlay treatment. Own class
   set, independent of both .bc-shop-card__like and .bc-listing-card__like
   — same --heart-red visual language, different context. */
.bc-item-like {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .78rem;
  color: var(--ink-soft);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.bc-item-like.is-static { cursor: default; }
.bc-item-like-icon {
  width: 14px; height: 14px;
  flex: none;
  fill: none;
  stroke: var(--heart-red);
  stroke-width: 4;
}
.bc-item-like.is-liked .bc-item-like-icon {
  fill: var(--heart-red);
  stroke: var(--heart-red);
}

/* Resale Waitlist / Clock — "notify me if this item is listed again",
   same quiet inline-metadata treatment as .bc-view-count/.bc-item-like
   right next to it, deliberately never a large competing CTA. Own class
   set — CHAIN-scoped, unrelated to .bc-item-like's LISTING-scoped state. */
.bc-item-waitlist {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .78rem;
  color: var(--ink-soft);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.bc-item-waitlist.is-static { cursor: default; }
.bc-item-waitlist.is-waiting { color: var(--violet); font-weight: 700; }

/* ── Identity header (profile / wardrobe) ───────────────────────────────*/

.bc-identity {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.1rem;
}
.bc-avatar {
  border-radius: 999px;
  object-fit: cover;
  background: var(--rose);
  border: 3px solid var(--white);
  box-shadow: 0 6px 18px -10px rgba(44,27,51,.4);
}
.bc-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
}
.bc-identity__name-row { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.bc-identity__name { font-size: 1.15rem; font-weight: 600; margin: 0; }
.bc-identity__meta { margin: .15rem 0 0; font-size: .85rem; color: var(--ink-soft); }
.bc-identity__bio { margin: .5rem 1.1rem 0; font-size: .92rem; color: var(--ink); }

.bc-stats { display: flex; gap: 1.4rem; padding: 0 1.1rem; margin-top: .3rem; }
.bc-stat { display: flex; flex-direction: column; }
.bc-stat__value { font-size: 1.05rem; font-weight: 700; }
.bc-stat__label { font-size: .74rem; color: var(--ink-soft); }

/* ── CTA card (wardrobe / wallet entry points on the profile) ───────────*/

.bc-cta {
  margin: 1.1rem;
  padding: 1.3rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.bc-cta__eyebrow {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 0;
}
.bc-cta__title { margin: 0; font-size: 1.15rem; font-weight: 500; }
.bc-cta__note { margin: 0; font-size: .87rem; color: var(--ink-soft); }
.bc-cta--gold { border-color: var(--gold-light); }

/* ── Grids / lists ───────────────────────────────────────────────────── */

.bc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
  padding: 1.1rem;
}
@media (min-width: 460px) {
  .bc-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Marketplace Home — shop discovery grid ─────────────────────────────
   Each card is one woman's Marketplace shop/profile — her real profile
   photo (never a separate shop image), tap anywhere → her full profile.
   Home-page-only classes; nothing else in the app references these, so
   they cannot affect any other Marketplace page. Mobile-first: 3/row,
   widening only at genuinely wider viewports so counts/name never get
   cramped on a phone. */

.bc-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  padding: 0 .65rem 1.2rem;
}
@media (min-width: 640px) {
  .bc-shop-grid { grid-template-columns: repeat(4, 1fr); gap: .65rem; }
}
@media (min-width: 900px) {
  .bc-shop-grid { grid-template-columns: repeat(5, 1fr); gap: .75rem; }
}

/* The loading skeleton is made of individual grid items (see index.html),
   so it already lays out N-per-row automatically — nothing to fix there.
   The empty/error message, though, is a single child dropped into the
   grid; without this it only fills the first column (looks like a stray
   box, not a "no results" state). Scoped to .bc-empty only when it's a
   direct child of THIS grid, so cart/item/wardrobe's own unrelated
   .bc-empty usage elsewhere is completely untouched. */
.bc-shop-grid > .bc-empty {
  grid-column: 1 / -1;
}

/* Champagne gold -> soft rose premium ring, same visual language as the
   Marketplace profile page's own --premium-border (kept as a separate
   token here since this stylesheet doesn't share profile/styles.css's
   token set) — one shared variable, not a re-invented gradient per card
   part. */
.bc-shop-card {
  --shop-premium-border: linear-gradient(155deg, var(--gold-light), var(--rose) 55%, var(--gold));
  display: block;
  position: relative;
  min-width: 0;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 1.5px;
  background-image: linear-gradient(var(--paper-warm), var(--paper-warm)), var(--shop-premium-border);
  background-origin: border-box;
  background-clip: content-box, border-box;
  box-shadow: 0 8px 20px -16px rgba(44, 27, 51, .35);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.bc-shop-card:active { transform: scale(.96); }

/* The actual navigable link — a SIBLING of .bc-shop-card__like now (see
   index.html's cardHtml() for why: a <button> can no longer end up
   nested inside this <a>, which is what let some browsers resolve a
   heart click as a navigation). Fills the card exactly as the old <a>
   itself used to. */
.bc-shop-card__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.bc-shop-card__media {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-md) - 1.5px);
  overflow: hidden;
}
.bc-shop-card__photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-shop-card__photo--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: rgba(180, 134, 44, .55);
  background: linear-gradient(150deg, var(--paper-warm) 0%, #E9F6EE 55%, var(--rose) 130%);
}

/* Readable gradient scrim ON the photo — never a separate body block
   below it — so the portrait stays full-bleed and the card height is
   exactly the 3:4 image, nothing more. */
.bc-shop-card__scrim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.1rem .5rem .4rem;
  background: linear-gradient(to top, rgba(20, 10, 18, .82) 0%, rgba(20, 10, 18, .45) 55%, transparent 100%);
}
.bc-shop-card__name {
  margin: 0;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-shop-card__meta {
  margin: 1px 0 0;
  font-size: .64rem;
  color: rgba(255, 255, 255, .82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Marketplace profile like — discreet overlay, top-right corner of the
   card photo (opposite corner from any future badge), visible over any
   photo via its own translucent-dark pill background regardless of what's
   underneath. Owner: same look, non-interactive (.is-owner, see
   index.html's click wiring — she cannot like her own shop). Positioned
   against .bc-shop-card (its own parent now, a SIBLING of
   .bc-shop-card__link, never nested inside it — see cardHtml()'s own
   comment) rather than .bc-shop-card__media as before; the two share
   almost the exact same box (.bc-shop-card__media only differs by this
   card's own 1.5px border padding), so the visual position is
   unaffected. */
.bc-shop-card__like {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px;
  border: none;
  border-radius: 999px;
  background: rgba(20, 10, 18, .55);
  color: #fff;
  font-size: .64rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform .12s ease;
}
.bc-shop-card__like:active { transform: scale(.92); }
.bc-shop-card__like.is-owner { cursor: default; }
.bc-shop-card__like.is-owner:active { transform: none; }
.bc-shop-card__like-icon {
  width: 11px; height: 11px;
  flex: none;
  fill: none;
  stroke: var(--heart-red);
  stroke-width: 4;
}
.bc-shop-card__like.is-liked .bc-shop-card__like-icon {
  fill: var(--heart-red);
  stroke: var(--heart-red);
}

/* Listing card (grid tile) */
.bc-listing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.bc-listing-card__img-wrap { position: relative; aspect-ratio: 3/4; background: var(--paper-warm); overflow: hidden; }
.bc-listing-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.bc-listing-card--sold .bc-listing-card__img-wrap img { filter: grayscale(.55); opacity: .65; }
.bc-listing-card__status {
  position: absolute; top: 8px; left: 8px;
}

/* Real view count + product like — same row as the price (not a separate
   row of its own, which would make the card taller), right side, NOT on
   the photo: no pill/background, plain readable text/icon. The row's own
   space-between (see .bc-listing-card__price-row below) is what pushes
   this to the right while the price stays left. */
.bc-listing-card__stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.bc-listing-card__views {
  display: inline-flex;
  align-items: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1;
}

/* Product/listing like — deliberately its own class set, independent of
   .bc-shop-card__like (the unrelated shop/profile like on Home), even
   though it reuses the same --heart-red visual language. .is-static =
   owner viewing her own card, or an anonymous visitor: count still
   shows, tap does nothing. */
.bc-listing-card__like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1;
  cursor: pointer;
  transition: transform .12s ease;
}
.bc-listing-card__like:active { transform: scale(.92); }
.bc-listing-card__like.is-static { cursor: default; }
.bc-listing-card__like.is-static:active { transform: none; }
.bc-listing-card__like-icon {
  width: 15px; height: 15px;
  flex: none;
  fill: none;
  stroke: var(--heart-red);
  stroke-width: 4;
}
/* Red fill reflects the PUBLIC aggregate (likeCount > 0), not whether
   this particular viewer personally liked it — .is-liked still exists
   and still drives aria-pressed / the toggle direction, untouched. */
.bc-listing-card__like.has-likes .bc-listing-card__like-icon {
  fill: var(--heart-red);
  stroke: var(--heart-red);
}
.bc-listing-card__body { padding: .6rem .65rem .75rem; display: flex; flex-direction: column; gap: .2rem; }
/* Handmade tab on Home. The grid itself is .bc-shop-grid (the Besties grid: 3 / 4 / 5 per row at the same
   breakpoints); .bc-hm-grid only stops the cards from growing huge on very wide screens. The card is the existing
   .bc-listing-card with a seller header on top (round profile photo + name -> her profile) and the product part
   below (photo, title, price, likes -> the product page). Every photo gets the same square frame. */
.bc-hm-grid { max-width: 1200px; margin-left: auto; margin-right: auto; }
.bc-hm-card { min-width: 0; }
.bc-hm-card__seller { display: flex; align-items: center; gap: .4rem; min-width: 0; padding: .4rem .5rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-size: .72rem; font-weight: 600; line-height: 1.2; }
.bc-hm-card__seller .bc-avatar { flex: none; }
.bc-hm-card__seller span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-hm-card__product { display: block; min-width: 0; text-decoration: none; color: inherit; }
.bc-hm-card .bc-listing-card__img-wrap { aspect-ratio: 1 / 1; }
.bc-hm-card .bc-listing-card__body { padding: .45rem .5rem .55rem; }
.bc-hm-card .bc-listing-card__price-row { flex-wrap: wrap; row-gap: .15rem; }
/* Course card (Home -> Курсове): the Handmade card + up to two small meta lines under the title
   ("Онлайн" / "Присъствен · град", and for an in-person course "дата · час · продължителност"). */
.bc-course-card__meta { margin: 0; font-size: .72rem; line-height: 1.3; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-course-card__when { color: var(--ink); font-weight: 600; }
/* Bestie Group tab header (Home) — the group-shopping feature, renamed from "BestieShop" in the nav (classes kept
   as bc-bs-* since this is the same feature, just relabeled): title + "Групово пазаруване" + the "joining is not
   active yet" note */
.bc-bs-head { margin: 1rem 1.1rem .8rem; }
.bc-bs-head__title { margin: 0; font-size: 1.25rem; }
.bc-bs-head__sub { margin: .1rem 0 .55rem; font-size: .85rem; color: var(--ink-soft); }
.bc-bs-note { margin: 0; padding: .55rem .75rem; border-radius: 12px; background: #FFF3E0; color: #7A5410; font-size: .78rem; line-height: 1.4; }
/* Bestie Group offer card (Home -> Bestie Group): the compact Handmade card + a "Групова оферта" badge on the photo, the group
   price next to the struck-through regular price, a thin progress bar with "13 / 20", and the time left. Same 3 / 4 / 5 grid. */
.bc-bs-card .bc-listing-card__img-wrap { position: relative; }
.bc-bs-card__badge { position: absolute; left: .3rem; top: .3rem; max-width: calc(100% - .6rem); padding: .1rem .4rem; border-radius: 999px; background: linear-gradient(135deg, var(--gold-light), #E9C572); color: #6B4F14; font-size: .58rem; font-weight: 700; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-bs-card__prices { display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; margin-top: .1rem; }
.bc-bs-card__group { font-size: .92rem; font-weight: 700; color: var(--magenta); }
.bc-bs-card__regular { font-size: .7rem; color: var(--ink-soft); text-decoration: line-through; }
.bc-bs-card__progress { display: flex; align-items: center; gap: .35rem; margin-top: .25rem; }
.bc-bs-bar { flex: 1; min-width: 0; height: 5px; border-radius: 99px; background: #EFE6EA; overflow: hidden; }
.bc-bs-bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--magenta)); }
.bc-bs-card__count { font-size: .68rem; font-weight: 700; white-space: nowrap; }
.bc-bs-card__time { min-width: 0; font-size: .66rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* BestieShop detail page + the create form's read-only product preview */
.bc-bs-price { display: grid; gap: .3rem; margin: 0 0 .9rem; }
.bc-bs-price > div { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.bc-bs-price__label { min-width: 6.4rem; font-size: .8rem; color: var(--ink-soft); }
.bc-bs-price__group { font-size: 1.4rem; font-weight: 700; color: var(--magenta); }
.bc-bs-price__regular { font-size: 1rem; color: var(--ink-soft); text-decoration: line-through; }
.bc-bs-progress { margin: 0 0 1rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.bc-bs-progress__row { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .4rem; font-size: 1rem; }
.bc-bs-progress .bc-bs-card__time { font-size: .8rem; }
.bc-bs-bar--lg { display: block; height: 9px; }
.bc-bs-progress__goal { margin: .45rem 0 0; font-size: .82rem; font-weight: 600; }
.bc-bs-source { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; padding: .6rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.bc-bs-source img, .bc-bs-source__ph { flex: none; width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: var(--paper-warm); }
.bc-bs-source__label { font-size: .72rem; color: var(--ink-soft); }
.bc-bs-source__title { font-size: .95rem; font-weight: 700; overflow-wrap: anywhere; }
.bc-bs-source__price { font-size: .85rem; color: var(--ink-soft); }
#offer-form .bc-field { min-width: 0; }
#offer-form .bc-field input { min-width: 0; max-width: 100%; box-sizing: border-box; }
/* Handmade product page: the link to its running group offer */
.bc-bs-linkrow { display: block; margin: 0 0 1rem; padding: .7rem .85rem; border: 1px solid var(--gold, #C69B45); border-radius: 14px; background: #FFF9EC; color: inherit; text-decoration: none; }
.bc-bs-linkrow__top { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; font-size: .88rem; }
.bc-bs-linkrow__go { display: block; margin-top: .25rem; font-size: .8rem; font-weight: 700; color: #6B4F14; }
/* BestieShop Phase 2: the join area */
.bc-bs-join { margin: 0 0 .9rem; }
.bc-bs-join__state { margin: 0 0 .7rem; padding: .7rem .85rem; border-radius: 14px; background: #FFF9EC; border: 1px solid var(--gold, #C69B45); font-size: .9rem; line-height: 1.4; }
.bc-bs-how { margin: .9rem 0 .8rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: .85rem; }
.bc-bs-how ul { margin: .4rem 0 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.bc-bs-delivery { margin: 0 0 .8rem; }
#bsj-mount { margin-top: .8rem; }
/* Course grid (Home -> Курсове): the same grid as Handmade but two cards per row on a phone — a course card carries two
   more text lines, so 3 per row would cut the title / date / city too short. */
.bc-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .bc-course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .bc-course-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Course create form: two short fields side by side (date + time, hours + minutes), the city picker full width */
.bc-field-row.bc-field-row--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* date / time inputs have a wide intrinsic width: let them shrink to their half of the row instead of stretching the page */
#course-form .bc-field { min-width: 0; }
#course-form .bc-field input, #course-form .bc-field select, #course-form .bc-field textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
#course-form .bc-city-picker input { width: 100%; box-sizing: border-box; }
/* Course create form: the two mode cards, the chosen-mode chip, the online note */
.bc-mode-grid { display: grid; grid-template-columns: 1fr; gap: .7rem; }
@media (min-width: 600px) { .bc-mode-grid { grid-template-columns: 1fr 1fr; } }
.bc-mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; text-align: left; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; font: inherit; color: inherit; transition: border-color .2s, box-shadow .2s; }
.bc-mode-card:hover, .bc-mode-card:focus-visible { border-color: var(--gold, #C69B45); box-shadow: 0 6px 18px -12px rgba(120, 76, 58, .5); outline: none; }
.bc-mode-card__icon { font-size: 1.5rem; line-height: 1; }
.bc-mode-card__title { font-size: 1rem; font-weight: 700; }
.bc-mode-card__hint { font-size: .8rem; color: var(--ink-soft); line-height: 1.4; }
.bc-mode-chip { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 1rem; font-size: .9rem; }
.bc-mode-chip__change { font-size: .8rem; color: var(--ink-soft); text-decoration: underline; background: none; border: 0; cursor: pointer; padding: .3rem 0; }
.bc-course-note { margin: 0 0 1rem; padding: .7rem .85rem; border-radius: 12px; background: #FFF3E0; color: #7A5410; font-size: .84rem; line-height: 1.45; }
/* Course detail: the facts list, description, seller block, the "enrollment later" note, owner actions */
.bc-course-facts { margin: 0 0 1rem; padding: 0; display: grid; gap: .1rem; }
.bc-course-fact { display: grid; grid-template-columns: minmax(7.5rem, 38%) 1fr; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.bc-course-fact dt { color: var(--ink-soft); font-size: .82rem; }
.bc-course-fact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.bc-course-description { font-size: .92rem; margin: 0 0 1.2rem; white-space: pre-line; overflow-wrap: anywhere; }
.bc-course-seller { text-decoration: none; color: inherit; display: flex; align-items: center; gap: .6rem; padding: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 1rem; }
.bc-course-soon { display: flex; gap: .5rem; align-items: flex-start; padding: .7rem .85rem; border-radius: 12px; background: #F6F1F4; color: var(--ink-soft); font-size: .84rem; line-height: 1.45; margin-bottom: 1rem; }
.bc-course-owner { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.bc-listing-card__title { font-size: .84rem; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Price stays bottom-left, views/likes bottom-right, both on the SAME
   row as each other — space-between does the split, no extra row/height. */
.bc-listing-card__price-row { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.bc-listing-card__price-group { display: flex; align-items: baseline; gap: .4rem; min-width: 0; }
.bc-listing-card__price { font-weight: 700; font-size: .92rem; }
.bc-listing-card__price--old { font-size: .78rem; color: var(--ink-soft); text-decoration: line-through; }
.bc-listing-card__price--sale { color: var(--magenta); }

/* ── Style gallery ───────────────────────────────────────────────────── */

.bc-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 1.1rem 1.1rem;
}
.bc-style-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* ── Forms ───────────────────────────────────────────────────────────── */

.bc-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.bc-field label { font-size: .82rem; font-weight: 700; color: var(--ink); }
.bc-field input, .bc-field select, .bc-field textarea {
  font: inherit;
  padding: .8rem .9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.bc-field input:focus, .bc-field select:focus, .bc-field textarea:focus {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
}
.bc-field textarea { resize: vertical; min-height: 90px; }
/* Mobile-first: one field per row (only sell.html's listing form uses
   this class — see its own comment) so category/size/color/condition/
   price/city each get their own line on a phone instead of being
   cramped two-up; widens back to a 2-up row at genuinely wider
   viewports, matching the breakpoint .bc-grid already uses above. */
.bc-field-row { display: grid; grid-template-columns: 1fr; gap: .7rem; }
@media (min-width: 460px) {
  .bc-field-row { grid-template-columns: 1fr 1fr; }
}
.bc-hint { font-size: .78rem; color: var(--ink-soft); margin: -.4rem 0 1rem; }
.bc-form-error { font-size: .82rem; font-weight: 600; color: var(--magenta); margin: -.2rem 0 1rem; }

.bc-upload-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.bc-upload-thumb { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.bc-upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bc-upload-add {
  width: 76px; height: 76px; border-radius: 12px;
  border: 1.5px dashed var(--rose);
  background: var(--paper-warm);
  display: flex; align-items: center; justify-content: center;
  color: var(--magenta); font-size: 1.4rem; cursor: pointer;
}

/* ── Steps (identity verification / Seller Access / sell flow) ────────── */

.bc-step {
  margin: 0 1.1rem 1rem;
  padding: 1.1rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
}
.bc-step--done { opacity: .6; }
.bc-step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--paper-warm); color: var(--magenta);
  font-size: .78rem; font-weight: 700; margin-bottom: .5rem;
}
.bc-step--done .bc-step__num { background: #E7F6EF; color: var(--green); }
.bc-step__title { margin: 0 0 .3rem; font-size: 1.02rem; font-weight: 600; }
.bc-step__note { margin: 0 0 .8rem; font-size: .87rem; color: var(--ink-soft); }

/* Order row thumbnail (orders.html — "Моите покупки") — tappable link to
   the listing, sibling to (never wrapping) the row's own action buttons. */
.bc-step__row { display: flex; gap: .7rem; align-items: flex-start; text-decoration: none; color: inherit; }
.bc-step__thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--paper-warm); }
.bc-step__body { flex: 1; min-width: 0; }

/* ── Wallet stat tiles ───────────────────────────────────────────────── */

.bc-wallet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; padding: 1.1rem; }
.bc-wallet-tile {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--line);
}
.bc-wallet-tile__label { font-size: .74rem; color: var(--ink-soft); margin: 0 0 .3rem; }
.bc-wallet-tile__value { font-size: 1.25rem; font-weight: 700; margin: 0; }
.bc-wallet-tile--gold { background: linear-gradient(160deg, #FFF9EC, #FDF1D6); border-color: var(--gold-light); }

/* ── Empty / loading states ──────────────────────────────────────────── */

.bc-empty {
  margin: 1.1rem;
  padding: 2.4rem 1.3rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: .92rem;
}
.bc-empty__icon { font-size: 2rem; margin-bottom: .6rem; }

.bc-skeleton {
  background: linear-gradient(100deg, var(--paper-warm) 30%, #fff 50%, var(--paper-warm) 70%);
  background-size: 200% 100%;
  animation: bc-sk 1.3s ease-in-out infinite;
  border-radius: var(--radius-md);
}
@keyframes bc-sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .bc-skeleton { animation: none; } }

/* ── Gate (open-in-app prompt) ──────────────────────────────────────── */

.bc-gate {
  margin: 1.1rem;
  padding: 1.3rem;
  border-radius: var(--radius-lg);
  background: var(--paper-warm);
  border: 1px dashed var(--rose);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
}
.bc-gate__msg { margin: 0; font-size: .92rem; color: var(--ink); }

/* ── Toast ──────────────────────────────────────────────────────────── */

.bc-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 999px;
  font-size: .85rem;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.4);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.bc-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ── Filter bar / sheet ──────────────────────────────────────────────── */

.bc-search {
  margin: 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
}
.bc-search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; }
.bc-search svg { width: 17px; height: 17px; stroke: var(--ink-soft); flex-shrink: 0; }

/* ── Home — single compact "Филтър" entry point ─────────────────────────
   Replaces the always-visible sort/filter chip row: one button, opens a
   bottom sheet with the actual choices (see .bc-sheet below). Home itself
   stays visually clean — nothing here changes what's fetched or how the
   default ranking works, only which already-fetched shops array gets
   re-sorted client-side (see index.html's applySort()). */
.bc-filter-row {
  margin: .9rem 1.1rem 1.1rem;
  display: flex;
}
.bc-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .95rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
}
.bc-filter-btn svg { width: 15px; height: 15px; stroke: var(--ink-soft); flex-shrink: 0; }
.bc-filter-btn.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.bc-filter-btn.is-active svg { stroke: #fff; }

/* ── Compact bottom sheet — shared shell (filter today; general enough to
   reuse for any future Home sheet). Sits above BOTH fixed chrome bars
   (.bctop-bar z-index 1001, .bcnav-bar z-index 1000), same reasoning/
   z-index as the Marketplace profile page's own showcase-picker-overlay. */
.bc-sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(44, 27, 51, .4);
  z-index: 1199;
  display: none;
}
.bc-sheet-backdrop.is-open { display: block; }
.bc-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-height: 82vh;
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  padding: .7rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom));
  z-index: 1200;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2, .7, .3, 1);
  overflow-y: auto;
  box-sizing: border-box;
  max-width: 100%;
}
.bc-sheet.is-open { transform: translateY(0); }
.bc-sheet__handle { width: 36px; height: 4px; border-radius: 999px; background: var(--line); margin: 0 auto .9rem; }
.bc-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .3rem;
}
.bc-sheet__title { margin: 0; font-size: 1.05rem; font-weight: 600; }
.bc-sheet__close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink-soft);
}
.bc-sheet__close:active { background: var(--paper-warm); }

.bc-sort-options { list-style: none; margin: .5rem 0 0; padding: 0; }
.bc-sort-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem .2rem;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.bc-sort-options li:last-child .bc-sort-option { border-bottom: none; }
.bc-sort-option::after {
  content: "";
  width: 18px; height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line);
}
.bc-sort-option.is-selected { color: var(--gold); }
.bc-sort-option.is-selected::after {
  border-color: var(--gold);
  background: var(--gold) radial-gradient(circle, #fff 0 3px, transparent 4px);
}

.bc-sheet__foot {
  display: flex;
  gap: .6rem;
  margin-top: 1rem;
}

/* ── Cart ────────────────────────────────────────────────────────────── */

.bc-cart-group { margin: 0 1.1rem 1.2rem; }
.bc-cart-group__seller {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem .2rem; font-size: .88rem; font-weight: 700;
}
.bc-cart-item {
  display: flex; gap: .7rem; align-items: center;
  padding: .7rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: .5rem;
}
.bc-cart-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.bc-cart-item__body { flex: 1; min-width: 0; }
.bc-cart-item__title { font-size: .87rem; font-weight: 600; margin: 0 0 .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-cart-item__price { font-size: .85rem; font-weight: 700; }
.bc-cart-item__remove { background: none; border: 0; color: var(--ink-soft); font-size: .78rem; cursor: pointer; text-decoration: underline; padding: 0; }

.bc-summary-row { display: flex; justify-content: space-between; font-size: .88rem; padding: .3rem 0; }
.bc-summary-row--total { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .7rem; }

.bc-payment-option {
  display: flex; align-items: center; gap: .7rem;
  padding: .9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--white);
  margin-bottom: .6rem;
}
.bc-payment-option[aria-disabled="true"] { opacity: .55; }
.bc-payment-option__note { font-size: .74rem; color: var(--ink-soft); margin-top: 2px; }

/* Card payment (Stripe Connect Direct Charges, cart.html) — the Payment
   Element renders its own iframe UI; this just gives it the same spacing
   rhythm as the rest of the checkout panel. */
.card-payment-panel { margin-top: .6rem; }
.card-payment-mount { min-height: 40px; }

/* ── Courier (Econt) point picker — cart.html ───────────────────────── */
.courier-results-list {
  max-height: 190px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-top: .4rem; background: var(--white);
}
.courier-result-item {
  display: block; width: 100%; text-align: left;
  padding: .55rem .7rem; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; font: inherit; color: var(--ink); cursor: pointer;
}
.courier-result-item:last-child { border-bottom: 0; }
.courier-result-item:hover { background: var(--paper-warm); }
.courier-result-item.is-selected { background: var(--rose); font-weight: 700; }
.courier-result-item__type { font-size: .74rem; color: var(--ink-soft); margin-left: .4rem; }
.courier-selected-summary { font-weight: 600; color: var(--ink); }

/* ── Messages ────────────────────────────────────────────────────────── */

.bc-conv-row {
  display: flex; gap: .7rem; align-items: center;
  padding: .8rem 1.1rem;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--line);
}
.bc-conv-row__body { flex: 1; min-width: 0; }
.bc-conv-row__name { font-weight: 600; font-size: .93rem; margin: 0; }
.bc-conv-row__preview { font-size: .82rem; color: var(--ink-soft); margin: .1rem 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-conv-row__time { font-size: .72rem; color: var(--ink-soft); flex-shrink: 0; }

.bc-listing-context {
  display: flex; gap: .6rem; align-items: center;
  margin: .8rem 1.1rem;
  padding: .6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.bc-listing-context img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }

.bc-chat-log { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem; }
.bc-bubble { max-width: 78%; padding: .6rem .85rem; border-radius: 16px; font-size: .88rem; }
.bc-bubble--me { align-self: flex-end; background: linear-gradient(102deg, var(--violet), var(--magenta)); color: #fff; border-bottom-right-radius: 4px; }
.bc-bubble--them { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }

.bc-composer {
  position: sticky; bottom: 0;
  display: flex; gap: .5rem; align-items: center;
  padding: .8rem 1.1rem calc(.8rem + env(safe-area-inset-bottom));
  background: rgba(255,248,249,.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.bc-composer input { flex: 1; padding: .8rem 1rem; border-radius: 999px; border: 1px solid var(--line); font: inherit; }
.bc-composer button {
  width: 40px; height: 40px; border-radius: 999px; border: 0; flex-shrink: 0;
  background: linear-gradient(102deg, var(--violet), var(--magenta)); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ── Report link ─────────────────────────────────────────────────────── */

.bc-report-link {
  display: inline-block;
  margin: 0 1.1rem 1.5rem;
  font-size: .8rem;
  color: var(--ink-soft);
  text-decoration: underline;
  background: none; border: 0; cursor: pointer; padding: 0;
}

/* ── Finance & Payments info page ───────────────────────────────────── */

.bc-info-lede {
  margin: 1.1rem 1.1rem 0;
  font-size: .92rem;
  color: var(--ink-soft);
}

.bc-info-list {
  margin: .6rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.bc-info-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: .9rem;
  color: var(--ink);
}
.bc-info-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--gold);
}

.bc-info-warning {
  margin: .8rem 0 0;
  padding: .7rem .85rem;
  border-radius: var(--radius-sm);
  background: #FFF3E0;
  color: #6B4F14;
  font-size: .85rem;
  font-weight: 600;
}

.bc-info-formula {
  margin: .8rem 0 0;
  padding: .9rem 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, #FFF9EC, #FDF1D6);
  border: 1px solid var(--gold-light);
  font-size: .88rem;
}
.bc-info-formula__row {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .25rem 0;
}
.bc-info-formula__row--result {
  border-top: 1px solid var(--gold-light);
  margin-top: .25rem;
  padding-top: .5rem;
  font-weight: 700;
  color: #6B4F14;
}

.bc-confirm-card {
  margin: 1.1rem;
  padding: 1.1rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--gold-light);
  box-shadow: var(--shadow-soft);
}
.bc-confirm-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
}
.bc-confirm-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--gold);
  margin-top: .1rem;
}
.bc-confirm-row span {
  font-size: .9rem;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
