/* ============================================================
   LinkBrave — Social Commerce Storefront
   Design system v1.0
   ============================================================ */
:root {
  /* Pluto theme: dark red + light beige (user-pinned palette) */
  --brand: #9B2524;        /* dark red */
  --brand-2: #C25148;      /* light red (gradient start) */
  --brand-dark: #6F1516;   /* deep maroon */
  --brand-soft: #F6E7E2;   /* soft red-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, #C25148 0%, #9B2524 55%, #6F1516 100%);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
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 ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  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: 68px; }
.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: 84px 0 72px; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; 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: 20px;
}
.hero h1 { font-size: 54px; line-height: 1.12; letter-spacing: -1.5px; font-weight: 800; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 20px 0 32px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 44px; }
.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 { position: relative; }
.hero-visual .photo {
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3; 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; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.section-head h2 { font-size: 34px; letter-spacing: -1px; font-weight: 800; }
.section-head .sub { color: var(--muted); margin-top: 6px; font-size: 15.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: 18px; }
.cat-tile {
  background: var(--card); border-radius: var(--radius); padding: 26px 20px; 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: 62px; height: 62px; margin: 0 auto 14px; border-radius: 18px; background: var(--brand-soft);
  display: grid; place-items: center; font-size: 30px;
}
.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: 22px; }
.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 { 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) ---------- */
.community-strip { background: linear-gradient(160deg,#2C1114, #42191D); color: #fff; }
.community-strip .section-head h2, .community-strip .sub { color: #fff; }
.community-strip .sub { opacity: .7; }
.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; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--brand-soft); }
.newsletter-inner { text-align: center; max-width: 560px; margin: 0 auto; padding: 64px 0; }
.newsletter h2 { font-size: 30px; letter-spacing: -.8px; }
.newsletter p { color: var(--muted); margin: 10px 0 26px; }
.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: 60px 0 28px; 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; }

/* ---------- Page shell ---------- */
.page-head { padding: 46px 0 8px; }
.page-head h1 { font-size: 36px; letter-spacing: -1px; }
.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: 26px 0 80px; }
.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: 26px 0 80px; }
.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: 26px 0 80px; }
.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: 26px 0 80px; }
.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: 9px; flex-wrap: wrap; margin-bottom: 22px; }
.t-chip {
  padding: 8px 18px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line);
  font-weight: 700; font-size: 13.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: 20px 22px; margin-bottom: 20px; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-head .who b { font-size: 14.5px; display: block; }
.post-head .who span { font-size: 12.5px; color: var(--faint); }
.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; }
.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: 420px; 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; gap: 6px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.pa {
  display: flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px;
  font-size: 13.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: 60px 0 20px; }
.about-hero h1 { font-size: 40px; letter-spacing: -1.2px; }
.about-hero p { color: var(--muted); font-size: 17px; margin-top: 14px; }
.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; }
}
@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; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 38px; }
  .pd-layout, .cart-layout, .co-layout, .community-layout { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .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: 52px 0; }
}
@media (max-width: 560px) {
  .grid-products { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-mini-grid { grid-template-columns: 1fr; }
  .values-grid, .milestones, .value-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; flex-wrap: wrap; }
  .newsletter form { flex-direction: column; }
}
