/* ========================================
   PRODUCT CARDS - REDESIGNED PROFESSIONAL
   ======================================== */

.product-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(167, 203, 191, 0.1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--color-herb);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F7F7 100%);
    aspect-ratio: 1;
    border-bottom: 1px solid rgba(167, 203, 191, 0.1);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Estilo para imagen por defecto */
.product-image[src*="sin-imagen.jpg"] {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.product-image[src*="sin-imagen.jpg"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6c757d;
}

/* Fallback para cuando la imagen no carga */
.product-image-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F7F7 100%);
    aspect-ratio: 1;
    border-bottom: 1px solid rgba(167, 203, 191, 0.1);
}

.product-image-container::after {
    content: '🌱';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #6c757d;
    opacity: 0.3;
    z-index: 1;
    display: none;
}

.product-image-container:has(img[src*="sin-imagen.jpg"])::after,
.product-image-container:has(img[src=""])::after {
    display: block;
}

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

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--color-herb) 0%, #7a8a7a 100%);
    color: var(--color-charcoal);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(98, 110, 96, 0.3);
    z-index: 2;
    backdrop-filter: blur(10px);
}

.product-info {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1rem;
}

.product-header {
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-charcoal);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Merriweather', serif;
}

.product-description {
    font-size: 0.9rem;
    color: var(--color-charcoal);
    margin-bottom: 0;
    font-weight: 400;
    opacity: 0.8;
}

.product-price-container {
    margin-bottom: 1rem;
    text-align: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f7f7 0%, #e8e6e6 100%);
    border-radius: 16px;
    border: 1px solid rgba(148, 93, 96, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.product-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-charcoal);
    margin-bottom: 0.25rem;
}

.product-unit {
    font-size: 0.85rem;
    color: var(--color-charcoal);
    opacity: 0.8;
    font-weight: 500;
    margin-top: 0.25rem;
}

.quantity-section {
    margin-bottom: 0.75rem;
}

.quantity-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-charcoal);
    margin-bottom: 0.5rem;
    text-align: center;
}

.quantity-input {
    border: 2px solid #e8e6e6;
    border-radius: 12px;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.quantity-input:focus {
    border-color: var(--color-herb);
    box-shadow: 0 0 0 3px rgba(98, 110, 96, 0.1);
    outline: none;
}

.quantity-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    padding: 0.75rem;
    border-radius: 12px;
    border: 2px solid var(--color-herb);
    box-shadow: 0 4px 12px rgba(98, 110, 96, 0.15);
}

.stepper-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    border: 2px solid #e8e6e6;
    background: white;
    color: var(--color-charcoal);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.stepper-btn:hover {
    border-color: #A7CBBF;
    background: #A7CBBF;
    color: #332E44;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(167, 203, 191, 0.2);
}

.quantity-display {
    font-weight: 700;
    font-size: 1rem;
    min-width: 36px;
    text-align: center;
    color: #332E44;
    background: rgba(167, 203, 191, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(167, 203, 191, 0.2);
}

.product-actions {
    margin-top: 0.5rem;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #A7CBBF 0%, #B8D4C8 100%);
    border: none;
    border-radius: 16px;
    padding: 1rem;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(167, 203, 191, 0.25);
    transition: all 0.4s ease;
    width: 100%;
    color: #332E44;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(167, 203, 191, 0.4);
    background: linear-gradient(135deg, #96B8A8 0%, #A7CBBF 100%);
}

.remove-from-cart-btn {
    background: linear-gradient(135deg, #DD9348 0%, #E8A66B 100%);
    border: none;
    border-radius: 16px;
    padding: 1rem;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(221, 147, 72, 0.25);
    transition: all 0.4s ease;
    width: 100%;
    color: #332E44;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.remove-from-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.remove-from-cart-btn:hover::before {
    left: 100%;
}

.remove-from-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(221, 147, 72, 0.4);
    background: linear-gradient(135deg, #E8A66B 0%, #DD9348 100%);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 576px) {
    .product-card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    }
    
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    }
    
    .product-info {
        padding: 1.25rem;
    }
    
    .product-title {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        font-weight: 700;
    }
    
    .product-description {
        font-size: 0.85rem;
        color: #718096;
        margin-bottom: 0.75rem;
    }
    
    .product-price-container {
        padding: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .product-price {
        font-size: 1.3rem;
        font-weight: 800;
        margin-bottom: 0.25rem;
    }
    
    .product-unit {
        font-size: 0.75rem;
    }
    
    .quantity-section {
        margin-bottom: 1.25rem;
    }
    
    .quantity-label {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .quantity-input {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
    
    .quantity-stepper {
        padding: 0.6rem;
        gap: 10px;
    }
    
    .stepper-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .quantity-display {
        font-size: 1rem;
        min-width: 35px;
        padding: 0.4rem;
    }
    
    .add-to-cart-btn,
    .remove-from-cart-btn {
        padding: 0.875rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    
    .add-to-cart-btn:hover,
    .remove-from-cart-btn:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 375px) {
    .product-card {
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    .product-card:hover {
        transform: translateY(-2px);
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .product-description {
        font-size: 0.8rem;
    }
    
    .product-price-container {
        padding: 0.6rem;
        margin-bottom: 1rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .product-unit {
        font-size: 0.7rem;
    }
    
    .quantity-section {
        margin-bottom: 1rem;
    }
    
    .quantity-label {
        font-size: 0.8rem;
    }
    
    .quantity-input {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .quantity-stepper {
        padding: 0.5rem;
        gap: 8px;
    }
    
    .stepper-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .quantity-display {
        font-size: 0.9rem;
        min-width: 30px;
        padding: 0.3rem;
    }
    
    .add-to-cart-btn,
    .remove-from-cart-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
}

@media (max-width: 576px) and (orientation: landscape) {
    .product-card {
        margin-bottom: 1rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }
    
    .product-description {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .product-price-container {
        padding: 0.6rem;
        margin-bottom: 0.75rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .quantity-section {
        margin-bottom: 0.75rem;
    }
    
    .add-to-cart-btn,
    .remove-from-cart-btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
} 