:root {
  --ink: #1f2430; --muted: #6b7280; --line: #e6e3dc; --bg: #fbfaf7; --card: #fff;
  --brand: #1f5e4f; --brand-2: #164638; --accent: #e8743b; --sale: #c2410c; --ok: #15803d;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(31,36,48,.06);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); font-size: .9rem; }

/* header */
.topbar { background: var(--brand-2); color: #e8f2ee; text-align: center; font-size: .82rem; padding: 7px 10px; }
header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-main { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.05rem; }
.search { flex: 1; display: flex; max-width: 620px; margin: 0 auto; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg); }
.search:focus-within { border-color: var(--brand); }
.search input { flex: 1; border: 0; background: transparent; padding: 11px 18px; font: inherit; outline: none; min-width: 0; }
.search button { border: 0; background: var(--brand); color: #fff; padding: 0 18px; cursor: pointer; }
.cart-link { position: relative; padding: 6px; }
#cart-count { position: absolute; top: -4px; right: -6px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
#cart-count[hidden] { display: none; }
.catnav { border-top: 1px solid var(--line); }
.catnav .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 6px; padding-bottom: 6px; scrollbar-width: none; }
.catnav a { padding: 7px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500; white-space: nowrap; color: #374151; }
.catnav a:hover, .catnav a.on { background: #eaf2ef; color: var(--brand); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 12px 22px; font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #c9ccd1; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn-ghost:hover { background: #eaf2ef; }
.btn-sm { padding: 8px 14px; font-size: .88rem; border-radius: 8px; }
.btn-block { width: 100%; margin-top: 14px; }
.link { background: none; border: 0; color: var(--brand); font: inherit; font-size: .9rem; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.center { display: block; text-align: center; margin-top: 12px; }

/* hero */
.hero { background: linear-gradient(135deg, #e9f1ed 0%, #f7efe4 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); background: #fff; padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; }
.hero p { font-size: 1.1rem; color: #4b5563; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-cta.center { justify-content: center; }
.hero-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-mosaic a { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-mosaic img { transition: transform .4s; }
.hero-mosaic a:hover img { transform: scale(1.04); }
.hero-mosaic span { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.92); padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; }

/* sections */
.section { padding-top: 48px; padding-bottom: 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.section-head h2 { font-size: 1.6rem; margin: 0; }
.section-head a { color: var(--brand); font-weight: 600; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.cat-tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-tile div { padding: 16px 18px 20px; }
.cat-tile h3 { font-size: 1.15rem; margin-bottom: 4px; }
.cat-tile p { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.cat-tile span { color: var(--brand); font-weight: 600; font-size: .9rem; }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-bottom: 56px; }
.perks div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.perks h4 { margin-bottom: 6px; }
.perks p { margin: 0; color: var(--muted); font-size: .92rem; }
.perks a { color: var(--brand); }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img { position: relative; aspect-ratio: 1; background: #f3f1ec; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; font-size: .75rem; font-weight: 700; padding: 4px 9px; border-radius: 6px; color: #fff; }
.badge.sale { background: var(--sale); }
.badge.out { background: #4b5563; left: auto; right: 10px; }
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-type { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.card-title { font-weight: 600; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card-title:hover { color: var(--brand); }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-weight: 800; font-size: 1.1rem; }
.price-row s { color: var(--muted); font-size: .88rem; }
.card .btn { margin-top: 6px; }

/* shop */
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 18px; }
.crumbs a:hover { color: var(--brand); }
.shop-head { padding-top: 10px; padding-bottom: 10px; }
.shop-head h1 { font-size: 2rem; margin-bottom: 4px; }
.shop-head p { color: var(--muted); margin: 0; }
.shop { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding-bottom: 56px; padding-top: 10px; }
.filters form { position: sticky; top: 140px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.filters h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 4px; }
.filters h4:first-of-type { margin-top: 0; }
.filters label { font-size: .93rem; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.filters .chk { margin: 10px 0; }
select, input, textarea { font: inherit; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--ink); }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand); }
.filters select { width: 100%; }
.price-in { display: flex; align-items: center; gap: 6px; }
.price-in input { width: 100%; min-width: 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: .93rem; color: var(--muted); }
.toolbar label { display: flex; align-items: center; gap: 8px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pager a { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; }
.pager a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.empty { text-align: center; padding: 60px 20px; grid-column: 1 / -1; }
.empty.big { padding: 90px 20px; }
.empty a:not(.btn) { color: var(--brand); }

/* product page */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 18px; padding-bottom: 30px; }
.pdp-img { background: #f3f1ec; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); align-self: start; position: sticky; top: 140px; }
.pdp-img img { width: 100%; height: auto; }
.pdp-info h1 { font-size: 1.8rem; margin: 6px 0 12px; }
.price-row.big .price { font-size: 1.9rem; }
.save { background: #fdecdf; color: var(--sale); font-weight: 700; font-size: .85rem; padding: 3px 9px; border-radius: 6px; }
.stock { display: inline-block; font-size: .88rem; font-weight: 600; margin: 10px 0; }
.stock.in { color: var(--ok); } .stock.low { color: var(--accent); } .stock.out { color: #6b7280; }
.lead { color: #374151; font-size: 1.02rem; }
.feats { padding-left: 0; list-style: none; margin: 14px 0; }
.feats li { padding-left: 26px; position: relative; margin: 7px 0; }
.feats li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.buy { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 16px; }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 40px; border: 0; background: #fff; font-size: 1.1rem; cursor: pointer; }
.qty button:hover { background: #f3f4f6; }
.qty input { width: 52px; text-align: center; border: 0; border-radius: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.assure { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; color: #4b5563; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.variants { margin-top: 18px; }
.variants h4 { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.variants div { display: flex; gap: 8px; flex-wrap: wrap; }
.variants a { width: 62px; height: 62px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; }
.variants a.on, .variants a:hover { border-color: var(--brand); }
.tabs-wrap { padding-bottom: 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 12px 18px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-color: var(--brand); }
.tab { display: none; padding: 20px 0; max-width: 820px; }
.tab.on { display: block; }
.specs { border-collapse: collapse; width: 100%; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.specs th, .specs td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: .93rem; vertical-align: top; }
.specs th { width: 34%; background: #f8f7f3; font-weight: 600; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }

/* cart & checkout */
.page-title { padding-top: 26px; font-size: 2rem; }
.cart { display: grid; grid-template-columns: 1fr 360px; gap: 28px; padding-bottom: 60px; align-items: start; }
.cart-items { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.line { display: grid; grid-template-columns: 86px 1fr auto 100px; gap: 16px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img { width: 86px; height: 86px; border-radius: 10px; object-fit: cover; }
.line-info { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.line-info a { font-weight: 600; }
.line strong { text-align: right; }
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 140px; }
.summary > div { display: flex; justify-content: space-between; padding: 6px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 800; font-size: 1.15rem; }
.hint { font-size: .87rem; color: var(--accent); background: #fdf1e8; padding: 8px 10px; border-radius: 8px; }
.mini { display: block !important; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.mini div { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; font-size: .85rem; padding: 6px 0; }
.mini img { width: 44px; height: 44px; border-radius: 8px; }
.co-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.co-form h3 { margin: 8px 0 0; }
.co-form label { display: flex; flex-direction: column; gap: 5px; font-size: .9rem; font-weight: 500; flex: 1; }
.co-form .chk { flex-direction: row; align-items: center; gap: 10px; }
.co-form .row { display: flex; gap: 12px; }
.done .tick { width: 64px; height: 64px; border-radius: 50%; background: #dcfce7; color: var(--ok); font-size: 2rem; display: grid; place-items: center; margin: 0 auto 16px; }
.order-txt { text-align: left; max-width: 560px; margin: 26px auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; font-size: .82rem; white-space: pre-wrap; }

/* footer */
footer { background: #1d2420; color: #c9d3cd; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 30px; padding-top: 44px; padding-bottom: 30px; }
footer .logo { color: #fff; }
footer h4 { color: #fff; font-size: .95rem; }
footer a, footer span { display: block; font-size: .9rem; margin: 6px 0; }
footer a:hover { color: #fff; }
.copy { border-top: 1px solid #2f3833; padding-top: 16px; padding-bottom: 22px; font-size: .82rem; color: #8b968f; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: .92rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* responsive */
@media (max-width: 980px) {
  .hero-inner, .pdp { grid-template-columns: 1fr; gap: 28px; }
  .pdp-img { position: static; }
  .cat-grid, .perks { grid-template-columns: repeat(2, 1fr); }
  .shop { grid-template-columns: 1fr; }
  .filters form { position: static; }
  .cart { grid-template-columns: 1fr; }
  .summary { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header-main { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; flex-basis: 100%; }
  .cart-link { margin-left: auto; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-grid, .perks { grid-template-columns: 1fr; }
  .line { grid-template-columns: 64px 1fr; }
  .line img { width: 64px; height: 64px; }
  .line .qty, .line strong { grid-column: 2; justify-self: start; }
  .co-form .row { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 32px; padding-bottom: 32px; }
}

/* ===== dynamic store additions ===== */
.head-actions { display: flex; align-items: center; gap: 18px; }
.head-link { font-weight: 600; font-size: .92rem; color: #374151; white-space: nowrap; }
.head-link:hover { color: var(--brand); }
.card form { margin-top: 6px; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 16px 0 0; font-size: .95rem; border: 1px solid; }
.alert-ok { background: #ecfdf3; border-color: #b7e4c7; color: #14532d; }
.alert-warn { background: #fff7ed; border-color: #fed7aa; color: #7c2d12; }
.alert-err { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: .9rem; font-weight: 500; flex: 1; }
.form .chk { flex-direction: row; align-items: center; gap: 10px; }
.form .row { display: flex; gap: 12px; }
.form h3 { margin: 8px 0 0; }
.pay { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.pay:has(input:checked) { border-color: var(--brand); background: #f3f8f6; }
.small { font-size: .83rem; }
.line-foot { padding: 12px 16px; text-align: right; }
.pager .gap { padding: 0 6px; align-self: center; color: var(--muted); }
.receipt { max-width: 460px; margin: 24px auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; text-align: left; }
.receipt div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .93rem; }
.receipt .total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; font-size: 1.05rem; }
.narrow { max-width: 560px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; margin: 40px auto; max-width: 440px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 1.6rem; margin-top: 14px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: .9rem; }
.auth-links a { color: var(--brand); }
.checks { list-style: none; padding: 0; } .checks .ok { color: var(--ok); } .checks .bad { color: #b91c1c; font-weight: 600; }
.account { display: grid; grid-template-columns: 1fr 340px; gap: 28px; padding-bottom: 60px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h3 { margin-bottom: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table a { color: var(--brand); font-weight: 600; }
.num { text-align: right !important; white-space: nowrap; }
.st { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef0f3; color: #374151; white-space: nowrap; }
.st-new { background: #e0ecff; color: #1d4ed8; } .st-processing { background: #fef3c7; color: #92400e; }
.st-shipped { background: #ede9fe; color: #5b21b6; } .st-delivered, .st-paid { background: #dcfce7; color: #166534; }
.st-cancelled, .st-failed { background: #fee2e2; color: #991b1b; } .st-refunded { background: #f3f4f6; color: #4b5563; } .st-pending { background: #fff7ed; color: #9a3412; }
@media (max-width: 980px) { .account { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .form .row { flex-direction: column; } .head-link { font-size: .85rem; } .head-actions { gap: 12px; margin-left: auto; } .table { font-size: .85rem; } }
