/* =====================
   Shop grid
   ===================== */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    justify-content: stretch !important;
    align-items: stretch !important;
}

ul.products::before,
ul.products::after {
    display: none !important;
}

/* =====================
   Product Card
   ===================== */
ul.products li.product.custom-product-card {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: clamp(16px, 2vw, 25px) !important;
    position: relative !important;
    width: 100% !important;
    max-width: 253px !important;
    min-width: 0 !important;
    min-height: clamp(420px, 44vw, 488px) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 18px !important;
    background: #fff !important;
    float: none !important;
    margin: 0 !important;
    justify-self: center !important;
    transition: box-shadow .2s ease !important;
}

ul.products li.product.custom-product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10) !important;
}

/* =====================
   Product image — no background
   ===================== */
ul.products li.product.custom-product-card .card-image-wrap {
    display: block;
    width: min(100%, 203px);
    aspect-ratio: 203 / 271;
    height: auto;
    background: transparent;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

ul.products li.product.custom-product-card .card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

/* =====================
   Top badges
   ===================== */
ul.products li.product.custom-product-card .card-top-badges {
    position: absolute !important;
    top: 15px !important;
    left: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    z-index: 10 !important;
}

ul.products li.product.custom-product-card .badge-sale {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 22px !important;
    background: var(--thermo-red) !important;
    border-radius: 5px !important;
    font-family: 'ThermoFont', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    color: #FFFFFF !important;
    white-space: nowrap !important;
}

ul.products li.product.custom-product-card .badge-new {
    font-family: 'ThermoFont', sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    color: var(--thermo-dark) !important;
    letter-spacing: -0.12px !important;
}

/* =====================
   Wishlist button
   ===================== */
ul.products li.product.custom-product-card .thermo-wl-btn {
    position: absolute;
    top: 15px;
    right: 16px;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border: none !important;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.10);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: transform .15s, box-shadow .15s;
}
ul.products li.product.custom-product-card .thermo-wl-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,.14);
}
ul.products li.product.custom-product-card .thermo-wl-btn .wl-heart {
    stroke: var(--thermo-gray-light);
    fill: none;
    transition: stroke .15s, fill .15s;
}
ul.products li.product.custom-product-card .thermo-wl-btn.in-wl .wl-heart {
    stroke: var(--thermo-red);
    fill: var(--thermo-red);
}

/* =====================
   Color swatches
   ===================== */
ul.products li.product.custom-product-card .card-swatches {
    width: min(100%, 203px);
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 20px;
}

ul.products li.product.custom-product-card .card-swatches .cfvsw-swatches-container {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
}

ul.products li.product.custom-product-card .card-swatches .cfvsw-swatches-option,
ul.products li.product.custom-product-card .card-swatches .card-swatch-dot {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    border: none !important;
    background: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    transition: none !important;
}

ul.products li.product.custom-product-card .card-swatches .cfvsw-swatch-inner {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    display: block !important;
}

/* Active / hover — только 1px border var(--thermo-gray-light) */
ul.products li.product.custom-product-card .card-swatch-dot.active .cfvsw-swatch-inner,
ul.products li.product.custom-product-card .card-swatch-dot:hover .cfvsw-swatch-inner {
    outline: 1px solid var(--thermo-gray-light) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* =====================
   Product title
   ===================== */
ul.products li.product.custom-product-card .card-title {
    width: min(100%, 203px);
    min-height: 42px;
    font-family: 'ThermoFont', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 21px;
    letter-spacing: -0.374px;
    color: var(--thermo-near-black);
    margin-top: 12px;
    margin-bottom: 0;
}

ul.products li.product.custom-product-card .card-title a {
    color: inherit;
    text-decoration: none;
}

/* =====================
   Price
   ===================== */
ul.products li.product.custom-product-card .card-price {
    margin-top: 35px;
    width: min(100%, 203px);
}

ul.products li.product.custom-product-card .card-price .price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Crossed-out regular price */
ul.products li.product.custom-product-card .card-price .price del {
    display: inline-flex;
    align-items: center;
    text-decoration: line-through;
}

ul.products li.product.custom-product-card .card-price .price del .woocommerce-Price-amount {
    font-family: 'ThermoFont', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: -0.224px;
    color: var(--thermo-near-black);
    opacity: 0.5;
}

/* Sale price */
ul.products li.product.custom-product-card .card-price .price ins {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

ul.products li.product.custom-product-card .card-price .price ins .woocommerce-Price-amount {
    font-family: 'ThermoFont', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: -0.224px;
    color: var(--thermo-near-black);
}

/* Regular price (no sale) */
ul.products li.product.custom-product-card .card-price .price > .woocommerce-Price-amount {
    font-family: 'ThermoFont', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: -0.224px;
    color: var(--thermo-near-black);
}


/* Fix for WooCommerce category pages — 3 columns */
.woocommerce-page ul.products.columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
}

.woocommerce-page ul.products.columns-4,
.thermo-related-inner ul.products.columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
}

/* Kill Astra full-width override on cards */
ul.products li.product.custom-product-card.ast-full-width {
    width: 100% !important;
    max-width: 253px !important;
}

.thermo-archive-products ul.products li.product.custom-product-card {
    max-width: none !important;
}

@media (max-width: 1100px) and (min-width: 769px) {
    .woocommerce-page ul.products.columns-3,
    .woocommerce-page ul.products.columns-4,
    .thermo-archive-products ul.products,
    .thermo-related-inner ul.products.columns-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }

    ul.products li.product.custom-product-card {
        min-height: 410px !important;
    }

    ul.products li.product.custom-product-card .card-title {
        font-size: 14px;
        line-height: 19px;
        min-height: 38px;
    }

    ul.products li.product.custom-product-card .card-price {
        margin-top: 22px;
    }
}

@media (max-width: 1180px) and (min-width: 769px) {
    .elementor-widget-shortcode ul.products,
    .elementor-widget-container > ul.products {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
        gap: 16px !important;
    }

    .elementor-widget-shortcode ul.products li.product.custom-product-card,
    .elementor-widget-container > ul.products li.product.custom-product-card {
        min-height: 410px !important;
    }
}


/* =====================
   Responsive
   ===================== */
@media (max-width: 768px) {
    ul.products,
    .woocommerce-page ul.products.columns-3,
    .woocommerce-page ul.products.columns-4,
    .woocommerce-page.mobile-columns-3 ul.products:not(.elementor-grid),
    .woocommerce-page.mobile-columns-3 ul.products.columns-3:not(.elementor-grid),
    .woocommerce-page.mobile-columns-4 ul.products:not(.elementor-grid),
    .woocommerce-page.mobile-columns-4 ul.products.columns-4:not(.elementor-grid),
    .thermo-archive-products ul.products,
    .thermo-archive-products ul.products.columns-3,
    .woocommerce-page.mobile-columns-3 .thermo-archive-products ul.products.columns-3:not(.elementor-grid),
    .single-product.woocommerce-page.mobile-columns-3 .thermo-related-inner ul.products.columns-4:not(.elementor-grid),
    .single-product.woocommerce-page.mobile-columns-4 .thermo-related-inner ul.products.columns-4:not(.elementor-grid),
    .thermo-related-inner ul.products.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    ul.products li.product.custom-product-card {
        width: 100% !important;
        max-width: none !important;
        min-height: 390px !important;
    }

    ul.products li.product.custom-product-card .card-image-wrap,
    ul.products li.product.custom-product-card .card-title,
    ul.products li.product.custom-product-card .card-price,
    ul.products li.product.custom-product-card .card-swatches {
        width: 100%;
    }
}

@media (max-width: 480px) {
    ul.products,
    .woocommerce-page ul.products.columns-3,
    .woocommerce-page ul.products.columns-4,
    .woocommerce-page.mobile-columns-3 ul.products:not(.elementor-grid),
    .woocommerce-page.mobile-columns-3 ul.products.columns-3:not(.elementor-grid),
    .woocommerce-page.mobile-columns-4 ul.products:not(.elementor-grid),
    .woocommerce-page.mobile-columns-4 ul.products.columns-4:not(.elementor-grid),
    .thermo-archive-products ul.products,
    .thermo-archive-products ul.products.columns-3,
    .woocommerce-page.mobile-columns-3 .thermo-archive-products ul.products.columns-3:not(.elementor-grid),
    .single-product.woocommerce-page.mobile-columns-3 .thermo-related-inner ul.products.columns-4:not(.elementor-grid),
    .single-product.woocommerce-page.mobile-columns-4 .thermo-related-inner ul.products.columns-4:not(.elementor-grid),
    .thermo-related-inner ul.products.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    ul.products li.product.custom-product-card {
        min-height: 380px !important;
        padding: 14px 10px !important;
        border-radius: 14px !important;
    }

    ul.products li.product.custom-product-card .card-title {
        font-size: 13px;
        line-height: 18px;
        min-height: 36px;
    }

    ul.products li.product.custom-product-card .card-price {
        margin-top: 18px;
    }

    ul.products li.product.custom-product-card .card-price .price {
        gap: 4px;
    }

    ul.products li.product.custom-product-card .card-price .price del .woocommerce-Price-amount,
    ul.products li.product.custom-product-card .card-price .price ins .woocommerce-Price-amount,
    ul.products li.product.custom-product-card .card-price .price > .woocommerce-Price-amount {
        font-size: 12px;
    }
}