/* Product Card Styles - ArteGuaraní Design */
/* 
 * Este archivo contiene todos los estilos para el componente product_card.html
 * Incluir en templates que usen {% include 'product_card.html' %}
 */

/* Product Grid and Carousel Styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg, 2rem);
    padding: var(--spacing-lg, 2rem) 0;
}

/* Infinite Carousel Styles */
.products-carousel-container {
    position: relative;
    overflow: hidden;
    margin: 20px 0 0 0;
}

.products-carousel {
    display: flex;
    gap: 25px;
    animation: infiniteScroll 12s linear infinite;
}

@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.products-carousel .product-card {
    flex: 0 0 250px;
    min-width: 250px;
}

/* Estilos específicos para product-card en el carousel */
.carousel-slide .product-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.carousel-slide .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.15);
}

/* Asegurar que el contenido del carousel se vea igual que el grid */
.carousel-slide .product-card .product-info {
    display: flex;
    flex-direction: column;
}

.carousel-slide .product-card .add-to-cart {
    text-align: center;
    margin-top: 15px;
}

.product-card {
    background: var(--color-bg-primary, #FFFFFF);
    border-radius: var(--radius-xl, 20px);
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(139, 69, 19, 0.1));
    transition: var(--transition-base, 0.3s ease);
    position: relative;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg, 0 8px 32px rgba(139, 69, 19, 0.2));
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--color-light, #FDEBD0);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.discount-badge {
    position: absolute;
    top: var(--spacing-sm, 1rem);
    left: var(--spacing-sm, 1rem);
    padding: 6px 12px;
    background: var(--glass-bg, rgba(255, 249, 240, 0.9));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border, rgba(139, 69, 19, 0.1));
    border-radius: var(--radius-full, 9999px);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary, #8B4513);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(139, 69, 19, 0.1));
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: all 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-actions a {
    width: 36px;
    height: 36px;
    background-color: white;
    color: #8B4513;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(139, 69, 19, 0.1);
    transition: all 0.3s;
    text-decoration: none;
}

.product-actions a:hover {
    background-color: #8B4513;
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333333;
    font-weight: 600;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary, #8B4513);
    font-family: var(--font-heading, 'Merriweather', sans-serif);
}

.original-price {
    font-size: 1rem;
    color: var(--color-text-light, #999999);
    text-decoration: line-through;
    margin-left: var(--spacing-xs, 0.5rem);
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: var(--color-primary, #8B4513);
    border: 2px solid var(--color-primary, #8B4513);
    border-radius: var(--radius-md, 12px);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition-base, 0.3s ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs, 0.5rem);
    position: relative;
    overflow: hidden;
}

.add-to-cart:hover {
    background: var(--color-dark, #5D4037);
    border-color: var(--color-dark, #5D4037);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 16px rgba(139, 69, 19, 0.15));
}

/* Responsive Styles */
@media (max-width: 768px) {
    .product-image {
        height: 170px;
    }
    
    .product-title {
        font-size: 14px;
        height: 38px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .original-price {
        font-size: 13px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .add-to-cart {
        padding: 9px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .product-image {
        height: 160px;
    }
    
    .product-title {
        font-size: 13px;
        height: 36px;
    }
    
    .current-price {
        font-size: 15px;
    }
    
    .product-info {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 150px;
    }
    
    .product-title {
        font-size: 13px;
        height: 34px;
    }
    
    .current-price {
        font-size: 14px;
    }
    
    .original-price {
        font-size: 12px;
    }
    
    .product-actions {
        opacity: 1; /* Always visible on mobile */
    }
    
    .product-actions a {
        width: 30px;
        height: 30px;
        margin-bottom: 6px;
        font-size: 12px;
    }
    
    .add-to-cart {
        padding: 8px;
        font-size: 13px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .discount-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 360px) {
    .product-image {
        height: 140px;
    }
    
    .product-title {
        font-size: 12px;
        height: 32px;
    }
    
    .current-price {
        font-size: 13px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .add-to-cart {
        padding: 7px;
        font-size: 12px;
    }
    
    .product-actions a {
        width: 28px;
        height: 28px;
        margin-bottom: 5px;
        font-size: 11px;
    }
}

@media (max-width: 320px) {
    .product-image {
        height: 130px;
    }
    
    .product-title {
        font-size: 11px;
        height: 30px;
    }
    
    .current-price {
        font-size: 12px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .add-to-cart {
        padding: 6px;
        font-size: 11px;
    }
    
    .discount-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Responsive Styles for Product Grid and Carousel */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .products-carousel .product-card {
        flex: 0 0 200px;
        min-width: 200px;
    }
    
    .products-carousel {
        gap: 20px;
        animation: infiniteScroll 11s linear infinite;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 15px;
    }
    
    .products-carousel .product-card {
        flex: 0 0 170px;
        min-width: 170px;
    }
    
    .products-carousel {
        gap: 15px;
        animation: infiniteScroll 10s linear infinite;
    }
}

@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 12px;
    }
    
    .products-carousel .product-card {
        flex: 0 0 155px;
        min-width: 155px;
    }
    
    .products-carousel {
        gap: 12px;
        animation: infiniteScroll 9s linear infinite;
    }
}

@media (max-width: 320px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
        gap: 10px;
    }
    
    .products-carousel .product-card {
        flex: 0 0 145px;
        min-width: 145px;
    }
    
    .products-carousel {
        gap: 10px;
        animation: infiniteScroll 8s linear infinite;
    }
}

