/* ========================================
   🔥 CART STYLES MODERNOS - BOOTSTRAP 5
   ESQUEMA: AMARILLO (#FFC107), NEGRO, BLANCO
   ======================================== */

:root {
    --bs-warning: #FFC107;
    --bs-warning-rgb: 255, 193, 7;
    --yellow-glow: rgba(255, 193, 7, 0.2);
    --dark-bg: #0d0d0d;
    --dark-gradient: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
}

/* ========================================
   FUENTE Y GENERAL
   ======================================== */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.cart-page {
    background: #f8f9fa;
    min-height: 100vh;
}

/* ========================================
   NAVBAR MODERNA
   ======================================== */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(13, 13, 13, 0.95) !important;
    border-bottom: 3px solid var(--bs-warning);
}

.navbar-brand {
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.logo-wrapper {
    filter: drop-shadow(0 4px 12px var(--yellow-glow));
}

.btn-cart {
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
}

.btn-cart .badge {
    font-size: 0.7rem;
    padding: 0.3em 0.5em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    background: var(--dark-gradient);
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--bs-warning);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, var(--yellow-glow) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section .display-4 {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
}

.hero-section .alert {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.3);
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   CARDS Y CONTENIDO
   ======================================== */
.card {
    border-radius: 16px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-bottom: none;
    border-radius: 16px 16px 0 0 !important;
}

.bg-warning {
    background: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%) !important;
}

.card-header.bg-dark {
    background: var(--dark-gradient) !important;
}

/* ========================================
   TABLA DEL CARRITO
   ======================================== */
.table {
    margin-bottom: 0;
}

.table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-warning {
    --bs-table-bg: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%);
}

.shopping-summery thead th {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    padding: 1rem;
    border: none;
}

.shopping-summery tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.shopping-summery tbody tr:hover {
    background: rgba(255, 193, 7, 0.05);
    transform: scale(1.01);
}

.shopping-summery tbody td {
    vertical-align: middle;
    padding: 1.2rem 1rem;
}

.shopping-summery tbody td img {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    max-width: 80px;
    height: auto;
}

.shopping-summery tbody td img:hover {
    transform: scale(1.1) rotate(3deg);
}

/* Botones de cantidad */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quantity-controls .btn-qty {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.quantity-controls .btn-qty:hover {
    background: var(--bs-warning);
    border-color: var(--bs-warning);
    transform: scale(1.1);
}

.quantity-controls .quantity-value {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Botón eliminar */
.btn-remove {
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn-remove:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.05);
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-cart {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ========================================
   RESUMEN DEL PEDIDO
   ======================================== */
.sticky-top {
    transition: all 0.3s ease;
}

.card-body .border-warning {
    border-color: var(--bs-warning) !important;
    border-width: 3px !important;
}

.text-warning {
    color: var(--bs-warning) !important;
    font-weight: 700;
    text-shadow: 0 2px 10px var(--yellow-glow);
}

/* Botones de pago mejorados */
.btn-warning,
.btn-outline-dark {
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-warning {
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 193, 7, 0.6);
}

.btn-outline-dark:hover {
    background: #000;
    border-color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Ripple effect */
.btn-warning::before,
.btn-outline-dark::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.6s, height 0.6s;
}

.btn-warning:hover::before,
.btn-outline-dark:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    .sticky-top {
        position: relative !important;
        top: 0 !important;
    }
    
    .hero-section .display-4 {
        font-size: 2.5rem;
    }
}

@media (max-width: 767px) {
    .navbar-brand img {
        height: 35px;
    }
    
    .hero-section {
        padding: 2rem 0 !important;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .shopping-summery thead th {
        font-size: 0.7rem;
        padding: 0.8rem 0.5rem;
    }
    
    .shopping-summery tbody td {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .shopping-summery tbody td img {
        max-width: 60px;
    }
    
    .quantity-controls button {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .quantity-controls .quantity-value {
        font-size: 1rem;
        min-width: 30px;
    }
}

@media (max-width: 575px) {
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .hero-section .alert {
        font-size: 0.9rem;
    }
    
    .shopping-summery thead th {
        font-size: 0.65rem;
        padding: 0.6rem 0.3rem;
    }
    
    .shopping-summery tbody td {
        padding: 0.6rem 0.3rem;
        font-size: 0.85rem;
    }
    
    .shopping-summery tbody td img {
        max-width: 50px;
    }
}

/* ========================================
   ANIMACIONES ADICIONALES
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.card {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Loading state */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--bs-warning);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   SWEETALERT2 CUSTOM STYLES
   ======================================== */
.swal-wide {
    width: 600px !important;
    max-width: 90vw !important;
}

.swal-wide .swal2-html-container {
    margin: 1.5rem 0 !important;
}

.swal-wide .alert-warning {
    background-color: #fff3cd;
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 1.5rem;
}

.swal-wide .alert-heading {
    color: #856404;
    font-weight: 700;
}

.swal-wide ol {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.swal-wide ol li {
    color: #333;
    font-weight: 500;
}

.swal-wide ol li strong {
    color: #856404;
}

.swal2-confirm.swal2-styled {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    padding: 0.7rem 2rem !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
}

.swal2-cancel.swal2-styled {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    padding: 0.7rem 2rem !important;
    border-radius: 10px !important;
}

