/* ============================================================
   LinkBrave — Social Commerce Storefront
   Design system v1.0
   ============================================================ */
:root {
  /* Pluto theme v2: refined burgundy + light beige (premium deep red) */
  --brand: #7C2626;        /* burgundy */
  --brand-2: #A0433F;      /* muted brick (gradient start) */
  --brand-dark: #521416;   /* oxblood */
  --brand-soft: #F3E6E0;   /* soft wine-cream tint */
  --ink: #2A2320;          /* warm near-black */
  --muted: #7A6A5E;
  --faint: #A69684;
  --bg: #F7F1E6;           /* light beige */
  --card: #FFFFFF;
  --line: #EAE2D2;
  --green: #16A34A;
  --star: #F5A623;
  --danger: #DC2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(43, 17, 20, .07);
  --shadow-lg: 0 14px 44px rgba(43, 17, 20, .13);
  --grad: linear-gradient(135deg, #A0433F 0%, #7C2626 55%, #521416 100%);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; max-width: 100vw; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 15px; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 24px; }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--grad);
  color: #fff; font-size: 13px; font-weight: 600;
  text-align: center; padding: 8px 16px; letter-spacing: .2px;
}

/* ---------- Header ---------- */
#site-header { position: sticky; top: 0; z-index: 100; }
.header {
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -.3px; flex-shrink: 0; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--grad);
  color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(155,37,36,.4);
}
.logo-name span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--muted);
  transition: all .18s;
}
.nav a:hover { color: var(--ink); background: var(--brand-soft); }
.nav a.active { color: var(--brand); background: var(--brand-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.search-box { position: relative; flex: 0 1 260px; }
.search-box input {
  width: 100%; padding: 9px 14px 9px 38px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg); font-size: 14px; outline: none;
  transition: border .18s, box-shadow .18s;
}
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(155,37,36,.18); }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; color: var(--ink); transition: background .18s;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.cart-badge {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(155,37,36,.55);
}
.menu-btn { display: none; }

/* Mobile nav */
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; padding: 10px 16px 16px; }
.mobile-nav a { display: block; padding: 11px 12px; font-weight: 600; color: var(--ink); border-radius: 10px; }
.mobile-nav a.active { color: var(--brand); background: var(--brand-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: all .18s; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(155,37,36,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(155,37,36,.5); }
.btn-outline { border: 2px solid var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { border: 1.5px solid var(--line); color: var(--muted); background: #fff; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(228, 210, 172, .5), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(155, 37, 36, .16), transparent 60%),
    linear-gradient(180deg, #FCF8EE 0%, var(--bg) 100%);
  padding: 46px 0 38px; overflow: hidden;
}
@media (min-width: 861px) {
  .post-imgs.n1 img { max-height: 260px; }
  .post { padding: 16px 20px; margin-bottom: 16px; }
  .post-text { font-size: 15px; }
}

/* ---- desktop polish (end of file: wins the cascade over mobile-scoped bases) ---- */
@media (min-width: 861px) {
  .topbar .topbar-logo { display: none; }
  .topbar { padding: 8px 24px; }
  .topbar .t-chip { padding: 7px 14px; font-size: 13px; }
}
/* hero: text left, Emma chat card right (single row, chat follows text height) */
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; column-gap: 56px;
  grid-template-areas: "top visual"; align-items: center;
}
.hero-top { grid-area: top; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--brand);
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.emma-expand {
  margin-left: auto; align-self: flex-start; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff; font-size: 13px; line-height: 1;
  display: grid; place-items: center; flex-shrink: 0;
}
.emma-expand:hover { background: rgba(255,255,255,.35); }
.hero h1 { font-family: var(--font-display); font-size: 44px; line-height: 1.06; letter-spacing: -0.3px; font-weight: 700; white-space: nowrap; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 15.5px; color: var(--muted); margin: 10px 0 16px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 40px; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.hero-stats b { display: block; font-size: 26px; letter-spacing: -.5px; }
.hero-stats span { font-size: 13px; color: var(--muted); font-weight: 600; }
.hero-visual { grid-area: visual; position: relative; align-self: stretch; }
.hero-pluto {
  position: absolute; top: -36px; left: -40px; width: 176px; height: 176px; z-index: 3;
  pointer-events: none; filter: drop-shadow(0 14px 24px rgba(60,30,20,.38));
  animation: plutoFloat 6.5s ease-in-out infinite;
}
@keyframes plutoFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-9px) rotate(1.5deg); } }
@media (max-width: 860px) { .hero-pluto { width: 96px; height: 96px; top: -20px; left: -6px; } }
.hero-visual .photo {
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg);
  height: 100%; min-height: 440px; background: linear-gradient(135deg, #F4EDDD, #E3D3B4);
}
.hero-visual .photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-card {
  position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 700;
}
.hero-card .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.hero-card small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.hero-card.c1 { left: -18px; bottom: 34px; }
.hero-card.c2 { right: -14px; top: 26px; }

/* real-rooms ribbon inside the hero (visual proof of the community story) */
.rooms-ribbon { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.rooms-ribbon .rr-strip { display: flex; overflow: hidden; flex: 0 1 auto; min-width: 0; }
.rooms-ribbon .rr-strip img {
  width: 62px; height: 62px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
  border: 2.5px solid #fff; box-shadow: var(--shadow); margin-right: -12px;
  transition: transform .2s;
}
.rooms-ribbon .rr-strip img:hover { transform: translateY(-5px) scale(1.06); z-index: 2; }
.rooms-ribbon .rr-cap { font-size: 12px; color: var(--muted); font-weight: 700; line-height: 1.35; flex-shrink: 0; }
.rooms-ribbon .rr-cap b { display: block; color: var(--ink); font-size: 13px; }
@media (max-width: 860px) {
  .rooms-ribbon .rr-strip img { width: 52px; height: 52px; border-radius: 12px; }
}

/* ---------- Sections ---------- */
.section { padding: 54px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-family: var(--font-display); font-size: 34px; letter-spacing: -.3px; font-weight: 700; }
.section-head .sub { color: var(--muted); margin-top: 4px; font-size: 14.5px; }
.link-more { font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }
.link-more:hover { gap: 10px; }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat-tile {
  background: var(--card); border-radius: var(--radius); padding: 18px 14px; text-align: center;
  border: 1.5px solid transparent; transition: all .2s; box-shadow: var(--shadow);
}
.cat-tile:hover { border-color: var(--brand); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-tile .emoji {
  width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 16px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 26px;
}
.cat-tile b { font-size: 15.5px; display: block; }
.cat-tile span { font-size: 13px; color: var(--muted); }

/* ---------- Product cards ---------- */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.p-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: all .22s; display: flex; flex-direction: column; border: 1.5px solid transparent;
}
.p-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(255,107,53,.45); }
.p-media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #F1EADA; }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.p-card:hover .p-media img { transform: scale(1.06); }
.badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; }
.badge {
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .4px; color: #fff;
  width: max-content;
}
.badge.sale { background: var(--brand); }
.badge.new { background: #2C2118; }
.badge.best { background: var(--green); }
.quick-add {
  position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 11px; border-radius: 12px;
  background: rgba(44,33,24,.92); color: #fff; font-weight: 700; font-size: 14px;
  opacity: 0; transform: translateY(8px); transition: all .22s; backdrop-filter: blur(4px);
}
.p-card:hover .quick-add, .p-card.tapped .quick-add { opacity: 1; transform: none; }
.p-card:hover .quick-add { opacity: 1; transform: translateY(0); }
.quick-add:hover { background: var(--brand); }
.p-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.p-cat { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .8px; }
.p-name { font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.p-name:hover { color: var(--brand); }
.stars { color: var(--star); font-size: 13px; letter-spacing: 1.5px; display: inline-block; }
.stars small { color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 5px; }
.p-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; }
.p-price b { font-size: 18px; letter-spacing: -.3px; }
.p-price s { color: var(--faint); font-size: 13.5px; }
.p-price .off { color: var(--brand); font-size: 12.5px; font-weight: 800; }

/* ---------- Value props ---------- */
.values { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 46px 0; }
.value { display: flex; gap: 14px; align-items: flex-start; }
.value .ico {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 22px;
}
.value b { font-size: 15px; display: block; }
.value span { font-size: 13.5px; color: var(--muted); }

/* ---------- Community strip (home) ---------- */
/* homepage: mobile drops the standard header for the sticky filter topbar; desktop keeps both */
@media (max-width: 860px) {
  body[data-page="community"] #site-header { display: none; }
}
.topbar {
  position: sticky; top: 0; z-index: 120;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 6px 12px;
}
@media (min-width: 861px) {
  .topbar { top: 56px; } /* sticks under the restored desktop header */
}
.topbar-logo {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.topbar .topic-chips { flex: 1; margin-bottom: 0; min-width: 0; }
.topbar-cart { flex-shrink: 0; font-size: 17px; text-decoration: none; padding: 2px 4px; }
@media (max-width: 860px) {
  .topbar { padding: 5px 8px; gap: 6px; }
  .topbar .t-chip { padding: 5px 9px; font-size: 12px; }
  .topbar .topic-chips { gap: 5px; }
  .topbar-logo { width: 26px; height: 26px; font-size: 13px; }
}

.section.community-strip { background: linear-gradient(160deg,#2C1114, #42191D); padding-top: 4px; }
/* white cards inside the dark strip must reset to ink text (posts, side cards, chips) */
.community-strip .post, .community-strip .side-card, .community-strip .card,
.community-strip .t-chip, .community-strip .comment, .community-strip .comment-form { color: var(--ink); }
.post-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-mini {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 20px; transition: all .2s; backdrop-filter: blur(4px);
}
.post-mini:hover { background: rgba(255,255,255,.1); transform: translateY(-3px); }
.post-mini .pm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-mini .pm-text { font-size: 14px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-mini .pm-meta { display: flex; gap: 16px; margin-top: 14px; font-size: 13px; opacity: .65; font-weight: 600; }
.tag-chip {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 800;
  background: rgba(194,81,72,.22); color: #DDA29A;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
img.avatar { object-fit: cover; border: 1px solid rgba(0,0,0,.08); display: block; }

/* ---- homepage brand film ---- */
.brand-video {
  overflow: hidden; border-radius: 18px; background: #000;
  box-shadow: var(--shadow-lg);
}
.brand-video video { width: 100%; display: block; max-height: 560px; object-fit: cover; }
.brand-video-cap {
  padding: 13px 16px; text-align: center; font-weight: 700; font-size: 14.5px;
  background: var(--bg); color: var(--ink); letter-spacing: .2px;
}

/* ---- popular search chips ---- */
.pop-search {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px;
  font-size: 13px; color: var(--faint);
}
.pop-search span { font-weight: 700; }
.pop-search button {
  padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font-weight: 600; font-size: 12.5px; color: var(--ink);
}
.pop-search button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ---- language switcher ---- */
.lang-switch select {
  padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 700; color: var(--ink);
  cursor: pointer; outline: none; max-width: 128px;
}
.lang-switch select:hover { border-color: var(--brand); }
.lang-switch select:focus { box-shadow: 0 0 0 3px rgba(155,37,36,.15); }
@media (max-width: 860px) { .lang-switch select { padding: 7px 8px; font-size: 12px; max-width: 96px; } }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--brand-soft); }
.newsletter-inner { text-align: center; max-width: 560px; margin: 0 auto; padding: 40px 0; }
.newsletter h2 { font-size: 26px; letter-spacing: -.6px; }
.newsletter p { color: var(--muted); margin: 8px 0 20px; }
.newsletter form { display: flex; gap: 10px; }
.newsletter input {
  flex: 1; padding: 13px 20px; border-radius: 999px; border: 1.5px solid var(--line); outline: none;
}
.newsletter input:focus { border-color: var(--brand); }

/* ---------- Footer ---------- */
.footer { background: #230D0F; color: #C9B3AD; padding: 44px 0 22px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 44px; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer p { line-height: 1.8; }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 16px; letter-spacing: .4px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a:hover { color: var(--brand-2); }
.footer .socials { display: flex; gap: 10px; margin-top: 18px; }
.footer .socials a {
  width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.08);
  display: grid; place-items: center; transition: all .18s;
}
.footer .socials a:hover { background: var(--brand); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.pwa-install {
  margin-left: 10px; padding: 5px 13px; border-radius: 999px; background: rgba(255,255,255,.14);
  color: #fff; font-weight: 700; font-size: 12px; border: 1px solid rgba(255,255,255,.28); transition: all .15s;
}
.pwa-install:hover { background: var(--brand); }

/* ---------- Page shell ---------- */
.page-head { padding: 32px 0 6px; }
.page-head h1 { font-size: 32px; letter-spacing: -.8px; }
.page-head .crumb { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.page-head .crumb a { color: var(--brand); font-weight: 600; }

/* ---------- Shop layout ---------- */
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 34px; align-items: start; padding: 18px 0 54px; }
.filters { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); position: sticky; top: 92px; }
.filters h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); margin: 20px 0 10px; }
.filters h3:first-child { margin-top: 0; }
.f-group { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 14.5px; cursor: pointer; }
.f-group:hover { background: var(--brand-soft); }
.f-group input { accent-color: var(--brand); width: 16px; height: 16px; }
.f-group .cnt { margin-left: auto; font-size: 12px; color: var(--faint); font-weight: 700; }
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: #fff; border-radius: var(--radius-sm); padding: 12px 18px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.shop-toolbar .cnt { font-size: 14px; color: var(--muted); font-weight: 600; }
.shop-toolbar select {
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-weight: 600; font-size: 13.5px; outline: none; cursor: pointer;
}
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-state .big { font-size: 46px; margin-bottom: 12px; }

/* ---------- Product detail ---------- */
.pd-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; padding: 30px 0 70px; align-items: start; }
.pd-gallery .main {
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; background: #F2EFEA; box-shadow: var(--shadow);
}
.pd-gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 12px; margin-top: 14px; }
.pd-thumbs button {
  width: 78px; height: 78px; border-radius: 12px; overflow: hidden; border: 2.5px solid transparent;
  padding: 0; opacity: .75; transition: all .15s;
}
.pd-thumbs button.on { border-color: var(--brand); opacity: 1; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: 32px; letter-spacing: -.8px; line-height: 1.2; }
.pd-rating { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: 14px; color: var(--muted); font-weight: 600; }
.pd-price { display: flex; align-items: baseline; gap: 12px; margin: 16px 0 4px; }
.pd-price b { font-size: 32px; letter-spacing: -1px; }
.pd-price s { color: var(--faint); font-size: 18px; }
.pd-price .off { color: var(--brand); font-weight: 800; }
.pd-tax { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.opt-block { margin: 14px 0; }
.opt-block .lbl { font-size: 13.5px; font-weight: 800; margin-bottom: 9px; }
.opt-block .lbl span { color: var(--muted); font-weight: 600; }
.opt-chips { display: flex; gap: 9px; flex-wrap: wrap; }
.opt-chip {
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-weight: 700; font-size: 13.5px; color: var(--ink); transition: all .15s;
}
.opt-chip:hover { border-color: var(--brand); }
.opt-chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.qty-buy { display: flex; gap: 14px; margin: 26px 0 14px; }
.qty {
  display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden;
}
.qty button { width: 42px; height: 46px; font-size: 18px; font-weight: 800; color: var(--muted); }
.qty button:hover { color: var(--brand); }
.qty b { width: 40px; text-align: center; font-size: 15px; }
.qty-buy .btn { flex: 1; }
.pd-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.pd-perks div { display: flex; gap: 8px; align-items: center; }
.pd-tabs { border-top: 1px solid var(--line); margin-top: 10px; }
.tab-bar { display: flex; gap: 8px; padding: 18px 0 0; border-bottom: 1px solid var(--line); }
.tab-bar button {
  padding: 12px 20px; font-weight: 700; font-size: 14.5px; color: var(--muted);
  border-bottom: 2.5px solid transparent; margin-bottom: -1.5px;
}
.tab-bar button.on { color: var(--brand); border-color: var(--brand); }
.tab-panel { padding: 28px 4px 10px; max-width: 860px; }
.spec-table { width: 100%; border-collapse: collapse; max-width: 640px; }
.spec-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-table td:first-child { color: var(--muted); font-weight: 700; width: 200px; }

/* Reviews */
.review { border-bottom: 1px solid var(--line); padding: 18px 0; display: flex; gap: 14px; }
.review:last-child { border: none; }
.review .b { flex: 1; }
.review .who { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 10px; }
.review .who time { color: var(--faint); font-weight: 500; font-size: 13px; }
.review p { font-size: 14.5px; color: #4A3B2E; margin-top: 5px; }
.verified { color: var(--green); font-size: 12px; font-weight: 700; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.6fr .9fr; gap: 34px; align-items: start; padding: 18px 0 54px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.cart-line { display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line:last-child { border: none; }
.cart-line img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; background: #F2EFEA; }
.cart-line .name { font-weight: 700; font-size: 15px; }
.cart-line .var { font-size: 13px; color: var(--muted); margin: 3px 0 10px; }
.cart-line .row { display: flex; align-items: center; gap: 16px; }
.cart-line .row .qty button { height: 36px; width: 34px; }
.cart-line .row .qty b { width: 34px; font-size: 14px; }
.remove-btn { color: var(--faint); font-size: 13.5px; font-weight: 700; }
.remove-btn:hover { color: var(--danger); }
.line-total { font-weight: 800; font-size: 16px; text-align: right; }
.summary .row { display: flex; justify-content: space-between; font-size: 14.5px; margin-bottom: 12px; }
.summary .row b { font-size: 15px; }
.summary .total { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; font-size: 18px; font-weight: 800; }
.free-ship-note { background: var(--brand-soft); border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 14px; }

/* ---------- Checkout ---------- */
.co-layout { display: grid; grid-template-columns: 1.5fr .95fr; gap: 34px; align-items: start; padding: 18px 0 54px; }
.steps { display: flex; gap: 8px; margin: 6px 0 26px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; color: var(--faint); }
.step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: 12.5px; }
.step.on { color: var(--brand); }
.step.on .n { background: var(--grad); color: #fff; }
.step.done { color: var(--green); }
.step.done .n { background: var(--green); color: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.field label span { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--line);
  outline: none; transition: border .15s, box-shadow .15s; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(155,37,36,.16); }
.field .err { color: var(--danger); font-size: 12.5px; margin-top: 4px; display: none; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .err { display: block; }
.pay-note { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.radio-row { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; margin-bottom: 10px; transition: border .15s; }
.radio-row:hover { border-color: var(--brand); }
.radio-row.on { border-color: var(--brand); background: var(--brand-soft); }
.radio-row input { accent-color: var(--brand); width: 17px; height: 17px; }
.radio-row b { font-size: 14.5px; display: block; }
.radio-row span { font-size: 13px; color: var(--muted); }
.radio-row .pr { margin-left: auto; font-weight: 800; }
.order-success { text-align: center; max-width: 560px; margin: 40px auto 80px; }
.order-success .check {
  width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; background: #DCFCE7;
  display: grid; place-items: center; font-size: 40px; color: var(--green);
}
.mini-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.mini-line img { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; }
.mini-line .q { color: var(--faint); font-weight: 700; }

/* ---------- Community ---------- */
.community-layout { display: grid; grid-template-columns: 1.65fr .85fr; gap: 32px; align-items: start; padding: 8px 0 54px; }
.compose { margin-bottom: 22px; }
.compose textarea {
  width: 100%; min-height: 96px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px; outline: none; resize: vertical; font-size: 14.5px; background: #fff;
}
.compose textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(155,37,36,.16); }
.compose .row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.compose select {
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 700;
  font-size: 13px; outline: none; background: #fff; cursor: pointer;
}
.topic-chips {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
  max-height: 31px; overflow: hidden; transition: max-height .25s ease; padding: 0; align-items: center;
}
.topic-chips.open { max-height: 320px; }
.t-chip { white-space: nowrap; }
.t-sep { width: 1px; background: rgba(255,255,255,.25); flex-shrink: 0; margin: 5px 3px; }
.t-expand { color: var(--brand); border-color: var(--brand); }
.t-chip {
  padding: 5px 12px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line);
  font-weight: 700; font-size: 12.5px; color: var(--muted); transition: all .15s;
}
.t-chip:hover { border-color: var(--brand); color: var(--brand); }
.t-chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(155,37,36,.4); }
.post { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-head .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.post-head .who b { font-size: 14px; white-space: nowrap; }
.post-head .who span { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.post-head .del { margin-left: auto; color: var(--faint); font-size: 12.5px; font-weight: 700; }
.post-head .del:hover { color: var(--danger); }
.post-text { font-size: 15px; line-height: 1.65; white-space: pre-wrap; color: var(--ink); }
/* posts have a bounded height: text clamps to 4 lines, images capped — tap "Show more" to open text */
.post.clamped .post-text {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal;
}
.post.clamped .post-imgs img { max-height: 150px; object-fit: cover; }
.post-toggle {
  margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--brand);
  padding: 4px 0; display: inline-flex; align-items: center; gap: 4px;
}
.post-toggle:hover { text-decoration: underline; }
.post-imgs { display: grid; gap: 10px; margin-top: 14px; }
.post-imgs.n1 { grid-template-columns: 1fr; }
.post-imgs.n2 { grid-template-columns: 1fr 1fr; }
.post-imgs.n1 img { border-radius: 12px; max-height: 170px; object-fit: cover; width: 100%; }
.post-imgs.n2 img { border-radius: 12px; max-height: 150px; object-fit: cover; width: 100%; }
.post-imgs.n2 img { border-radius: 12px; aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.post-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; padding-top: 0; border-top: none; }
.post-toggle { margin-left: auto; margin-top: 0; }
.pa {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--muted); transition: all .15s;
}
.pa:hover { background: var(--brand-soft); color: var(--brand); }
.pa.liked { color: var(--brand); }
.comments { margin-top: 14px; background: var(--bg); border-radius: 12px; padding: 14px 16px; }
.comment { display: flex; gap: 10px; padding: 9px 0; }
.comment .b { flex: 1; font-size: 14px; }
.comment .b b { font-size: 13.5px; }
.comment .b span { color: var(--faint); font-size: 12px; margin-left: 8px; }
.comment p { margin-top: 2px; font-size: 14px; }
.comment-form { display: flex; gap: 10px; margin-top: 10px; }
.comment-form input {
  flex: 1; padding: 10px 15px; border-radius: 999px; border: 1.5px solid var(--line); outline: none; font-size: 14px;
}
.comment-form input:focus { border-color: var(--brand); }
.side-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.side-card h3 { font-size: 15.5px; margin-bottom: 14px; }
.trend-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: 14px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.trend-row:last-child { border: none; }
.trend-row b { color: var(--brand); }
.trend-row span { color: var(--faint); font-size: 12.5px; font-weight: 700; }
.contrib { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.contrib .b b { font-size: 14px; display: block; }
.contrib .b span { font-size: 12px; color: var(--faint); }

/* ---------- Auth / Account ---------- */
.auth-wrap { max-width: 460px; margin: 50px auto 90px; }
.auth-tabs { display: flex; background: #fff; border-radius: 999px; padding: 5px; box-shadow: var(--shadow); margin-bottom: 20px; }
.auth-tabs button { flex: 1; padding: 11px; border-radius: 999px; font-weight: 800; font-size: 14.5px; color: var(--muted); }
.auth-tabs button.on { background: var(--grad); color: #fff; }
.demo-hint { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.demo-hint b { color: var(--brand); }
.acct-layout { max-width: 980px; margin: 0 auto; padding: 26px 24px 90px; }
.acct-tabs { display: flex; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }
.acct-tabs button {
  padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: 14px;
  color: var(--muted); background: #fff; border: 1.5px solid var(--line);
}
.acct-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.profile-card { display: flex; gap: 20px; align-items: center; }
.order-card { margin-bottom: 16px; }
.order-card .oh { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.status-pill { padding: 4px 13px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #FEF3C7; color: #92400E; }
.status-pill.ok { background: #DCFCE7; color: #166534; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: var(--ink); color: #fff; padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: toastIn .25s ease;
}
.toast.ok::before { content: "✓"; color: #4ADE80; font-weight: 900; }
.toast.warn::before { content: "!"; color: #FBBF24; font-weight: 900; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(35,13,15,.55); z-index: 300; display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 18px; padding: 30px; max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); animation: toastIn .22s ease; }
.modal h3 { margin-bottom: 6px; font-size: 20px; }
.modal p.sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ---------- About ---------- */
.about-hero { text-align: center; max-width: 720px; margin: 0 auto; padding: 40px 0 14px; }
.about-hero h1 { font-size: 34px; letter-spacing: -1px; }
.about-hero p { color: var(--muted); font-size: 16px; margin-top: 10px; }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.milestones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.milestone { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border-top: 3px solid var(--brand); }
.milestone b { color: var(--brand); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.milestone h4 { margin: 6px 0 6px; font-size: 16.5px; }
.milestone p { font-size: 13.5px; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 40px; }

/* ---------- Handwritten signature pad ---------- */
.sig-pad-mask { position: fixed; inset: 0; background: rgba(35,13,15,.55); z-index: 300; display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px); }
.sig-pad { background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 680px; box-shadow: var(--shadow-lg); animation: toastIn .22s ease; }
.sig-canvas {
  width: 100%; aspect-ratio: 620/230; display: block; border: 2px dashed var(--line); border-radius: 12px;
  background: #FDFCF8; cursor: crosshair; touch-action: none;
}
.sig-pad-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.post-signature {
  margin-top: 14px; display: flex; justify-content: flex-end;
}
.post-signature img {
  max-height: 72px; max-width: 240px; object-fit: contain;
  border-bottom: 1.5px solid var(--line); padding-bottom: 4px;
}

/* ---------- Video embeds in posts ---------- */
.video-embeds { margin-top: 14px; display: grid; gap: 12px; }
.video-embeds iframe {
  width: 100%; aspect-ratio: 16/9; border: none; border-radius: 12px; background: #000;
}
.video-embeds iframe.tiktok { aspect-ratio: 9/16; max-width: 325px; justify-self: center; height: auto; }

/* ---------- Compliance pages ---------- */
.policy-body { max-width: 820px; margin: 0 auto; padding: 0 0 90px; }
.policy-body h1 { font-size: 34px; letter-spacing: -1px; }
.policy-body .meta { color: var(--muted); font-size: 14px; margin: 8px 0 30px; }
.policy-body h2 { font-size: 20px; margin: 30px 0 10px; }
.policy-body p, .policy-body li { font-size: 15px; color: #4A3B2E; line-height: 1.75; }
.policy-body ul { padding-left: 22px; margin: 10px 0; }
.policy-body .card { margin: 18px 0; }
.footer-links-bottom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.footer-links-bottom a { color: #C7B2A6; font-size: 13px; }
.footer-links-bottom a:hover { color: var(--brand-2); }

@media (max-width: 560px) {
  .post-signature img { max-width: 180px; }
  .sig-pad { padding: 16px; }
}
/* ============================================================
   Mobile-first additions (Western devices: iPhone 390/393/430,
   Android 360-412, iPad 768-820, desktop 1440/1920)
   ============================================================ */

/* ---- Mobile bottom navigation (app-style, phones only) ---- */
.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  box-shadow: 0 -4px 22px rgba(43,17,20,.1);
  padding: 3px 4px calc(3px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav nav {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0 6px; max-width: 356px; margin: 0 auto;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 10px; font-weight: 700; color: var(--muted);
  padding: 5px 0 4px; border-radius: 10px; position: relative;
}
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a svg { width: 21px; height: 21px; }
.bottom-nav .cart-badge { top: 0; right: calc(50% - 21px); }

/* ---- Mobile header search toggle ---- */
.search-toggle { display: none; }
.mobile-searchbar {
  display: none; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line);
}
.mobile-searchbar.open { display: block; }
.mobile-searchbar input {
  width: 100%; padding: 12px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  outline: none; font-size: 15px;
}
.mobile-searchbar input:focus { border-color: var(--brand); }
@media (max-width: 1080px) { .search-toggle { display: grid; } }

/* ---- Product page sticky buy bar (phones) ---- */
.pd-buybar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 140;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  box-shadow: 0 -4px 22px rgba(43,17,20,.12);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  align-items: center; gap: 12px;
}
.pd-buybar .pd-buy-price { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.pd-buybar .pd-buy-price s { display: block; font-size: 12px; color: var(--faint); font-weight: 600; }
.pd-buybar .btn { flex: 1; padding: 12px 18px; }

/* ---- Shop filters toggle (phones/tablets) ---- */
.filters-toggle {
  display: none; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 12px; border-radius: var(--radius-sm); background: #fff;
  border: 1.5px solid var(--line); box-shadow: var(--shadow);
  font-weight: 700; font-size: 14px; margin-bottom: 14px; cursor: pointer; color: var(--ink);
}
.filters-toggle .cnt-dot {
  background: var(--brand-soft); color: var(--brand); border-radius: 999px;
  padding: 1px 9px; font-size: 12px;
}

/* ---- Responsive behavior tuned for Western device mix ---- */
@media (max-width: 1080px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-mini-grid { grid-template-columns: 1fr 1fr; }
  .search-box { display: none; }
}

/* phones + small tablets (hamburger nav + bottom nav) */
@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .bottom-nav { display: block; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body.has-buybar { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }

  /* compact header so 320-390px phones never overflow horizontally */
  .container { padding: 0 14px; }
  .newsletter-inner { padding: 26px 0; } /* re-assert: .container rule above zeroes it otherwise */
  .header-inner { gap: 8px; height: 50px; }
  .logo { font-size: 19px; gap: 8px; }
  .logo-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; }
  .icon-btn { width: 34px; height: 34px; }
  .header-actions { gap: 2px; }
  /* lang/currency selects overflow the phone header — they live in the hamburger menu instead */
  .header-actions .lang-switch { display: none !important; }

  /* two-column compact product cards — all mainstream phones (360-500, incl.
     top-2026 resolutions 360x800 / 384x832 / 390x844 / 393x852 / 414x896 / 428x926) */
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .p-body { padding: 10px 12px 12px; gap: 3px; }
  .p-name { font-size: 13px; }
  .p-cat { display: none; }
  .p-price b { font-size: 15px; }
  .p-price s { font-size: 11.5px; }
  .p-price .off { font-size: 11px; }
  .stars { font-size: 11px; }
  .stars small { font-size: 11px; }
  .quick-add { display: none; } /* touch has no hover; tapping the card opens detail */
  /* category tiles: compact single-row strip on phones (saves a full screen of tiles) */
  .cat-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(120px, 132px);
    overflow-x: auto; gap: 10px; padding: 2px 2px 10px; margin: 0 -2px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-grid::-webkit-scrollbar { display: none; }
  .cat-grid .cat-tile { scroll-snap-align: start; padding: 14px 12px; }

  /* mobile: title → chat card → feed (higher specificity: overrides the base .hero-chat rules below) */
  .hero { padding: 6px 0 4px; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "top" "visual"; row-gap: 6px; }
  .hero .hero-chat { min-height: 0; }
  .hero .hero-chat .emma-log { min-height: 40px; height: 48px; flex: none; padding: 5px 8px; }
  .hero .hero-chat .emma-head { padding: 4px 8px; }
  .hero .hero-chat .emma-head .emma-fig { width: 24px; height: 24px; }
  .hero .hero-chat .emma-head b { font-size: 12.5px; }
  .hero .emma-mode { padding: 4px 8px 0; }
  .hero .emma-mode button { padding: 5px 7px; font-size: 11.5px; }
  .hero .emma-posttools { padding: 5px 8px 0; }
  .hero .emma-inputrow { padding: 5px 8px 6px; }
  .hero .emma-inputrow input { padding: 7px 9px; font-size: 12.5px; }
  .hero .em-msg { font-size: 12px; padding: 6px 9px; border-radius: 10px; }
  .hero h1 { font-size: clamp(15px, 4.8vw, 24px); margin: 0; }
  /* posts full-bleed edge to edge on phones */
  .section.community-strip .container { padding: 0; }
  .community-layout { grid-template-columns: 1fr; gap: 14px; padding: 3px 0 40px; }
  .post { border-radius: 0; padding: 10px 12px; margin-bottom: 8px; }
  .post-head { margin-bottom: 6px; gap: 8px; }
  .post-imgs.n1 img { max-height: 116px; border-radius: 10px; }
  .post-imgs { margin-top: 7px; }
  .post-actions { margin-top: 6px; }
  .post-text { font-size: 13px; }
  .section.community-strip { padding-top: 2px; }
  .hero h1 { font-size: clamp(19px, 5.4vw, 26px); white-space: nowrap; }
  .hero p.lead { display: none; }
  .hero-visual .photo { height: auto; min-height: 0; aspect-ratio: 4/3; border-radius: 18px; }
  .hero-cta { margin-top: 2px; }
  .hero-cta .btn { width: 100%; }
  .hero-stats { gap: 16px; margin-top: 20px; padding-top: 18px; }
  .hero-stats b { font-size: 20px; }
  .hero-stats span { font-size: 11px; line-height: 1.3; }
  .hero-card { padding: 9px 12px; font-size: 12px; border-radius: 12px; }
  .hero-card small { font-size: 10.5px; }
  .hero-card.c1 { left: 10px; bottom: 12px; }
  .hero-card.c2 { right: 10px; top: 10px; }
  .section-head h2 { font-size: clamp(22px, 5.4vw, 26px); }
  .section-head { margin-bottom: 16px; }
  .pd-layout, .cart-layout, .co-layout, .community-layout { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { display: none; position: static; box-shadow: var(--shadow); }
  .filters.open { display: block; }
  .filters-toggle { display: flex; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .milestones, .value-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
  .qty-buy { flex-wrap: wrap; }
  .qty-buy .qty, .qty-buy .btn { flex: 1; }
  .pd-perks { grid-template-columns: 1fr; }
  .pa { min-height: 44px; }          /* 44px touch target (Apple HIG) */
  .t-chip { padding: 11px 18px; }
  .comment-form .btn { padding: 10px 16px; }
  .tab-bar { flex-wrap: wrap; }
  .tab-bar button { padding: 10px 13px; font-size: 13.5px; }
  .pd-thumbs button { width: 64px; height: 64px; }
}

/* small phones / older devices (320-359: iPhone SE1, 360x640 Androids) */
@media (max-width: 359px) {
  .grid-products { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; flex-wrap: wrap; }
  .search-toggle { display: none; } /* search stays available in the hamburger menu */
}

/* large phones / phablets / foldable covers (500-639) get roomier cards */
@media (min-width: 500px) and (max-width: 860px) {
  .grid-products { gap: 16px; }
  .p-body { padding: 12px 14px 14px; }
  .p-name { font-size: 14px; }
}

/* small screens: stack secondary grids */
@media (max-width: 860px) {
  /* footer: brand full-width, link columns side by side — kills the airy stacked look */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer { padding: 34px 0 18px; }
  .footer h4 { margin-bottom: 10px; }
  .footer li { margin-bottom: 6px; }
  .footer p { line-height: 1.65; font-size: 13px; }
  .footer .socials { margin-top: 12px; }
  .footer-bottom { padding-top: 16px; font-size: 12px; }
  .post-mini-grid { grid-template-columns: 1fr; }
  .values-grid, .milestones, .value-grid, .contact-grid { grid-template-columns: 1fr; }
  .newsletter form { flex-direction: column; }
  .pd-buybar .btn { padding: 13px 16px; }
}

/* tablets portrait fine-tuning (iPad 768/810/820, iPad Air 820) */
@media (min-width: 700px) and (max-width: 1080px) {
  .grid-products { gap: 18px; }
  .hero-cta .btn { width: auto; }
}

/* large desktops (1536 laptops scaled, 1728/1920/2560) */
@media (min-width: 1500px) {
  .hero h1 { font-size: clamp(44px, 2.8vw, 52px); }
  .grid-products { gap: 26px; }
}

/* scroll-in reveal (IntersectionObserver adds .on) — skip when JS disabled or reduced motion */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.rv.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* keep everything above the iPhone home indicator */
.pd-buybar, .bottom-nav { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }

/* ============================================================
   P0/P1 additions: cart drawer, wishlist, chat widget,
   swatch form, size compare, delivery ETA, review photos
   ============================================================ */

/* ---- cart drawer (add-to-cart no longer navigates) ---- */
.drawer-mask { position: fixed; inset: 0; background: rgba(35,13,15,.45); z-index: 250; opacity: 0; transition: opacity .2s; }
.drawer-mask.on { opacity: 1; }
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: min(400px, 92vw); height: 100%; background: #fff; z-index: 251;
  box-shadow: -12px 0 44px rgba(43,17,20,.2); transition: right .28s ease; display: flex; flex-direction: column;
}
.cart-drawer.on { right: 0; }
.cart-drawer .cd-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart-drawer .cd-head b { font-size: 17px; }
.cart-drawer .cd-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-drawer .cd-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom,0px)); border-top: 1px solid var(--line); }
.cart-drawer .mini-line img { width: 58px; height: 58px; }
.cd-x { font-size: 22px; color: var(--faint); line-height: 1; padding: 4px 8px; }

/* ---- wishlist hearts ---- */
.wl-heart {
  position: absolute; top: 10px; right: 10px; z-index: 5; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center; color: #b9b0a4;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: all .15s;
}
.wl-heart.on { color: var(--brand); }
.pd-wl-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; }
.pd-wl-btn.on { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* ---- product page: delivery ETA + size compare + swatch ---- */
.eta-box {
  display: flex; gap: 10px; align-items: center; background: #fff; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin: 14px 0; color: var(--ink);
}
.eta-box b { color: var(--green); }
.size-compare { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-top: 26px; }
.size-compare h3 { font-size: 16px; margin-bottom: 6px; }
.size-compare p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.size-compare svg { width: 100%; height: auto; display: block; }
.swatch-card { background: var(--brand-soft); border: 1.5px dashed var(--brand); border-radius: var(--radius); padding: 22px; margin-top: 22px; }
.swatch-card h3 { font-size: 16px; margin-bottom: 4px; }
.swatch-card > p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.swatch-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
@media (max-width: 560px) { .swatch-grid2 { grid-template-columns: 1fr; } }
.swatch-grid2 input { padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--line); outline: none; }

/* ---- review photos ---- */
.review-photo { margin-top: 8px; border-radius: 10px; max-width: 220px; max-height: 220px; object-fit: cover; }
.rv-img-up { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 700; }

/* ---- complete the room ---- */
.room-cta { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.room-cta b { color: var(--ink); }

/* ---- friends page ---- */
.friends-layout { display: grid; grid-template-columns: 1.5fr .95fr; gap: 30px; align-items: start; padding: 18px 0 54px; }
.fr-search { margin-bottom: 18px; }
.fr-search input {
  width: 100%; padding: 13px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  outline: none; font-size: 15px; background: #fff; box-shadow: var(--shadow);
}
.fr-search input:focus { border-color: var(--brand); }
.fr-block h3 { font-size: 15px; margin-bottom: 14px; }
.fr-count { color: var(--brand); font-size: 13px; margin-left: 4px; }
.fr-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px;
  transition: background .15s; position: relative;
}
.fr-row:hover { background: var(--bg); }
.fr-ava {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px;
  border: 2px solid #fff; box-shadow: var(--shadow);
}
.fr-dot {
  position: absolute; left: 38px; top: 38px; width: 12px; height: 12px; border-radius: 50%;
  background: #22C55E; border: 2.5px solid #fff; z-index: 2;
}
.fr-meta { flex: 1; min-width: 0; }
.fr-meta b { display: block; font-size: 14.5px; }
.fr-meta span { font-size: 12px; color: var(--muted); }
.fr-act { display: flex; gap: 6px; flex-shrink: 0; }
/* inbox: async messages + product shares */
.fr-note { display: flex; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.fr-note:last-child { border-bottom: none; }
.fr-notebody { flex: 1; min-width: 0; }
.fr-notebody > b { font-size: 14px; }
.fr-notebody > span { font-size: 11.5px; color: var(--muted); margin-left: 6px; }
.fr-notetext { font-size: 13.5px; color: var(--ink); margin-top: 6px; line-height: 1.55; }
.fr-sharecard {
  display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: all .15s; max-width: 340px;
}
.fr-sharecard:hover { border-color: var(--brand); }
.fr-sharecard img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.fr-sharecard b { display: block; font-size: 13px; }
.fr-sharecard span { font-size: 11.5px; color: var(--brand); font-weight: 700; }
/* unread red dot on the Friends nav entries */
header .nav a { position: relative; }
.fr-dot-badge {
  position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; z-index: 5;
}
.bottom-nav .fr-dot-badge { top: 0; right: calc(50% - 26px); border-color: rgba(255,255,255,.97); }

/* official best-seller share post */
.bs-post { border: 1.5px solid rgba(255,180,143,.55); }
.bs-product {
  display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: all .15s;
}
.bs-product:hover { border-color: var(--brand); }
.bs-product img { width: 64px; height: 64px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.bs-pinfo { flex: 1; min-width: 0; }
.bs-pinfo b { display: block; font-size: 13.5px; }
.bs-pprice { display: block; color: var(--brand); font-weight: 800; font-size: 13px; margin-top: 2px; }
.bs-pview { display: block; font-size: 11.5px; color: var(--brand); font-weight: 700; margin-top: 3px; }
.bs-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bs-cat {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 76px;
  padding: 9px 10px; border-radius: 12px; background: var(--brand-soft); transition: all .15s;
}
.bs-cat:hover { transform: translateY(-2px); }
.bs-cat i { font-style: normal; font-size: 21px; }
.bs-cat b { font-size: 11px; color: var(--ink); }

/* friend badge in the community feed */
.friend-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 9px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: 800; vertical-align: 1px;
}
@media (max-width: 860px) {
  .friends-layout { grid-template-columns: 1fr; gap: 20px; padding: 12px 0 40px; }
  .fr-ava { width: 42px; height: 42px; }
  .fr-meta b { font-size: 14px; }
}

/* ---- Emma chat card inside the hero (replaces the sofa photo) ---- */
.hero-chat { height: 100%; min-height: 380px; box-shadow: var(--shadow-lg); }
.hero-chat .emma-log { flex: 1; height: auto; min-height: 210px; }
.hero-chat .emma-head { padding: 8px 14px; }
.hero-chat .emma-head .emma-fig { width: 40px; height: 40px; }
.hero-chat .emma-head b { font-size: 15px; }

/* ---- Meet Emma: embedded homepage chat section ---- */
.emma-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 28px; align-items: stretch; }
.emma-chat {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
  display: flex; flex-direction: column; border: 1px solid var(--line);
}
.emma-head { background: var(--grad); color: #fff; padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.emma-head .emma-fig { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2.5px solid rgba(255,255,255,.85); }
.emma-head .emma-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.emma-head b { font-size: 16px; display: block; }
.emma-head span { font-size: 12.5px; opacity: .88; }
.emma-log {
  background: var(--bg); padding: 16px 18px; height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.em-msg { max-width: 88%; padding: 9px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.em-msg.emma { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; box-shadow: var(--shadow); }
.em-msg.me { align-self: flex-end; background: var(--brand-soft); border-bottom-right-radius: 4px; }
.em-typing { align-self: flex-start; color: var(--faint); font-size: 15px; letter-spacing: 4px; padding: 2px 6px; animation: emDots .9s infinite; }
@keyframes emDots { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.em-linkchip {
  align-self: flex-start; padding: 7px 13px; border-radius: 999px; background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 700; box-shadow: var(--shadow);
}
.em-linkchip:hover { opacity: .92; }
/* tappable product card the AI appends under a recommendation */
.em-prodchip {
  display: flex; align-items: center; gap: 10px; align-self: flex-start;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 9px 14px; box-shadow: var(--shadow); max-width: 92%;
  transition: all .15s;
}
.em-prodchip:hover { border-color: var(--brand); transform: translateY(-2px); }
.em-prodchip b { font-size: 13.5px; }
.em-prodchip span { color: var(--brand); font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.em-prodchip i { font-style: normal; color: var(--brand); font-weight: 800; margin-left: 2px; }
.emma-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 0; }
.emma-chips button {
  padding: 8px 13px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 700; color: var(--ink); transition: all .15s;
}
.emma-chips button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.emma-mode { display: flex; gap: 6px; padding: 10px 14px 0; }
.emma-mode button {
  flex: 1; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: all .15s;
}
.emma-mode button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.emma-posttools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 14px 0; }
.emma-posttools select { padding: 8px 10px; border-radius: 9px; border: 1.5px solid var(--line); font-size: 12.5px; font-weight: 700; background: #fff; outline: none; }
.emma-inputrow { display: flex; gap: 8px; padding: 12px 14px 14px; }
.emma-inputrow input { flex: 1; padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--line); outline: none; font-size: 14px; }
.emma-inputrow input:focus { border-color: var(--brand); }
.emma-side h3 { font-size: 26px; letter-spacing: -.6px; margin-bottom: 12px; }
.emma-side p { color: var(--muted); margin-bottom: 12px; line-height: 1.65; }
.emma-side-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 22px; }
.emma-side-stats { display: flex; gap: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.emma-side-stats b { display: block; font-size: 22px; }
.emma-side-stats span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
@media (max-width: 860px) {
  .emma-grid { grid-template-columns: 1fr; gap: 22px; }
  .emma-log { height: 300px; }
  .emma-side h3 { font-size: 22px; }
  .emma-side-stats { gap: 22px; }
}

/* ---- live chat widget (AI assistant with human persona) ---- */
.chatw-btn {
  position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 160;
  width: 54px; height: 54px; padding: 0; border-radius: 50%;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(155,37,36,.5);
  border: 2px solid rgba(255,255,255,.65);
  animation: chatwEnter .55s cubic-bezier(.2,.9,.3,1.35) .6s backwards, chatwNudge 16s ease-in 9s infinite;
}
.chatw-btn .chatw-fig {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: block;
}
.chatw-btn .chatw-fig img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.chatw-btn .chatw-dot {
  position: absolute; top: 1px; right: 1px; width: 12px; height: 12px; border-radius: 50%;
  background: #22C55E; border: 2.5px solid #fff; box-shadow: 0 0 0 0 rgba(34,197,94,.6);
  animation: chatwPulse 2s infinite;
}
@keyframes chatwPulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
@keyframes chatwEnter { from { transform: translateY(18px) scale(.7); opacity: 0; } }
@keyframes chatwNudge {
  0%, 6%, 100% { transform: none; }
  2% { transform: scale(1.08) rotate(-2deg); }
  4% { transform: scale(.97) rotate(1.5deg); }
}
.chatw-btn, .chatw-btn .chatw-fig { transition: all .25s ease; }
.chatw-close {
  margin-left: auto; align-self: flex-start; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff; font-size: 12px; line-height: 1;
  display: grid; place-items: center; flex-shrink: 0;
}
.chatw-close:hover { background: rgba(255,255,255,.35); }
/* teaser bubble above the chat button */
.chatw-teaser {
  position: fixed; right: 18px; bottom: calc(158px + env(safe-area-inset-bottom, 0px)); z-index: 159;
  display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px;
  padding: 11px 34px 11px 12px; max-width: 280px; cursor: pointer;
  box-shadow: var(--shadow-lg); animation: toastIn .25s ease;
}
.chatw-teaser-ava { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1.5px solid var(--line); }
.chatw-teaser b { display: block; font-size: 13px; }
.chatw-teaser span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.chatw-teaser-x {
  position: absolute; top: 6px; right: 7px; width: 20px; height: 20px; border-radius: 50%;
  color: var(--faint); font-size: 11px; line-height: 1; display: grid; place-items: center;
}
.chatw-teaser-x:hover { background: var(--bg); color: var(--ink); }
@media (max-width: 860px) {
  .chatw-teaser { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 36px); }
}
.chatw-btn:hover { transform: scale(1.08); }
@media (min-width: 861px) { .chatw-btn { bottom: 24px; } }
.chatw-panel {
  position: fixed; right: 18px; bottom: calc(158px + env(safe-area-inset-bottom, 0px)); z-index: 161;
  width: min(410px, calc(100vw - 24px)); background: #fff; border-radius: 18px;
  box-shadow: var(--shadow-lg); display: none; overflow: hidden; animation: toastIn .2s ease;
  flex-direction: column; height: min(72dvh, 640px); max-height: calc(100dvh - 32px);
}
.chatw-panel.on { display: flex; }
.chatw-panel .emma-log { flex: 1 1 auto; height: auto; min-height: 160px; }
@media (max-width: 860px) {
  .chatw-panel { width: auto; left: 8px; right: 8px; height: min(86dvh, 720px); }
}
.chatw-panel .emma-inputrow input:focus { border-color: var(--brand); }
.chatw-head { background: var(--grad); color: #fff; padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.chatw-head .chatw-ava { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2.5px solid rgba(255,255,255,.85); flex-shrink: 0; }
.chatw-head b { font-size: 16px; display: block; }
.chatw-head span { font-size: 12.5px; opacity: .85; }
.chatw-body { padding: 16px 18px; max-height: 72vh; overflow-y: auto; }
.chatw-faq { display: block; width: 100%; text-align: left; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--line); margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--ink); background: #fff; }
.chatw-faq:hover { border-color: var(--brand); color: var(--brand); }
.chatw-faq-a { font-size: 13.5px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: -4px 0 10px; line-height: 1.6; }
.chatw-body input, .chatw-body textarea { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--line); outline: none; font-size: 14px; margin-bottom: 8px; }
.chatw-body textarea { min-height: 76px; resize: vertical; }
@media (max-width: 860px) { .chatw-panel { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); } }

/* sticky buy bar shows on phones/tablets only */
@media (max-width: 860px) {
  .pd-buybar { display: flex; }
}

/* ---- desktop polish: end-of-file block wins the cascade ---- */
@media (min-width: 861px) {
  .topbar .topbar-logo { display: none; }
  .topbar { padding: 8px 24px; }
  .topbar .t-chip { padding: 7px 14px; font-size: 13px; }
  .post-imgs.n1 img { max-height: 260px; }
  .post { padding: 16px 20px; margin-bottom: 16px; }
  .post-text { font-size: 15px; }
}

/* ---- desktop v2: two-line title, bigger chat, wider community ---- */
.br-desk { display: none; }
@media (min-width: 861px) {
  .br-desk { display: inline; }
  .hero h1 { white-space: normal; font-size: 56px; }
  .hero .hero-chat { min-height: 520px; }
  .hero .hero-chat .emma-log { min-height: 340px; }
  .hero .hero-chat .emma-head { padding: 12px 16px; }
  .hero .hero-chat .emma-head .emma-fig { width: 46px; height: 46px; }
  .hero .hero-chat .emma-head b { font-size: 16px; }
  .section.community-strip .container { max-width: 1460px; }
}

/* ---- desktop v3: chat card spans 3/4 of the hero width ---- */
@media (min-width: 861px) {
  .hero-grid { grid-template-columns: minmax(280px, 1fr) 3fr; column-gap: 36px; }
  .hero h1 { font-size: clamp(34px, 2.6vw, 44px); }
}

/* ---- desktop v4: title lives in the chat header; beige header; full-width card ---- */
.hero-grid { grid-template-columns: 1fr; grid-template-areas: 'visual'; }
.emma-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.emma-title b { white-space: nowrap; }
h1.emma-slogan {
  display: inline; margin: 0; font-family: var(--font);
  font-size: 13.5px; font-weight: 700; color: var(--brand);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.emma-head {
  background: #F4EDDD; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.emma-head b { color: var(--ink); }
.emma-expand { background: rgba(43,17,20,.08); color: var(--ink); }
.emma-expand:hover { background: rgba(43,17,20,.16); }

/* ---- v5: header = slogan only; greeting carries the avatar ---- */
h1.emma-slogan { flex: 1; }
.em-greet { display: flex; align-items: center; gap: 8px; background: transparent; border: none; box-shadow: none; padding: 0; max-width: 100%; }
.em-greet .em-ava { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1.5px solid var(--line); }
.em-greet span { background: #fff; border: 1px solid var(--line); border-radius: 11px; border-bottom-left-radius: 4px; padding: 6px 11px; font-size: 12.5px; color: var(--ink); }

/* ---- v6: one input row = mode toggle + input + paper-plane send ---- */
.emma-inputrow { gap: 6px; }
.emma-inputrow .emma-mode { padding: 0; gap: 4px; flex-shrink: 0; }
.emma-inputrow .emma-mode button { padding: 8px 9px; font-size: 11.5px; border-radius: 9px; white-space: nowrap; }
.emma-send { padding: 8px 11px !important; flex-shrink: 0; display: inline-flex; align-items: center; }
.emma-inputrow input { min-width: 0; }
@media (max-width: 860px) {
  .hero .emma-inputrow .emma-mode button { padding: 7px 7px; font-size: 11px; }
}

/* ---- v7: one more line of chat height; the log itself is click-to-expand ---- */
@media (max-width: 860px) {
  .hero .hero-chat .emma-log { min-height: 56px; height: 70px; }
}
.hero-chat .emma-log { cursor: pointer; }

/* ---- v8: close button visible on beige header; panel height locked (svh doesn't jump with the mobile address bar) ---- */
.chatw-close { background: rgba(43,17,20,.08); color: var(--ink); }
.chatw-close:hover { background: rgba(43,17,20,.16); }
.chatw-panel { height: min(72svh, 640px); max-height: calc(100svh - 32px); }
@media (max-width: 860px) {
  .chatw-panel { height: min(86svh, 720px); }
}

/* ---- v9: author meta merges into the actions row; BS post is image-dominant ---- */
.post-actions { margin-top: 5px; gap: 9px; padding-top: 0; }
.pa-meta { display: flex; align-items: center; gap: 7px; margin-right: auto; min-width: 0; }
.pa-meta b { font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.pa-meta > span { font-size: 11px; color: var(--faint); white-space: nowrap; }
.pa-meta .avatar.sm { width: 22px; height: 22px; font-size: 9.5px; flex-shrink: 0; }
.post .del { color: var(--faint); font-size: 12px; padding: 2px 4px; flex-shrink: 0; }
.bs-hero { position: relative; display: block; margin: -10px -12px 8px; }
.bs-hero img { width: 100%; height: 200px; object-fit: cover; display: block; }
.bs-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 12px 9px;
  background: linear-gradient(transparent, rgba(20,8,9,.75));
  color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bs-caption b { font-weight: 800; }
.bs-cats { margin-top: 2px; gap: 6px; }
.bs-cat { min-width: 64px; padding: 7px 8px; }
.bs-cat i { font-size: 18px; }
.bs-cat b { font-size: 10.5px; }
@media (min-width: 861px) {
  .bs-hero { margin: -16px -20px 10px; }
  .bs-hero img { height: 300px; }
}

/* ---- v10: product post badge + bold post titles ---- */
.bs-logo {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 14px;
  display: grid; place-items: center; box-shadow: 0 3px 10px rgba(20,8,9,.4);
}
.bs-more { background: var(--brand-soft); border: 1.5px dashed var(--brand); }
.bs-more b { color: var(--brand); }
.post-title { display: block; font-weight: 800; font-size: 13.5px; margin-bottom: 2px; color: var(--ink); }

/* ---- v11: flatter posts with thin red separators; tighter meta row; one-row category tiles ---- */
@media (max-width: 860px) {
  .post {
    box-shadow: none; border-radius: 0; margin-bottom: 0;
    border-bottom: 1px solid rgba(155, 37, 36, .28);
    padding: 7px 12px 5px;
  }
  .post-actions { margin-top: 2px; gap: 7px; }
  .pa { padding: 3px 8px; font-size: 12px; }
  .pa-meta .avatar.sm { width: 19px; height: 19px; font-size: 8.5px; }
  .pa-meta b { font-size: 12px; }
  .pa-meta > span { font-size: 10.5px; }
  .post-toggle { font-size: 12px; }
}
.bs-cats { flex-wrap: nowrap; }
.bs-cat { flex: 1; min-width: 0; padding: 6px 4px; }
.bs-cat i { font-size: 17px; }
.bs-cat b { font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 860px) { .post-actions .pa { min-height: 0; } .post-actions .post-toggle { padding: 2px 0; } }

/* ---- v12: topbar language select styling ---- */
.topbar-lang {
  flex-shrink: 0; padding: 6px 8px; border-radius: 9px; border: 1.5px solid var(--line);
  font-size: 12px; font-weight: 700; background: #fff; color: var(--ink); outline: none; max-width: 118px;
}

/* ---- v13: tighten topbar so the topics fold marker stays on the visible row ---- */
@media (max-width: 860px) {
  .topbar { padding: 4px 6px; gap: 4px; }
  .topbar-lang { padding: 4px 5px; font-size: 11px; max-width: 92px; border-radius: 8px; }
  .topbar .topic-chips { gap: 4px; }
  .topbar .t-chip { padding: 4px 8px; font-size: 11.5px; }
  .topbar .t-sep { margin: 4px 2px; }
}

/* ---- v14: sort chips + fold marker locked to one non-wrapping core row ---- */
.t-core { display: flex; gap: 5px; flex-wrap: nowrap; flex-shrink: 0; }
.t-core .t-chip { flex-shrink: 0; }
@media (max-width: 360px) {
  .topbar-logo { display: none; }
  .topbar-lang { max-width: 74px; font-size: 10.5px; padding: 3px 4px; }
  .topbar .t-chip { padding: 3px 7px; font-size: 11px; }
  .topbar { padding: 3px 5px; gap: 3px; }
  .topbar .topic-chips { gap: 4px; }
}

/* ---- v15: topbar language select as a proper compact pill (no half-circle look) ---- */
.topbar-lang {
  border-radius: 8px;
  max-width: none;
  width: auto;
  padding: 5px 22px 5px 9px;
  font-size: 11.5px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%238E8078' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}
@media (max-width: 360px) {
  .topbar-lang { max-width: 86px; padding: 4px 18px 4px 7px; }
}

/* ---- v16: logo & lang stay put when topics expand (bar grows downward only) ---- */
.topbar { align-items: flex-start; }
.topbar-logo { margin-top: 5px; }
.topbar-lang { margin-top: 3px; }

/* ---- v17: logo / chips / lang share one centerline ---- */
.topbar-logo { margin-top: 0; }
.topbar-lang { margin-top: -1px; }

/* ---- v18: AI bubbles with avatar align top for long replies ---- */
.em-greet { align-items: flex-start; }
.em-greet .em-ava { margin-top: 1px; }
.em-greet span { line-height: 1.5; }

/* ---- v19: GDPR cookie consent bar ---- */
.cookie-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 210; background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  animation: toastIn .3s ease;
}
.cookie-bar .cb-text { flex: 1; min-width: 220px; }
.cookie-bar .cb-text b { display: block; font-size: 14px; margin-bottom: 4px; }
.cookie-bar .cb-text span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.cookie-bar .cb-btns { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 860px) {
  .cookie-bar { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); padding: 12px 14px; }
  .cookie-bar .cb-btns { width: 100%; }
  .cookie-bar .cb-btns .btn { flex: 1; }
}

/* ---- v20: product post = pure image + caption (no tile row) ---- */
.bs-post { padding: 0; border: none; box-shadow: none; }
.bs-hero { margin: 0; }
.bs-hero img { border-radius: 0; }
@media (min-width: 861px) {
  .bs-post { margin: 0 -20px 16px; width: calc(100% + 40px); border-radius: var(--radius); overflow: hidden; }
  .bs-hero { margin: 0; }
  .bs-hero img { border-radius: 0; height: 320px; }
}

/* ---- v21: comment danmaku over the first post's image ---- */
.post-imgs { position: relative; }
.danmaku { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.dm {
  position: absolute; left: 100%; white-space: nowrap;
  background: rgba(20, 8, 9, .55); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  animation: dmFloat 9s linear infinite;
  will-change: transform;
}
.dm i { font-style: normal; color: #FFC9B8; font-weight: 800; margin-right: 4px; }
.dm0 { top: 8%; }
.dm1 { top: 38%; }
.dm2 { top: 68%; }
@keyframes dmFloat {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(calc(-100vw - 100%)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .dm { animation: none; left: 10px; opacity: .9; } }

/* ---- v22: "More furniture ->" entry under the product post image ---- */
.bs-more-furniture {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  padding: 7px 12px 8px; font-size: 12.5px; font-weight: 700; color: var(--brand);
  text-decoration: none; letter-spacing: .2px;
}
.bs-more-furniture:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .bs-more-furniture { padding: 5px 12px 6px; font-size: 12px; }
}

/* ---- v23: "More furniture ->" as a badge on the image, bottom-right ---- */
.bs-more-furniture {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(20, 8, 9, .6); backdrop-filter: blur(4px);
  color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .2px;
}
.bs-hero:hover .bs-more-furniture { background: rgba(20, 8, 9, .8); }

/* ---- v24: "More furniture ->" badge aligned with the caption baseline ---- */
.bs-more-furniture {
  top: auto; bottom: 9px; right: 10px;
  padding: 5px 12px;
}
.bs-caption { padding-right: 150px; }

/* ---- v25: nudge badge 3px down to match caption optical center ---- */
.bs-more-furniture { bottom: 6px; }

/* ---- v26: exact alignment with caption center ---- */
.bs-more-furniture { bottom: 1px; }

/* ---- v27: corrected — lift badge up to caption centerline ---- */
.bs-more-furniture { bottom: 16px; }

/* ---- v28: chat card fills the full container width; bubbles span wide ---- */
.hero .container.hero-grid { padding: 0 8px; }
.hero-chat { width: 100%; }
.em-greet span { max-width: none; }
.em-msg { max-width: 100%; }
@media (min-width: 861px) {
  .hero .container.hero-grid { padding: 0 24px; }
}

/* ---- v29: chat card edge-to-edge on phones ---- */
@media (max-width: 860px) {
  .hero .container.hero-grid { padding: 0; }
  .hero-chat { border-radius: 0; }
}

/* ---- v30: true edge-to-edge, scrollbar accounted ---- */
@media (max-width: 860px) {
  .hero .container.hero-grid { padding: 0; margin: 0; width: 100%; max-width: none; }
  html, body { overflow-x: clip; } /* clip not hidden: hidden turns body into a scroll container and kills the sticky topbar */
}

/* ---- v31: kill the 15px scrollbar gutter on phones ---- */
@media (max-width: 860px) {
  ::-webkit-scrollbar { width: 0; height: 0; }
  .hero-chat { margin-right: -15px; }
}

/* ---- v32: living FAB — wiggle greeting, breathing idle, bounce on hover, happy on open ---- */
@keyframes fabWiggle {
  0%, 100% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-8deg) scale(1.06); }
  30% { transform: rotate(6deg) scale(1.04); }
  45% { transform: rotate(-4deg) scale(1.02); }
  60% { transform: rotate(2deg) scale(1); }
}
@keyframes fabBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
@keyframes fabPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18) rotate(-6deg); }
  100% { transform: scale(1); }
}
@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
}
.chatw-btn {
  animation: fabEnter .55s cubic-bezier(.2,.9,.3,1.35) .6s backwards,
             fabWiggle .8s ease 2.2s,
             fabBreathe 3.2s ease-in-out 3.4s infinite;
}
.chatw-btn:hover { animation: fabPop .45s ease; transform: scale(1.12); }
.chatw-btn:active { transform: scale(.92); }
.chatw-panel.on ~ .chatw-btn,
.chatw-btn.chatw-open { animation: fabPop .5s ease; }
.chatw-btn .chatw-dot { animation: chatwPulse 2s infinite, dotBounce 2.4s ease .5s infinite; }
/* speech bubble puff on load (draws the eye once) */
.chatw-btn::after {
  content: "👋"; position: absolute; top: -12px; left: -30px; font-size: 16px;
  opacity: 0; pointer-events: none;
  animation: fabWave 2s ease 3s;
}
@keyframes fabWave {
  0% { opacity: 0; transform: translate(6px,6px) rotate(20deg); }
  20% { opacity: 1; transform: translate(0,0) rotate(-8deg); }
  80% { opacity: 1; transform: translate(-2px,-2px) rotate(6deg); }
  100% { opacity: 0; transform: translate(-6px,-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .chatw-btn, .chatw-btn .chatw-dot, .chatw-btn::after { animation: none !important; }
}
