/* =====================
   Shop grid
   ===================== */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 253px) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !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: 25px !important;
    position: relative !important;
    width: 253px !important;
    min-height: 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;
}

/* =====================
   Product image — no background
   ===================== */
ul.products li.product.custom-product-card .card-image-wrap {
    display: block;
    width: 203px;
    height: 271px;
    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: #FF7B7B !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: #152231 !important;
    letter-spacing: -0.12px !important;
}

/* =====================
   YITH Wishlist
   ===================== */
ul.products li.product.custom-product-card .yith-add-to-wishlist-button-block {
    position: absolute !important;
    top: 15px !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 20 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

ul.products li.product.custom-product-card .yith-add-to-wishlist-button-block a {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background: #fff !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10) !important;
    margin: 0 !important;
}

ul.products li.product.custom-product-card .yith-add-to-wishlist-button-block a span {
    display: none !important;
}

/* Heart — default */
ul.products li.product.custom-product-card .yith-add-to-wishlist-button-block .yith-wcwl-add-button a {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' fill='none' viewBox='0 0 24 24' stroke='%23B9BDC1' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 19px !important;
}

/* Heart — added to wishlist */
ul.products li.product.custom-product-card .yith-add-to-wishlist-button-block .yith-wcwl-wishlistaddedbrowse a,
ul.products li.product.custom-product-card .yith-add-to-wishlist-button-block .yith-wcwl-wishlistexistsbrowse a {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' fill='%23FF7B7B' viewBox='0 0 24 24' stroke='%23FF7B7B' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 19px !important;
}

/* =====================
   Color swatches
   ===================== */
ul.products li.product.custom-product-card .card-swatches {
    width: 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 #B9BDC1 */
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 #B9BDC1 !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* =====================
   Product title
   ===================== */
ul.products li.product.custom-product-card .card-title {
    width: 203px;
    min-height: 42px;
    font-family: 'ThermoFont', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 21px;
    letter-spacing: -0.374px;
    color: #1D1D1F;
    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: 12px;
    width: 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: #1D1D1F;
    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: #1D1D1F;
}

/* 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: #1D1D1F;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 768px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    ul.products li.product.custom-product-card {
        width: 100% !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 {
        grid-template-columns: 1fr !important;
    }
}