/*
 * CSS Personalizado para Product Grid Card - WoodMart
 * Agregar en: style.css o assets/css/custom.css del child theme
 */

/* ===== ESTRUCTURA GENERAL DE LA CARD ===== */
.product-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    align-items: left !important;
}

.product-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ===== IMAGEN DEL PRODUCTO ===== */
.product-grid-item .product-image-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.product-grid-item .product-image-link img {
    transition: transform 0.4s ease;
    width: 100%;
}

.product-grid-item:hover .product-image-link img {
    transform: scale(1.1);
}

/* ===== BADGES PERSONALIZADOS ===== */
.custom-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    /*text-transform: uppercase;*/
    border-radius: 20px;
    z-index: 5;
    letter-spacing: 0.5px;
}

.custom-sale-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255,107,107,0.4);
}

.custom-featured-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    top: 50px;
    box-shadow: 0 2px 8px rgba(79,172,254,0.4);
}

/* ===== CONTENIDO DEL PRODUCTO ===== */
.product-grid-item .wd-entities-title {
    font-size: 16px;
    font-weight: 600;
    margin: 12px 0 8px;
    line-height: 1.4;
    color: #000000 !important;
    transition: color 0.3s ease;
    align-self: baseline;
}

.product-grid-item:hover .wd-entities-title {
    color: #000000 !important;
}

/* ===== META INFORMACIÓN PERSONALIZADA ===== */
.custom-product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 12px;
}

.custom-sku {
    color: #666;
    font-weight: 500;
}

.custom-stock .in-stock {
    color: #28a745;
    font-weight: 600;
}

.custom-stock .out-stock {
    color: #dc3545;
    font-weight: 600;
}

/* ===== PRECIOS PERSONALIZADOS ===== */
.custom-price-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.custom-regular-price {
    font-size: 14px;
    color: #7a7777;
    text-decoration: line-through;
}

.custom-sale-price,
.custom-price {
    font-size: 22px;
    font-weight: 700;
    color: #7a7777 !important;
}
.custom-price .amount {
    font-size: 22px;
    font-weight: 700;
    color: #7a7777 !important;
}

.custom-discount-badge {
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

/* ===== BOTÓN AÑADIR AL CARRITO PERSONALIZADO ===== */
.custom-add-to-cart {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 70%;
    border-radius: 25px;
    padding: 12px 20px !important;
    background: #E9E9E9 !important;
    color: black !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    /*text-transform: uppercase;*/
    letter-spacing: 0.5px;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.custom-add-to-cart:hover {
    transform: translateY(-2px) !important;
    /*box-shadow: 0 6px 16px rgba(102,126,234,0.5) !important;*/
    /*background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;*/
}

.custom-add-to-cart .button-icon {
    font-size: 18px;
}

/* ===== OVERLAY DE HOVER ===== */
.custom-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-grid-item:hover .custom-hover-overlay {
    opacity: 1;
    visibility: visible;
}

.custom-hover-content {
    text-align: center;
    color: white;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.product-grid-item:hover .custom-hover-content {
    transform: translateY(0);
}

.custom-hover-content h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 18px;
}

.custom-hover-content p {
    color: #ddd;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .custom-price-wrapper {
        font-size: 18px;
    }

    .custom-add-to-cart {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }

    .custom-hover-overlay {
        display: none; /* Desactivar en móvil */
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-grid-item {
    animation: fadeInUp 0.5s ease;
}
