/* Product Card Enhanced Styles */
.product-card-enhanced {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Image Section */
.product-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #ffffff;
    /* Fondo blanco para imágenes */
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Mostrar imagen completa sin recortar */
    transition: transform 0.3s;
}

.product-card-enhanced:hover .product-image-wrapper img {
    transform: scale(1.05);
}


/* Badges */
.badge-container {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    z-index: 10;
    pointer-events: none;
}

.badge-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.65rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.badge-featured {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
}

.badge-discount {
    background: #ff4444;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Favorite Button */
.btn-favorite {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #95a5a6;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    z-index: 10;
    pointer-events: auto;
}

.btn-favorite:hover {
    transform: scale(1.1);
    background: white;
    color: #ff4444;
}

.btn-favorite.active {
    color: #ff4444;
}

/* Content Section */
.product-content {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Title */
.product-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.3;
    min-height: 34px;
    max-height: 34px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: #F5A623;
}

/* Description */
.product-description {
    font-size: 0.72rem;
    color: #7f8c8d;
    line-height: 1.35;
    margin-bottom: 8px;
    min-height: 32px;
    max-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Offer Tags */
.offer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
    min-height: 20px;
    max-height: 20px;
}

.offer-tag {
    background: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    height: 18px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Price Section */
.price-section {
    background: #f8f9fa;
    padding: 6px 8px 4px 8px;
    border-radius: 8px;
    margin-bottom: 6px;
    min-height: 74px;
    max-height: 74px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 2px;
}

.price-container {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 2px;
    min-height: 24px;
    width: 100%;
}

.price-original {
    font-size: 0.72rem;
    color: #95a5a6;
    text-decoration: line-through;
}

.price-final {
    font-size: 1.1rem;
    font-weight: 800;
    color: #2c3e50;
}

.savings-stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 16px;
}

.stock-label {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.stock-high {
    background: #e8f5e9;
    color: #27ae60;
}

.stock-low {
    background: #fdebd0;
    color: #d35400;
}

.stock-out {
    background: #fadbd8;
    color: #c0392b;
}

.price-savings {
    font-size: 0.65rem;
    color: #27ae60;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

.installments-info {
    padding-top: 2px;
    border-top: 1px solid #e0e0e0;
    margin-top: 0;
    height: 18px;
    text-align: right;
    width: 100%;
    line-height: 1.1;
}

.installments {
    font-size: 0.68rem;
    color: #7f8c8d;
}

.installments strong {
    color: #2c3e50;
    font-weight: 700;
}

/* Info Badges */
.stock-info-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
    min-height: 20px;
    max-height: 20px;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
    height: 20px;
}

.info-badge.sales {
    background: #e3f2fd;
    color: #1976d2;
}

.info-badge.shipping {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Actions */
.actions-container {
    display: flex;
    gap: 5px;
    margin-top: 2px;
    align-items: center;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    padding: 3px;
    border-radius: 20px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    height: 34px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    color: #2c3e50;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-bottom: 2px;
}

.qty-btn:hover {
    background: #F5A623;
    color: white;
}

.qty-input {
    width: 30px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
}

.btn-cart-icon {
    width: 34px;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 1rem;
}

.btn-cart-icon:hover {
    background: #1976d2;
    color: white;
}

.btn-buy {
    flex: 1;
    background: linear-gradient(135deg, #F5A623 0%, #F76B1C 100%);
    color: white;
    font-size: 0.85rem;
    gap: 6px;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

/* Out of Stock State */
.product-card-enhanced.out-of-stock {
    opacity: 0.8;
}

.product-card-enhanced.out-of-stock .product-image-wrapper img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.out-of-stock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(192, 57, 43, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.product-card-enhanced.out-of-stock .btn-action:disabled {
    background: #95a5a6;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}