/* Product Card Enhanced Styles */
.product-card-enhanced {
    background: var(--card-bg, #fff);
    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: var(--bg-white, #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: var(--badge-featured, var(--gradient-accent));
    color: var(--accent-contrast, #000);
}

.badge-new {
    background: var(--badge-new, var(--success-color, #27ae60));
    color: var(--success-contrast, white);
}

.badge-discount {
    background: var(--badge-sale, var(--danger-color, #ff4444));
    color: var(--danger-contrast, white);
    animation: pulse 2s infinite;
}

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

    50% {
        transform: scale(1.05);
    }

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

/* Condition Badges */
.badge-condition {
    font-weight: 600;
}

.badge-used {
    background: #6c757d;
    color: white;
}

.badge-refurbished {
    background: #17a2b8;
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: white;
}

/* Favorite Button */
.btn-favorite {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-muted, #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: var(--danger-color, #ff4444);
}

.btn-favorite.active {
    color: var(--danger-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: var(--text-primary);
    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: var(--primary-color);
}

/* Description */
.product-description {
    font-size: 0.72rem;
    color: var(--text-muted, #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: var(--success-color, #27ae60);
    color: var(--success-contrast, 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: var(--background-light, #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: var(--text-muted, #95a5a6);
    text-decoration: line-through;
}

.price-final {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary, #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: rgba(var(--success-color-rgb, 39, 174, 96), 0.15);
    color: var(--badge-stock, var(--success-color, #27ae60));
}

.stock-low {
    background: rgba(var(--warning-color-rgb, 211, 84, 0), 0.15);
    color: var(--warning-color, #d35400);
}

.stock-out {
    background: rgba(var(--danger-color-rgb, 192, 57, 43), 0.15);
    color: var(--danger-color, #c0392b);
}

.price-savings {
    font-size: 0.65rem;
    color: var(--success-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 var(--border-color, #e0e0e0);
    margin-top: 0;
    height: 18px;
    text-align: right;
    width: 100%;
    line-height: 1.1;
}

.installments {
    font-size: 0.68rem;
    color: var(--text-muted, #7f8c8d);
}

.installments strong {
    color: var(--text-primary, #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: rgba(var(--info-color-rgb, 25, 118, 210), 0.15);
    color: var(--info-color, #1976d2);
}

.info-badge.shipping {
    background: rgba(128, 0, 128, 0.1);
    color: #7b1fa2;
}

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

/* Selector de Cantidad Estilizado */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-light, #f1f3f5);
    padding: 0;
    border-radius: 8px;
    border: 1px solid transparent;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
    height: 38px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.qty-selector:hover {
    border-color: rgba(0, 0, 0, 0.1);
    background: var(--bg-light, #eceff1);
}

.qty-btn {
    width: 32px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.qty-input {
    width: 36px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Botón Carrito */
.btn-cart-icon {
    width: 42px;
    height: 38px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cart-icon:hover {
    background: var(--primary-color);
    color: var(--primary-contrast, white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Botón Comprar - Uses advanced --btn-cta-bg variable */
.btn-buy {
    flex: 1;
    height: 38px;
    background: var(--btn-cta-bg, var(--gradient-primary));
    background-size: 200% auto;
    color: var(--primary-contrast, white);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-buy:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.btn-buy:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-buy i {
    font-size: 1rem;
}

/* 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: var(--text-muted, #95a5a6);
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==========================================
   ENHANCED BUTTON STYLES - PREMIUM DESIGN
   (Merged from product-card-buttons.css)
   ========================================== */

/* Quantity Buttons Mini (-/+) */
.qty-btn-mini {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(var(--primary-color-rgb, 245, 166, 35), 0.3);
    position: relative;
    overflow: hidden;
}

.qty-btn-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.5s;
}

.qty-btn-mini:hover::before {
    left: 100%;
}

.qty-btn-mini:hover {
    background: var(--primary-color-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.5);
}

.qty-btn-mini:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(245, 166, 35, 0.4);
}

/* Cart Icon Button */
.btn-icon {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: var(--info-color, #1565c0);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-icon:hover::before {
    width: 120%;
    height: 120%;
}

.btn-icon:hover {
    background: var(--info-color-dark, #0d47a1);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.5);
}

.btn-icon:active {
    transform: translateY(-1px) scale(0.95);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.4);
}

.btn-icon i {
    position: relative;
    z-index: 1;
}

/* Buy Now Button */
.btn-buy-now {
    flex: 1;
    padding: 0 16px;
    background: var(--success-color, #27ae60);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-buy-now::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.25);
    transition: left 0.6s;
}

.btn-buy-now:hover::before {
    left: 100%;
}

.btn-buy-now:hover {
    background: var(--success-color-dark, #229954);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5);
}

.btn-buy-now:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.4);
}

.btn-buy-now i {
    font-size: 1rem;
    animation: bolt-pulse 2s infinite;
}

@keyframes bolt-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Disabled State */
.btn-icon:disabled,
.btn-buy-now:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--text-muted, #95a5a6);
    box-shadow: none;
    transform: none;
}

.btn-icon:disabled:hover,
.btn-buy-now:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Mobile Responsive for Buttons */
@media (max-width: 480px) {
    .qty-btn-mini {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
    }

    .btn-buy-now {
        font-size: 0.85rem;
        padding: 0 12px;
    }
}