/* =============================== GRID DESKTOP ================================ */
@media (min-width: 1025px) {
    .custom-product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
        gap: 24px;
        justify-content: center;
    }
}

/* =============================== CARD BASE ================================ */
.custom-product-card {
    position: relative;
    /* 🔥 importante */
    padding-bottom: 25px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    box-sizing: border-box;
    overflow: visible;
    /* 🔥 cambiar hidden por visible */

}

/* =============================== IMAGEN 1:1 ================================ */
.custom-product-card .product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

/* link SOLO para click */
.product-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
}

/* =============================== IMÁGENES ================================ */
.custom-product-card .product-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition-property: opacity, transform;
    transition-duration: .45s, .85s;
    transition-timing-function: ease, cubic-bezier(.4, 0, .2, 1);
    will-change: opacity, transform;
    border-radius: 20px 20px 0px 0px;
}

/* estado base */
.img-main {
    z-index: 1;
}

.img-hover {
    z-index: 2;
    opacity: 0;
    transform: scale(1.08);
}

/* =============================== TAP / TOUCH (MÓVIL) ================================ */
.custom-product-card.is-hover .img-main {
    opacity: 0;
    transform: scale(1);
}

.custom-product-card.is-hover .img-hover {
    opacity: 1;
    transform: scale(1);
}

/* =============================== INFO ================================ */
.product-info {
    padding: 14px 16px 2px;
}

.product-category {
    font-size: 11px;
    text-transform: uppercase;
    color: #8a8a8a;
    letter-spacing: .1em;
}

.product-title {
    font-family: 'Varela Round', sans-serif;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    margin: 6px 0;
}


@media (max-width: 768px) {

    .product-title,
    .product-price,
    .product-category {
        font-size: 10px;
    }
}

.product-title a {
    color: #000 !important;
}

.product-title:hover a {
    color: #56CFE1 !important;
}

.product-price {
    display: block;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 300;
    text-decoration: none !important;
}

.product-price del {
    opacity: .5;
    font-size: 14px;
    font-weight: 800;
    margin-right: 6px;
}

.product-price ins {
    text-decoration: none !important;
    font-weight: 500;
    color: #000;
}

/* =============================== MÓVIL (2 productos) ================================ */
@media (max-width: 768px) {
    .custom-product-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        /* 🔥 separación entre columnas y filas */
        padding: 0 2px;
        /* 🔥 aire lateral */
        font-size: 14px;
    }

    .custom-product-card {
        height: 100%;
        width: 100%;
        max-width: 100%;
    }






}

.btn-icon {
    width: 16px;
    height: 16px;
    transition: transform .2s ease;
}

/* =============================== TABLET (3 productos) ================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .custom-product-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 0 20px;
    }

    .custom-product-card {
        width: 100%;
        max-width: 100%;
    }
}

/* =============================== CASO ESPECIAL: SOLO 1 PRODUCTO ================================ */
@media (max-width: 768px) {
    .custom-product-grid:has(.custom-product-card:only-child) {
        justify-content: center;
        overflow-x: hidden;
    }

    .custom-product-grid:has(.custom-product-card:only-child) .custom-product-card {
        flex: 0 0 calc(100% - 34px);
        /* 🔑 FIX DEFINITIVO */
        max-width: calc(100% - 34px);
        margin: 0 auto;
    }
}

/* =============================== LABELS (AWL) ================================ */
.custom-product-card .product-image .awl-product-label,
.custom-product-card .product-image .awl-label {
    position: absolute !important;
    z-index: 9999 !important;
    pointer-events: none;
    top: 1px;
    left: 12px;
    transform: translateY(-80%) !important;
}

/* Contenedor imágenes + link */
.product-media {
    position: absolute;
    inset: 0;
    z-index: 1;
    will-change: opacity, transform;
}

.product-link:active {
    background: transparent;
}

/* =============================== FIX REAL AWL → OVERLAY ================================ */
/* contenedor principal AWL */
.custom-product-card .product-image>.advanced-woo-labels {
    position: absolute !important;
    top: 28px;
    left: 12px;
    width: auto !important;
    z-index: 20 !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

/* evitar que AWL empuje layout */
.custom-product-card .product-image>.advanced-woo-labels * {
    pointer-events: none;
}

/* =============================== SAFARI / iOS TAP FEEDBACK ================================ */
@media (hover: none) and (pointer: coarse) {
    .custom-product-card .product-image {
        transition: transform .18s cubic-bezier(.4, 0, .2, 1);
    }

    .custom-product-card .product-image:active {
        transform: scale(.97);
    }
}

/* =============================== Productos archive ================================ */
.archive-add-variable {
    text-transform: uppercase !important;
    color: #ddd !important;
    border-radius: 70px 70px 70px 70px !important;
    background-color: #0f0f0f !important;
}

.archive-variation-buttons {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    padding: 0 12px;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 10;
}

.variation-option {
    padding: 6px 12px;
    margin: 0 !important;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
    font-size: 14px;
    border-radius: 70px !important;
    text-align: center !important;
    flex: 0 0 auto !important;
    min-width: 30px !important;
    padding: 5px !important;
    background-color: #f5f5f5 !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.variation-option:hover {
    border-color: #000 !important;
}

.variation-option.active {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

.archive-add-variable:disabled {
    opacity: .5 !important;
    cursor: not-allowed !important;
}

/* Hover desktop */
@media (hover: hover) and (pointer: fine) {
    .archive-add-variable:hover {
        background: #000;
        transform: translateY(-2px);
    }
}

/* Active móvil */
@media (hover: none) and (pointer: coarse) {
    .archive-add-variable:active {
        transform: scale(.96);
    }
}

/* Disabled */
.archive-add-variable:disabled {
    background: #e5e5e5;
    color: #9aa0a6;
    cursor: not-allowed;
    transform: none;
}

.archive-add-to-cart {
    text-transform: uppercase !important;
    color: #ddd !important;
    border-radius: 70px 70px 70px 70px !important;
    background-color: #0f0f0f !important;
}


.product-actions {
    position: absolute;
    bottom: -15px;
    /* 🔥 controla qué tan afuera sale */
    justify-content: center;
    width: 100%;
    /* 🔥 faltaba esto */
    justify-content: center;
    z-index: 5;
    padding: 0;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {

    .variation-option {
        font-size: 9px;
        padding: 4px 8px !important;
    }

    .product-actions {
        bottom: -12px;
        /* menos salida en móvil */
    }



}

/* Botón simple */
.archive-add-to-cart,
.archive-add-variable {
    width: auto;
    min-width: 100px;
    padding: 10px 22px;
    text-align: center;
    border-radius: 70px;
    background-color: #0f0f0f;
    color: #fff;
    text-transform: uppercase;
    gap: 8px;
}

@media (max-width: 768px) {

    .archive-add-to-cart,
    .archive-add-variable {
        font-size: 11px;
    }
}


@media (max-width: 768px) {
    .custom-product-card .archive-variation-buttons .variation-option {
        border: 0 !important;
        font-size: 11px !important;
    }
}

.custom-product-card .archive-variation-buttons .variation-option {
    border: 0 !important;
}

