/* =========================================
   ESTILOS ESPECÍFICOS: CHECKOUT
   (Cargar DESPUÉS de main.css)
   ========================================= */

:root {
    --input-height: 56px;
}

/* --- 1. SOLUCIÓN NUCLEAR AL HUECO (BUFFER) --- */

html {
    background-color: #000000;
    /* Fondo de seguridad negro puro */
    height: 100%;
    overflow-x: hidden;
    /* Intentar bloquear rebote (funciona en Chrome/Android, a veces Safari lo ignora) */
    overscroll-behavior: none;
}

body {
    background-color: transparent !important;
    background-image: none !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

/* EL TRUCO: IMAGEN MÁS GRANDE QUE LA PANTALLA (BUFFER) */
body::before {
    content: '';
    position: fixed;

    /* Posicionamos la imagen -10% arriba y a la izquierda */
    top: -10vh;
    left: -10vw;

    /* Hacemos la imagen un 20% más grande que la pantalla */
    width: 120vw;
    height: 120vh;

    z-index: -1;

    /* Tu imagen de fondo oscura */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/images/FONDO_REESCALADO.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    /* Blur */
    filter: blur(10px);

    /* Esto asegura que no se mueva ni un píxel */
    pointer-events: none;
    will-change: transform;
}


/* --- 2. NAVBAR (ALINEACIÓN Y CRISTAL) --- */

.navbar {
    position: fixed;
    background-image: none !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    /* Fondo oscuro sólido al 80% */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    /* Aseguramos que ocupe todo */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.logo-mini {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
}

.marquee-container {
    display: none !important;
}

.nav-item.left,
.nav-item.right {
    justify-content: center !important;
    padding: 0 !important;
    width: 100%;
}

.nav-btn {
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    margin: 0 !important;
    line-height: 1 !important;
    padding-top: 4px;
}


/* --- 3. LAYOUT PRINCIPAL --- */
.checkout-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 60px;
    position: relative;
    width: 100%;
    overflow-x: hidden;
}


/* --- 4. SECCIONES --- */

.checkout-form-section {
    padding: 40px;
    border-right: 2px solid white;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
}

.order-summary-section {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    color: white;
    position: sticky;
    top: 60px;
    height: calc(100vh - 120px);
}

.form-group {
    margin-bottom: 40px;
}

.form-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    border-bottom: 2px solid white;
    padding-bottom: 10px;
    color: white;
}


/* --- 5. INPUTS --- */
.brutal-input {
    width: 100%;
    height: var(--input-height);
    padding: 0 15px;
    margin-bottom: 15px;
    background: transparent;
    border: 2px solid white;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    outline: none;
    line-height: normal;
    display: flex;
    align-items: center;
    border-radius: 0;
}

.brutal-input::placeholder {
    color: var(--color-text-muted);
    text-transform: uppercase;
    opacity: 0.7;
}

.brutal-input:focus {
    background: rgba(255, 255, 255, 0.1);
}

.phone-input-group {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.brutal-select {
    width: 100%;
    height: var(--input-height);
    padding: 0 15px;
    background-color: #0f0f13;
    border: 2px solid white;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    outline: none;
    cursor: pointer;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px auto;
}

.phone-input-group .brutal-input {
    margin-bottom: 0;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 10px;
}


/* --- 6. ITEMS RESUMEN --- */
.summary-header {
    padding: 20px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    border-bottom: 2px solid white;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.summary-items {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: white transparent;
}

.summary-items::-webkit-scrollbar {
    width: 4px;
}

.summary-items::-webkit-scrollbar-thumb {
    background-color: white;
}

.summary-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
}

.summary-item img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border: 1px solid white;
    flex-shrink: 0;
    background-color: #333;
}

.summary-item-info {
    flex-grow: 1;
}

.item-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
}

.item-meta {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 5px;
}

.item-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: white;
}

.summary-totals {
    padding: 20px;
    border-top: 2px solid white;
    background: black;
    flex-shrink: 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-family: var(--font-body);
    color: var(--color-text-muted);
}

.total-row.final {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid white;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: white;
}

.pay-btn {
    width: 100%;
    padding: 20px;
    background: white;
    color: black;
    border: none;
    font-family: var(--font-heading);
    font-size: 2rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    margin-top: 20px;
}

.pay-btn:hover {
    background: #ccc;
}


/* =========================================
   MEDIA QUERIES - RESPONSIVE MÓVIL
   ========================================= */

@media (max-width: 900px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }

    .checkout-form-section {
        border-right: none;
        border-bottom: 2px solid white;
    }

    .order-summary-section {
        position: static;
        height: auto;
    }
}

@media (max-width: 768px) {

    /* QUITANDO BORDES */
    body {
        border: none !important;
    }

    .navbar {
        border-left: none !important;
        border-right: none !important;
        width: 100% !important;
    }

    .checkout-container {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        overflow-x: hidden;
    }

    .checkout-form-section {
        padding: 20px;
    }

    /* IMAGEN VERTICAL (CON BUFFER TAMBIÉN) */
    body::before {
        background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/images/FONDO_REESCALADO_VERTICAL.webp');
        background-size: cover;
        /* Buffer en móvil */
        width: 120vw;
        height: 120vh;
        top: -10vh;
        left: -10vw;
    }
}

@media (max-width: 500px) {
    .phone-input-group {
        grid-template-columns: 90px 1fr;
    }

    .brutal-select {
        padding: 0 5px;
        font-size: 1rem;
    }

    .input-row {
        grid-template-columns: 1fr;
    }
}