/* ==========================================================================
   PREMIUM CART LAYOUT
   ========================================================================== */

#modal-cart *,
#modal-cart *::before,
#modal-cart *::after {
    box-sizing: border-box;
}

/* Contenedor Principal: Layout de dos columnas */
.premium-cart-layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 0 40px;
}

@media (min-width: 769px) {
    .premium-cart-layout {
        flex-direction: row;
        max-width: 1280px;
    }
}

#modal-cart.modal-fullscreen {
    background: rgba(11, 19, 43, 0.45) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 0 !important;
}

body.dark-mode #modal-cart.modal-fullscreen {
    background: rgba(0, 0, 0, 0.75) !important;
}

.modal-content-wrapper.premium-cart-container {
    width: 100%;
    max-width: 1300px;
    margin: 40px auto;
    background: transparent;
    box-shadow: none;
    padding: 0 20px;
    overflow: visible;
    max-height: none; /* Fix for overlap with footer */
}

/* Columna Izquierda (Productos) */
.premium-cart-left {
    width: 100%;
    flex: 1;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(220, 230, 242, 0.8);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 769px) {
    .premium-cart-left {
        flex: 1 1 70%;
        max-width: 70%;
    }
}

body.dark-mode .premium-cart-left {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

/* Columna Derecha (Resumen/Checkout) */
.premium-cart-right {
    width: 100%;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 769px) {
    .premium-cart-right {
        flex: 0 0 30%;
        max-width: 30%;
    }
}

.premium-checkout-box {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: 0 18px 65px rgba(15, 23, 42, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

body.dark-mode .premium-checkout-box {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 65px rgba(0, 0, 0, 0.35);
}

.premium-checkout-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 90px rgba(15, 23, 42, 0.16);
}

body.dark-mode .premium-checkout-box:hover {
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.2);
}

.order-summary-card {
    border-left: 4px solid #22c55e;
    box-shadow: 0 22px 90px rgba(34, 149, 71, 0.14);
}

.order-summary-card .summary-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.summary-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text);
}

.summary-note {
    font-size: 12px;
    color: var(--color-text-muted);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--color-text);
}

.summary-row--secondary {
    color: var(--color-text-muted);
}

.summary-row .total-usd {
    font-size: 24px;
    font-weight: 900;
}

.summary-row .total-bs {
    font-size: 14px;
    font-weight: 700;
}

.payment-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.payment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

.payment-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.payment-card__label {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-text-muted);
}

.payment-card__pill {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
    padding: 6px 10px;
    border-radius: 999px;
}

.payment-card__pill--zelle {
    background: rgba(116, 27, 136, 0.08);
    color: #5b21b6;
}

.payment-card__hint {
    font-size: 12px;
    color: var(--color-primary);
    font-weight: 700;
    text-align: center;
    margin-top: 16px;
}

.payment-highlight {
    font-weight: 700;
    color: #111827;
    word-break: break-all;
}

.payment-detail {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    word-break: break-word;
}

.btn-checkout-primary {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 800;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    color: white;
    box-shadow: 0 18px 42px rgba(34, 149, 71, 0.28);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.dark-mode .btn-checkout-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 18px 42px rgba(34, 149, 71, 0.28);
}

.btn-checkout-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 22px 50px rgba(34, 149, 71, 0.35);
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.checkout-warning-text {
    text-align: center;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    margin-top: 12px;
}

.box-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.box-title i {
    color: var(--color-primary);
}

body.dark-mode .box-title i {
    color: var(--color-accent);
}

/* Header del Carrito */
.premium-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.premium-cart-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    color: var(--color-text);
    letter-spacing: -0.5px;
}

.btn-trash {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: var(--color-danger);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.btn-trash:hover {
    background: var(--color-danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.25);
}

.btn-trash:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

#lista-carrito {
    padding: 10px 0 0;
    display: grid;
    gap: 18px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid rgba(229, 231, 235, 1);
    min-height: 100px;
}

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

body.dark-mode .cart-item {
    border-color: rgba(71, 85, 105, 0.25);
}

.cart-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 60%;
}

.cart-item-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    margin-top: auto;
}

@media (min-width: 769px) {
    .cart-item-right {
        justify-content: flex-end;
        width: 40%;
        gap: 20px;
        margin-top: 0;
    }
}

.cart-item-image,
.cart-item-img-placeholder {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 12px;
    background: rgba(243, 244, 246, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(209, 213, 219, 0.7);
    overflow: hidden;
}

body.dark-mode .cart-item-image,
body.dark-mode .cart-item-img-placeholder {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
}

.cart-item-image img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.cart-item-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .cart-item-title {
    color: #f8fafc;
}

.cart-item-unit {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-primary);
}

.cart-item-unit .cart-item-price-bs {
    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 700;
}

body.dark-mode .cart-item-unit,
body.dark-mode .cart-item-unit .cart-item-price-bs {
    color: #60a5fa;
}

.cart-item-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
}

body.dark-mode .cart-item-total {
    color: #f8fafc;
}

.cart-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(243, 244, 246, 0.95);
    border: 1px solid rgba(209, 213, 219, 0.8);
    flex-shrink: 0;
}

body.dark-mode .cart-controls {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(71, 85, 105, 0.65);
}

.cart-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text);
    border: 1px solid rgba(209, 213, 219, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.dark-mode .cart-btn {
    border-color: rgba(71, 85, 105, 0.85);
    color: #f8fafc;
}

.cart-btn:hover:not(.cart-btn-disabled) {
    transform: translateY(-1px);
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.45);
    color: #166534;
}

body.dark-mode .cart-btn:hover:not(.cart-btn-disabled) {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.45);
    color: #d1fae5;
}

.cart-btn.cart-btn-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: rgba(229, 231, 235, 0.6);
    color: var(--color-text-muted);
}

.cart-item-qty {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.cart-item-delete {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cart-item-delete:hover {
    color: var(--color-danger);
    transform: scale(1.1);
}

.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(229, 231, 235, 0.9);
    color: var(--color-text);
}

.cart-empty-state h3 {
    font-size: 1.4rem;
    margin: 12px 0 6px;
    font-weight: 800;
}

.cart-empty-state p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
    max-width: 320px;
}

.cart-empty-state .btn-checkout-primary {
    margin-top: 24px;
    max-width: 240px;
}

@media (max-width: 768px) {
    .premium-cart-left {
        padding: 20px 15px;
    }
    
    .cart-mobile-top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid var(--color-border);
    }
    
    .btn-volver-tienda {
        background: white;
        color: var(--color-primary);
        border: 1px solid rgba(0,0,0,0.05);
        font-size: 13px;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        text-decoration: none;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    .btn-volver-tienda:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    }
    
    .btn-volver-tienda:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }
    
    .btn-trash-mobile {
        background: #FEF2F2;
        color: var(--color-danger);
        border: 1px solid rgba(239, 68, 68, 0.1);
        font-size: 13px;
        font-weight: 600;
        padding: 8px 14px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    .btn-trash-mobile:hover {
        background: var(--color-danger);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(239, 68, 68, 0.25);
    }
    
    .btn-trash-mobile:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
    }

    .cart-header.premium-cart-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    .cart-header h2 {
        font-size: 20px;
    }

    .cart-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
        border: 2px solid var(--color-primary) !important;
        border-radius: 12px;
        background: white;
    }

    body.dark-mode .cart-item {
        background: var(--color-card);
    }

    .cart-item-left {
        width: 100%;
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 12px;
    }

    .cart-item-image,
    .cart-item-img-placeholder {
        width: 70px;
        height: 70px;
        min-width: 70px;
        max-width: 70px;
        margin: 0;
        border-radius: 8px;
    }

    .cart-item-info {
        flex: 1;
        width: calc(100% - 82px);
    }
    
    .cart-item-title {
        font-size: 14px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .cart-item-unit {
        font-size: 1rem;
        margin-top: 4px;
    }

    .cart-item-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px dashed rgba(0,0,0,0.1);
        padding-top: 12px;
        margin-top: 0;
    }
    
    body.dark-mode .cart-item-right {
        border-top-color: rgba(255,255,255,0.1);
    }
    
    .cart-item-total {
        display: none;
    }

    .cart-controls {
        padding: 4px 8px;
    }
    .cart-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .cart-item-qty {
        min-width: 15px;
        font-size: 14px;
    }
    .cart-item-delete {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

.cart-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 999px;
    margin-top: 4px;
    background: rgba(248, 250, 252, 0.92);
    color: var(--color-text-muted);
}

.cart-stock-badge.info {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.cart-stock-badge.warning {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.cart-stock-badge.limit {
    background: rgba(239, 68, 68, 0.14);
    color: #991b1b;
}

.cart-header {
    margin-bottom: 20px;
}

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

.premium-checkout-box {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.16);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

body.dark-mode .premium-checkout-box {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

.premium-checkout-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 36px 110px rgba(15, 23, 42, 0.18);
}

body.dark-mode .premium-checkout-box:hover {
    box-shadow: 0 36px 110px rgba(245, 158, 11, 0.22);
}

.btn-checkout-primary {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 800;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    color: white;
    box-shadow: 0 14px 38px rgba(30, 58, 138, 0.22);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

body.dark-mode .btn-checkout-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, #d97706 100%);
    color: #000;
    box-shadow: 0 14px 38px rgba(245, 158, 11, 0.22);
}

.btn-checkout-primary:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 22px 50px rgba(30, 58, 138, 0.35);
}

body.dark-mode .btn-checkout-primary:hover {
    box-shadow: 0 22px 50px rgba(245, 158, 11, 0.35);
}

.btn-premium-qty[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-premium-delete {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: var(--color-danger);
    font-size: 18px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-premium-delete:hover {
    background: var(--color-danger);
    color: white;
    transform: rotate(90deg);
}

/* Panel de Checkout (Subtotal) */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.summary-row.total-row {
    border-top: 2px dashed var(--color-border);
    padding-top: 15px;
    margin-top: 5px;
    margin-bottom: 25px;
}

.summary-row span.label {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.total-usd {
    font-size: 36px;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
    letter-spacing: -1px;
}

body.dark-mode .total-usd {
    color: var(--color-accent);
}

.total-bs {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: right;
    display: block;
    margin-top: 5px;
}

.btn-checkout-primary {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 800;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    color: white;
    box-shadow: 0 18px 42px rgba(34, 149, 71, 0.28);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.dark-mode .btn-checkout-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 18px 42px rgba(34, 149, 71, 0.28);
}

.btn-checkout-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 22px 50px rgba(34, 149, 71, 0.35);
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

body.dark-mode .btn-checkout-primary:hover {
    box-shadow: 0 18px 35px rgba(245, 158, 11, 0.35);
}

/* Estilos de Toggles Modernos (Botones de Opciones) */
.premium-toggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

.premium-toggles.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

.premium-toggles input[type="radio"] {
    display: none;
}

.premium-toggle-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 12px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
    box-shadow: var(--shadow-xxs);
}

.premium-toggle-btn i {
    font-size: 20px;
}

.premium-toggles input[type="radio"]:checked + .premium-toggle-btn {
    background: rgba(30, 58, 138, 0.05);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

body.dark-mode .premium-toggles input[type="radio"]:checked + .premium-toggle-btn {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: inset 0 0 0 1px var(--color-accent);
}

.premium-toggle-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

body.dark-mode .premium-toggle-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Campos de texto en Checkout */
.premium-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.premium-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    outline: none;
}

body.dark-mode .premium-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .premium-cart-layout {
        gap: 20px;
        padding: 10px 15px 40px;
    }
    .premium-cart-left {
        padding: 20px;
    }
    .premium-cart-right {
        flex: 0 0 320px;
        min-width: 300px;
    }
}

/* Mobile y Tablets pequeñas */
@media (max-width: 768px) {
    .modal-content-wrapper.premium-cart-container {
        margin: 0;
        padding: 0 16px;
        border-radius: 0;
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    #modal-cart.modal-fullscreen {
        background: var(--color-bg) !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .premium-cart-layout {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    /* Flujo de Checkout: Ocultar lista de productos solo en móviles para pasos 2 y 3 */
    .premium-cart-layout[data-checkout-step="2"] .premium-cart-left,
    .premium-cart-layout[data-checkout-step="3"] .premium-cart-left {
        display: none !important;
    }

    .premium-cart-right {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: static;
        top: auto;
        border-radius: 0;
        padding: 20px 0;
        background: var(--color-bg);
        box-sizing: border-box;
    }

    .premium-checkout-box {
        border-radius: var(--radius-lg);
        margin-bottom: 20px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .premium-cart-left {
        flex: 1 1 100%;
        width: 100%;
        border-radius: 0;
        border: none;
        box-shadow: none;
        padding: 20px 0;
        background: var(--color-bg);
        box-sizing: border-box;
    }

    .premium-cart-header {
        padding-top: 10px;
        position: sticky;
        top: 0;
        background: var(--color-bg);
        z-index: 10;
        padding-bottom: 15px;
    }

    .premium-cart-header h2 {
        font-size: 24px;
    }

    #lista-carrito {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .cart-item {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        margin: 0;
        border-bottom: 1px solid rgba(229, 231, 235, 1);
    }

    .cart-item-image,
    .cart-item-img-placeholder {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        min-width: auto;
        border-radius: 16px;
    }

    .cart-item-header {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-item-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-item-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .cart-item-right {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
        margin-top: auto;
    }

    .cart-item-total {
        position: static !important;
        margin: 0 auto 0 0 !important;
        transform: none !important;
    }

    .cart-controls {
        width: auto;
        justify-content: center;
    }

    .premium-item-img {
        max-width: 90%;
        max-height: 90%;
    }

    .premium-item-title-row {
        flex-direction: column;
        gap: 3px;
        align-items: flex-start;
    }

    .premium-item-title {
        max-width: 100%;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
    }

    .premium-item-price {
        text-align: left;
        font-size: 16px;
        font-weight: 800;
        margin-top: 2px;
    }

    .premium-item-actions {
        border-top: none;
        padding-top: 0;
        margin-top: 10px;
        justify-content: space-between;
        width: 100%;
    }
}

/* Teléfonos muy pequeños */
@media (max-width: 480px) {
    .premium-toggles.three-cols {
        grid-template-columns: 1fr;
    }
    .premium-qty-control {
        height: 40px;
    }
    .btn-premium-qty, .btn-premium-delete {
        width: 40px;
        height: 40px;
    }

    /* Rediseño Mobile First para los Items del Carrito */
    .cart-item {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding: 12px !important;
        margin: 0 !important;
    }

    .cart-item-left {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .cart-item-image,
    .cart-item-img-placeholder {
        width: 64px !important;
        height: 64px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .cart-item-info {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .cart-item-title {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }

    .cart-item-right {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 12px !important;
        margin-top: auto !important;
    }
    
    .cart-item-total {
        position: static !important;
        margin: 0 auto 0 0 !important;
        transform: none !important;
    }

    .cart-controls {
        width: auto !important;
    }
}

/* ==========================================================================
   ESTILOS PREMIUM DE TERCERA FASE (CARRETAS Y SECCIONES NUEVAS)
   ========================================================================== */

/* Resaltado dinámico para métodos de pago al seleccionarse */
#pago-efectivo:checked + .premium-toggle-btn {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: var(--color-success) !important;
    color: var(--color-success) !important;
    box-shadow: inset 0 0 0 1px var(--color-success) !important;
}

#pago-movil:checked + .premium-toggle-btn {
    background: rgba(30, 58, 138, 0.08) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
    box-shadow: inset 0 0 0 1px var(--color-primary) !important;
}

#pago-zelle:checked + .premium-toggle-btn {
    background: rgba(116, 27, 136, 0.08) !important;
    border-color: #741b88 !important;
    color: #741b88 !important;
    box-shadow: inset 0 0 0 1px #741b88 !important;
}

body.dark-mode #pago-movil:checked + .premium-toggle-btn {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
    box-shadow: inset 0 0 0 1px var(--color-accent) !important;
}

/* Copiado de Datos de Pago Estilizados */
.data-pago-row {
    background: var(--color-bg) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 16px !important;
    margin-bottom: 10px !important;
    transition: all 0.2s ease !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.data-pago-row:hover {
    border-color: var(--color-primary) !important;
}

body.dark-mode .data-pago-row:hover {
    border-color: var(--color-accent) !important;
}

.btn-copy-pago {
    background: rgba(30, 58, 138, 0.05) !important;
    color: var(--color-primary) !important;
    padding: 6px 12px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-copy-pago:hover {
    background: var(--color-primary) !important;
    color: white !important;
}

body.dark-mode .btn-copy-pago {
    background: rgba(245, 158, 11, 0.1) !important;
    color: var(--color-accent) !important;
}

body.dark-mode .btn-copy-pago:hover {
    background: var(--color-accent) !important;
    color: black !important;
}

/* Estado de Carrito Vacío */
.premium-empty-cart {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.premium-empty-cart svg {
    opacity: 0.25;
    margin-bottom: 20px;
    color: var(--color-primary);
    animation: bounceSlow 3s infinite ease-in-out;
}

body.dark-mode .premium-empty-cart svg {
    color: var(--color-accent);
}

.premium-empty-cart h3 {
    color: var(--color-text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 10px 0;
}

.premium-empty-cart p {
    font-size: 14px;
    margin: 0 0 30px 0;
    max-width: 320px;
    line-height: 1.5;
}

.premium-empty-cart .btn-explore {
    width: auto;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .premium-empty-cart .btn-explore {
    background: linear-gradient(135deg, var(--color-accent) 0%, #d97706 100%);
    color: #000;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}

.premium-empty-cart .btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(30, 58, 138, 0.3);
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Animaciones Premium para el Flujo de Checkout de 4 Pasos */
#step-1-summary,
#step-2-delivery,
#step-3-payment,
#step-4-confirm {
    animation: fadeSlideUpPremium 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeSlideUpPremium {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Ocultar lista de productos al entrar en checkout y centrar la caja (Aplica a PC y Móvil) */
.premium-cart-layout.checkout-active .premium-cart-left {
    display: none !important;
}

.premium-cart-layout.checkout-active {
    justify-content: center;
    align-items: center;
}

@media (min-width: 769px) {
    .premium-cart-layout.checkout-active .premium-cart-right {
        flex: 0 0 500px;
        max-width: 500px;
        margin: 0 auto;
    }
}