/*
Theme Name: ГлавХозБаза
Description: Витрина интернет-магазина на WooCommerce.
Version: 1.0.2
Requires PHP: 8.1
Text Domain: ghb
*/

:root {
    --ink: #23201f;
    --muted: #6a615f;
    --red: #d9001a;
    --red-dark: #ad0015;
    --rose: #fff0ef;
    --line: #e8dfdc;
    --paper: #fff;
    --canvas: #f7f4f2;
    --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: "Golos Text", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; }
svg { inline-size: 22px; block-size: 22px; flex: none; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.14; letter-spacing: -.025em; }
p { margin: 0 0 1em; }
.screen-reader-text, .skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip-link:focus { position: absolute; z-index: 9; inset: .5rem auto auto .5rem; padding: 1rem; background: white; }
.shell { width: min(100% - 72px, 1360px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-layout {
    display: grid;
    grid-template-columns: auto minmax(210px, 510px) 1fr;
    align-items: center;
    gap: clamp(20px, 4vw, 56px);
    min-height: 86px;
}
.brand { display: inline-flex; align-items: center; width: clamp(170px, 17vw, 226px); }
.brand img { display: block; width: 100%; }
.site-search {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 5px 5px 13px;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.site-search > svg { width: 20px; color: var(--muted); }
.site-search input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 6px 3px; }
.site-search button {
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    color: var(--ink);
    font-size: .875rem;
    font-weight: 650;
}
.site-search button:hover { color: var(--red-dark); }
.header-links { justify-self: end; display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); }
.header-links a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: .875rem; font-weight: 650; }
.ghb-cart-count { display: grid; place-items: center; min-width: 23px; height: 23px; border-radius: 99px; padding-inline: 5px; background: var(--rose); color: var(--red-dark); }
.page-body { min-height: 63vh; padding-bottom: 64px; }
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 18px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: white;
    font-size: .875rem;
    font-weight: 650;
    white-space: nowrap;
}
.chip svg { width: 16px; height: 16px; }
.chip:hover { border-color: #df8d92; }
.chip.selected { background: var(--red); border-color: var(--red); color: white; }
.shop-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: clamp(285px, 28vw, 380px);
    border-radius: 24px;
    background: #e9cbc5;
    margin-bottom: 28px;
}
.shop-hero > img {
    position: absolute;
    z-index: -2;
    inset: 0 0 0 auto;
    width: 78%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 22%;
}
.shop-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, #f1dcd7 5%, #f1dcd7 24%, #f1dcd7e8 34%, #f1dcd752 52%, transparent 70%);
}
.hero-copy { padding: clamp(25px, 3.2vw, 46px) clamp(26px, 4.5vw, 68px); max-width: 610px; }
.hero-copy h1 { font-size: clamp(36px, 4.6vw, 70px); margin-bottom: .23em; letter-spacing: -.065em; font-weight: 790; }
.hero-copy p { max-width: 330px; color: #57413e; margin-bottom: 22px; }
.action, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--red);
    color: white;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
}
.action:hover, .woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce input.button:hover, .woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--red-dark); color: white; }
.action.outline { color: var(--red-dark); border-color: #e6b3b6; background: white; }
.action.outline:hover { background: var(--rose); }
.shop-layout { display: grid; grid-template-columns: minmax(185px, 235px) minmax(0, 1fr); gap: 24px; scroll-margin-top: 18px; }
.catalog-sidebar { min-width: 0; }
.filter-toggle summary { display: none; }
.filter-box, .content-panel, .single-product div.product {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: white;
}
.filter-box { padding: 17px 18px; margin-bottom: 12px; }
.filter-box h2 { font-size: 1rem; }
.category-tree, .category-tree ul { list-style: none; margin: 0; padding: 0; }
.category-tree { max-height: 390px; padding-right: 5px; overflow: auto; scrollbar-color: #d8c6c3 transparent; scrollbar-width: thin; }
.category-tree ul { margin: 0 0 4px 10px; padding-left: 9px; border-left: 1px solid var(--line); }
.category-tree a { display: block; padding: 5px 0; color: #534846; font-size: .875rem; line-height: 1.35; }
.category-tree a:hover, .category-tree a.current, .category-tree a[aria-current] { color: var(--red-dark); }
.category-tree a.current, .category-tree a[aria-current] { font-weight: 750; }
.price-filter { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.price-filter label { font-size: .8rem; color: var(--muted); }
.price-filter input { min-width: 0; width: 100%; margin-top: 3px; }
.price-filter .action, .filter-reset { grid-column: 1/-1; }
.filter-reset { text-align: center; color: var(--muted); font-size: .85rem; }
.price-filter input, .woocommerce input.input-text, .woocommerce select,
.woocommerce textarea, .woocommerce .quantity .qty {
    min-height: 40px;
    border: 1px solid var(--line);
    background-color: white;
    border-radius: 9px;
    padding: 7px 9px;
    color: var(--ink);
}
.catalog-results { min-width: 0; }
.catalog-title, .catalog-results > h1, .woocommerce-products-header__title { font-size: clamp(26px, 3vw, 40px); margin-top: 2px; margin-bottom: 12px; }
.woocommerce .woocommerce-result-count { margin-top: 9px; color: var(--muted); font-size: .875rem; }
.woocommerce .woocommerce-ordering { margin-bottom: 13px; }
.woocommerce .woocommerce-ordering select { font-size: .875rem; max-width: 100%; }
.woocommerce ul.products {
    clear: both;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin: 0 0 22px;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce .page-body ul.products[class*="columns-"] li.product {
    display: flex;
    flex-direction: column;
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    overflow: hidden;
}
.product-photo {
    display: block;
    overflow: hidden;
    background: #f0e9e6;
    aspect-ratio: 1.35;
}
.woocommerce ul.products li.product a img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform 170ms ease-out;
}
.product-photo:hover img { transform: scale(1.035); }
.product-card-body { display: flex; flex: 1; flex-direction: column; justify-content: space-between; gap: 12px; padding: 13px 15px 15px; }
.product-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .925rem; font-weight: 690; line-height: 1.35; }
.card-purchase { display: flex; align-items: center; justify-content: space-between; gap: 7px; flex-wrap: wrap; }
.woocommerce ul.products li.product .price { color: var(--ink); margin: 0; font-size: 1.18rem; font-weight: 780; white-space: nowrap; }
.woocommerce ul.products li.product a.button { margin: 0; min-height: 35px; padding: 7px 9px; color: var(--red-dark); background: var(--rose); font-size: .8rem; }
.woocommerce ul.products li.product a.button:hover { background: var(--red); color: white; }
.woocommerce ul.products li.product .added_to_cart { padding: 0; color: var(--red-dark); font-size: .8rem; }
.woocommerce nav.woocommerce-pagination ul { border: 0; display: inline-flex; flex-wrap: wrap; gap: 5px; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.woocommerce nav.woocommerce-pagination ul li .current { background: var(--red); color: white; border-color: var(--red); }
.woocommerce .woocommerce-breadcrumb { padding-block: 16px; margin-bottom: 2px; color: var(--muted); }
.single-product div.product, .content-panel { padding: clamp(16px, 3vw, 35px); margin-top: 18px; }
.single-product div.product { margin-top: 0; }
.woocommerce div.product .product_title { font-size: clamp(25px, 3.1vw, 41px); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ink); font-size: 1.55rem; font-weight: 750; }
.woocommerce div.product .stock { color: #32713d; }
.woocommerce div.product .woocommerce-product-gallery img { border-radius: 14px; }
.ghb-illustration-note { color: var(--muted); font-size: .875rem; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea { line-height: inherit; }
.woocommerce .woocommerce-info, .woocommerce .woocommerce-message { border-top-color: var(--red); }
.woocommerce .woocommerce-info::before, .woocommerce .woocommerce-message::before { color: var(--red-dark); }
.woocommerce-MyAccount-navigation ul { padding: 0; margin: 0; list-style: none; }
.woocommerce-MyAccount-navigation a { display: block; padding: 7px 10px; border-radius: 7px; }
.woocommerce-MyAccount-navigation .is-active a { color: var(--red-dark); background: var(--rose); font-weight: 650; }
.woocommerce form.checkout .form-row label { font-weight: 650; }
.ghb-delivery-note { color: var(--muted); font-size: .875rem; }
.site-footer { background: white; border-top: 1px solid var(--line); }
.footer-layout { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-block: 26px; }
.footer-layout .brand { width: 145px; }
.footer-layout nav { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: .875rem; }
@media (max-width: 1080px) {
    .shell { width: calc(100% - 42px); }
    .header-layout { gap: 20px; }
    .header-links a > span:not(.ghb-cart-count) { display: none; }
    .header-links a { padding-block: 10px; }
    .shop-layout { grid-template-columns: minmax(165px, 195px) minmax(0, 1fr); gap: 15px; }
}
@media (max-width: 760px) {
    .shell { width: calc(100% - 28px); }
    .header-layout { min-height: 0; padding-block: 12px; grid-template-columns: 1fr auto; gap: 10px; }
    .site-search { grid-column: 1/-1; grid-row: 2; }
    .header-links { grid-column: 2; grid-row: 1; }
    .category-chips { flex-wrap: nowrap; overflow-x: auto; padding-block: 12px; }
    .shop-layout { display: block; }
    .shop-hero { min-height: 260px; margin-bottom: 15px; border-radius: 15px; }
    .hero-copy { padding: 23px 15px; }
    .hero-copy h1 { font-size: clamp(30px, 7vw, 48px); }
    .hero-copy p { width: min(52vw, 260px); font-size: .875rem; }
    .shop-hero > img { width: 85%; object-position: 66% center; }
    .shop-hero::after { background: linear-gradient(90deg,#f1dcd7 8%,#f1dcd7e8 34%,#f1dcd773 55%,transparent 87%); }
    .filter-toggle { margin-bottom: 15px; }
    .filter-toggle summary { display: flex; align-items: center; gap: 8px; padding: 9px 13px; background: white; border: 1px solid var(--line); border-radius: 9px; font-size: .875rem; font-weight: 680; cursor: pointer; }
    .filter-toggle summary > svg:last-child { margin-left: auto; }
    .filter-toggle[open] summary { margin-bottom: 9px; }
    .category-tree { max-height: 265px; }
    .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .woocommerce .page-body ul.products[class*="columns-"] li.product { border-radius: 13px; }
    .product-card-body { padding: 9px; gap: 7px; }
    .product-name { font-size: .86rem; }
    .woocommerce ul.products li.product .price { font-size: 1rem; }
    .woocommerce .woocommerce-ordering { max-width: 59%; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .woocommerce ul.products li.product a img { transition: none; }
}
