/*
Theme Name: POLIGON 2.0
Theme URI: https://poligon-shop.ru
Description: Дочерняя тема POLIGON для Astra и WooCommerce
Author: POLIGON
Template: astra
Version: 2.0.0
Text Domain: poligon-child
*/

/* Фирменные цвета POLIGON */
:root {
    --poligon-dark: #101820;
    --poligon-surface: #182831;
    --poligon-accent: #42c9bd;
    --poligon-text: #e8f1f4;
}

/* POLIGON 1.0 — Homepage */

.poligon-home {
    background: #101820;
    color: #e8f1f4;
}

.poligon-container {
    width: min(1200px, 90%);
    margin: 0 auto;
}

.poligon-hero {
    min-height: 620px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(
            circle at 85% 40%,
            #20565b 0%,
            transparent 40%
        ),
        linear-gradient(135deg, #101820, #182831);
}

.poligon-hero-content {
    max-width: 800px;
    padding: 90px 0;
}

.poligon-eyebrow {
    color: #42c9bd;
    font-size: 13px;
    letter-spacing: 3px;
    font-weight: 700;
}

.poligon-hero h1 {
    color: #ffffff;
    font-size: clamp(42px, 6vw, 88px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -2px;
    margin: 30px 0;
}

.poligon-hero h1 span {
    color: #42c9bd;
}

.poligon-hero p {
    color: #b8c9d0;
    font-size: 19px;
    line-height: 1.7;
    max-width: 580px;
}

.poligon-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 35px;
}

.poligon-btn,
.poligon-btn-outline {
    display: inline-block;
    padding: 16px 28px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
}

.poligon-btn {
    background: #42c9bd;
    color: #101820;
}

.poligon-btn-outline {
    border: 1px solid #638087;
    color: #ffffff;
}

.poligon-categories {
    padding: 90px 0;
}

.poligon-section-heading span {
    color: #42c9bd;
    font-size: 13px;
    letter-spacing: 2px;
}

.poligon-section-heading h2 {
    color: #ffffff;
    font-size: clamp(32px, 4vw, 52px);
    margin: 15px 0;
}

.poligon-section-heading p {
    color: #b8c9d0;
}

.poligon-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 45px;
}

.poligon-category-card {
    min-height: 240px;
    padding: 30px;
    background: #1b2b35;
    border: 1px solid #30434d;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    transition: 0.25s ease;
}

.poligon-category-card:hover {
    border-color: #42c9bd;
    transform: translateY(-4px);
}

.poligon-category-number {
    color: #42c9bd;
    font-size: 13px;
}

.poligon-category-card h3 {
    color: #ffffff;
    font-size: 25px;
    margin: 0 0 10px;
}

.poligon-category-card p {
    color: #b8c9d0;
    margin: 0;
}

.poligon-category-arrow {
    color: #42c9bd;
    align-self: flex-end;
    font-size: 25px;
}

.poligon-benefits {
    padding: 55px 0;
    background: #182831;
}

.poligon-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.poligon-benefits strong {
    color: #42c9bd;
}

.poligon-benefits p {
    color: #d1dce0;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .poligon-hero {
        min-height: 500px;
    }

    .poligon-hero-content {
        padding: 70px 0;
    }

    .poligon-category-grid,
    .poligon-benefits-grid {
        grid-template-columns: 1fr;
    }

    .poligon-category-card {
        min-height: 210px;
    }
}

/* POLIGON — полноширинная главная */

body.home .site-content > .ast-container {
    display: block;
    max-width: 100%;
    width: 100%;
    padding: 0;
}

body.home #primary {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    float: none;
}

body.home #secondary {
    display: none;
}

body.home .poligon-home {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

body.home .site-content {
    padding: 0;
}


.pg-legal-footer{background:#10191d;color:#e9f2f2;border-top:1px solid #304247;padding:55px clamp(20px,5vw,76px) 22px;font-size:15px}
.pg-legal-footer a{color:#c5d7d9;text-decoration:none}.pg-legal-footer a:hover{color:#7bc9c4}
.pg-legal-grid{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:35px;max-width:1440px;margin:auto}
.pg-legal-footer h3{color:#80cbc5;font-size:12px;letter-spacing:.13em;text-transform:uppercase;margin:0 0 18px}
.pg-legal-footer p{margin:0 0 12px;line-height:1.65;color:#b9c9cc}
.pg-legal-footer .pg-legal-brand{font-size:28px;font-weight:800;letter-spacing:.1em;color:#fff;margin-bottom:13px}
.pg-legal-footer .pg-legal-bottom{max-width:1440px;margin:36px auto 0;border-top:1px solid #304247;padding-top:18px;display:flex;justify-content:space-between;gap:20px;color:#8da3a8;font-size:12px;flex-wrap:wrap}
@media(max-width:760px){.pg-legal-grid{grid-template-columns:1fr}.pg-legal-footer{padding:35px 22px 20px}}

/* Internal pages only: keep transaction forms light and readable. */
body:not(.home) #masthead, body:not(.home) #colophon {display:none!important}
body:not(.home) {--ast-global-color-0:#087e80;--ast-global-color-1:#09666b;--ast-global-color-2:#182831;--ast-global-color-3:#34454e;--wp--preset--color--vivid-cyan-blue:#087e80;background:#eef2f3;color:#182831}
body:not(.home) .pg-header {display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;background:#101820;color:#e8f1f4;padding:22px clamp(20px,5vw,76px);border-bottom:1px solid #304247}
body:not(.home) .pg-header a {color:#e8f1f4;text-decoration:none}
body:not(.home) .pg-header a:hover {color:#42c9bd}
body:not(.home) .pg-logo {display:flex;align-items:center;gap:12px;font-size:24px;font-weight:800;letter-spacing:.08em;line-height:1.15}
body:not(.home) .pg-logo small {display:block;font-size:9px;letter-spacing:.14em;color:#a8bdc3;margin-top:5px}
body:not(.home) .pg-logo-mark {display:grid;place-items:center;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid #46666c;border-radius:6px}
body:not(.home) .pg-logo-mark span,body:not(.home) .pg-cart span {color:#42c9bd}
body:not(.home) .pg-nav {display:flex;flex-wrap:wrap;gap:20px;font-size:14px}
body:not(.home) .pg-cart {border:1px solid #46666c;border-radius:6px;padding:10px 16px}
body:not(.home) #content {background:#eef2f3;min-height:55vh}
body:not(.home) .ast-article-single,body:not(.home) .ast-woocommerce-container {background:transparent}
body:not(.home) .site-content > .ast-container {padding-top:32px;padding-bottom:48px}
body:not(.home) .woocommerce ul.products li.product {background:#fff;border:1px solid #d5dfe1;border-radius:8px;padding:16px;overflow-wrap:anywhere}
body:not(.home) .woocommerce ul.products li.product img {border-radius:4px}
body:not(.home) .woocommerce a.button,body:not(.home) .woocommerce button.button,body:not(.home) .woocommerce input.button,body:not(.home) .wc-block-components-button:not(.is-link),body:not(.home) .wp-element-button {background:#087e80;color:#fff;border-radius:5px;border-color:#087e80}
body:not(.home) .woocommerce a.button:hover,body:not(.home) .woocommerce button.button:hover,body:not(.home) .wc-block-components-button:not(.is-link):hover {background:#09666b;color:#fff}
body:not(.home) .wc-block-components-sidebar,body:not(.home) .wc-block-cart-items,body:not(.home) .woocommerce-checkout-review-order {background:#fff;border-radius:8px;padding:16px}
body:not(.home) .wc-block-components-text-input input,body:not(.home) .woocommerce form input.input-text {background:#fff;color:#182831}
body:not(.home) .pg-header a:focus-visible,body:not(.home) .pg-legal-footer a:focus-visible {outline:2px solid #42c9bd;outline-offset:4px}
@media(max-width:760px){body:not(.home) .pg-header{gap:15px;padding:16px 20px}body:not(.home) .pg-nav{order:3;width:100%;gap:14px}body:not(.home) .site-content > .ast-container{padding-top:20px;padding-bottom:30px}body:not(.home) .woocommerce ul.products li.product{padding:10px}}

/* POLIGON — compact WooCommerce archive grid, 6 / 3 / 2.
   Only shop and product categories; exclude search and homepage. */
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch;
}
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products::before,
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products::after {
    display: none !important;
    content: none !important;
}
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products li.product {
    box-sizing: border-box;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    padding: 10px !important;
    display: flex;
    flex-direction: column;
    text-align: left;
}
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products li.product :is(.woocommerce-loop-product__link,.astra-shop-thumbnail-wrap) {
    min-width: 0;
}
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products li.product :is(img.attachment-woocommerce_thumbnail,img.wp-post-image,img.woocommerce-placeholder,.woocommerce-loop-product__link > img) {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    object-position: center;
    background: #fff;
    margin: 0 0 10px !important;
    padding: 5px;
}
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products li.product .astra-shop-summary-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products li.product .price {
    margin-top: auto;
}
body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products li.product .button {
    max-width: 100%;
    white-space: normal;
    font-size: 12px;
    line-height: 1.35;
    padding: 9px 7px;
    text-align: center;
}
@media (max-width: 1100px) {
    body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 600px) {
    body:is(.post-type-archive-product,.tax-product_cat):not(.home):not(.search) .ast-woocommerce-container ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}
