/* --- AJUSTES DE ESTRUCTURA GLOBAL --- */
body.cart-page {
    background-color: #050505;
    display: block; /* IMPORTANTE: No usar flex aquí para no romper el footer */
    font-family: 'Montserrat', sans-serif;
}

/* Sección que envuelve el carrito para separarlo de header y footer */
.cart-main-content {
    padding: 140px 0 80px 0; /* 140px arriba para no chocar con el header fixed */
    min-height: calc(100vh - 400px); /* Asegura que el footer no suba si hay poco contenido */
    display: flex;
    justify-content: center;
}

.cart-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.cart-container {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 30px;
    align-items: start; /* Alineación perfecta de recuadros */
}

/* --- TERMINAL STYLES --- */
.terminal-header {
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.terminal-header h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: #fff;
    margin: 0;
    line-height: 1;
}

.system-status {
    font-family: monospace;
    color: #8A0100;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

/* --- EMPTY STATE --- */
.empty-state {
    position: relative;
    min-height: 480px;
    background: linear-gradient(180deg, rgba(138, 1, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    border: 1px solid #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding: 40px;
}

.scanner-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 1px;
    background: #8A0100;
    box-shadow: 0 0 15px #8A0100;
    animation: scan 4s linear infinite;
}

@keyframes scan { 0% { top: 0; } 100% { top: 100%; } }

.warning-code { color: #8A0100; font-weight: 700; font-size: 0.8rem; letter-spacing: 3px; display: block; margin-bottom: 10px; }
.empty-content h2 { font-family: 'Poppins'; font-size: 1.6rem; margin-bottom: 15px; color: #fff; }
.empty-content p { color: #666; font-size: 0.95rem; margin-bottom: 30px; max-width: 400px; margin-inline: auto; }

.btn-return {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid #8A0100;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    transition: 0.3s;
}
.btn-return:hover { background: #8A0100; box-shadow: 0 0 20px rgba(138, 1, 0, 0.4); }

/* --- SUMMARY CARD --- */
.summary-card {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    padding: 30px;
    border-top: 4px solid #8A0100;
    position: sticky;
    top: 100px;
}

.summary-card h3 { font-family: 'Poppins'; font-size: 1rem; margin-bottom: 25px; border-left: 3px solid #8A0100; padding-left: 15px; }
.detail-row { display: flex; justify-content: space-between; margin-bottom: 12px; color: #666; font-size: 0.8rem; font-weight: 600; }
.total-row { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #222; padding-top: 20px; margin-top: 20px; }
.total-amount { font-family: 'Poppins'; font-size: 1.8rem; font-weight: 700; color: #fff; }

.btn-checkout {
    width: 100%; padding: 18px; background: #111; border: 1px solid #222;
    color: #333; font-family: 'Poppins'; font-weight: 900; cursor: not-allowed; margin-top: 30px;
}

.security-meta { margin-top: 25px; text-align: center; font-size: 0.6rem; color: #444; letter-spacing: 1px; }
.legal-footer { margin-top: 15px; padding-top: 15px; border-top: 1px solid #1a1a1a; }
.legal-link { color: #666; text-decoration: none; }
.legal-link:hover { color: #8A0100; }
.separator { margin: 0 5px; color: #222; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .cart-container { grid-template-columns: 1fr; }
    .cart-main-content { padding: 100px 0 60px 0; }
    .summary-card { position: static; max-width: 500px; margin: 0 auto; }
}