/* ===================================
   CARRITO PREMIUM - ESTILOS ESPECÍFICOS
   Solo para carrito.php
   ================================== */

/* Contenedor principal del carrito premium */
.carrito-premium {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 20px 0;
}

/* ===== WELCOME SECTION PREMIUM ===== */
.carrito-premium .welcome-section {
    background: linear-gradient(135deg, #ff6348 0%, #ff4757 50%, #e83e8c 100%);
    color: white;
    border-radius: 25px;
    padding: 60px 40px;
    margin: 30px 0;
    box-shadow: 0 25px 50px rgba(255, 99, 72, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carrito-premium .welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: floatPremium 8s ease-in-out infinite;
}

.carrito-premium .welcome-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes floatPremium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

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

.carrito-premium .welcome-icon {
    font-size: 5.5rem;
    margin-bottom: 25px;
    opacity: 0.95;
    text-shadow: 0 8px 20px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.carrito-premium .welcome-title {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
    background: linear-gradient(45deg, #ffffff, #f8f9fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.carrito-premium .welcome-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 500;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== MODERN CARDS PREMIUM ===== */
.carrito-premium .modern-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.carrito-premium .modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6348, #ff4757, #e83e8c);
}

.carrito-premium .modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.carrito-premium .modern-card-header {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 25px 30px;
    border-bottom: 2px solid rgba(255, 99, 72, 0.1);
    position: relative;
}

.carrito-premium .modern-card-header h4 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
}

.carrito-premium .modern-card-header h4 i {
    color: #ff6348;
    font-size: 1.2rem;
}

.carrito-premium .modern-card-body {
    padding: 30px;
}

/* ===== CART ITEMS PREMIUM ===== */
.carrito-premium .cart-item {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.carrito-premium .cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 99, 72, 0.05), transparent);
    transition: left 0.6s ease;
}

.carrito-premium .cart-item:hover {
    border-color: #ff6348;
    transform: translateX(8px) translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 99, 72, 0.15);
}

.carrito-premium .cart-item:hover::before {
    left: 100%;
}

.carrito-premium .cart-item-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.carrito-premium .cart-item-image img {
    border-radius: 15px;
    transition: transform 0.4s ease;
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.carrito-premium .cart-item:hover .cart-item-image img {
    transform: scale(1.05);
}

.carrito-premium .cart-item-info h5 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 1.2rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carrito-premium .cart-item-info .text-muted {
    color: #6c757d !important;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.carrito-premium .cart-item-info .fw-bold {
    color: #ff6348;
    font-size: 1.3rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(255, 99, 72, 0.2);
}

/* ===== QUANTITY CONTROLS PREMIUM ===== */
.carrito-premium .quantity-controls {
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 2px solid #f8f9fa;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.carrito-premium .quantity-controls:hover {
    border-color: #ff6348;
    box-shadow: 0 12px 35px rgba(255, 99, 72, 0.2);
}

.carrito-premium .quantity-controls .btn {
    border-radius: 0;
    border: none;
    padding: 12px 18px;
    background: #f8f9fa;
    color: #2c3e50;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrito-premium .quantity-controls .btn:hover {
    background: #ff6348;
    color: white;
    transform: scale(1.1);
}

.carrito-premium .quantity-controls input {
    border: none;
    background: white;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    font-size: 1.1rem;
    width: 60px;
    padding: 12px 8px;
}

.carrito-premium .quantity-controls input:focus {
    outline: none;
    box-shadow: none;
}

/* ===== BUTTONS PREMIUM ===== */
.carrito-premium .btn-modern {
    border-radius: 30px;
    font-weight: 700;
    padding: 14px 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.carrito-premium .btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.carrito-premium .btn-modern:hover::before {
    left: 100%;
}

.carrito-premium .btn-primary-modern {
    background: linear-gradient(135deg, #ff6348 0%, #ff4757 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(255, 99, 72, 0.3);
}

.carrito-premium .btn-primary-modern:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 45px rgba(255, 99, 72, 0.4);
    color: white;
    background: linear-gradient(135deg, #ff4757, #ff3742);
}

.carrito-premium .btn-danger-modern {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
}

.carrito-premium .btn-danger-modern:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 45px rgba(220, 53, 69, 0.4);
    color: white;
    background: linear-gradient(135deg, #c82333, #bd2130);
}

.carrito-premium .btn-success-modern {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
}

.carrito-premium .btn-success-modern:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 45px rgba(40, 167, 69, 0.4);
    color: white;
    background: linear-gradient(135deg, #20c997, #17a2b8);
}

/* ===== SUMMARY SECTION PREMIUM ===== */
.carrito-premium .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 2px solid rgba(233, 236, 239, 0.5);
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.carrito-premium .summary-item:hover {
    background: rgba(255, 99, 72, 0.02);
    padding-left: 8px;
    border-radius: 8px;
}

.carrito-premium .summary-item:last-child {
    border-bottom: none;
}

.carrito-premium .summary-item span:first-child {
    color: #6c757d;
    font-weight: 600;
}

.carrito-premium .summary-item span:last-child {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.1rem;
}

.carrito-premium .summary-total {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 18px;
    padding: 25px;
    margin-top: 20px;
    border: 2px solid rgba(255, 99, 72, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.carrito-premium .summary-total::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6348, #ff4757, #e83e8c);
}

.carrito-premium .summary-total h5 {
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
    font-size: 1.3rem;
}

.carrito-premium .summary-total h3 {
    color: #ff6348;
    font-weight: 900;
    margin: 0;
    font-size: 2.2rem;
    text-shadow: 0 2px 8px rgba(255, 99, 72, 0.3);
}

/* ===== EMPTY CART STATE ===== */
.carrito-premium .empty-cart {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 20px;
    border: 2px dashed #dee2e6;
    margin: 40px 0;
}

.carrito-premium .empty-cart-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.carrito-premium .empty-cart h3 {
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 15px;
}

.carrito-premium .empty-cart p {
    color: #adb5bd;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* ===== LOADING STATES ===== */
.carrito-premium .loading-container {
    padding: 60px 40px;
    text-align: center;
}

.carrito-premium .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: #ff6348;
}

.carrito-premium .loading-container p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
}

/* ===== SHIPPING CALCULATOR ===== */
.carrito-premium .shipping-calculator {
    background: linear-gradient(135deg, #e3f2fd, #ffffff);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid rgba(33, 150, 243, 0.1);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.1);
}

.carrito-premium .shipping-calculator h6 {
    color: #1976d2;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.carrito-premium .shipping-calculator .form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.carrito-premium .shipping-calculator .form-control:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

/* ===== COUPON SECTION ===== */
.carrito-premium .coupon-section {
    background: linear-gradient(135deg, #fff3e0, #ffffff);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid rgba(255, 152, 0, 0.1);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.1);
}

.carrito-premium .coupon-section h6 {
    color: #f57c00;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.carrito-premium .coupon-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.carrito-premium .coupon-input-group .form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-weight: 600;
    flex: 1;
}

.carrito-premium .coupon-input-group .btn {
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 700;
    white-space: nowrap;
}

/* ===== PROGRESS INDICATOR ===== */
.carrito-premium .checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.carrito-premium .progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 120px;
}

.carrito-premium .progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #dee2e6;
    z-index: 1;
}

.carrito-premium .progress-step.active:not(:last-child)::after {
    background: #ff6348;
}

.carrito-premium .progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.carrito-premium .progress-step.active .progress-circle {
    background: #ff6348;
    box-shadow: 0 4px 15px rgba(255, 99, 72, 0.3);
}

.carrito-premium .progress-step.completed .progress-circle {
    background: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.carrito-premium .progress-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
}

.carrito-premium .progress-step.active .progress-label {
    color: #ff6348;
}

/* ===== PRODUCT RECOMMENDATIONS ===== */
.carrito-premium .recommendations-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.carrito-premium .recommendations-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.carrito-premium .recommendations-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6348, #ff4757);
    border-radius: 2px;
}

.carrito-premium .recommendation-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.carrito-premium .recommendation-card:hover {
    transform: translateY(-5px);
    border-color: #ff6348;
    box-shadow: 0 15px 40px rgba(255, 99, 72, 0.15);
}

.carrito-premium .recommendation-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.carrito-premium .recommendation-card:hover img {
    transform: scale(1.05);
}

.carrito-premium .recommendation-card h6 {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.3;
}

.carrito-premium .recommendation-card .price {
    color: #ff6348;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .carrito-premium .modern-card-body {
        padding: 20px;
    }
    
    .carrito-premium .cart-item {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .carrito-premium .welcome-section {
        padding: 40px 20px;
        margin: 20px 0;
    }
    
    .carrito-premium .welcome-title {
        font-size: 2.5rem;
    }
    
    .carrito-premium .welcome-subtitle {
        font-size: 1.1rem;
    }
    
    .carrito-premium .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px 15px;
    }
    
    .carrito-premium .cart-item-controls {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .carrito-premium .modern-card-header {
        padding: 20px;
    }
    
    .carrito-premium .modern-card-body {
        padding: 20px 15px;
    }
    
    .carrito-premium .summary-total {
        padding: 20px;
    }
    
    .carrito-premium .checkout-progress {
        flex-direction: column;
        gap: 20px;
    }
    
    .carrito-premium .progress-step:not(:last-child)::after {
        display: none;
    }
    
    .carrito-premium .coupon-input-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .carrito-premium .welcome-title {
        font-size: 2rem;
    }
    
    .carrito-premium .btn-modern {
        padding: 12px 20px;
        font-size: 0.85rem;
        min-width: 120px;
    }
    
    .carrito-premium .quantity-controls {
        max-width: 140px;
        margin: 0 auto;
    }
    
    .carrito-premium .summary-total h3 {
        font-size: 1.8rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.carrito-premium .cart-item {
    animation: slideInUp 0.5s ease-out;
}

.carrito-premium .cart-item:nth-child(2) {
    animation-delay: 0.1s;
}

.carrito-premium .cart-item:nth-child(3) {
    animation-delay: 0.2s;
}

.carrito-premium .modern-card {
    animation: fadeInScale 0.6s ease-out;
}

.carrito-premium .summary-total {
    animation: fadeInScale 0.6s ease-out 0.3s both;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.toast.success .toast-icon {
    background: #28a745;
}

.toast.error .toast-icon {
    background: #dc3545;
}

.toast.warning .toast-icon {
    background: #ffc107;
}

.toast-message {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #2c3e50;
}