/* ============================================================
   Vagonka — основной CSS темы. Бюджет: ≤150 KB (факт ~14 KB).
   Разделы: база, шапка, hero, секции, каталог, карточка Woo,
   квиз/формы, портфолио, блог, футер, мобильное.
   ============================================================ */

/* ── база ── */
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-ui); font-size: var(--fs-body); line-height: var(--lh-body);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.18; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 3.4vw, 38px); }
h2 { font-size: 28px; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--honey-deep); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--honey); font-weight: 600; }
.linkish { background: none; border: 0; color: var(--honey); font-weight: 600; padding: 0; border-bottom: 1px dashed currentColor; }

/* кнопки */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: var(--r); padding: 12px 22px; font-weight: 600; font-size: 15px; border: 0; }
.btn--honey { background: var(--honey); color: #fff; }
.btn--honey:hover { background: var(--honey-deep); color: #fff; }
.btn--pine { background: var(--pine); color: #fff; }
.btn--pine:hover { background: var(--pine-deep); color: #fff; }
.btn--ghost { background: transparent; border: 1.5px solid rgba(242,237,226,.45); color: #F2EDE2; }
.btn--line { background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); }

/* ── топбар и шапка ── */
.topbar { background: var(--pine-deep); color: #EDE6D9; font-size: 13px; }
.topbar a { color: #fff; }
.topbar-row { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.hrow { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; line-height: 1.05; }
.logo-mark { width: 66px; height: 48px; object-fit: contain; flex: none; }
.logo-text { display: flex; flex-direction: column; }
.logo b { font-family: var(--font-display); font-size: 24px; }
.logo b i { color: var(--honey); font-style: normal; }
.logo-text > span { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
/* .hsearch — форма поиска в шапке. НЕ называть .search: WP вешает класс
   "search" на body страниц поиска (та же ловушка, что и с .cart у Woo). */
.hsearch { flex: 1; min-width: 220px; display: flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.hsearch input { flex: 1; border: 0; background: transparent; padding: 10px 18px; font: inherit; color: var(--ink); outline: none; }
.hsearch button { border: 0; background: var(--pine); color: #fff; padding: 0 22px; }
.hact { display: flex; gap: 20px; align-items: center; }
.hphone { text-align: right; line-height: 1.3; }
.hphone b { font-size: 16px; font-variant-numeric: tabular-nums; }
.hphone .linkish { display: block; font-size: 12.5px; }
/* .cart-btn — только кнопка в шапке (не .cart: этот класс Woo вешает на form.cart товара!) */
.cart-btn { position: relative; background: var(--sand); border-radius: var(--r); padding: 10px 16px; display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.cart-btn em { font-style: normal; background: var(--honey); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; font-weight: 700; }
.nav-toggle { display: none; background: var(--pine); color: #fff; border-radius: 8px; border: 0; padding: 10px 14px; }
.main-nav { border-top: 1px solid var(--line); }
.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav .menu a { display: block; padding: 12px 16px; font-size: 14.5px; font-weight: 600; border-bottom: 2.5px solid transparent; }
.main-nav .menu a:hover { border-bottom-color: var(--honey); color: inherit; }

/* ── hero ── */
.hero { background: var(--pine-deep); color: #F2EDE2; }
.hero-row { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 52px; padding-bottom: 52px; }
.hero h1 { color: #fff; margin-bottom: 0; }
.hero .lead { font-size: 17px; max-width: 52ch; color: #D7CFBE; margin: 16px 0 26px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 28px; margin-top: 32px; flex-wrap: wrap; }
.hero-facts b { display: block; font-family: var(--font-display); font-size: 22px; color: var(--honey); }
.hero-facts span { font-size: 13px; color: #BDB4A0; }
.hero-photo img { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow); display: block; }
.planks, .thumb--wood {
  border-radius: 14px; box-shadow: var(--shadow); aspect-ratio: 4/3; display: block;
  background:
    repeating-linear-gradient(180deg, transparent 0 56px, var(--wood-gap) 56px 58px),
    linear-gradient(96deg, var(--wood-a) 0%, var(--wood-b) 38%, var(--wood-c) 72%, var(--wood-b) 100%);
}

/* ── секции ── */
.blk { padding: 50px 0; }
.blk--tint { background: var(--sand); }
.shead { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.shead h2 { margin: 0; }
.shead .all { font-size: 14px; font-weight: 600; color: var(--honey); border-bottom: 1px solid currentColor; }

.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.catcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .15s; }
.catcard:hover { box-shadow: var(--shadow); color: inherit; }
.catcard .thumb { border-radius: 8px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.catcard .thumb--wood { aspect-ratio: 16/9; }
.catcard b { font-size: 16px; }
.catcard span { font-size: 13px; color: var(--muted); }

.usps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.usp { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.usp i { width: 42px; height: 42px; flex: none; border-radius: 9px; background: var(--pine-tint); display: grid; place-items: center; font-style: normal; font-size: 19px; }
.usp b { display: block; font-size: 14.5px; }
.usp span { font-size: 13px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; counter-reset: st; margin-top: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; counter-increment: st; }
.step::before { content: counter(st, decimal-leading-zero); font-family: var(--font-display); font-size: 24px; color: var(--honey); display: block; margin-bottom: 6px; }
.step b { display: block; font-size: 14px; }
.step span { font-size: 12.5px; color: var(--muted); }

.svc { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }

/* ── квиз и формы ── */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: var(--shadow); }
.quiz h3 { font-size: 19px; margin-bottom: 4px; }
.quiz-sub { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; }
.quiz .frow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.quiz input, .quiz select { width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; background: var(--paper); color: var(--ink); }
.quiz .btn { width: 100%; justify-content: center; margin-top: 6px; }
.quiz small { display: block; text-align: center; color: var(--muted); margin-top: 10px; font-size: 12px; }
.quiz-msg { margin-top: 12px; padding: 10px 14px; border-radius: 8px; font-size: 14px; background: var(--pine-tint); }
.quiz-msg.is-error { background: #F7E2D8; color: var(--bad); }

/* ── портфолио и блог ── */
.casegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.casecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s; }
.casecard:hover { box-shadow: var(--shadow); color: inherit; }
.casecard img, .casecard .thumb--wood { aspect-ratio: 3/2; object-fit: cover; width: 100%; border-radius: 0; box-shadow: none; }
.casecard b { padding: 12px 16px 2px; font-size: 15px; }
.casecard span { padding: 0 16px 14px; font-size: 13px; color: var(--muted); }
.postgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.postcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.postcard h2 { font-size: 18px; margin: 10px 0 6px; }
.postcard img { border-radius: 8px; aspect-ratio: 16/9; object-fit: cover; }
/* лайтбокс галерей (портфолио) */
.vg-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(26, 22, 16, .93);
  display: grid; place-items: center; padding: 24px; }
.vg-lightbox img { max-width: min(92vw, 1100px); max-height: 86vh; width: auto; height: auto;
  border-radius: 8px; box-shadow: 0 12px 48px rgba(0, 0, 0, .5); }
.vg-lightbox button { border: 0; color: #fff; cursor: pointer; display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); transition: background .15s; }
.vg-lightbox button:hover { background: rgba(255, 255, 255, .28); }
.vg-lightbox-close { position: absolute; top: 14px; right: 14px; width: 46px; height: 46px;
  border-radius: 50%; font-size: 22px; }
.vg-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 68px; font-size: 26px; border-radius: 8px; }
.vg-lightbox-prev { left: 14px; }
.vg-lightbox-next { right: 14px; }
.vg-lightbox-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, .75); font-size: 13px; font-variant-numeric: tabular-nums; }
body.vg-lightbox-open { overflow: hidden; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.gallery-caption { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.prose { padding: 28px 0 48px; }
.prose--narrow { max-width: 760px; }
.prose p, .prose li { max-width: 68ch; }

/* ── каталог Woo ── */
.crumbs { font-size: 13px; color: var(--muted); padding: 16px 20px 4px; }
.cathead { padding: 6px 0 18px; }
.cathead-intro { max-width: 78ch; color: var(--muted); font-size: 14.5px; margin: 0; }
.cat-layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; padding-bottom: 40px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; position: sticky; top: 12px; }
.fgroup { padding: 12px 0; border-top: 1px solid var(--line); }
.fgroup:first-child { border-top: 0; padding-top: 0; }
.fgroup-title { margin: 0 0 8px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.fgroup ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.fgroup li { padding: 3px 0; }
.fgroup ul.children { padding-left: 14px; }
.fgroup .current-cat > a { color: var(--honey-deep); font-weight: 700; }
/* у родительских категорий счётчик прячем — его место занимает каретка */
.filters li.cat-parent > .count { display: none; }
/* аккордеон подкатегорий: по умолчанию свёрнуты, ветка текущей — открыта (JS) */
.filters li.cat-parent { position: relative; }
.filters li.cat-parent > ul.children { display: none; }
.filters li.cat-parent.is-open > ul.children { display: block; }
.cat-toggle { position: absolute; right: 0; top: 1px; width: 26px; height: 26px;
  border: 0; background: transparent; color: var(--muted); font-size: 15px; line-height: 1;
  cursor: pointer; border-radius: 6px; }
.cat-toggle:hover { background: var(--sand); color: var(--ink); }
.cat-toggle::before { content: "▸"; display: block; transition: transform .15s; }
li.is-open > .cat-toggle::before { transform: rotate(90deg); }
.filters li.cat-parent > a { display: inline-block; padding-right: 28px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .woocommerce-result-count { margin: 0; font-size: 13.5px; color: var(--muted); }
.toolbar select { border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; background: var(--surface); color: var(--ink); }
.seotext { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 26px; font-size: 14px; color: var(--muted); margin-top: 26px; }
.seotext h2, .seotext h3 { color: var(--ink); font-size: 17px; }

ul.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s; }
.pcard:hover { box-shadow: var(--shadow); }
.pcard-photo { position: relative; display: block; }
.pcard-photo img { aspect-ratio: 1/.82; object-fit: cover; width: 100%; display: block; }
.onsale { position: absolute; top: 10px; left: 10px; background: var(--honey); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 5px; padding: 3px 9px; z-index: 2; }
.pcard-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pcard-name { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.pcard-stock { font-size: 12.5px; font-weight: 600; }
.pcard-stock.is-in { color: var(--good); }
.pcard-stock.is-out { color: var(--bad); }
.pcard-row { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pcard-price { font-family: var(--font-display); font-size: 19px; font-variant-numeric: tabular-nums; }
.pcard-price del { color: var(--muted); font-size: 14px; }
.pcard-price ins { text-decoration: none; }
.price-unit { font-family: var(--font-ui); font-size: 12px; color: var(--muted); font-weight: 400; }
.tocart, a.add_to_cart_button, .single_add_to_cart_button {
  background: var(--pine); color: #fff !important; border: 0; border-radius: 8px;
  padding: 9px 15px; font-size: 13.5px; font-weight: 600; display: inline-block;
}
.tocart:hover, a.add_to_cart_button:hover, .single_add_to_cart_button:hover { background: var(--pine-deep); }
.single_add_to_cart_button { background: var(--honey); font-size: 15px; padding: 13px 26px; }
.single_add_to_cart_button:hover { background: var(--honey-deep); }
.woocommerce-pagination ul, .pager .nav-links { list-style: none; display: flex; gap: 8px; justify-content: center; margin: 28px 0 0; padding: 0; }
.woocommerce-pagination a, .woocommerce-pagination span,
.pager .page-numbers { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 600; background: var(--surface); padding: 0 8px; }
.woocommerce-pagination span.current, .pager .current { background: var(--pine); border-color: var(--pine); color: #fff; }

/* ── карточка товара Woo ── */
.single-product div.product { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: start; padding: 10px 0 40px; }
.single-product div.product .woocommerce-product-gallery img { border-radius: 12px; }
.single-product div.product .summary h1 { font-size: 26px; }
.single-product div.product .summary .price { font-family: var(--font-display); font-size: 30px; color: var(--ink); }
.single-product div.product .summary .price del { font-size: 18px; color: var(--muted); }
.single-product div.product .summary .price ins { text-decoration: none; }
.single-product .stock.in-stock { color: var(--good); font-weight: 600; }
.single-product .stock.out-of-stock { color: var(--bad); font-weight: 600; }
.single-product table.variations select { border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--paper); font: inherit; }
.single-product .quantity .qty { width: 84px; border: 1.5px solid var(--line); border-radius: 8px; padding: 11px; font: inherit; text-align: center; }
.single-product .woocommerce-tabs { grid-column: 1 / -1; }
.single-product .woocommerce-tabs ul.tabs { list-style: none; display: flex; gap: 6px; margin: 0 0 20px; padding: 0; border-bottom: 1.5px solid var(--line); flex-wrap: wrap; }
.single-product .woocommerce-tabs ul.tabs a { display: block; padding: 11px 16px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.single-product .woocommerce-tabs ul.tabs li.active a { color: var(--ink); border-bottom-color: var(--honey); }
.single-product .related.products, .single-product .upsells { grid-column: 1 / -1; }
.shiplist { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; display: grid; gap: 7px; font-size: 13.5px; }
.shiplist > div { display: flex; gap: 10px; }

/* калькулятор */
.calc { background: var(--sand); border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; }
.calc h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.calc-row { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; }
.calc-row label span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.calc input[type="text"] { width: 110px; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 12px; font: inherit; background: var(--surface); font-variant-numeric: tabular-nums; }
.calc-reserve { display: flex; gap: 7px; align-items: center; font-size: 13px; padding-bottom: 9px; }
.calc-result { margin: 10px 0 0; font-size: 14px; }
.calc-result strong { font-variant-numeric: tabular-nums; }

/* ── страница отзывов ── */
.rev { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.rcard p { font-size: 14px; margin: 8px 0 10px; }
.rcard b { font-size: 13.5px; }
.rev-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; }
.rev--page { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-bottom: 40px; }
.stars-static { color: var(--honey); letter-spacing: 3px; font-size: 15px; }
.rcard-title { font-size: 15.5px; margin: 8px 0 0; font-family: var(--font-ui); font-weight: 700; }
.rcard-src { display: inline-block; margin-top: 8px; font-size: 11.5px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); background: var(--sand); border-radius: 5px; padding: 2px 8px; }
.review-form { max-width: 640px; }
.review-form textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font: inherit; background: var(--paper); color: var(--ink); margin-bottom: 8px; }
/* звёзды-радио: порядок в разметке 5→1, подсветка через ~ */
.rate-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; margin-bottom: 10px; }
.rate-stars input { position: absolute; opacity: 0; pointer-events: none; }
.rate-stars label { font-size: 26px; color: var(--line); cursor: pointer; transition: color .1s; }
.rate-stars label:hover, .rate-stars label:hover ~ label,
.rate-stars input:checked ~ label { color: var(--honey); }

/* ── отзывы в карточке товара (Woo reviews) ── */
#reviews .commentlist { list-style: none; margin: 0 0 26px; padding: 0; }
#reviews .commentlist > li { border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; }
#reviews .comment_container img.avatar { display: none; } /* аватары не показываем */
#reviews .comment-text { margin: 0; }
#reviews .comment-text .star-rating { margin-bottom: 6px; }
#reviews .meta { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
#reviews .meta strong { color: var(--ink); }
#reviews .description p { margin: 0; }
#reviews .woocommerce-Reviews-title, #reply-title { font-family: var(--font-display);
  font-size: 20px; display: block; margin: 0 0 14px; }
#review_form .comment-notes { font-size: 13px; color: var(--muted); }
#review_form p { margin: 0 0 10px; }
#review_form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
#review_form input[type="text"], #review_form input[type="email"], #review_form textarea {
  width: 100%; max-width: 560px; border: 1.5px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font: inherit; background: var(--paper); color: var(--ink);
}
#review_form .form-submit input.submit { background: var(--honey); color: #fff; border: 0;
  border-radius: 8px; padding: 11px 22px; font-weight: 600; font-size: 14.5px; cursor: pointer; }
#review_form .form-submit input.submit:hover { background: var(--honey-deep); }
/* звёзды выбора оценки (разметка Woo: p.stars > span > a.star-N, порядок 1→5) */
#review_form p.stars { display: inline-block; line-height: 1; }
#review_form p.stars span { display: inline-flex; gap: 2px; }
#review_form p.stars a { font-size: 0; text-decoration: none; }
#review_form p.stars a::before { content: "★"; font-size: 25px; color: var(--honey); }
#review_form p.stars a:hover ~ a::before,
#review_form p.stars a.active ~ a::before { color: var(--line); }
#review_form p.stars.selected a::before { color: var(--honey); }
#review_form p.stars.selected a.active ~ a::before { color: var(--line); }

/* ── фото справа от текста на контентных страницах ── */
.page-photo { float: right; width: min(46%, 520px); margin: 6px 0 18px 28px;
  border-radius: 12px; box-shadow: var(--shadow); }
.prose::after { content: ""; display: block; clear: both; }
@media (max-width: 720px) { .page-photo { float: none; width: 100%; margin: 0 0 18px; } }

/* ── футер ── */
.site-footer { background: var(--pine-deep); color: #C9C0AC; margin-top: 56px; font-size: 14px; }
.site-footer a:hover { color: #fff; }
/* .footer-grid — сетка футера (НЕ .frow: этот класс занят рядами квиза) */
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 32px; padding-top: 42px; padding-bottom: 34px; }
.fcol h4 { color: #fff; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
.fmenu { list-style: none; margin: 0; padding: 0; }
.fmenu a { display: block; padding: 3.5px 0; }
.fphone { color: #fff; font-weight: 700; font-size: 16px; }
.fbot { border-top: 1px solid rgba(237,230,217,.15); }
.fbot-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 15px; padding-bottom: 15px; font-size: 12.5px; }

/* ── WooCommerce: свои стили (дефолтные отключены в performance.php) ── */

/* сетка товаров: гасим остатки li.product на случай чужого CSS */
ul.products li.product { float: none; width: auto; margin: 0; list-style: none; }
.woocommerce-products-header { padding: 6px 0 18px; }

/* уведомления */
.woocommerce-notices-wrapper { display: block; }
.woocommerce-message, .woocommerce-info, .woocommerce-error li, ul.woocommerce-error {
  list-style: none; margin: 0 0 18px; padding: 13px 18px; border-radius: var(--r);
  background: var(--pine-tint); border-left: 3px solid var(--pine); font-size: 14.5px;
}
ul.woocommerce-error { padding: 0; background: none; border: 0; }
.woocommerce-error li { background: #F7E2D8; border-left-color: var(--bad); }
/* Кнопка внутри уведомления идёт в разметке ПЕРВОЙ — флексом ставим её вправо,
   float ломал рамку секции (кнопка вылезала за границы). */
.woocommerce-message, .woocommerce-info {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
}
.woocommerce-message a.button, .woocommerce-info a.button {
  order: 2; margin-left: auto; flex: none;
  background: var(--pine); color: #fff; border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 600;
}

/* формы Woo */
.woocommerce form .form-row { margin: 0 0 8px; }
.woocommerce form .form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.woocommerce input.input-text, .woocommerce textarea.input-text, .woocommerce select,
.woocommerce .input-text {
  width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 12px;
  font: inherit; background: var(--surface); color: var(--ink);
}
.woocommerce-checkout h3, #order_review_heading { margin-bottom: 8px; }
.woocommerce-billing-fields h3 { margin-top: 0; }
.woocommerce .required { color: var(--bad); text-decoration: none; }
.woocommerce button.button, .woocommerce a.button, .woocommerce input.button {
  background: var(--pine); color: #fff; border: 0; border-radius: 8px;
  padding: 11px 20px; font-weight: 600; font-size: 14px; cursor: pointer; display: inline-block;
}
.woocommerce button.button:hover, .woocommerce a.button:hover { background: var(--pine-deep); color: #fff; }
.woocommerce button.button:disabled { opacity: .5; cursor: not-allowed; }

/* карточка товара (single) */
.single-product div.product .summary { min-width: 0; }
.single-product div.product .summary .price { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 6px 0 18px; }
.single-product div.product p.stock { margin: 4px 0 12px; }
.woocommerce-product-gallery { position: relative; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image a { display: block; }
.woocommerce-product-gallery img { width: 100%; height: auto; border: 1px solid var(--line); }
.woocommerce-product-gallery__trigger { position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: 50%; }
.flex-control-thumbs { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0 0; padding: 0; }
.flex-control-thumbs img { border-radius: 8px; border: 2px solid transparent; cursor: pointer; opacity: .75; }
.flex-control-thumbs img.flex-active, .flex-control-thumbs img:hover { border-color: var(--honey); opacity: 1; }

/* форма покупки: вариации → калькулятор → количество+кнопка */
form.cart { margin: 0 0 18px; }
form.cart table.variations { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
form.cart table.variations th, form.cart table.variations td { padding: 6px 0; text-align: left; vertical-align: middle; }
form.cart table.variations th.label { width: 110px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
form.cart table.variations select { width: auto; min-width: 220px; }
.reset_variations { font-size: 12.5px; color: var(--muted); margin-left: 10px; }
.woocommerce-variation.single_variation { margin-bottom: 12px; }
.woocommerce-variation-price .price { font-family: var(--font-display); font-size: 24px; }
.woocommerce-variation-availability p.stock { margin: 4px 0 0; font-size: 13.5px; }
form.cart div.quantity { display: inline-block; margin-right: 10px; }
form.cart .woocommerce-variation-add-to-cart,
form.cart:not(.variations_form) { display: block; }
form.cart .woocommerce-variation-add-to-cart { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.woocommerce-variation-add-to-cart .calc { flex: 1 1 100%; }
.single-product form.cart > .quantity { margin-right: 10px; }
.single-product form.cart > .single_add_to_cart_button { vertical-align: middle; }

/* рейтинг: юникод-звёзды вместо иконочного шрифта Woo */
.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1.1em; line-height: 1.1;
  font-size: 14px; overflow: hidden; }
.star-rating::before { content: "★★★★★"; color: var(--line); letter-spacing: 2px; }
.star-rating > span { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; }
.star-rating > span::before { content: "★★★★★"; color: var(--honey); letter-spacing: 2px; }
.star-rating > span > strong, .star-rating .rating { display: none; }

/* мета и связанные */
.product_meta { font-size: 13px; color: var(--muted); }
.product_meta > span { display: block; padding: 2px 0; }
.related.products > h2, .upsells > h2 { font-size: 26px; margin: 30px 0 18px; }

/* таблица корзины (классический шорткод) */
.woocommerce-cart-form table.shop_table { width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
table.shop_table th, table.shop_table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14.5px; }
table.shop_table thead th { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--sand); }
table.shop_table td.product-remove a { color: var(--bad); font-size: 20px; text-decoration: none; }
table.shop_table td.product-thumbnail img { width: 64px; border-radius: 8px; }
table.shop_table .quantity .qty { width: 74px; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px; text-align: center; }
table.shop_table td.actions { background: var(--paper); }
table.shop_table td.actions .coupon { float: left; display: flex; gap: 8px; }
table.shop_table td.actions .coupon .input-text { width: 160px; }
table.shop_table td.actions > .button { float: right; }
.cart-collaterals { display: flex; justify-content: flex-end; margin-top: 22px; }
.cart_totals { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.cart_totals h2 { font-size: 20px; margin-bottom: 10px; }
.cart_totals table { width: 100%; }
.cart_totals table th, .cart_totals table td { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.wc-proceed-to-checkout { margin-top: 16px; }
.wc-proceed-to-checkout a.checkout-button { display: block; text-align: center; background: var(--honey); font-size: 15.5px; padding: 14px; }
.wc-proceed-to-checkout a.checkout-button:hover { background: var(--honey-deep); }
.cart-empty.woocommerce-info { text-align: left; }
.return-to-shop { margin-top: 8px; }

/* чекаут (классический шорткод) */
.woocommerce-checkout form.checkout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 6px 32px; align-items: start; }
.woocommerce-checkout #customer_details { min-width: 0; grid-column: 1; grid-row: 1 / span 2; }
.woocommerce-checkout #order_review_heading { grid-column: 2; grid-row: 1; }
.woocommerce-checkout #order_review { grid-column: 2; grid-row: 2; align-self: start; }
.woocommerce-checkout .col-1, .woocommerce-checkout .col-2 { width: auto; float: none; }
.woocommerce-checkout h3 { font-size: 19px; margin: 0 0 14px; }
#order_review_heading { margin: 0 0 14px; font-size: 19px; }
.woocommerce-checkout #order_review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
#order_review table.shop_table { border: 0; }
#payment { background: transparent; }
#payment ul.wc_payment_methods { list-style: none; margin: 14px 0; padding: 14px 0; border-top: 1px solid var(--line); }
#payment ul.wc_payment_methods li { padding: 6px 0; }
#payment div.payment_box { background: var(--sand); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; margin: 8px 0; }
#place_order { width: 100%; background: var(--honey); font-size: 15.5px; padding: 14px; }
#place_order:hover { background: var(--honey-deep); }
.woocommerce-form-coupon-toggle .woocommerce-info { cursor: default; }

/* аккаунт/результат заказа — базовая типографика */
.woocommerce-order ul.order_details { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; padding: 16px 0; margin: 0 0 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; }

/* пагинация Woo */
.woocommerce-pagination { text-align: center; }

/* ── мобильное ── */
.sticky-mobile { display: none; }
@media (max-width: 900px) {
  .hero-row, .svc, .cat-layout, .single-product div.product,
  .woocommerce-checkout form.checkout { grid-template-columns: 1fr; }
  .woocommerce-cart-form { overflow-x: auto; }
  table.shop_table td.actions .coupon { float: none; margin-bottom: 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .filters { position: static; }
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .main-nav .menu { flex-direction: column; gap: 0; }
  .hact .hphone { display: none; }
  ul.products { grid-template-columns: repeat(2, 1fr); }
  .topbar-row span:first-child { display: none; } /* строка доставки — экономим высоту шапки */
  .sticky-mobile { display: flex; gap: 10px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px; }
  .sticky-mobile .btn { flex: 1; justify-content: center; }
  body { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
