:root {
  --ink: #14211f;
  --ink-2: #4a5a57;
  --muted: #7a8a87;
  --line: #e5ebe9;
  --bg: #f6f8f7;
  --card: #ffffff;
  --brand: #0f3d3e;
  --brand-2: #155e5f;
  --accent: #ff6b3d;
  --accent-soft: #fff0ea;
  --good: #1a8f5a;
  --star: #f5a524;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 38, .06), 0 4px 16px rgba(16, 40, 38, .06);
  --shadow-lg: 0 12px 40px rgba(16, 40, 38, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- top bars ---------- */
.disclosure-bar {
  background: var(--brand);
  color: #cfe3e0;
  font-size: 12px;
  text-align: center;
  padding: 6px 16px;
}
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand); color: var(--accent); font-weight: 800;
}
.search { flex: 1; position: relative; max-width: 640px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: var(--muted); }
.search input {
  width: 100%; height: 44px; padding: 0 16px 0 42px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input:focus { background: #fff; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(21, 94, 95, .12); }
.header-links { display: flex; gap: 18px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.header-links a:hover { color: var(--brand); }

.cat-nav {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 12px;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0; border: 1px solid var(--line); background: #fff;
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.cat-pill:hover { border-color: var(--brand-2); color: var(--brand); }
.cat-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat-pill small { opacity: .6; font-weight: 500; margin-left: 4px; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(800px 400px at 85% 10%, rgba(255, 107, 61, .22), transparent 60%),
    linear-gradient(135deg, #0f3d3e 0%, #12504f 60%, #0d3232 100%);
  color: #fff; overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: #ffb59a; margin: 0 0 12px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -.03em; }
.hero h1 span { color: var(--accent); }
.lead { font-size: 17px; color: #cfe3e0; max-width: 520px; margin: 0 0 28px; line-height: 1.6; }
.hero-stats { display: flex; gap: 32px; margin-bottom: 32px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 26px; font-weight: 800; }
.hero-stats span { font-size: 13px; color: #a9c6c2; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); background: transparent; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .08); }

.hero-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; transform: rotate(-4deg); }
.hero-showcase .tile {
  background: #fff; border-radius: 16px; padding: 8px; box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.hero-showcase .tile:nth-child(3n+2) { animation-delay: -2s; margin-top: 28px; }
.hero-showcase .tile:nth-child(3n) { animation-delay: -4s; }
.hero-showcase img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; background: var(--bg); }
.hero-showcase .tile span { display: block; font-size: 12px; font-weight: 800; color: var(--accent); padding: 6px 4px 2px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: all .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #f25a2a; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 107, 61, .35); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand-2); }
.btn-block { width: 100%; }

/* ---------- sections ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 40px 0 16px; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.section-head p { margin: 4px 0 0; font-size: 14px; }
.see-all { font-weight: 700; font-size: 14px; color: var(--brand-2); white-space: nowrap; }
.see-all:hover { color: var(--accent); }

.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 14px;
  overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory;
}
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* ---------- catalog ---------- */
.catalog { padding-bottom: 64px; }
.toolbar { display: flex; gap: 10px; align-items: center; }
.select { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.select select {
  height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-weight: 600; color: var(--ink); cursor: pointer;
}
.filter-toggle { display: none; height: 40px; }

.catalog-body { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.filters {
  position: sticky; top: 130px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.filter-group { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.filter-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink-2);
}
.chip:hover { border-color: var(--brand-2); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input {
  width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.price-range input:focus { border-color: var(--brand-2); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; cursor: pointer; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }

/* ---------- product card ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-img { position: relative; aspect-ratio: 1; background: var(--bg); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge-disc {
  position: absolute; top: 8px; left: 8px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 12px;
  padding: 3px 8px; border-radius: 6px;
}
.badge-off {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(15, 61, 62, .9); color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 3px 7px; border-radius: 5px; letter-spacing: .02em;
}
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title {
  font-size: 13.5px; line-height: 1.4; margin: 0; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em;
}
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 17px; color: var(--accent); }
.price-old { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: auto; }
.stars { color: var(--star); font-weight: 700; }
.stars b { color: var(--ink-2); font-weight: 600; }
.card-shop { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.skeleton { background: linear-gradient(90deg, #eef2f1 25%, #f7f9f8 50%, #eef2f1 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); aspect-ratio: .68; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.load-more-wrap { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- modal ---------- */
.product-modal {
  width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  border: none; border-radius: 20px; padding: 0; box-shadow: var(--shadow-lg); overflow: auto;
}
.product-modal::backdrop { background: rgba(10, 25, 24, .55); backdrop-filter: blur(3px); }
.modal-close {
  position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.pm-body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 28px; }
.pm-gallery .main { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg); }
.pm-gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs button { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--bg); }
.thumbs button.active { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pm-info h2 { font-size: 21px; line-height: 1.35; margin: 4px 0 12px; letter-spacing: -.01em; }
.crumbs { font-size: 12px; color: var(--muted); font-weight: 600; }
.pm-price { background: var(--accent-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pm-price .price { font-size: 28px; }
.pm-price .save { background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.facts div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.facts strong { display: block; font-size: 16px; }
.facts span { font-size: 11.5px; color: var(--muted); }
.shop-line { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #e6f2f0; color: var(--brand-2); }
.tag.green { background: #e5f5ec; color: var(--good); }
.pm-actions { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pm-actions .btn-primary { flex: 1; height: 50px; font-size: 15px; }
.pm-note { font-size: 12px; color: var(--muted); margin: 6px 0 16px; }
.desc { font-size: 14px; line-height: 1.65; color: var(--ink-2); white-space: pre-line; border-top: 1px solid var(--line); padding-top: 14px; max-height: 260px; overflow: auto; }
.related { grid-column: 1 / -1; }
.related h3 { margin: 4px 0 12px; font-size: 17px; }

/* ---------- footer ---------- */
.site-footer { background: #0c2b2b; color: #cfe3e0; padding: 40px 0; }
.site-footer .muted { color: #8eaaa6; font-size: 13.5px; line-height: 1.6; }
.site-footer .brand-mark { background: #fff; }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.footer-note h4 { margin: 0 0 8px; color: #fff; }

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--brand); color: #fff;
  font-size: 18px; cursor: pointer; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }

body.view-list .hero, body.view-list .rail-section { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .hero-showcase { display: none; }
  .catalog-body { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }
  .filters { display: none; position: static; }
  .filters.open { display: block; }
  .pm-body { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  .header-inner { gap: 10px; height: 58px; }
  .brand-name, .header-links { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rail { grid-auto-columns: 46%; }
  .catalog-head { flex-direction: column; align-items: stretch; }
  .toolbar { justify-content: space-between; }
  .price { font-size: 15px; }
  .hero-stats { gap: 20px; }
  .facts strong { font-size: 14px; }
}

/* ---------- static SEO pages (/p/…, /c/…) ---------- */
.card-title a { color: inherit; }
.static-main { padding-top: 20px; padding-bottom: 56px; min-height: 60vh; }
.crumbs-nav { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs-nav a { color: var(--brand-2); font-weight: 600; }
.product-page { background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.product-page h1 { font-size: 22px; line-height: 1.35; margin: 4px 0 12px; letter-spacing: -.01em; }
.summary { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.desc-title { font-size: 16px; margin: 18px 0 8px; }
.product-page .desc { max-height: none; }
.related-static h2, .cat-hero h1 { font-size: 22px; letter-spacing: -.02em; margin: 36px 0 14px; }
.cat-hero h1 { font-size: 30px; margin-top: 8px; }
.cat-hero a { color: var(--brand-2); font-weight: 700; }
.subcats { font-size: 13px; color: var(--ink-2); }
.footer-cats { grid-column: 1 / -1; }
.footer-cats h4 { margin: 0 0 8px; color: #fff; }
.footer-cats a { display: inline-block; margin: 0 14px 6px 0; font-size: 13.5px; color: #8eaaa6; }
.footer-cats a:hover { color: #fff; }
@media (max-width: 640px) { .static-page .brand-name { display: none; } }
