@import url("/css/fonts.css");

/* ============================================================
   TechOpt — дизайн-система «тёплый ритейл»
   изумруд + янтарь + кремовая бумага + графит
   ============================================================ */
:root {
  /* поверхности */
  --paper:      #f6f3ea;
  --paper-2:    #efe9dc;
  --surface:    #ffffff;
  --surface-2:  #fbf9f3;
  /* текст */
  --ink:        #1a1712;
  --ink-2:      #453d31;
  --muted:      #7c7466;
  --faint:      #a89e8c;
  /* линии */
  --line:       #e8e1d2;
  --line-2:     #d9d0bd;
  /* бренд (изумруд) */
  --brand:      #1c6b47;
  --brand-600:  #185c3c;
  --brand-700:  #123f2a;
  --brand-050:  #e7f0ea;
  --brand-100:  #d3e4d9;
  --brand-ink:  #0e3a26;
  /* акцент (янтарь) */
  --accent:     #b9770f;
  --accent-strong:#9a6109;
  --accent-bright:#f0a92b;
  --accent-050: #fbeed3;
  /* статусы */
  --ok:         #1f7a4d;
  --ok-050:     #e6f2ea;
  --danger:     #b23b2e;
  --danger-050: #f8e8e4;
  --star:       #e2a12b;
  /* фокус */
  --focus:      rgba(28,107,71,.35);
  /* тени (тёплые) */
  --sh-1: 0 1px 2px rgba(46,33,12,.06), 0 1px 1px rgba(46,33,12,.04);
  --sh-2: 0 6px 18px rgba(46,33,12,.09), 0 2px 6px rgba(46,33,12,.05);
  --sh-3: 0 22px 48px rgba(34,24,8,.16);
  /* радиусы */
  --r-xs: 7px; --r-sm: 11px; --r: 15px; --r-lg: 22px; --r-pill: 999px;
  /* типографика */
  --font-body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  /* движение */
  --t: .18s ease;
  --t-slow: .34s cubic-bezier(.2,.7,.2,1);
  --maxw: 1240px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
}
a { color: var(--brand); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--brand-600); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
::selection { background: var(--brand-100); color: var(--brand-ink); }

h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.15; font-weight: 700; letter-spacing: -.018em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + .8vw, 1.7rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

/* ---- утилиты ---- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.page { padding: 30px 0 64px; min-height: 62vh; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.ta-right { text-align: right; }
.block { margin-top: 48px; }
.eyebrow {
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent-bright); border-radius: 2px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .link-more { font-weight: 600; font-size: .92rem; white-space: nowrap; }

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  --bg: var(--surface); --bd: var(--line-2); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-pill); border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg); cursor: pointer; font-size: .95rem; font-weight: 600;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);
  white-space: nowrap; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); box-shadow: var(--sh-1); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
.btn-primary { --bg: var(--brand); --bd: var(--brand); --fg: #fff; }
.btn-primary:hover { --bg: var(--brand-600); --bd: var(--brand-600); }
.btn-accent { --bg: var(--accent-bright); --bd: var(--accent-bright); --fg: #3a2602; }
.btn-accent:hover { --bg: #e89e1d; --bd: #e89e1d; }
.btn-ghost { --bg: transparent; --bd: transparent; --fg: var(--ink); }
.btn-ghost:hover { --bg: var(--paper-2); box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-danger { --bd: #e7b8b1; --fg: var(--danger); }
.btn-danger:hover { --bg: var(--danger); --bd: var(--danger); --fg: #fff; }
.linklike { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { text-decoration: underline; }
.inline-form { display: inline; margin: 0; }

/* ============================================================
   Шапка
   ============================================================ */
.topbar { background: var(--brand-700); color: #d7e6dc; font-size: .8rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 38px; gap: 16px; }
.topbar a { color: #eaf3ee; font-weight: 500; }
.topbar a:hover { color: #fff; }
.topbar .tb-left { display: flex; gap: 20px; align-items: center; }
.topbar .tb-right { display: flex; gap: 20px; align-items: center; }
.topbar .tb-tag { color: #a7c6b4; }

.site-header { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 0 rgba(255,255,255,.06), var(--sh-1); }
.header-inner { display: flex; align-items: center; gap: 22px; height: 74px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: #fff; letter-spacing: -.02em; display: inline-flex; align-items: baseline; gap: .12em; }
.logo:hover { color: #fff; }
.logo .dot { color: var(--accent-bright); }
.burger { display: none; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 44px; height: 44px; border-radius: var(--r-sm); cursor: pointer; align-items: center; justify-content: center; }
.burger svg { width: 22px; height: 22px; }

.search { flex: 1; display: flex; max-width: 600px; position: relative; }
.search input {
  flex: 1; height: 46px; padding: 0 50px 0 18px; font-size: .95rem; color: var(--ink);
  border: 0; border-radius: var(--r-pill); outline: none; background: #fff; box-shadow: var(--sh-1);
}
.search input::placeholder { color: var(--faint); }
.search input:focus { box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.search button {
  position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center;
  transition: background var(--t);
}
.search button:hover { background: var(--brand-700); }
.search button svg { width: 18px; height: 18px; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav .nav-link { color: #eaf3ee; font-weight: 600; font-size: .95rem; padding: 9px 14px; border-radius: var(--r-pill); transition: background var(--t), color var(--t); }
.main-nav .nav-link:hover { background: rgba(255,255,255,.13); color: #fff; }
.cart-link { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.13); padding: 9px 16px 9px 14px; border-radius: var(--r-pill); color: #fff; font-weight: 600; }
.cart-link:hover { background: rgba(255,255,255,.22); color: #fff; }
.cart-link svg { width: 19px; height: 19px; }
.badge {
  min-width: 21px; height: 21px; line-height: 21px; text-align: center; background: var(--accent-bright); color: #3a2602;
  border-radius: var(--r-pill); font-size: .72rem; font-weight: 800; padding: 0 6px;
}

/* подкатегорийная лента под шапкой */
.cat-strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.cat-strip .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cat-strip .container::-webkit-scrollbar { display: none; }
.cat-strip a { color: var(--ink-2); font-weight: 600; font-size: .9rem; padding: 13px 14px; white-space: nowrap; border-bottom: 2.5px solid transparent; transition: color var(--t), border-color var(--t); }
.cat-strip a:hover { color: var(--brand); }
.cat-strip a.active { color: var(--brand); border-color: var(--brand); }

/* ============================================================
   Главная — герой
   ============================================================ */
.hero {
  position: relative; overflow: hidden; margin-top: 26px;
  background:
    radial-gradient(1200px 380px at 88% -10%, rgba(240,169,43,.16), transparent 60%),
    radial-gradient(900px 420px at -5% 110%, rgba(28,107,71,.12), transparent 55%),
    linear-gradient(180deg, #fffdf8, var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 56px 56px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(26,23,18,.05) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(120deg, #000, transparent 70%); mask-image: linear-gradient(120deg, #000, transparent 70%);
}
.hero-inner { position: relative; max-width: 640px; }
.hero h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; margin: 16px 0 14px; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); margin: 0 0 26px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-stats { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .hs { display: flex; flex-direction: column; }
.hero-stats .hs b { font-size: 1.5rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.hero-stats .hs span { font-size: .82rem; color: var(--muted); }

/* категории-плитки */
.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.group-card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--ink);
  min-height: 132px; transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t);
}
.group-card::before {
  content: ""; position: absolute; right: -30px; bottom: -30px; width: 130px; height: 130px; border-radius: 50%;
  background: var(--brand-050); transition: transform var(--t-slow), background var(--t);
}
.group-card .g-ico { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); background: var(--brand-050); color: var(--brand); margin-bottom: 6px; }
.group-card .g-ico svg { width: 24px; height: 24px; }
.group-card .group-title { position: relative; font-weight: 700; font-size: 1.05rem; }
.group-card .group-count { position: relative; color: var(--muted); font-size: .85rem; }
.group-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--brand-100); }
.group-card:hover::before { transform: scale(1.25); background: var(--accent-050); }

/* доверие/преимущества */
.usp { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.usp .u { display: flex; gap: 13px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.usp .u-ico { flex: none; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--accent-050); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; }
.usp .u-ico svg { width: 22px; height: 22px; }
.usp .u b { display: block; font-size: .95rem; }
.usp .u span { font-size: .84rem; color: var(--muted); }

/* ============================================================
   Сетка товаров и карточка
   ============================================================ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.product-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column; transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--brand-100); }
.pc-link { display: flex; flex-direction: column; flex: 1; color: var(--ink); }
.pc-link:hover { text-decoration: none; }
.thumb {
  position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-bottom: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform var(--t-slow); }
.product-card:hover .thumb img { transform: scale(1.05); }
.thumb.noimg::after, .noimg-label { content: "нет фото"; color: var(--faint); font-size: .8rem; }
.noimg-label { position: absolute; }
.pc-badge { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 4px 9px; border-radius: var(--r-pill); }
.pc-badge.stock { background: var(--ok-050); color: var(--ok); }
.pc-badge.order { background: var(--paper-2); color: var(--muted); }
.p-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.p-name { font-size: .9rem; line-height: 1.36; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.p-art { font-size: .75rem; color: var(--faint); }
.p-price { font-size: 1.22rem; font-weight: 800; margin-top: auto; letter-spacing: -.02em; padding-top: 4px; }
.p-price .cur { font-size: .8em; font-weight: 700; color: var(--muted); margin-left: 2px; }
.pc-add { padding: 0 14px 14px; }
.btn-add { width: 100%; --bg: var(--brand-050); --bd: transparent; --fg: var(--brand); font-weight: 700; }
.btn-add:hover { --bg: var(--brand); --fg: #fff; }
.btn-add svg { width: 17px; height: 17px; }

/* ============================================================
   Каталог
   ============================================================ */
.breadcrumbs { font-size: .82rem; color: var(--muted); margin-bottom: 18px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs .sep { color: var(--faint); }

.catalog-layout { display: grid; grid-template-columns: 256px 1fr; gap: 30px; align-items: start; }
.sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; position: sticky; top: 92px; }
.sidebar h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 12px 12px 8px; }
.cat-nav { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.cat-nav > li { margin-bottom: 1px; }
.cat-nav a { color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: var(--r-sm); font-weight: 500; transition: background var(--t), color var(--t); }
.cat-nav a .c { color: var(--faint); font-size: .82rem; font-weight: 500; }
.cat-nav a:hover { background: var(--paper); text-decoration: none; }
.cat-nav a.active { background: var(--brand-050); color: var(--brand-ink); font-weight: 700; }
.cat-nav a.active .c { color: var(--brand); }
.subcat { list-style: none; margin: 2px 0 8px; padding-left: 8px; border-left: 2px solid var(--line); }
.subcat a { font-size: .86rem; color: var(--muted); padding: 7px 10px; }
.subcat a.active { color: var(--brand-ink); }

.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.results-bar h1 { margin: 0; font-size: 1.55rem; }
.results-bar .count { color: var(--muted); font-size: .9rem; }
.sortbar { display: inline-flex; align-items: center; gap: 8px; }
.sortbar label { font-size: .85rem; color: var(--muted); }
.select {
  appearance: none; -webkit-appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c7466' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1.5px solid var(--line-2); border-radius: var(--r-pill); padding: 9px 34px 9px 14px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink); cursor: pointer;
}
.select:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); border-color: var(--brand); }

.pagination { display: flex; gap: 7px; margin-top: 34px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-weight: 600; transition: all var(--t);
}
.pagination a:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }
.pagination .active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .dots { border: 0; background: none; color: var(--faint); min-width: 20px; }

.empty { color: var(--muted); padding: 48px 0; text-align: center; }
.empty svg { width: 56px; height: 56px; color: var(--faint); margin-bottom: 14px; }

/* ============================================================
   Карточка товара
   ============================================================ */
.product-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.gallery { position: sticky; top: 92px; }
.gallery .main-img { position: relative; aspect-ratio: 1/1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery .main-img img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 26px; }
.gallery.noimg-big .main-img img { display: none; }
.gallery.noimg-big .main-img::after { content: "нет фото"; color: var(--faint); }
.thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.thumbs img { width: 70px; height: 70px; object-fit: contain; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; padding: 6px; background: var(--surface); transition: border-color var(--t); }
.thumbs img:hover { border-color: var(--line-2); }
.thumbs img.active { border-color: var(--brand); }

.product-info h1 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.95rem); margin-bottom: 14px; }
.pi-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: var(--r-pill); background: var(--paper-2); color: var(--ink-2); }
.chip.brand { background: var(--surface); border: 1px solid var(--line); }
.chip.in-stock { background: var(--ok-050); color: var(--ok); }
.chip.in-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.chip.out-stock { background: var(--paper-2); color: var(--muted); }
.price-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; margin-bottom: 22px; }
.price-big { font-size: 2.3rem; font-weight: 800; letter-spacing: -.025em; line-height: 1; }
.price-big .cur { font-size: .55em; font-weight: 700; color: var(--muted); }
.price-note { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.add-row { display: flex; gap: 14px; align-items: stretch; margin-top: 18px; flex-wrap: wrap; }

/* степпер количества */
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); overflow: hidden; }
.stepper button { width: 46px; height: 50px; border: 0; background: none; cursor: pointer; font-size: 1.3rem; color: var(--ink-2); display: flex; align-items: center; justify-content: center; transition: background var(--t); }
.stepper button:hover { background: var(--paper-2); }
.stepper input { width: 54px; height: 50px; border: 0; text-align: center; font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink); -moz-appearance: textfield; background: none; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-row .btn-primary { flex: 1; min-width: 180px; }

.specs { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.specs .row { display: flex; gap: 12px; padding: 11px 18px; font-size: .9rem; }
.specs .row:nth-child(odd) { background: var(--surface-2); }
.specs .row .k { color: var(--muted); min-width: 130px; }
.specs .row .v { color: var(--ink); font-weight: 500; }
.description { margin-bottom: 8px; }
.description h3 { margin-bottom: 12px; }
.description p { white-space: pre-line; color: var(--ink-2); line-height: 1.7; }

/* ============================================================
   Корзина
   ============================================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; }
.cart-items { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 78px 1fr auto auto 34px; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-thumb { width: 78px; height: 78px; border: 1px solid var(--line); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface-2); }
.cart-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 6px; }
.cart-main a { color: var(--ink); font-size: .95rem; font-weight: 600; }
.cart-main a:hover { color: var(--brand); }
.cart-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; }
.cart-stepper button { width: 36px; height: 38px; border: 0; background: none; cursor: pointer; font-size: 1.1rem; color: var(--ink-2); }
.cart-stepper button:hover { background: var(--paper-2); }
.cart-stepper input { width: 44px; height: 38px; border: 0; text-align: center; font: inherit; font-weight: 700; background: none; -moz-appearance: textfield; }
.cart-stepper input::-webkit-outer-spin-button, .cart-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-price { font-weight: 800; text-align: right; font-size: 1.02rem; white-space: nowrap; }
.remove { background: none; border: 0; color: var(--faint); cursor: pointer; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all var(--t); }
.remove:hover { background: var(--danger-050); color: var(--danger); }
.remove svg { width: 18px; height: 18px; }

.checkout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; position: sticky; top: 92px; box-shadow: var(--sh-1); }
.checkout h3 { margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; color: var(--muted); font-size: .92rem; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; margin: 8px 0 16px; border-top: 1px dashed var(--line-2); font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.sum-total b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.checkout-form { display: flex; flex-direction: column; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.field input, .field textarea, .input {
  padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); font: inherit; color: var(--ink); background: var(--surface); transition: border-color var(--t), box-shadow var(--t); width: 100%;
}
.field input:focus, .field textarea:focus, .input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--focus); }
.checkout-hint { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .8rem; margin-top: 4px; }

/* ============================================================
   Общие блоки / уведомления
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.doc { max-width: 780px; margin: 0 auto; padding: 36px 40px; }
.doc h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: 8px; }
.doc h3 { margin-top: 26px; margin-bottom: 8px; }
.doc ul { padding-left: 20px; color: var(--ink-2); margin: 0 0 1em; }
.doc li { margin: 6px 0; }
.doc p { color: var(--ink-2); }
@media (max-width: 720px) { .doc { padding: 26px 20px; } }
.done { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 60px 40px; text-align: center; max-width: 600px; margin: 0 auto; }
.done .done-ico { width: 76px; height: 76px; border-radius: 50%; background: var(--ok-050); color: var(--ok); display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; }
.done .done-ico svg { width: 38px; height: 38px; }
.done h1 { margin-bottom: 12px; }
.contacts p { margin: 8px 0; }
.notfound-code { font-family: var(--font-display); font-weight: 800; font-size: 4rem; color: var(--brand-100); line-height: 1; margin-bottom: 4px; }
.notfound-search { display: flex; gap: 10px; max-width: 440px; margin: 22px auto 20px; }
.notfound-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; font-weight: 600; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.contacts-grid .card { padding: 26px 28px; }
.contact-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; line-height: 1.4; }
.contact-list .ci { flex: none; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--brand-050); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.contact-list .ci svg { width: 20px; height: 20px; }
.contact-list a { font-weight: 600; }
.how-steps { margin: 14px 0 18px; padding-left: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.how-steps li { position: relative; padding-left: 44px; line-height: 1.5; color: var(--ink-2); }
.how-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: .95rem; display: flex; align-items: center; justify-content: center; }
@media (max-width: 720px) { .contacts-grid { grid-template-columns: 1fr; } }
.alert { padding: 13px 16px; border-radius: var(--r-sm); margin-bottom: 18px; font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.error, .alert-err { background: var(--danger-050); color: #8f2d22; }
.success, .alert-ok { background: var(--ok-050); color: #155f3b; }
.alert-info { background: var(--accent-050); color: var(--accent-strong); }

/* ============================================================
   Подвал
   ============================================================ */
.site-footer { background: var(--brand-700); color: #c9ddd1; margin-top: 70px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding: 50px 0 40px; }
.site-footer .f-brand .logo { color: #fff; }
.site-footer .f-brand p { color: #a7c6b4; font-size: .9rem; max-width: 320px; margin-top: 12px; }
.site-footer h4 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: #c9ddd1; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.f-contact b { color: #fff; display: block; font-size: 1.05rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: .82rem; color: #8fb09c; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   Тост
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 18px);
  background: var(--ink); color: #fff; padding: 13px 20px 13px 16px; border-radius: var(--r-pill);
  font-size: .92rem; font-weight: 600; box-shadow: var(--sh-3); display: flex; align-items: center; gap: 10px;
  opacity: 0; transition: opacity var(--t), transform var(--t-slow); z-index: 80; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 19px; height: 19px; flex: none; }
.toast-ok { background: var(--brand); }
.toast-ok svg { color: var(--accent-bright); }
.toast-err { background: var(--danger); }

/* back to top */
.to-top { position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff; border: 0; cursor: pointer; box-shadow: var(--sh-2); display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity var(--t), transform var(--t), background var(--t); z-index: 50; }
.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--brand-700); }
.to-top svg { width: 22px; height: 22px; }

/* появление при загрузке */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.reveal-2 { animation-delay: .06s; }
.reveal-3 { animation-delay: .12s; }
/* лёгкий каскад карточек в сетке (первый экран) */
.product-grid > .reveal:nth-child(2) { animation-delay: .04s; }
.product-grid > .reveal:nth-child(3) { animation-delay: .08s; }
.product-grid > .reveal:nth-child(4) { animation-delay: .12s; }
.product-grid > .reveal:nth-child(5) { animation-delay: .16s; }
.product-grid > .reveal:nth-child(n+6) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ============================================================
   Адаптив
   ============================================================ */
.mobile-only { display: none; }
@media (max-width: 1024px) {
  .product-page { grid-template-columns: 1fr; gap: 28px; }
  .gallery { position: static; }
}
@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 28px; }
}
@media (max-width: 720px) {
  .mobile-only { display: flex; }
  .burger { display: flex; }
  .topbar { display: none; }
  .header-inner { height: 64px; gap: 12px; flex-wrap: wrap; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--brand); flex-direction: column; align-items: stretch; padding: 10px; gap: 4px; box-shadow: var(--sh-2); }
  .main-nav.open { display: flex; }
  .main-nav .nav-link, .main-nav .cart-link { width: 100%; }
  .search { order: 3; max-width: none; width: 100%; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 28px; }
  .container { padding: 0 16px; }
  .cart-row { grid-template-columns: 60px 1fr 34px; grid-template-areas: "img main rm" "img step price"; gap: 10px 12px; }
  .cart-thumb { width: 60px; height: 60px; grid-area: img; }
  .cart-main { grid-area: main; }
  .cart-stepper { grid-area: step; }
  .cart-price { grid-area: price; text-align: left; }
  .remove { grid-area: rm; }
  .hero { padding: 32px 22px; }
}

/* ============================================================
   АДМИН-ПАНЕЛЬ
   ============================================================ */
.admin-body { background: var(--paper-2); }
.admin-shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.admin-aside { background: var(--brand-700); color: #cfe0d6; padding: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 22px 22px 18px; font-family: var(--font-display); font-size: 1.25rem; color: #fff; }
.admin-brand .dot { color: var(--accent-bright); }
.admin-brand small { font-family: var(--font-body); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: #87a795; font-weight: 600; }
.admin-menu { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; flex: 1; }
.admin-menu a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-sm); color: #cfe0d6; font-weight: 600; font-size: .92rem; transition: background var(--t), color var(--t); }
.admin-menu a svg { width: 19px; height: 19px; flex: none; opacity: .9; }
.admin-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-menu a.active { background: var(--brand); color: #fff; }
.admin-menu .count { margin-left: auto; background: rgba(255,255,255,.16); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: var(--r-pill); }
.admin-aside-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 8px; }
.admin-aside-foot a, .admin-aside-foot button { color: #a7c6b4; font-size: .85rem; font-weight: 600; background: none; border: 0; text-align: left; cursor: pointer; padding: 6px 8px; border-radius: var(--r-xs); }
.admin-aside-foot a:hover, .admin-aside-foot button:hover { color: #fff; background: rgba(255,255,255,.06); }

.admin-main { padding: 30px 36px 60px; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-topbar h1 { margin: 0; font-size: 1.5rem; }
.admin-topbar .crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 4px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.stat .s-ico { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }
.stat .s-ico svg { width: 20px; height: 20px; }
.stat.green .s-ico { background: var(--brand-050); color: var(--brand); }
.stat.amber .s-ico { background: var(--accent-050); color: var(--accent-strong); }
.stat.gray .s-ico { background: var(--paper-2); color: var(--muted); }
.stat .num { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: .85rem; }

.admin-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 1rem; }
.panel-body { padding: 20px; }

.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: .9rem; }
.panel .data-table { border: 0; border-radius: 0; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { background: var(--surface-2); font-weight: 700; color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.data-table tbody tr { transition: background var(--t); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr.inactive { opacity: .55; }
.data-table tr.row-link { cursor: pointer; }
.data-table img.mini { width: 46px; height: 46px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--r-xs); background: #fff; }
.data-table .num-cell { font-weight: 700; white-space: nowrap; }

.import-form { max-width: 680px; }
.import-form input[type=file] { display: block; margin: 14px 0; font-size: .9rem; width: 100%; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; }
.import-mode { border: 0; padding: 0; margin: 6px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.import-mode .radio { display: flex; gap: 11px; align-items: flex-start; font-size: .9rem; line-height: 1.5; cursor: pointer; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); transition: border-color var(--t), background var(--t); }
.import-mode .radio:has(input:checked) { border-color: var(--brand); background: var(--brand-050); }
.import-mode .radio input { margin-top: 3px; accent-color: var(--brand); }
.import-mode em { color: var(--brand); font-style: normal; font-weight: 600; }

.admin-search { display: flex; gap: 10px; max-width: 460px; }
.admin-search input { flex: 1; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r-pill); font: inherit; }
.admin-search input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--focus); }
.products-toolbar { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }

/* статусы заявок */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; padding: 4px 11px; border-radius: var(--r-pill); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-new { background: var(--brand-050); color: var(--brand); }
.status-processing { background: var(--accent-050); color: var(--accent-strong); }
.status-done { background: var(--ok-050); color: var(--ok); }
.status-canceled { background: var(--paper-2); color: var(--muted); }
.status-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.status-tabs a { padding: 8px 16px; border: 1.5px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.status-tabs a:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }
.status-tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.status-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 18px 0 24px; }
.order-customer { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 28px; margin-bottom: 22px; }
.order-customer .k { color: var(--muted); font-size: .82rem; }

.settings-form { max-width: 620px; display: flex; flex-direction: column; gap: 18px; }
.settings-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.toggle input { width: 20px; height: 20px; accent-color: var(--brand); }

/* админ-вход */
.admin-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; background:
  radial-gradient(800px 400px at 50% -10%, rgba(28,107,71,.18), transparent 60%), var(--brand-700); padding: 20px; }
.login-card { background: var(--surface); border-radius: var(--r-lg); padding: 38px 34px; width: 360px; box-shadow: var(--sh-3); }
.login-card .login-brand { font-family: var(--font-display); font-size: 1.5rem; text-align: center; margin-bottom: 4px; }
.login-card .login-brand .dot { color: var(--accent-bright); }
.login-card .login-sub { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 24px; }
.login-card .field { margin-bottom: 16px; }
.login-card .btn { width: 100%; }

@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-aside { position: static; height: auto; flex-direction: column; }
  .admin-menu { flex-direction: row; overflow-x: auto; flex: none; }
  .admin-menu a .count { display: none; }
  .admin-aside-foot { flex-direction: row; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 22px 18px 40px; }
  .order-customer { grid-template-columns: 1fr; }
  .settings-form .field-row { grid-template-columns: 1fr; }
}
