/*========== SHOPPING CART STYLES ==========*/

/* Variables para temas */
:root {
    --cart-bg: #ffffff;
    --cart-text: #333333;
    --cart-text-light: #666666;
    --cart-border: #eeeeee;
    --cart-item-bg: #f9f9f9;
    --cart-shadow: rgba(0, 0, 0, 0.1);
    --cart-btn-bg: #ff8c00;
    --cart-btn-hover: #ff6600;
    --cart-btn-text: #ffffff;
    --cart-remove-bg: #ff3333;
    --cart-edit-bg: #2196F3;
    --cart-icon-color: #ff8c00;
}

body.dark-theme {
    --cart-bg: #2d2d2d;
    --cart-text: #ffffff;
    --cart-text-light: #b0b0b0;
    --cart-border: #404040;
    --cart-item-bg: #3d3d3d;
    --cart-shadow: rgba(0, 0, 0, 0.3);
    --cart-btn-bg: #ff8c00;
    --cart-btn-hover: #ff6600;
    --cart-btn-text: #ffffff;
    --cart-remove-bg: #ff3333;
    --cart-edit-bg: #2196F3;
    --cart-icon-color: #ff9500;
}


.cart-sidebar,
.cart-sidebar *,
.extra-ingredients-modal,
.extra-ingredients-modal * {
    font-family: "Outfit", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* Cart Button */
.cart-btn {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6600 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000001 !important;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
    transition: all 0.3s ease;
    border: none;
    color: white;
    pointer-events: auto !important;
}

.cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5);
}

.cart-btn i {
    font-size: 1.8rem;
}

/* Cart badge - item count */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3333;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid white;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000000 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: auto !important;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto !important;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: var(--cart-bg);
    z-index: 10000001 !important;
    transition: right 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px var(--cart-shadow);
    overflow: hidden;
    opacity: 0;
    pointer-events: auto !important;
}

.cart-sidebar.active {
    right: 0;
    opacity: 1;
}

/* Make sure cart is fully hidden and not clickable */
.cart-sidebar:not(.active) {
    pointer-events: none;
}

/* Ensure cart content doesn't overflow */
.cart-sidebar * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Cart Header */
.cart-header {
    padding: 1.35rem 1.5rem 1.25rem;
    background: linear-gradient(145deg, #ff9500 0%, #ff6600 48%, #e85d00 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.cart-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 100% 0%, rgba(255, 255, 255, 0.2), transparent 55%);
    pointer-events: none;
}

.cart-header h2 {
    font-size: 1.55rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.cart-header h2 i {
    font-size: 1.8rem;
}

.cart-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.cart-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Cart Body */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.35rem;
    background: linear-gradient(180deg, rgba(255, 140, 0, 0.04) 0%, var(--cart-bg) 120px);
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--cart-text-light);
}

.cart-empty i {
    font-size: 3rem;
    color: var(--cart-icon-color);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.cart-empty p {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--cart-text);
    font-weight: 500;
}

.cart-empty span {
    font-size: 1.0rem;
    color: var(--cart-text-light);
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
    overflow-x: hidden;
}

/* ========== DISEÑO DEL CARRITO ========== */
.cart-item {
    background: var(--cart-item-bg);
    border-radius: 22px;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--cart-border);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 6px 20px var(--cart-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--cart-shadow);
}

.cart-item__media {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid rgba(255, 140, 0, 0.45);
    box-shadow:
        0 4px 14px rgba(255, 140, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    background: linear-gradient(160deg, rgba(255, 140, 0, 0.12), rgba(255, 102, 0, 0.06));
}

.cart-item-image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Cabecera de la pizza para alinear nombre y tamaño */
.cart-item-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.cart-item-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cart-text);
    margin-bottom: 0;
    flex: 1;
}

.cart-item-size {
    font-size: 0.95rem;
    color: var(--cart-icon-color);
    background: rgba(255, 140, 0, 0.15);
    padding: 4px 10px;
    border-radius: 30px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(255, 140, 0, 0.3);
    flex-shrink: 0;
}

/* Ingredientes base */
.cart-item-ingredients {
    font-size: 0.9rem;
    color: var(--cart-text-light);
    margin: 8px 0;
    padding: 6px 10px;
    background: rgba(255, 140, 0, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--cart-icon-color);
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
}

.cart-item-ingredients strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cart-text);
}

/* Extras */
.cart-item-extras-detail {
    margin: 8px 0;
    padding: 6px 0;
    border-top: 1px dashed var(--cart-border);
    border-bottom: 1px dashed var(--cart-border);
    width: 100%;
    box-sizing: border-box;
}

.extras-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cart-text);
    margin-bottom: 6px;
}

.extras-list-detail {
    margin-bottom: 8px;
    width: 100%;
}

.extra-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 5px 0;
    color: var(--cart-text);
    border-bottom: 1px dotted rgba(255, 140, 0, 0.15);
    width: 100%;
}

.extra-detail-item:last-child {
    border-bottom: none;
}

.extra-price-detail {
    color: var(--cart-icon-color);
    font-weight: 500;
}

.promo-badge-detail {
    font-size: 0.8rem;
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    padding: 6px 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 8px;
}

.extras-total-detail {
    font-size: 0.85rem;
    text-align: right;
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px dotted var(--cart-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    color: var(--cart-text-light);
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.extras-total-detail strong {
    color: var(--cart-icon-color);
}

/* Sección cantidad y subtotal */
.cart-item-quantity-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 8px;
    padding-top: 5px;
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--cart-btn-bg);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
    padding: 0;
    line-height: 1;
}

.qty-btn:hover {
    background: var(--cart-btn-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.qty-btn i {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn.remove-btn {
    background: var(--cart-remove-bg);
    box-shadow: 0 2px 8px rgba(255, 51, 51, 0.3);
}

.qty-btn.remove-btn:hover {
    background: #ff1a1a;
    box-shadow: 0 4px 12px rgba(255, 51, 51, 0.4);
}

.qty-btn.edit-btn {
    background: var(--cart-edit-bg);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn.edit-btn:hover {
    background: #1976D2;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.qty-btn.edit-btn svg {
    width: 18px;
    height: 18px;
}

.qty-btn.edit-btn svg path {
    stroke: white;
    stroke-width: 1.8;
}

.qty-value {
    font-size: 1.2rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    color: var(--cart-text);
}

.item-subtotal {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cart-text);
}

.item-subtotal strong {
    color: var(--cart-icon-color);
    font-size: 1.1rem;
}

/* Desglose de precios */
.price-breakdown-detail {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--cart-border);
    width: 100%;
    box-sizing: border-box;
}

.price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 4px 0;
    color: var(--cart-text-light);
    width: 100%;
}

.price-line.total-line {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed var(--cart-icon-color);
    font-weight: 600;
    color: var(--cart-text);
}

.unit-price-highlight {
    color: var(--cart-icon-color);
    font-size: 0.95rem;
    font-weight: 700;
}

/* Cart Footer */
.cart-footer {
    padding: 1.2rem 1.5rem;
    background: var(--cart-bg);
    border-top: 2px solid var(--cart-border);
    flex-shrink: 0;
}

/* Total breakdown - DISEÑO UNIFICADO SIEMPRE */
.total-breakdown {
    width: 100%;
    margin-bottom: 1.2rem;
}

.total-breakdown .subtotal-row,
.total-breakdown .discount-row {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    padding: 8px 0;
    color: var(--cart-text-light);
    border-bottom: 1px solid var(--cart-border);
}

.total-breakdown .subtotal-row .strikethrough {
    text-decoration: line-through;
    color: #999;
}

.total-breakdown .discount-row .discount-value {
    color: #4CAF50;
}

.total-breakdown .discount-row .discount-zero {
    color: var(--cart-text-light);
}

.total-breakdown .final-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 12px 0 8px;
    margin-top: 6px;
    border-top: 2px solid var(--cart-icon-color);
    color: var(--cart-text);
}

.total-breakdown .final-total-row .final-total {
    font-size: 1.5rem;
    color: var(--cart-icon-color);
    font-weight: 800;
}

.cart-whatsapp-btn {
    width: 100%;
    padding: 1rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.cart-whatsapp-btn:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.cart-whatsapp-btn i {
    font-size: 1.4rem;
}

.whatsapp-hours-note {
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--cart-text-light);
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 140, 0, 0.08);
    border: 1px solid rgba(255, 140, 0, 0.2);
}

body.dark-theme .whatsapp-hours-note {
    background: rgba(255, 140, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.28);
}

.cart-whatsapp-btn--closed {
    opacity: 0.65;
    cursor: not-allowed;
}

.cart-whatsapp-btn--closed:hover {
    background: #25D366;
    transform: none;
    box-shadow: none;
}

/* Cart Promo Info */
.cart-promo-info {
    background: rgba(255, 140, 0, 0.08);
    border-left: 4px solid #ff8c00;
    padding: 15px;
    margin-bottom: 18px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.cart-promo-info .promo-title {
    font-weight: 600;
    color: #ff8c00;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.cart-promo-info .promo-message {
    color: var(--cart-text);
    line-height: 1.4;
    font-size: 0.9rem;
}

.cart-promo-info .promo-discounts {
    margin-top: 10px;
    border-top: 1px dashed rgba(255, 140, 0, 0.2);
    padding-top: 10px;
}

.cart-promo-info .discounts-title {
    font-weight: 500;
    color: #ff8c00;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.cart-promo-info .discount-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 4px;
    padding: 3px 0;
}

.cart-promo-info .discount-amount {
    color: #4CAF50;
    font-weight: 600;
}

/* Mobile First - tamaños base para móviles */
.cart-promo-info {
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 0.7rem;
}

.cart-promo-info .promo-title {
    font-size: 0.7rem;
    margin-bottom: 4px;
}

.cart-promo-info .promo-message {
    font-size: 0.7rem;
}

.cart-promo-info .discounts-title {
    font-size: 0.65rem;
    margin-bottom: 4px;
    margin-top: 6px;
}

.cart-promo-info .discount-item {
    font-size: 0.7rem;
    margin-bottom: 2px;
    padding: 2px 0;
}

/* Tablets (768px en adelante) */
@media screen and (min-width: 768px) {
    .cart-promo-info {
        padding: 10px 12px;
        margin-bottom: 12px;
        font-size: 0.75rem;
    }
    
    .cart-promo-info .promo-title {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }
    
    .cart-promo-info .promo-message {
        font-size: 0.75rem;
    }
    
    .cart-promo-info .discounts-title {
        font-size: 0.7rem;
    }
    
    .cart-promo-info .discount-item {
        font-size: 0.75rem;
    }
}

/* Laptops / Desktop (1024px en adelante) */
@media screen and (min-width: 1024px) {
    .cart-promo-info {
        padding: 12px 15px;
        margin-bottom: 15px;
        font-size: 0.85rem;
    }
    
    .cart-promo-info .promo-title {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .cart-promo-info .promo-message {
        font-size: 0.85rem;
    }
    
    .cart-promo-info .discounts-title {
        font-size: 0.75rem;
    }
    
    .cart-promo-info .discount-item {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
}

/* Pantallas grandes (1200px en adelante) */
@media screen and (min-width: 1200px) {
    .cart-promo-info {
        padding: 15px;
        margin-bottom: 18px;
        font-size: 0.9rem;
    }
    
    .cart-promo-info .promo-title {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .cart-promo-info .promo-message {
        font-size: 0.9rem;
    }
    
    .cart-promo-info .discounts-title {
        font-size: 0.85rem;
    }
    
    .cart-promo-info .discount-item {
        font-size: 0.9rem;
    }
}

/* Móviles muy pequeños (menos de 380px) */
@media screen and (max-width: 380px) {
    .cart-promo-info {
        padding: 6px 8px;
        margin-bottom: 8px;
        font-size: 0.65rem;
    }
    
    .cart-promo-info .promo-title {
        font-size: 0.65rem;
        margin-bottom: 3px;
    }
    
    .cart-promo-info .promo-message {
        font-size: 0.65rem;
        line-height: 1.3;
    }
    
    .cart-promo-info .discounts-title {
        font-size: 0.6rem;
        margin-bottom: 3px;
    }
    
    .cart-promo-info .discount-item {
        font-size: 0.65rem;
        padding: 1px 0;
    }
}

/* ========== MODAL DE EXTRAS ========== */
.extra-ingredients-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000003 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5);
}

.extra-ingredients-modal.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.extra-modal-content {
    position: relative;
    background: var(--cart-bg);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    pointer-events: auto;
    z-index: 10000004 !important;
    overflow: hidden;
    border: 1px solid var(--cart-border);
    box-shadow: 0 10px 30px var(--cart-shadow);
}

.extra-ingredients-modal.active .extra-modal-content {
    transform: scale(1);
}

.extra-modal-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6600 100%);
    color: white;
    position: relative;
    flex-shrink: 0;
}

.extra-modal-header h3 {
    margin: 6px 0 12px 0;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.selected-pizza-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.selected-pizza-name {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.3px;
    background: rgba(0,0,0,0.2);
    padding: 4px 12px;
    border-radius: 40px;
    display: inline-block;
}

.selected-pizza-size {
    font-size: 0.9rem;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 40px;
    font-weight: 500;
}

.modal-promo-message {
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 10px;
    border-radius: 30px;
    margin-top: 8px;
    display: inline-block;
    width: auto;
    max-width: 100%;
    line-height: 1.3;
}

.extra-modal-close {
    position: absolute;
    top: 14px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 10000005 !important;
    pointer-events: auto;
}

.extra-modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.extra-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    background: var(--cart-bg);
}

/* Ingredientes base */
.current-ingredients {
    margin-bottom: 1.2rem;
}

.current-ingredients h4,
.extra-ingredients-section h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem !important;
    color: var(--cart-text) !important;
    font-weight: 700 !important;
}

.ingredients-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ingredient-tag {
    background: rgba(255, 140, 0, 0.1);
    color: var(--cart-icon-color);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 140, 0, 0.3);
}

.extra-ingredients-section {
    border-top: 1px solid var(--cart-border);
    padding-top: 1rem;
}

.extra-price-note {
    font-size: 0.9rem;
    color: var(--cart-icon-color);
    margin-bottom: 12px;
    font-weight: 500;
}

.extra-ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    pointer-events: auto;
}

.extra-ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--cart-item-bg);
    border-radius: 12px;
    transition: background 0.2s ease;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: auto;
    border: 1px solid var(--cart-border);
}

.extra-ingredient-item:hover {
    background: var(--cart-border);
}

.extra-name {
    flex: 1;
    font-size: 0.95rem;
    color: var(--cart-text);
    font-weight: 500;
}

.extra-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cart-icon-color);
}

.extra-modal-footer {
    padding: 1rem 1.5rem;
    background: var(--cart-item-bg);
    border-top: 1px solid var(--cart-border);
    flex-shrink: 0;
}

/* Panel de resumen de precios */
.price-summary-panel {
    background: var(--cart-bg);
    border-radius: 16px;
    padding: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid var(--cart-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.price-summary-panel .summary-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--cart-text-light);
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--cart-border);
}

.price-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--cart-text);
}

.price-summary-item .item-label {
    font-weight: 500;
    color: var(--cart-text-light);
}

.price-summary-item .item-value {
    font-weight: 600;
    color: var(--cart-text);
}

.price-summary-item.total {
    margin-top: 5px;
    padding-top: 10px;
    border-top: 2px solid var(--cart-icon-color);
    font-size: 1.05rem;
}

.price-summary-item.total .item-label {
    font-weight: 700;
    color: var(--cart-text);
    font-size: 1rem;
}

.price-summary-item.total .item-value {
    font-weight: 800;
    color: var(--cart-icon-color);
    font-size: 1.4rem;
}

.modal-confirm-btn {
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #FF8C00;
    color: #121212;
    font-weight: 700;
    cursor: pointer;
    border-radius: 60px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    transition: all 0.5s ease;
    width: 100%;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-confirm-btn::after {
    content: "";
    width: 100%;
    height: 100%;
    background: #FF8C00;
    position: absolute;
    bottom: -100%;
    left: 0;
    border-radius: 50%;
    z-index: -1;
    transition: all 0.5s ease;
}

.modal-confirm-btn:hover {
    color: #fff;
}

.modal-confirm-btn:hover::after {
    bottom: 0;
    border-radius: 0;
}

/* ========== MODERN CHECKBOX STYLES ========== */
.extra-ingredients-modal .container {
    --input-focus: #ff8c00;
    --input-out-of-focus: #ccc;
    --bg-color: #fff;
    --bg-color-alt: #666;
    --main-color: #ff8c00;
    position: relative;
    cursor: pointer;
    display: inline-block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.extra-ingredients-modal .container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.extra-ingredients-modal .checkmark {
    width: 24px;
    height: 24px;
    position: relative;
    top: 0;
    left: 0;
    border: 2px solid var(--main-color);
    border-radius: 6px;
    box-shadow: 2px 2px var(--main-color);
    background-color: var(--input-out-of-focus);
    transition: all 0.2s ease;
    display: block;
}

.extra-ingredients-modal .container input:checked ~ .checkmark {
    background-color: var(--input-focus) !important;
}

.extra-ingredients-modal .checkmark:after {
    content: "";
    width: 5px;
    height: 10px;
    position: absolute;
    top: 2px;
    left: 7px;
    display: none;
    border: solid var(--bg-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.extra-ingredients-modal .container input:checked ~ .checkmark:after {
    display: block !important;
}

.extra-ingredients-modal .container:hover .checkmark {
    transform: scale(1.02);
    box-shadow: 2px 2px var(--main-color);
}

.modal-promo-info {
    background: rgba(76, 175, 80, 0.1);
    padding: 8px 12px;
    border-radius: 12px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-promo-info i {
    font-size: 0.9rem;
}

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

/* Pantallas medianas (tablets) */
@media screen and (max-width: 768px) {
    .cart-sidebar {
        max-width: 400px;
    }
    
    .cart-header h2 {
        font-size: 1.6rem;
    }
    
    .cart-item-name {
        font-size: 1.3rem;
    }
    
    .cart-item-size {
        font-size: 0.9rem;
    }
    
    .selected-pizza-name {
        font-size: 1.4rem;
    }
    
    .selected-pizza-size {
        font-size: 1rem;
    }
    
    .current-ingredients h4,
    .extra-ingredients-section h4 {
        font-size: 1rem !important;
    }
    
    .ingredient-tag {
        font-size: 0.85rem;
        padding: 5px 12px;
    }
    
    .extra-name {
        font-size: 0.9rem;
    }
    
    .price-summary-item {
        font-size: 0.9rem;
    }
    
    .price-summary-item.total .item-value {
        font-size: 1.3rem;
    }
}

/* Pantallas pequeñas (móviles) */
@media screen and (max-width: 576px) {
    .cart-btn {
        bottom: 60px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
    
    .cart-btn i {
        font-size: 1.6rem;
    }
    
    .cart-sidebar {
        max-width: 100%;
        width: 100%;
    }
    
    .cart-header {
        padding: 1rem;
    }
    
    .cart-header h2 {
        font-size: 1.4rem;
    }
    
    .cart-header h2 i {
        font-size: 1.4rem;
    }
    
    .cart-close {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }
    
    .cart-body {
        padding: 0.8rem;
    }
    
    .cart-item {
        padding: 0.8rem;
        gap: 10px;
    }
    
    .cart-item__media {
        width: 78px;
        height: 78px;
    }
    
    .cart-item-name {
        font-size: 1.2rem;
    }
    
    .cart-item-size {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    .cart-item-ingredients {
        font-size: 0.8rem;
    }
    
    .cart-item-ingredients strong {
        font-size: 0.8rem;
    }
    
    .extras-title {
        font-size: 0.8rem;
    }
    
    .extra-detail-item {
        font-size: 0.75rem;
    }
    
    .qty-btn {
        width: 30px;
        height: 30px;
    }
    
    .qty-value {
        font-size: 1.1rem;
    }
    
    .item-subtotal {
        font-size: 0.8rem;
    }
    
    .price-line {
        font-size: 0.75rem;
    }
    
    .cart-footer {
        padding: 0.8rem;
    }
    
    .total-breakdown .subtotal-row,
    .total-breakdown .discount-row {
        font-size: 0.85rem;
    }
    
    .total-breakdown .final-total-row {
        font-size: 1rem;
    }
    
    .total-breakdown .final-total-row .final-total {
        font-size: 1.3rem;
    }
    
    .cart-whatsapp-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .cart-empty p {
        font-size: 1.3rem;
    }
    
    .cart-empty span {
        font-size: 1rem;
    }
    
    /* Modal responsive */
    .extra-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .extra-modal-header {
        padding: 0.8rem;
    }
    
    .extra-modal-header h3 {
        font-size: 0.85rem;
    }
    
    .selected-pizza-name {
        font-size: 1.3rem;
    }
    
    .selected-pizza-size {
        font-size: 0.9rem;
    }
    
    .extra-modal-close {
        width: 30px;
        height: 30px;
        font-size: 1.3rem;
        top: 10px;
        right: 10px;
    }
    
    .extra-modal-body {
        padding: 0.8rem;
    }
    
    .current-ingredients h4,
    .extra-ingredients-section h4 {
        font-size: 0.95rem !important;
    }
    
    .ingredient-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .extra-price-note {
        font-size: 0.75rem;
    }
    
    .extra-name {
        font-size: 0.85rem;
    }
    
    .extra-price {
        font-size: 0.8rem;
    }
    
    .extra-modal-footer {
        padding: 0.8rem;
    }
    
    .price-summary-panel {
        padding: 0.7rem;
    }
    
    .price-summary-panel .summary-title {
        font-size: 0.7rem;
    }
    
    .price-summary-item {
        font-size: 0.85rem;
        padding: 5px 0;
    }
    
    .price-summary-item.total .item-value {
        font-size: 1.2rem;
    }
    
    .modal-confirm-btn {
        padding: 10px 16px;
        font-size: 1rem;
    }
    
    .extra-ingredients-modal .container {
        width: 22px;
        height: 22px;
    }
    
    .extra-ingredients-modal .checkmark {
        width: 22px;
        height: 22px;
    }
}

/* Pantallas muy pequeñas */
@media screen and (max-width: 380px) {
    .cart-item-name {
        font-size: 1rem;
    }
    
    .cart-item-size {
        font-size: 0.7rem;
    }
    
    .selected-pizza-name {
        font-size: 1.1rem;
    }
    
    .current-ingredients h4,
    .extra-ingredients-section h4 {
        font-size: 0.85rem !important;
    }
    
    .modal-confirm-btn {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .price-summary-item {
        font-size: 0.75rem;
    }
    
    .price-summary-item.total .item-value {
        font-size: 1.1rem;
    }
}

/* Pantallas grandes */
@media screen and (min-width: 1200px) {
    .cart-sidebar {
        max-width: 500px;
    }
    
    .cart-item-name {
        font-size: 1.5rem;
    }
    
    .selected-pizza-name {
        font-size: 1.7rem;
    }
}

/* ========== Modal horario WhatsApp ========== */
.cart-hours-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000050;
    background: rgba(15, 12, 8, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-hours-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cart-hours-modal {
    width: 100%;
    max-width: 400px;
    background: var(--cart-bg);
    color: var(--cart-text);
    border-radius: 24px;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 140, 0, 0.2);
    text-align: center;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-hours-modal-overlay.active .cart-hours-modal {
    transform: translateY(0) scale(1);
}

.cart-hours-modal__title {
    margin: 0 0 0.65rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--cart-text);
}

.cart-hours-modal__text {
    margin: 0 0 1.1rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--cart-text-light);
}

.cart-hours-modal__box {
    text-align: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 140, 0, 0.09);
    border: 1px solid rgba(255, 140, 0, 0.22);
    margin-bottom: 1.25rem;
}

.cart-hours-modal__box-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cart-icon-color);
    margin-bottom: 4px;
}

.cart-hours-modal__schedule {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cart-text);
    line-height: 1.4;
}

.cart-hours-modal__btn {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6600 100%);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-hours-modal__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255, 102, 0, 0.45);
}

.cart-hours-modal__btn:focus-visible {
    outline: 2px solid var(--cart-icon-color);
    outline-offset: 3px;
}