/* =========================
   GRID GENERAL
========================= */
.gwca-active ul.products,
.gwca-active .woocommerce ul.products,
.gwca-active .woocommerce-page ul.products {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* =========================
   CARD DE PRODUCTO
========================= */
.gwca-active ul.products li.product,
.gwca-active .woocommerce ul.products li.product,
.gwca-active .woocommerce-page ul.products li.product {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid #dde5ee !important;
    border-radius: 22px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06) !important;
    overflow: hidden !important;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease !important;
}

.gwca-active ul.products li.product:hover,
.gwca-active .woocommerce ul.products li.product:hover,
.gwca-active .woocommerce-page ul.products li.product:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09) !important;
    border-color: #cfd9e4 !important;
}

/* =========================
   BADGE STOCK
========================= */
.gwca-active ul.products li.product.instock::before,
.gwca-active .woocommerce ul.products li.product.instock::before,
.gwca-active .woocommerce-page ul.products li.product.instock::before,
.gwca-active ul.products li.product.outofstock::before,
.gwca-active .woocommerce ul.products li.product.outofstock::before,
.gwca-active .woocommerce-page ul.products li.product.outofstock::before {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 6 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 28px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .2px !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: blur(6px) !important;
}

.gwca-active ul.products li.product.instock::before,
.gwca-active .woocommerce ul.products li.product.instock::before,
.gwca-active .woocommerce-page ul.products li.product.instock::before {
    content: "En stock" !important;
    background: rgba(34, 197, 94, 0.12) !important;
    color: #166534 !important;
    border: 1px solid rgba(34, 197, 94, 0.25) !important;
}

.gwca-active ul.products li.product.outofstock::before,
.gwca-active .woocommerce ul.products li.product.outofstock::before,
.gwca-active .woocommerce-page ul.products li.product.outofstock::before {
    content: "Sin stock" !important;
    background: rgba(239, 68, 68, 0.10) !important;
    color: #991b1b !important;
    border: 1px solid rgba(239, 68, 68, 0.22) !important;
}

/* =========================
   BLOQUE INTERNO
========================= */
.gwca-active ul.products li.product .product-block,
.gwca-active .woocommerce ul.products li.product .product-block,
.gwca-active .woocommerce-page ul.products li.product .product-block {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 100% !important;
    background: #fff !important;
}

/* =========================
   ZONA IMAGEN
========================= */
.gwca-active ul.products li.product .product-transition,
.gwca-active .woocommerce ul.products li.product .product-transition,
.gwca-active .woocommerce-page ul.products li.product .product-transition {
    position: relative !important;
    padding: 16px 16px 0 !important;
    z-index: 1 !important;
}

.gwca-active ul.products li.product .product-image,
.gwca-active .woocommerce ul.products li.product .product-image,
.gwca-active .woocommerce-page ul.products li.product .product-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 280px !important;
    min-height: 280px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.gwca-active ul.products li.product .product-image img,
.gwca-active .woocommerce ul.products li.product .product-image img,
.gwca-active .woocommerce-page ul.products li.product .product-image img {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin: 0 auto !important;
    background: transparent !important;
    transition: transform .25s ease !important;
}

.gwca-active ul.products li.product:hover .product-image img,
.gwca-active .woocommerce ul.products li.product:hover .product-image img,
.gwca-active .woocommerce-page ul.products li.product:hover .product-image img {
    transform: scale(1.02) !important;
}

/* overlay link */
.gwca-active ul.products li.product .woocommerce-LoopProduct-link,
.gwca-active .woocommerce ul.products li.product .woocommerce-LoopProduct-link,
.gwca-active .woocommerce-page ul.products li.product .woocommerce-LoopProduct-link {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    opacity: 0 !important;
}

/* =========================
   ACCIONES FLOTANTES
========================= */
.gwca-active ul.products li.product .group-action,
.gwca-active .woocommerce ul.products li.product .group-action,
.gwca-active .woocommerce-page ul.products li.product .group-action {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 6 !important;
    opacity: 0 !important;
    transform: translateY(6px) !important;
    transition: opacity .2s ease, transform .2s ease !important;
    pointer-events: none !important;
}

.gwca-active ul.products li.product:hover .group-action,
.gwca-active .woocommerce ul.products li.product:hover .group-action,
.gwca-active .woocommerce-page ul.products li.product:hover .group-action {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.gwca-active ul.products li.product .shop-action.vertical,
.gwca-active .woocommerce ul.products li.product .shop-action.vertical,
.gwca-active .woocommerce-page ul.products li.product .shop-action.vertical {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.gwca-active ul.products li.product .woosw-btn,
.gwca-active ul.products li.product .woosq-btn,
.gwca-active .woocommerce ul.products li.product .woosw-btn,
.gwca-active .woocommerce ul.products li.product .woosq-btn,
.gwca-active .woocommerce-page ul.products li.product .woosw-btn,
.gwca-active .woocommerce-page ul.products li.product .woosq-btn {
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    backdrop-filter: blur(6px) !important;
}

/* ocultar add to cart flotante del tema para no ensuciar */
.gwca-active ul.products li.product .opal-add-to-cart-button,
.gwca-active .woocommerce ul.products li.product .opal-add-to-cart-button,
.gwca-active .woocommerce-page ul.products li.product .opal-add-to-cart-button {
    display: none !important;
}

/* =========================
   CONTENIDO
========================= */
.gwca-active ul.products li.product .product-caption,
.gwca-active .woocommerce ul.products li.product .product-caption,
.gwca-active .woocommerce-page ul.products li.product .product-caption {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding: 10px 16px 4px !important;
}

.gwca-active ul.products li.product .woocommerce-loop-product__title,
.gwca-active .woocommerce ul.products li.product .woocommerce-loop-product__title,
.gwca-active .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
    margin: 0 0 8px !important;
    font-size: 15px !important;
    line-height: 1.38 !important;
    font-weight: 800 !important;
    min-height: 42px !important;
    max-height: 42px !important;
    color: #0f172a !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.gwca-active ul.products li.product .woocommerce-loop-product__title a,
.gwca-active .woocommerce ul.products li.product .woocommerce-loop-product__title a,
.gwca-active .woocommerce-page ul.products li.product .woocommerce-loop-product__title a {
    color: #0f172a !important;
    text-decoration: none !important;
}

.gwca-active ul.products li.product .count-review,
.gwca-active .woocommerce ul.products li.product .count-review,
.gwca-active .woocommerce-page ul.products li.product .count-review {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    min-height: 18px !important;
    font-size: 12px !important;
    color: #64748b !important;
}

.gwca-active ul.products li.product .star-rating,
.gwca-active .woocommerce ul.products li.product .star-rating,
.gwca-active .woocommerce-page ul.products li.product .star-rating {
    margin: 0 !important;
    color: #f59e0b !important;
    font-size: 12px !important;
}

.gwca-active ul.products li.product .price,
.gwca-active .woocommerce ul.products li.product .price,
.gwca-active .woocommerce-page ul.products li.product .price {
    margin: 0 0 4px !important;
    min-height: 28px !important;
    color: #0f172a !important;
    font-size: 21px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
}

.gwca-active ul.products li.product .price del,
.gwca-active .woocommerce ul.products li.product .price del,
.gwca-active .woocommerce-page ul.products li.product .price del {
    opacity: .5 !important;
    font-size: 14px !important;
    margin-right: 6px !important;
}

.gwca-active ul.products li.product .price ins,
.gwca-active .woocommerce ul.products li.product .price ins,
.gwca-active .woocommerce-page ul.products li.product .price ins {
    text-decoration: none !important;
}

/* =========================
   FECHA ESTIMADA
========================= */
.gwca-active ul.products li.product .pi-edd,
.gwca-active .woocommerce ul.products li.product .pi-edd,
.gwca-active .woocommerce-page ul.products li.product .pi-edd {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    min-height: auto !important;
}

/* =========================
   BOTN COMPRAR AHORA
========================= */
.gwca-active ul.products li.product > .wpcbn-btn,
.gwca-active .woocommerce ul.products li.product > .wpcbn-btn,
.gwca-active .woocommerce-page ul.products li.product > .wpcbn-btn {
    position: relative !important;
    z-index: 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: calc(100% - 32px) !important;
    margin: 12px 16px 16px !important;
    min-height: 44px !important;
    padding: 0 16px !important;
    border-radius: 14px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    border: 1px solid #0f172a !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10) !important;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease !important;
}

.gwca-active ul.products li.product > .wpcbn-btn:hover,
.gwca-active .woocommerce ul.products li.product > .wpcbn-btn:hover,
.gwca-active .woocommerce-page ul.products li.product > .wpcbn-btn:hover {
    transform: translateY(-1px) !important;
    background: #111827 !important;
    border-color: #111827 !important;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.14) !important;
}

/* =========================
   DESKTOP: 4 COLUMNAS
========================= */
@media (min-width: 1025px) {
    .gwca-active ul.products,
    .gwca-active .woocommerce ul.products,
    .gwca-active .woocommerce-page ul.products,
    .gwca-active ul.products.columns-5,
    .gwca-active ul.products.columns-4,
    .gwca-active ul.products.columns-3,
    .gwca-active ul.products.columns-2,
    .gwca-active ul.products.columns-1,
    .gwca-active .woocommerce ul.products[class*="columns-"],
    .gwca-active .woocommerce-page ul.products[class*="columns-"] {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 20px !important;
        align-items: stretch !important;
    }
}

/* =========================
   TABLET: 3 COLUMNAS
========================= */
@media (min-width: 769px) and (max-width: 1024px) {
    .gwca-active ul.products,
    .gwca-active .woocommerce ul.products,
    .gwca-active .woocommerce-page ul.products,
    .gwca-active ul.products.columns-5,
    .gwca-active ul.products.columns-4,
    .gwca-active ul.products.columns-3,
    .gwca-active ul.products.columns-2,
    .gwca-active ul.products.columns-1,
    .gwca-active .woocommerce ul.products[class*="columns-"],
    .gwca-active .woocommerce-page ul.products[class*="columns-"] {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 18px !important;
        align-items: stretch !important;
    }
}

/* =========================
   MOBILE: 2 COLUMNAS
========================= */
@media (max-width: 768px) {
    .gwca-active ul.products,
    .gwca-active .woocommerce ul.products,
    .gwca-active .woocommerce-page ul.products,
    .gwca-active ul.products.columns-5,
    .gwca-active ul.products.columns-4,
    .gwca-active ul.products.columns-3,
    .gwca-active ul.products.columns-2,
    .gwca-active ul.products.columns-1,
    .gwca-active .woocommerce ul.products[class*="columns-"],
    .gwca-active .woocommerce-page ul.products[class*="columns-"] {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
        align-items: stretch !important;
    }

    .gwca-active ul.products li.product .group-action,
    .gwca-active .woocommerce ul.products li.product .group-action,
    .gwca-active .woocommerce-page ul.products li.product .group-action {
        display: none !important;
    }

    .gwca-active ul.products li.product::before,
    .gwca-active .woocommerce ul.products li.product::before,
    .gwca-active .woocommerce-page ul.products li.product::before {
        top: 10px !important;
        left: 10px !important;
        min-height: 26px !important;
        padding: 5px 9px !important;
        font-size: 10px !important;
    }

    .gwca-active ul.products li.product .product-transition,
    .gwca-active .woocommerce ul.products li.product .product-transition,
    .gwca-active .woocommerce-page ul.products li.product .product-transition {
        padding: 12px 12px 0 !important;
    }

    .gwca-active ul.products li.product .product-image,
    .gwca-active .woocommerce ul.products li.product .product-image,
    .gwca-active .woocommerce-page ul.products li.product .product-image {
        height: 210px !important;
        min-height: 210px !important;
    }

    .gwca-active ul.products li.product .product-caption,
    .gwca-active .woocommerce ul.products li.product .product-caption,
    .gwca-active .woocommerce-page ul.products li.product .product-caption {
        padding: 10px 12px 2px !important;
    }

    .gwca-active ul.products li.product .woocommerce-loop-product__title,
    .gwca-active .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .gwca-active .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
        font-size: 13px !important;
        min-height: 38px !important;
        max-height: 38px !important;
    }

    .gwca-active ul.products li.product .price,
    .gwca-active .woocommerce ul.products li.product .price,
    .gwca-active .woocommerce-page ul.products li.product .price {
        font-size: 18px !important;
    }

    .gwca-active ul.products li.product .pi-edd,
    .gwca-active .woocommerce ul.products li.product .pi-edd,
    .gwca-active .woocommerce-page ul.products li.product .pi-edd {
        font-size: 11px !important;
        line-height: 1.4 !important;
    }

    .gwca-active ul.products li.product > .wpcbn-btn,
    .gwca-active .woocommerce ul.products li.product > .wpcbn-btn,
    .gwca-active .woocommerce-page ul.products li.product > .wpcbn-btn {
        width: calc(100% - 24px) !important;
        margin: 10px 12px 12px !important;
        min-height: 40px !important;
        font-size: 12px !important;
        border-radius: 12px !important;
    }
}

/* =========================
   MOBILE PEQUEO
========================= */
@media (max-width: 480px) {
    .gwca-active ul.products,
    .gwca-active .woocommerce ul.products,
    .gwca-active .woocommerce-page ul.products {
        gap: 12px !important;
    }

    .gwca-active ul.products li.product .product-image,
    .gwca-active .woocommerce ul.products li.product .product-image,
    .gwca-active .woocommerce-page ul.products li.product .product-image {
        height: 185px !important;
        min-height: 185px !important;
    }

    .gwca-active ul.products li.product .price,
    .gwca-active .woocommerce ul.products li.product .price,
    .gwca-active .woocommerce-page ul.products li.product .price {
        font-size: 16px !important;
    }
}