/* Custom Product Card Styles for EPMedica Theme */

/* Target the specific product-card class structure */
.product-card {
    background: white !important;
    border-radius: 15px !important;
    padding: 20px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important;
    transition: all 0.3s !important;
    margin: 0 !important;
    width: 100% !important;
    text-align: center !important;
}

.product-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15) !important;
}

/* Product title - h4 specific */
.product-card h4 {
    font-size: 16px !important;
    text-decoration: none !important;
    color: #333 !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin: 10px 0 8px !important;
}

.product-card h4 a {
    text-decoration: none !important;
    color: inherit !important;
}

.product-card h4 a:hover {
    color: #4a90e2 !important;
    text-decoration: none !important;
}

/* Product price styling */
.product-card .price {
    font-size: 18px !important;
    color: #1a4a5c !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
}

.product-card .price .woocommerce-Price-amount {
    font-size: 18px !important;
}

.product-card .price del .woocommerce-Price-amount {
    font-size: 14px !important;
    opacity: 0.6 !important;
}

.product-card .price ins {
    text-decoration: none !important;
}

.product-card .price .iva-text {
    display: block !important;
    font-size: 12px !important;
    color: #999 !important;
    font-weight: normal !important;
    margin-top: 5px !important;
}

/* Hide duplicate IVA text */
.product-card .price small.woocommerce-price-suffix {
    display: none !important;
}

/* Product category */
.product-card .product-category {
    font-size: 13px !important;
    color: #999 !important;
    margin-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Product image container */
.product-card .product-image-container {
    position: relative !important;
    margin-bottom: 15px !important;
}

.product-card .product-image-container img {
    width: 100% !important;
    height: auto !important;
    border-radius: 10px !important;
}

/* Sale badge */
.product-card .badge-sale {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: #e74c3c !important;
    color: white !important;
    padding: 5px 15px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    z-index: 10 !important;
}

/* Button styling */
.product-card .btn-cart {
    background: #4a90e2 !important;
    color: white !important;
    border: none !important;
    padding: 10px 30px !important;
    border-radius: 25px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    transition: all 0.3s !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.product-card .btn-cart:hover {
    background: #357abd !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3) !important;
    color: white !important;
}

/* Fix price filter overflow in sidebar */
.shop-sidebar .widget_price_filter .price_slider_wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
}

.shop-sidebar .widget_price_filter .ui-slider {
    width: calc(100% - 20px) !important;
    margin: 0 10px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-card {
        padding: 15px !important;
    }
    
    .product-card h4 {
        font-size: 18px !important;
    }
    
    .product-card .price {
        font-size: 20px !important;
    }
}

/* Archive page specific overrides */
body.archive.woocommerce-page .content-area,
body.tax-product_cat .content-area {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure grid layout */
body.woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

@media (max-width: 991px) {
    body.woocommerce-page ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    body.woocommerce-page ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 480px) {
    body.woocommerce-page ul.products {
        grid-template-columns: 1fr !important;
    }
}