/*
Theme Name: Matrasok
Description: Тема интернет-магазина matrasok.ru (WooCommerce). Направление 2: светлая, плитки, крупная типографика.
Version: 0.2.0
Requires PHP: 8.0
Text Domain: matrasok
*/

/* ---------------------------------------------------------------- токены */
:root {
    --ink: #101412;
    --muted: #5a625d;
    --line: #e2e5e1;
    --line-strong: #c9cfcb;
    --tile: #f1f2ef;
    --bg: #ffffff;
    --green: #0b6b52;
    --green-ink: #0a5743;
    --green-soft: #dcebe3;
    --green-on: #ddefe8;
    --bar-off: #d5dad6;
    --r-xl: 36px;
    --r-lg: 28px;
    --r-md: 20px;
    --r-sm: 14px;
    --wrap: 1280px;
    --pad: 24px;
    --header-h: 80px;
}

/* ---------------------------------------------------------------- основа */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font: 400 16px/1.5 Onest, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
p a, .content a, .link { color: var(--green-ink); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row-between { display: flex; justify-content: space-between; gap: 12px; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 100; left: 16px; top: 16px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; }
.display { font-size: clamp(44px, 6.5vw, 80px); line-height: 0.95; letter-spacing: -0.04em; }
.h-xl { font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.03em; line-height: 1; }
.lead { margin: 14px 0 0; font-size: 17px; color: var(--muted); max-width: 36em; }
.tile { background: var(--tile); border-radius: var(--r-lg); }
.tag { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; }

/* ---------------------------------------------------------------- кнопки и поля */
.btn, .button, button.button, a.button, input[type=submit], .woocommerce button.button, .woocommerce a.button, .woocommerce input.button, #place_order {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--ink); color: #fff; font: 600 16px/1 Onest, system-ui, sans-serif; text-decoration: none; transition: background .15s, transform .15s;
}
.btn:hover, .button:hover, #place_order:hover, .woocommerce button.button:hover, .woocommerce a.button:hover { background: #2a312d; color: #fff; }
.btn:active, .button:active { transform: scale(.98); }
.btn-lg { min-height: 60px; padding: 0 30px; font-size: 17px; }
.btn-green { background: var(--green); }
.btn-green:hover { background: #095a45; }
.btn-dark { background: var(--ink); }
.btn-block { display: flex; width: 100%; }
.woocommerce button.button.alt, .woocommerce a.button.alt, .woocommerce input.button.alt { background: var(--ink); color: #fff; }
.woocommerce button.button.alt:hover { background: #2a312d; }
.woocommerce button.button:disabled, .woocommerce button.button.disabled, .woocommerce button.button.alt.disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.icon-btn--dark { background: var(--ink); color: #fff; }
.icon-btn--dark:hover { color: #fff; background: #2a312d; }
.icon-btn--soft { background: var(--tile); color: var(--ink); }
.cart-count { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--green); color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.cart-count[hidden] { display: none; }

input[type=text], input[type=email], input[type=tel], input[type=search], input[type=number], input[type=password], select, textarea, .input-text {
    width: 100%; min-height: 56px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 18px;
    background: #fff; color: var(--ink); font: 400 17px/1.4 Onest, system-ui, sans-serif;
}
textarea, textarea.input-text { padding: 14px 18px; min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(16, 20, 18, .08); }
label { font-size: 14px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }

/* ---------------------------------------------------------------- шапка */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); }
.header-row { display: flex; align-items: center; gap: 12px 20px; min-height: var(--header-h); }
.site-logo img { height: 40px; width: auto; }
.pill-nav { margin: 0 auto; }
.pill-nav ul { list-style: none; margin: 0; padding: 4px; display: flex; gap: 4px; background: var(--tile); border-radius: 999px; }
.pill-nav a { display: block; padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.pill-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.pill-nav .current-menu-item > a, .pill-nav .current-menu-ancestor > a, .pill-nav .current-product_cat-ancestor > a, .pill-nav .current-page-ancestor > a { background: #fff; }
.header-phone { font-weight: 600; font-size: 15px; white-space: nowrap; padding: 12px 4px; }
.only-mobile { display: none; }
.icon-btn .i-close { display: none; }
.icon-btn[aria-expanded="true"] .i-open { display: none; }
.icon-btn[aria-expanded="true"] .i-close { display: inline-flex; }
.mobile-menu { padding: 8px var(--pad) 24px; background: #fff; border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: 0 24px 40px rgba(16, 20, 18, .12); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu__main a { display: block; padding: 14px 4px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; border-bottom: 1px solid var(--line); }
.mobile-menu__extra a { display: block; padding: 13px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 16px; }

/* ---------------------------------------------------------------- общие блоки страниц */
.site-main { padding-bottom: 72px; }
.page-head { padding: 24px 0 8px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; }
.page-head .lead { margin: 0 0 8px; }
.crumbs { padding-top: 20px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a:hover { color: var(--ink); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.empty-note { padding: 32px; font-size: 18px; margin-top: 24px; }

/* ---------------------------------------------------------------- главная */
.home { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.home-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.hero { flex: 999 1 560px; min-width: 0; border-radius: var(--r-xl); padding: 48px; display: flex; flex-direction: column; gap: 24px; justify-content: space-between; min-height: 520px; }
.hero .tag { align-self: flex-start; }
.hero-img { width: 100%; max-width: 620px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 24px; align-self: center; mix-blend-mode: multiply; }
.hero-bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: .98; max-width: 9em; }
.quiz { flex: 1 1 360px; min-width: 0; background: var(--green); color: #fff; border-radius: var(--r-xl); padding: 36px; display: flex; flex-direction: column; gap: 16px; }
.quiz h2 { font-size: 34px; line-height: 1.05; }
.quiz p { margin: 0; color: var(--green-on); font-size: 17px; }
.quiz-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.quiz-option { min-height: 48px; padding: 0 8px; border-radius: 999px; border: 1px solid #7fc2ae; background: transparent; color: #fff; font: 600 16px Onest, system-ui, sans-serif; cursor: pointer; }
.quiz-option.is-on { background: #fff; border-color: #fff; color: var(--green-ink); }
.quiz-results { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.quiz-results[hidden] { display: none; }
.quiz-item { display: flex; align-items: center; gap: 14px; padding: 10px; background: #fff; border-radius: var(--r-md); color: var(--ink); }
.quiz-item:hover { color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.quiz-item img { width: 72px; height: 54px; object-fit: cover; border-radius: 12px; flex: none; }
.quiz-item__text { display: flex; flex-direction: column; min-width: 0; flex: 1; overflow: hidden; }
.quiz-item__text b, .quiz-item__text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiz-item__text b { font-weight: 600; font-size: 17px; }
.quiz-item__text span { font-size: 14px; color: var(--muted); }
.quiz-item__price { flex: none; font-weight: 600; font-size: 15px; white-space: nowrap; padding-right: 6px; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cat-tile { padding: 24px; display: flex; flex-direction: column; gap: 6px; min-height: 260px; transition: transform .2s; }
.cat-tile:hover { color: var(--ink); transform: translateY(-3px); }
.cat-tile__title { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.cat-tile img { margin-top: auto; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; mix-blend-mode: multiply; }
.cat-tile--dark { background: var(--ink); color: #fff; }
.cat-tile--dark:hover { color: #fff; }
.cat-tile--dark span:not(.cat-tile__title) { color: #c9cfcb; }
.round-arrow { margin-top: auto; align-self: flex-end; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--ink) !important; display: flex; align-items: center; justify-content: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.stat { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.stat b { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.stat span { color: var(--muted); }
.stat--accent { background: var(--green-soft); border-color: var(--green-soft); }
.stat--accent b, .stat--accent span { color: var(--green-ink); }
.home-reviews { margin-top: 40px; }
.review-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.review-card { margin: 0; padding: 28px; display: flex; flex-direction: column; gap: 16px; justify-content: space-between; min-height: 180px; }
.review-card p { margin: 0; font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; }
.review-card footer { font-size: 15px; color: var(--muted); }

/* ---------------------------------------------------------------- каталог */
.chips-bar { position: sticky; top: var(--header-h); z-index: 20; background: rgba(255, 255, 255, .96); margin-top: 20px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips-label { font-size: 14px; color: var(--muted); margin-right: 2px; white-space: nowrap; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips-count { margin-left: auto; font-size: 15px; color: var(--muted); white-space: nowrap; }
ul.products { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 40px 20px; }
ul.products::before, ul.products::after { display: none !important; }
ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; padding: 0; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card-media { position: relative; display: block; background: var(--tile); border-radius: var(--r-lg); overflow: hidden; }
.card-media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; mix-blend-mode: multiply; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.tag--on-media { position: absolute; left: 16px; top: 16px; font-size: 13px; font-weight: 600; padding: 6px 12px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.card-title { font-size: 26px; }
.card-title a:hover { color: var(--green); }
.card-price { font-size: 20px; font-weight: 600; white-space: nowrap; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--muted); }
.card-firm { display: inline-flex; align-items: center; gap: 10px; }
.firm-bars { display: inline-flex; gap: 3px; }
.firm-bars span { width: 18px; height: 6px; border-radius: 3px; background: var(--bar-off); }
.firm-bars span.on { background: var(--green); }
.firm-bars--wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.firm-bars--wide span { width: auto; height: 10px; border-radius: 5px; }
.woocommerce-pagination ul { list-style: none; padding: 0; margin: 40px 0 0; display: flex; gap: 6px; justify-content: center; }
.woocommerce-pagination a, .woocommerce-pagination span { display: flex; align-items: center; justify-content: center; min-width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--line-strong); }
.woocommerce-pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.onsale, .woocommerce-result-count, .woocommerce-ordering { display: none; }

/* ---------------------------------------------------------------- товар */
.product-page { padding-top: 8px; }
.product-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); grid-template-areas: "media buy" "sections buy"; gap: 24px 48px; align-items: start; }
.product-media { grid-area: media; position: relative; }
.product-sections { grid-area: sections; }
.buy-box { grid-area: buy; position: sticky; top: calc(var(--header-h) + 12px); display: flex; flex-direction: column; gap: 24px; padding: 8px 0; }
.pill-link { position: absolute; z-index: 3; left: 20px; top: 20px; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; background: #fff; font-size: 15px; font-weight: 500; }
.woocommerce-product-gallery { position: relative; margin: 0; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image { background: var(--tile); border-radius: var(--r-xl); overflow: hidden; }
.woocommerce-product-gallery__image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; mix-blend-mode: multiply; }
.woocommerce-product-gallery .flex-control-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.woocommerce-product-gallery .flex-control-thumbs img { border-radius: 14px; background: var(--tile); cursor: pointer; opacity: .6; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active { opacity: 1; }
.woocommerce-product-gallery__trigger { position: absolute; z-index: 3; right: 20px; top: 20px; width: 44px; height: 44px; border-radius: 50%; background: #fff; font-size: 0; }
.woocommerce-product-gallery__trigger::before { content: ""; position: absolute; left: 13px; top: 13px; width: 13px; height: 13px; border: 2px solid var(--ink); border-radius: 50%; }
.woocommerce-product-gallery__trigger::after { content: ""; position: absolute; left: 27px; top: 27px; width: 7px; height: 2px; background: var(--ink); transform: rotate(45deg); }
.product-title { font-size: clamp(56px, 7vw, 88px); line-height: .92; letter-spacing: -0.05em; text-transform: capitalize; margin-top: 8px; }
.firm-scale { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { background: var(--tile); border-radius: var(--r-md); padding: 18px; display: flex; flex-direction: column; }
.fact b { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.fact span { font-size: 14px; color: var(--muted); }
.sizes { border: 0; margin: 0; padding: 0; }
.sizes legend { padding: 0; font-size: 15px; margin-bottom: 10px; }
.size-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.size-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 72px; padding: 14px 18px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.size-btn b { font-weight: 600; font-size: 18px; }
.size-btn span { font-size: 14px; opacity: .8; }
.size-btn:hover { border-color: var(--ink); }
.size-btn.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.buy-row { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.price-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.price-big .js-price { font-size: 48px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.price-big del { font-size: 17px; color: var(--muted); }
del[hidden] { display: none; }
/* штатная форма WooCommerce: выбор размера заменён кнопками выше, цена — крупной строкой */
.buy-form table.variations, .buy-form .woocommerce-variation-price, .buy-form .reset_variations, .buy-form .woocommerce-variation-availability, .buy-form .stock { display: none !important; }
.buy-form form.cart { margin: 0; display: flex; gap: 10px; }
.buy-form .single_variation_wrap, .buy-form .woocommerce-variation-add-to-cart { display: flex; gap: 10px; width: 100%; }
.buy-form .quantity input { width: 84px; min-height: 64px; text-align: center; border-radius: 999px; padding: 0 10px; }
.buy-form .single_add_to_cart_button { flex: 1; min-height: 64px; font-size: 18px; }
.product-sections { display: flex; flex-direction: column; }
.product-sections details { border-top: 1px solid var(--line); padding: 22px 0; }
.product-sections details:last-child { border-bottom: 1px solid var(--line); }
.product-sections summary { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.product-sections summary::-webkit-details-marker { display: none; }
.product-sections summary::after { content: "+"; font-weight: 400; font-size: 30px; line-height: 1; color: var(--muted); }
.product-sections details[open] summary::after { content: "−"; }
.product-sections .content { margin-top: 14px; font-size: 18px; line-height: 1.6; max-width: 62ch; }
.spec-table { margin: 14px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 24px; font-size: 17px; max-width: 600px; }
.spec-table dt { color: var(--muted); }
.spec-table dd { margin: 0; font-weight: 500; }
.sticky-buy { display: none; }

/* отзывы и форма отзыва */
.review-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.review-list li { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.review-list blockquote { margin: 0; }
.review-list p { margin: 0; font-size: 17px; line-height: 1.6; white-space: pre-line; }
.review-meta { margin-top: 6px; font-size: 14px; color: var(--muted); }
.comment-respond { margin-top: 24px; }
.comment-reply-title { font-size: 22px; margin-bottom: 8px; }
.comment-form { max-width: 560px; }
.comment-form .form-submit { margin: 8px 0 0; }

/* ---------------------------------------------------------------- текстовые страницы */
.text-layout { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: flex-start; margin-top: 24px; }
.text-body { flex: 999 1 560px; min-width: 0; }
.content { font-size: 18px; line-height: 1.65; }
.content > *:first-child { margin-top: 0; }
.content p, .content ul, .content ol { max-width: 66ch; }
.content h2, .content h3 { margin: 1.6em 0 .5em; font-size: 30px; letter-spacing: -0.03em; }
.content h3 { font-size: 22px; }
.content ul, .content ol { padding-left: 22px; }
.content li { margin: 4px 0; }
.content img { border-radius: var(--r-md); height: auto; }
.content table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.content td, .content th { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.content strong, .content b { font-weight: 600; }
.promo { border-top: 1px solid var(--line); padding: 28px 0; }
.promo h2 { margin-top: 0; }
.promo img { margin: 12px 0; }
.callback { flex: 1 1 340px; min-width: 0; position: sticky; top: calc(var(--header-h) + 12px); border-radius: var(--r-xl); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.callback h2 { font-size: 30px; letter-spacing: -0.03em; line-height: 1.05; }
.callback .contact-form { max-width: none; }
.callback-phones { padding-top: 16px; border-top: 1px solid var(--bar-off); display: flex; flex-direction: column; gap: 2px; }
.callback-phones a { font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.contact-form p { margin: 0 0 12px; }
.contact-form .hp { position: absolute; left: -9999px; }
.contact-form label:has(input[type=checkbox]) { display: block; padding-left: 32px; position: relative; font-size: 14px; line-height: 1.5; }
.contact-form label input[type=checkbox] { position: absolute; left: 0; top: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--green); width: 20px; height: 20px; flex: none; }
.form-note { padding: 14px 18px; background: var(--green-soft); color: var(--green-ink); border-radius: var(--r-sm); margin-bottom: 14px; }

/* ---------------------------------------------------------------- корзина, оформление, кабинет */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { list-style: none; margin: 16px 0; padding: 16px 20px; border-radius: var(--r-md); background: var(--green-soft); color: var(--green-ink); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.woocommerce-error { background: #fdecea; color: #8a1c12; }
.woocommerce-error li { list-style: none; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; min-height: 44px; padding: 0 20px; }
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { display: none; }

.shop-page { margin-top: 24px; }
form.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr); grid-template-areas: "details review-head" "details review"; gap: 0 48px; align-items: start; }
form.checkout #customer_details { grid-area: details; }
form.checkout #order_review_heading { grid-area: review-head; font-size: 22px; padding: 28px 28px 0; margin: 0; background: var(--tile); border-radius: var(--r-xl) var(--r-xl) 0 0; }
form.checkout #order_review { grid-area: review; position: sticky; top: calc(var(--header-h) + 12px); background: var(--tile); border-radius: 0 0 var(--r-xl) var(--r-xl); padding: 16px 28px 28px; }
#customer_details .col-1, #customer_details .col-2 { width: auto; float: none; }
#customer_details h3 { font-size: 26px; padding-top: 28px; margin-bottom: 16px; border-top: 1px solid var(--line); }
#customer_details .col-1 h3 { border-top: 0; padding-top: 0; }
.woocommerce form .form-row { margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.woocommerce form .form-row label { font-size: 14px; color: var(--muted); line-height: 1.3; }
.woocommerce form .form-row .optional { font-size: 13px; }
.woocommerce form .form-row .required { color: var(--green); text-decoration: none; border: 0; }
.woocommerce form .form-row.woocommerce-invalid input { border-color: #c0392b; }
.woocommerce-shipping-fields, .woocommerce-additional-fields h3 { display: block; }
#ship-to-different-address { display: none; }
.woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.woocommerce-checkout-review-order-table th, .woocommerce-checkout-review-order-table td { padding: 10px 0; border-bottom: 1px solid var(--bar-off); text-align: left; vertical-align: top; }
.woocommerce-checkout-review-order-table td:last-child, .woocommerce-checkout-review-order-table th:last-child { text-align: right; }
.woocommerce-checkout-review-order-table .order-total th, .woocommerce-checkout-review-order-table .order-total td { border-bottom: 0; padding-top: 16px; }
.woocommerce-checkout-review-order-table .order-total .amount { font-size: 36px; font-weight: 600; letter-spacing: -0.04em; }
.woocommerce-checkout-review-order-table tr.shipping td { text-align: left; }
#shipping_method, .wc_payment_methods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#shipping_method li, .wc_payment_methods li { position: relative; }
#shipping_method li input, .wc_payment_methods li > input { position: absolute; left: 16px; top: 18px; }
#shipping_method li label, .wc_payment_methods li > label { display: flex; align-items: center; min-height: 56px; padding: 0 16px 0 46px; border: 1px solid var(--line-strong); border-radius: 18px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 500; cursor: pointer; }
#shipping_method li input:checked + label, .wc_payment_methods li > input:checked + label { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.wc_payment_methods .payment_box { margin: 8px 0 0; padding: 12px 16px; font-size: 14px; color: var(--muted); background: transparent; }
.wc_payment_methods .payment_box p { margin: 0; }
#payment { margin-top: 16px; }
#payment .place-order { margin: 16px 0 0; padding: 0; }
.woocommerce-terms-and-conditions-wrapper, .woocommerce-privacy-policy-text { font-size: 13px; color: var(--muted); }
#place_order { width: 100%; min-height: 64px; font-size: 18px; margin-top: 12px; }
.woocommerce-account-fields { margin-top: 8px; }
.woocommerce-form__label-for-checkbox { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; color: var(--ink) !important; font-size: 15px !important; }

table.shop_table.cart { width: 100%; border-collapse: collapse; }
table.shop_table.cart th, table.shop_table.cart td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.shop_table.cart img { width: 96px; border-radius: 12px; background: var(--tile); }
table.shop_table.cart .product-remove a { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; background: var(--tile); font-size: 20px; }
table.shop_table.cart .quantity input { width: 84px; text-align: center; }
table.shop_table.cart td.actions { text-align: right; }
.cart-collaterals { margin-top: 24px; display: flex; justify-content: flex-end; }
.cart_totals { width: min(100%, 440px); background: var(--tile); border-radius: var(--r-xl); padding: 28px; }
.cart_totals h2 { font-size: 22px; margin-bottom: 8px; }
.cart_totals table { width: 100%; border-collapse: collapse; }
.cart_totals th, .cart_totals td { padding: 10px 0; border-bottom: 1px solid var(--bar-off); text-align: left; }
.cart_totals .order-total .amount { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; }
.wc-proceed-to-checkout .checkout-button { width: 100%; min-height: 64px; font-size: 18px; margin-top: 16px; }
.woocommerce-shipping-calculator, .shipping-calculator-button, .coupon { display: none !important; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 4px; margin: 0 0 24px; display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--tile); border-radius: 999px; }
.woocommerce-MyAccount-navigation a { display: block; padding: 10px 18px; border-radius: 999px; }
.woocommerce-MyAccount-navigation .is-active a { background: #fff; }
.woocommerce-order-overview { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.woocommerce-order-overview li { background: var(--tile); border-radius: var(--r-md); padding: 16px; }

/* ---------------------------------------------------------------- подвал */
.site-footer { padding-bottom: 24px; }
.footer-card { background: var(--ink); color: #c9cfcb; border-radius: var(--r-xl); padding: 40px; display: flex; flex-wrap: wrap; gap: 24px 64px; align-items: flex-end; }
.footer-card a:hover { color: #fff; }
.footer-contacts { display: flex; flex-direction: column; gap: 4px; }
.footer-phone { color: #fff; font-weight: 600; font-size: 34px; letter-spacing: -0.02em; line-height: 1.2; }
.footer-phone--small { font-size: 22px; }
.footer-contacts a:not(.footer-phone) { text-decoration: underline; }
.footer-nav { margin-left: auto; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.footer-copy { flex-basis: 100%; font-size: 13px; color: #8d9590; }

/* ---------------------------------------------------------------- планшет */
@media (max-width: 1100px) {
    .header-phone { display: none; }
    .product-main { grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 24px 32px; }
}

/* ---------------------------------------------------------------- телефон */
@media (max-width: 900px) {
    :root { --pad: 16px; --header-h: 64px; --r-xl: 28px; --r-lg: 24px; }
    .site-header { border-bottom: 1px solid #eef0ed; }
    .header-row { gap: 8px; }
    .site-logo { margin-right: auto; }
    .site-logo img { height: 34px; }
    .pill-nav { display: none; }
    .only-mobile { display: inline-flex; }
    .icon-btn { width: 44px; height: 44px; }
    .cart-btn { order: 3; background: var(--tile); color: var(--ink); }
    .cart-btn:hover { background: var(--tile); color: var(--ink); }
    .menu-btn { order: 4; }
    body.menu-open { overflow: hidden; }

    .home { padding-top: 12px; gap: 12px; }
    .hero { padding: 24px 20px; min-height: 0; gap: 16px; }
    .hero h1 { font-size: 40px; }
    .hero-bottom .btn { width: 100%; }
    .quiz { padding: 24px 20px; gap: 14px; }
    .quiz h2 { font-size: 28px; }
    .quiz-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .quiz-option { padding: 0 6px; font-size: 15px; }
    .cat-tiles, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .cat-tile { min-height: 0; padding: 16px; }
    .cat-tile__title { font-size: 18px; }
    .stat { padding: 18px; }
    .stat b { font-size: 32px; }
    .stat span { font-size: 14px; }
    .review-cards { display: flex; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 4px; scroll-snap-type: x mandatory; }
    .review-card { flex: 0 0 280px; scroll-snap-align: start; padding: 20px; }
    .review-card p { font-size: 19px; }

    .page-head { padding-top: 16px; }
    .display { font-size: 44px; }
    .chips-bar { margin-left: calc(-1 * var(--pad)); margin-right: calc(-1 * var(--pad)); padding: 10px var(--pad); flex-direction: column; align-items: stretch; gap: 8px; }
    .chips { margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); }
    .chips-count { margin-left: 0; font-size: 13px; }
    ul.products { grid-template-columns: 1fr; gap: 28px; margin-top: 20px; }
    .card-title { font-size: 22px; }
    .card-price { font-size: 18px; }
    .card-meta { font-size: 14px; }

    .product-main { display: flex; flex-direction: column; gap: 20px; }
    .product-media { order: 1; margin: 0 calc(-1 * var(--pad)); }
    .woocommerce-product-gallery__image { border-radius: 0; }
    .pill-link { left: 16px; top: 16px; }
    .woocommerce-product-gallery .flex-control-thumbs { padding: 0 var(--pad); grid-template-columns: repeat(5, minmax(0, 56px)); }
    .buy-box { order: 2; position: static; gap: 20px; padding: 0; }
    .product-sections { order: 3; }
    .product-title { font-size: 56px; }
    .fact b { font-size: 26px; }
    .price-big .js-price { font-size: 40px; }
    .product-sections summary { font-size: 20px; }
    .product-sections .content { font-size: 16px; }
    .sticky-buy { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; align-items: center; gap: 12px; padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -10px 24px rgba(16, 20, 18, .06); transform: translateY(110%); transition: transform .25s ease; }
    .sticky-buy.is-visible { transform: none; }
    .sticky-buy > div { display: flex; flex-direction: column; min-width: 0; }
    .sticky-buy__price { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
    .sticky-buy__meta { font-size: 13px; color: var(--muted); }
    .sticky-buy .btn { margin-left: auto; min-height: 56px; white-space: nowrap; }
    .single-product .site-main { padding-bottom: 100px; }

    form.checkout { display: flex; flex-direction: column; }
    form.checkout #order_review_heading { margin-top: 24px; padding: 20px 20px 0; border-radius: var(--r-lg) var(--r-lg) 0 0; }
    form.checkout #order_review { position: static; padding: 12px 20px 20px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
    #customer_details h3 { font-size: 22px; }
    #place_order { position: sticky; bottom: 12px; z-index: 5; box-shadow: 0 10px 24px rgba(16, 20, 18, .2); }
    table.shop_table.cart thead { display: none; }
    table.shop_table.cart tr { display: grid; grid-template-columns: 80px 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
    table.shop_table.cart td { border: 0; padding: 0; }
    table.shop_table.cart td.product-thumbnail { grid-row: span 3; }
    table.shop_table.cart td.product-price { display: none; }
    table.shop_table.cart td.actions { grid-column: 1 / -1; }
    table.shop_table.cart img { width: 80px; }

    .text-layout { flex-direction: column; gap: 24px; margin-top: 16px; }
    .content { font-size: 17px; }
    .content h2 { font-size: 26px; }
    .callback { position: static; padding: 22px 18px; }
    .callback h2 { font-size: 26px; }

    .footer-card { padding: 28px 20px; border-radius: var(--r-lg); flex-direction: column; align-items: flex-start; gap: 16px; }
    .footer-phone { font-size: 26px; }
    .footer-phone--small { font-size: 20px; }
    .footer-nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- перекрываем общий стиль WooCommerce на оформлении */
.woocommerce table.shop_table, .woocommerce-page table.shop_table { border: 0; border-radius: 0; margin: 0; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-top: 0; padding-left: 0; padding-right: 0; }
.woocommerce table.shop_table thead { display: none; }
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals { display: block; }
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals th { display: block; border: 0; padding-bottom: 4px; }
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td { display: block; width: 100%; text-align: left !important; }
.woocommerce ul#shipping_method { margin: 0; }
.woocommerce ul#shipping_method li { margin: 0; padding: 0; text-indent: 0; line-height: 1.3; }
.woocommerce ul#shipping_method li input { margin: 0; }
.woocommerce ul#shipping_method li label { display: flex; margin: 0; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select { border: 1px solid var(--line-strong); border-radius: 18px; padding: 0 18px; min-height: 56px; background: #fff; line-height: 1.4; }
.woocommerce form .form-row textarea { padding: 14px 18px; min-height: 110px; }
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { border-color: var(--ink); }
.woocommerce-checkout #payment, .woocommerce #payment { background: transparent; border-radius: 0; }
.woocommerce-checkout #payment ul.payment_methods { border: 0; padding: 0; }
.woocommerce-checkout #payment ul.payment_methods li { line-height: 1.3; }
.woocommerce-checkout #payment div.payment_box { background: transparent; color: var(--muted); padding: 8px 4px 0; margin: 0; font-size: 14px; }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce-checkout #payment div.form-row { padding: 0; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top: 0; outline: none; }
.woocommerce-message:focus, .woocommerce-info:focus, .woocommerce-error:focus { outline: none; }
#customer_details .woocommerce-billing-fields h3, #customer_details .woocommerce-additional-fields h3 { margin-top: 0; }
.woocommerce-checkout-review-order-table, .woocommerce-checkout-review-order-table tbody, .woocommerce-checkout-review-order-table tfoot { display: block; width: 100%; }
.woocommerce-checkout-review-order-table tr { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--bar-off); }
.woocommerce-checkout-review-order-table tr th, .woocommerce-checkout-review-order-table tr td { border-bottom: 0 !important; }
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
.woocommerce-checkout-review-order-table tr.order-total { border-bottom: 0; align-items: center; }
.woocommerce-checkout-review-order-table .order-total .amount { white-space: nowrap; }
form.checkout #order_review { margin-top: -1px; }
#order_comments, .woocommerce-additional-fields textarea { border: 1px solid var(--line-strong) !important; border-radius: 18px !important; }
@media (max-width: 900px) {
    .woocommerce-checkout-review-order-table .order-total .amount { font-size: 30px; }
}
form.checkout #order_review_heading { float: none; width: auto; align-self: stretch; }
form.checkout #order_review { float: none; width: auto; }
