﻿/* --- VARIABLES DE TU PALETA DE COLORES (Adaptadas) --- */
:root {
    --bg-main: #fff4e2; /* Crema base (Fondo) */
    --text-main: #472825; /* Marrón profundo (Títulos) */
    --text-muted: #96786f; /* Tierra suave (Subtítulos) */
    --accent-main: #d3ab80; /* Dorado/Madera (Detalles, Iconos) */
    --accent-soft: #fde4bc; /* Arena clara (Fondos suaves, Hovers) */
    --white: #ffffff;
    --shadow-soft: 0 8px 30px rgba(71, 40, 37, 0.08);
}

/* --- RESET Y BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', sans-serif; /* Usamos Poppins para un look más App */
}

body {
    background-color: var(--bg-main);
    color: var(--white);
    overflow-x: hidden;
}

/* --- ESTILOS GENERALES DE SECCIÓN --- */
section {
    padding: 40px 8%;
}

.cupones-wrapper {
    padding: 120px 5% 60px;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #fde4bc 0%, var(--bg-main) 40%);
}

.cupones-header {
    text-align: center;
    margin-bottom: 50px;
}

.badge-new {
    background: var(--text-main);
    color: var(--accent-main);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.text-accent {
    color: var(--accent-main);
}

/* Grid de Tickets */
.cupones-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* El Ticket */
.ticket-card {
    display: flex;
    filter: drop-shadow(0 10px 20px rgba(71, 40, 37, 0.1));
    transition: transform 0.3s ease;
}

    .ticket-card:hover {
        transform: translateY(-5px) scale(1.02);
    }

/* Lado Izquierdo (Descuento) */
.ticket-left {
    background: var(--text-main);
    color: white;
    width: 120px;
    padding: 30px 10px;
    border-radius: 20px 0 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 2px dashed rgba(255,255,255,0.3);
}

.discount-content .val {
    font-size: 2.2rem;
    font-weight: 900;
    display: block;
    line-height: 1;
}

.discount-content .type {
    font-size: 0.8rem;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* Lado Derecho (Info) */
.ticket-right {
    background: white;
    flex: 1;
    padding: 25px;
    border-radius: 0 20px 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ticket-info h3 {
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.ticket-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.expiry-tag {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #e74c3c;
    font-weight: 600;
}

/* Botón de Copiar */
.btn-copy {
    width: 100%;
    background: #f8f9fa;
    border: 2px solid #eee;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

    .btn-copy:hover {
        border-color: var(--accent-main);
        background: var(--bg-main);
    }

.code-txt {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    color: var(--text-main);
}

/* Perforaciones (Círculos) */
.perforation {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--bg-main);
    border-radius: 50%;
    right: -11px;
}

    .perforation.top {
        top: -10px;
    }

    .perforation.bottom {
        bottom: -10px;
    }


.badge-status {
    font-size: 0.75rem;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

    .badge-status.open {
        background: #e6fffa;
        color: #2c7a7b;
        border: 1px solid #81e6d9;
    }

    .badge-status.closed {
        background: #fff5f5;
        color: #c53030;
        border: 1px solid #feb2b2;
    }

/* Botón Ver Menú */
.btn-menu {
    background: #472825;
    color: white;
    padding: 14px 28px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 800;
    transition: 0.3s;
    display: inline-block;
    text-align: center;
}

    .btn-menu:hover {
        background: #d3ab80;
        transform: scale(1.05);
    }

    .btn-menu.disabled {
        background: #96786f;
        opacity: 0.7;
    }

/* Efectos hover cards */
.cat-card-ref:hover {
    background: #fdf2e3 !important;
    border-color: #472825 !important;
    transform: translateY(-5px);
}

.res-card-ref:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(71, 40, 37, 0.1) !important;
}

/* --- CONTENEDOR DE FORMULARIOS (Feedback, Registro, etc.) --- */
.form-section {
    background-color: var(--crema-fondo);
    min-height: 90vh; /* Ocupa casi toda la pantalla para empujar el footer */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    width: 100%;
}

.form-container {
    background: white;
    width: 100%;
    max-width: 900px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

/* --- ESTILO DE LAS ESTRELLAS --- */
.rating-stars {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

    .rating-stars i {
        font-size: 2.5rem;
        color: #ddd; /* Color apagado */
        cursor: pointer;
        transition: all 0.3s ease;
    }

        /* Esta clase es la que activa el color cuando haces clic */
        .rating-stars i.active {
            color: #ffc107; /* Amarillo RappiDoz */
            transform: scale(1.2);
            filter: drop-shadow(0 0 5px rgba(255,193,7,0.4));
        }

        .rating-stars i:hover {
            color: #ffdb70;
        }

/* Contenedor Principal: Centrado y ancho */
.carrito-section {
    max-width: 1300px;
    margin: 120px auto 50px auto; /* Espacio para el navbar */
    padding: 0 20px;
}

.seccion-header h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 800;
}

/* El truco del diseño: Grid de dos columnas */
.carrito-container {
    display: grid;
    grid-template-columns: 1fr 380px; /* Productos a la izquierda, Resumen fijo a la derecha */
    gap: 30px;
    align-items: start;
}

/* Columna de Productos */
.carrito-lista {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.carrito-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: 1; /* Esto hace que la info se estire */
}

.item-img-container img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
}

.item-detalles h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

.categoria-tag {
    font-size: 0.75rem;
    background: #e8f5e9;
    color: #2ecc71;
    padding: 3px 10px;
    border-radius: 5px;
    font-weight: bold;
}

/* Columna del Resumen (Derecha) */
.resumen-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    position: sticky; /* Se queda fijo al bajar */
    top: 120px;
}

    .resumen-card h3 {
        margin-top: 0;
        margin-bottom: 25px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

.resumen-linea {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #7f8c8d;
}

.resumen-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f8f9fa;
    font-size: 1.5rem;
    font-weight: 800;
    color: #2c3e50;
}

.btn-finalizar {
    width: 100%;
    background: #2ecc71; /* Color verde Rappi'Doz */
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
}

    .btn-finalizar:hover:not(:disabled) {
        background: #27ae60;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
    }

/* -----------------------------------------------------------------
   Styles moved from Views/Navbar/busqueda.cshtml
   ----------------------------------------------------------------- */
.main-search {
    background-color: #fff4e2;
    min-height: 100vh;
    padding-top: 70px;
    font-family: 'Segoe UI', sans-serif;
}

.res-card-ref {
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #d3ab80;
    transition: 0.3s;
    width: 100%;
    max-width: 850px;
    margin: 0 auto 15px;
    box-shadow: 0 4px 12px rgba(71, 40, 37, 0.03);
}

.res-card-ref:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(71, 40, 37, 0.08); }

.res-img-container { width: 180px; height: 130px; flex-shrink: 0; position: relative; }
.res-info-body { padding: 15px 20px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.res-title { color: #472825; font-size: 1.25rem; margin: 0; font-weight: 800; }
.badge-status { font-size: 0.65rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; }
.badge-status.open { background: #e6f9ed; color: #27ae60; }
.badge-status.closed { background: #fceaea; color: #e74c3c; }
.btn-menu-slim { background: #472825; color: white !important; padding: 8px 18px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 0.9rem; transition: 0.3s; white-space: nowrap; }
.btn-menu-slim.disabled { background: #96786f; opacity: 0.7; }

@media (max-width: 768px) {
    .res-card-ref { flex-direction: row; max-width: 100%; }
    .res-img-container { width: 120px; height: 110px; }
    .res-info-body { padding: 10px; }
    .res-title { font-size: 1.1rem; }
    .hide-mobile { display: none; }
}

@media (max-width: 480px) {
    .res-info-body { gap: 5px; }
    .btn-menu-slim { padding: 6px 12px; font-size: 0.8rem; }
}

/* Utilities for busqueda view (replace inline styles) */
.main-search .hero-section { padding: 30px 20px; text-align: center; }
.main-search .hero-section .hero-inner { max-width:600px; margin:0 auto; }
.search-form { display:flex; align-items:center; background:white; padding:6px; border-radius:15px; border:2px solid #d3ab80; }
.search-form i { color:#d3ab80; margin:0 10px; }
.search-form input { flex-grow:1; border:none; outline:none; font-size:1rem; color:#472825; background:transparent; }
.search-form button { background:#472825; color:white; border:none; padding:10px 20px; border-radius:12px; font-weight:700; cursor:pointer; }
.results-section { padding: 0 15px 60px; max-width:900px; margin:0 auto; }
.results-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:15px; border-bottom:1px solid #d3ab80; padding-bottom:8px; }
.results-empty { text-align:center; padding:40px 20px; background:white; border-radius:20px; border:1px dashed #d3ab80; }
.res-card-ref[aria-hidden="true"] { opacity: 0.8; }
.res-img-container img { width:100%; height:100%; object-fit:cover; }
.location-info { color:#96786f; font-size:0.85rem; margin:2px 0; display:flex; align-items:center; gap:4px; }
.remove-link { color:#e74c3c; margin-left:10px; }

    .btn-finalizar:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

.qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f3f5;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.btn-qty {
    background: white;
    border: 1px solid #dee2e6;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    color: #495057;
}

    .btn-qty:hover:not(:disabled) {
        background: #2ecc71;
        color: white;
        border-color: #2ecc71;
        transform: scale(1.05);
    }

    .btn-qty:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        background: #e9ecef;
    }

.qty-number {
    font-weight: 800;
    min-width: 25px;
    text-align: center;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* --- CONTENEDOR DE SECCIÓN --- */
.cupones-section {
    background-color: var(--crema-fondo);
    min-height: 70vh; /* Asegura que el fondo crema cubra la pantalla */
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
}

/* --- CUADRÍCULA DE CUPONES --- */
.cupones-grid {
    display: grid;
    /* Esto crea las columnas automáticamente: si cabe, pone 2 o 3. Si no, pone 1 */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 50px auto; /* Centrado y espacio abajo */
    padding: 0 20px;
    width: 100%;
}

/* --- TARJETA ESTILO TICKET --- */
.cupón-card {
    background: white;
    display: flex;
    border-radius: 15px;
    border: 2px solid var(--soft-green);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: visible; /* Importante para las perforaciones */
}

    .cupón-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

/* Parte Izquierda (El descuento) */
.cupón-izq {
    background: var(--deep-dark);
    color: white;
    width: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 2px dashed var(--soft-green);
    border-radius: 13px 0 0 13px;
    padding: 10px;
}

/* Parte Derecha (Info) */
.cupón-der {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* El botón/placeholder del código */
.codigo-placeholder {
    margin-top: auto; /* Empuja el código al fondo de la tarjeta */
    background: #f8f9fa;
    border: 2px dashed var(--medium-green);
    color: var(--medium-green);
    text-align: center;
    padding: 8px;
    font-weight: 800;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

    .codigo-placeholder:hover {
        background: var(--medium-green);
        color: white;
    }

/* --- PERFORACIONES TIPO TICKET --- */
.cupón-card::before, .cupón-card::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--crema-fondo); /* Debe ser el mismo que el fondo de la página */
    border: 2px solid var(--soft-green);
    border-radius: 50%;
    left: 98px; /* Ajustado para que caiga sobre la línea discontinua */
    z-index: 2;
}

.cupón-card::before {
    top: -12px;
}

.cupón-card::after {
    bottom: -12px;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* ===== 1. SECCIÓN BUSCADOR PROTAGONISTA ===== */
.search-hero {
    background-image: linear-gradient(rgba(71, 40, 37, 0.4), rgba(71, 40, 37, 0.4)), url(/UI-HTML-CSS/img/index-img.avif);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 8%;
    border-radius: 0 0 50px 50px; /* Curva elegante en la base */
    box-shadow: 0 10px 40px rgba(71, 40, 37, 0.05);
    text-align: center;
}

.search-wrapper h1 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 40px;
    color: var(--text-main);
    line-height: 1.1;
}

.search-box-custom {
    background: var(--bg-main);
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 100px; /* Redondeado perfecto */
    max-width: 650px;
    margin: 0 auto;
    border: 2px solid var(--accent-soft);
    transition: all 0.3s ease;
}

    .search-box-custom:focus-within {
        border-color: var(--accent-main);
        box-shadow: 0 0 15px rgba(211, 171, 128, 0.3);
    }

.main-icon {
    color: var(--accent-main);
    font-size: 20px;
    margin-left: 15px;
}

.search-box-custom input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 15px;
    font-size: 18px;
    color: var(--text-main);
}

    .search-box-custom input::placeholder {
        color: var(--text-muted);
        opacity: 0.7;
    }

.btn-action-custom {
    background-color: var(--primary-dark, #472825);
    color: var(--white);
    border: none;
    padding: 12px 35px;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

    .btn-action-custom:hover {
        background-color: var(--secondary-earth, #96786f);
    }

/* ===== 2. SECCIÓN CATEGORÍAS FLUIDAS (Scroll-X) ===== */
.categories-fluid {
    background-color: var(--white);
    margin-top: 20px;
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
}

.scroll-container-custom {
    display: flex;
    gap: 15px;
    overflow-x: auto; /* Activamos el scroll horizontal */
    padding: 10px 5px 20px 5px;
    scrollbar-width: none; /* Ocultamos barra en Firefox */
}

    .scroll-container-custom::-webkit-scrollbar {
        display: none; /* Ocultamos barra en Chrome/Safari */
    }

.category-card-custom {
    flex: 0 0 auto; /* No permite que las tarjetas se encojan */
    background: var(--light-cream, #fff4e2);
    border: 1px solid var(--accent-soft);
    padding: 20px 25px;
    border-radius: 100px; /* Estilo 'píldora' */
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

    .category-card-custom i {
        font-size: 22px;
        color: var(--accent-main);
    }

    .category-card-custom span {
        font-weight: 600;
        font-size: 15px;
    }

    .category-card-custom:hover {
        background: var(--accent-main);
        color: var(--white);
        transform: translateY(-3px);
    }

        .category-card-custom:hover i {
            color: var(--white);
        }

/* ===== 3. SECCIÓN RESULTADOS MINIMALISTAS ===== */
.results-minimal {
    padding-top: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.view-all {
    text-decoration: none;
    color: var(--accent-main);
    font-weight: 600;
    font-size: 14px;
}

.grid-results-custom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.restaurant-card-minimal {
    background: var(--white);
    border-radius: 25px; /* Bordes muy redondeados */
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

    .restaurant-card-minimal:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 40px rgba(71, 40, 37, 0.12);
        border-color: var(--accent-soft);
    }

.img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
}

    .img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.rating-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .rating-badge i {
        color: #f1c40f; /* Color estrella estándar */
    }

.info-minimal {
    padding: 20px;
}

    .info-minimal h3 {
        font-size: 20px;
        margin-bottom: 5px;
        color: var(--text-main);
    }

.cuisine {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.delivery-info {
    font-size: 13px;
    color: var(--text-main);
    background: var(--light-cream, #fff4e2);
    padding: 6px 12px;
    border-radius: 50px;
    display: inline-block;
}

.cta-final h2 {
    color: var(--white);
}

/* Contenedor principal para centrar el ticket */
.factura-wrapper {
    background-color: #fde4bc; /* Fondo beige de Rappi'Doz */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 60px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Estilo del Ticket */
.ticket {
    background: white;
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    position: relative;
    box-shadow: 0 15px 35px rgba(71, 40, 37, 0.15);
    border: 1px solid #d3ab80;
}

    /* Efecto de corte de papel (Zig-Zag) inferior */
    .ticket::after {
        content: "";
        position: absolute;
        bottom: -15px;
        left: 0;
        width: 100%;
        height: 15px;
        background: linear-gradient(-45deg, white 8px, transparent 0), linear-gradient(45deg, white 8px, transparent 0);
        background-size: 16px 15px;
    }

/* Encabezado */
.ticket-header {
    text-align: center;
    border-bottom: 2px dashed #d3ab80;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.ticket-logo {
    font-size: 2.2rem;
    font-weight: 900;
    color: #472825;
    margin: 0;
}

.ticket-meta {
    color: #96786f;
    font-size: 0.85rem;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Detalles de productos */
.receipt-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #472825;
}

.product-name {
    font-weight: 600;
    flex: 1;
}

.product-price {
    font-weight: 800;
    margin-left: 10px;
}

/* Totales */
.totals-section {
    border-top: 2px solid #fde4bc;
    margin-top: 20px;
    padding-top: 20px;
}

.total-bold {
    font-size: 1.8rem;
    font-weight: 900;
    color: #472825;
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

/* Botón de acción */
.btn-next {
    display: block;
    width: 100%;
    background: #472825;
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 800;
    margin-top: 40px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(71, 40, 37, 0.2);
}

    .btn-next:hover {
        background: #d3ab80;
        transform: translateY(-3px);
    }

/* Decoración de círculos laterales de ticket */
.ticket-hole-left, .ticket-hole-right {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #fde4bc;
    border-radius: 50%;
    top: 70%;
}

.ticket-hole-left {
    left: -15px;
}

.ticket-hole-right {
    right: -15px;
}

.movimientos-container {
    background-color: #fde4bc;
    min-height: 100vh;
    padding: 120px 0 80px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.movimientos-card {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    padding: 50px; /* Más margen interno para la tarjeta principal */
    box-shadow: 0 15px 50px rgba(71, 40, 37, 0.15);
}

/* Estilo de cada fila de pedido */
/* -----------------------------------------------------------------
   Styles moved from Views/Navbar/carrito.cshtml
   ----------------------------------------------------------------- */
.super-contenedor-carrito { background-color: #fde4bc; min-height: 100vh; padding: 120px 20px 60px; }
.carrito-bordeado { max-width: 1050px; margin: auto; background: #fff4e2; padding: 40px; border-radius: 35px; border: 2px solid #d3ab80; box-shadow: 0 15px 35px rgba(71, 40, 37, 0.1); }
.seccion-cupones-superior { margin-bottom: 25px; border-bottom: 2px dashed #d3ab80; padding-bottom: 15px; }
.scroll-cupones { display: flex; gap: 12px; overflow-x: auto; padding: 10px 5px; scrollbar-width: thin; scrollbar-color: #d3ab80 transparent; }
.scroll-cupones::-webkit-scrollbar { height: 6px; }
.scroll-cupones::-webkit-scrollbar-thumb { background: #d3ab80; border-radius: 10px; }
.card-cupon { flex: 0 0 140px; background: white; border: 2px solid #d3ab80; border-radius: 15px; padding: 15px 10px; text-align: center; cursor: pointer; transition: all 0.3s ease; position: relative; }
.card-cupon:hover { background: #472825; border-color: #472825; transform: translateY(-4px); }
.card-cupon:hover span, .card-cupon:hover b { color: white !important; }
.card-cupon.cupon-activo { border-color: #27ae60 !important; background: #e8f5e9 !important; transform: scale(1.05); box-shadow: 0 5px 15px rgba(39, 174, 96, 0.2); }
.card-cupon.cupon-activo b { color: #27ae60 !important; }
.badge-aplicado { display: block; font-size: 0.65rem; color: #27ae60; font-weight: 900; margin-top: 5px; }
.card-cupon span { display: block; font-size: 0.7rem; font-weight: 800; color: #96786f; margin-bottom: 4px; text-transform: uppercase; }
.card-cupon b { display: block; font-size: 1.1rem; color: #472825; font-weight: 900; }
.item-carrito { background: white; border-radius: 22px; padding: 15px; display: flex; align-items: center; gap: 20px; margin-bottom: 15px; border: 1px solid #fde4bc; }
.img-carrito { width: 80px; height: 80px; object-fit: cover; border-radius: 15px; }
.control-cantidad { display: flex; align-items: center; background: #fde4bc; border-radius: 12px; padding: 5px; gap: 8px; }
.btn-qty { background: white; border: none; width: 28px; height: 28px; border-radius: 8px; color: #472825; font-weight: bold; cursor: pointer; }
.qty-number { font-weight: 900; color: #472825; min-width: 20px; text-align: center; }

@media (max-width: 992px) {
    div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    aside div[style*="position: sticky"] { position: relative !important; top: 0 !important; }
}

details {
    background: #ffffff;
    border: 2px solid #eecfa1;
    border-radius: 20px;
    margin-bottom: 25px; /* Más espacio entre pedidos */
    overflow: hidden;
    transition: all 0.3s ease;
}

summary {
    padding: 30px 40px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    background-color: #fff;
}

/* Textos principales del resumen (Más visibles) */
.orden-titulo {
    color: #472825; /* Marrón oscuro para contraste */
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
}

.orden-fecha {
    color: #6d4c41; /* Tono café más oscuro que el anterior */
    font-size: 1.05rem;
    margin-top: 5px;
}

/* --- EL CONTENEDOR DE LA FACTURA --- */
.factura-box {
    background-color: #ffffff;
    margin: 20px 40px 40px 40px; /* Mucho más margen lateral y funcional */
    padding: 40px;
    border: 2px solid #472825; /* Borde sólido oscuro para que resalte */
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

    .ticket-table th {
        border-bottom: 2px solid #472825;
        padding: 15px 10px;
        text-align: left;
        color: #472825;
        font-weight: 900;
        text-transform: uppercase;
        font-size: 0.9rem;
    }

    .ticket-table td {
        padding: 18px 10px;
        border-bottom: 1px solid #eee;
        color: #2c1816; /* Casi negro para máxima lectura */
        font-size: 1.1rem;
    }

/* Sección de Desglose */
.desglose-area {
    margin-top: 30px;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 12px;
}

.linea-factura {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #472825;
    font-size: 1.1rem;
    font-weight: 500;
}

.linea-total-bold {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 3px double #472825;
    color: #d32f2f; /* Rojo oscuro para el total, muy visible */
    font-size: 1.7rem;
    font-weight: 900;
}

.status-badge {
    background: #472825;
    color: white;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
}


.form-section {
    padding: 120px 10% 60px;
    background-color: var(--light-mint);
    min-height: 100vh;
}

.form-container {
    background: var(--white);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--shadow-standard);
    max-width: 1000px;
    margin: 0 auto;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.btn-back {
    text-decoration: none;
    color: var(--dark-green);
    font-weight: 600;
    transition: var(--transicion-suave);
}

    .btn-back:hover {
        color: var(--deep-dark);
    }

.form-header h2 {
    color: var(--deep-dark);
    font-size: 28px;
}


.form-main-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 40px;
}


.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-green);
    font-size: 14px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid var(--soft-green);
    border-radius: 15px;
    background-color: var(--light-mint);
    color: var(--deep-dark);
    font-size: 15px;
    outline: none;
    transition: var(--transicion-suave);
}

    .input-group input:focus,
    .input-group select:focus,
    .input-group textarea:focus {
        border-color: var(--medium-green);
        background-color: var(--white);
    }

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

Vista Previa
.form-preview {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-preview span {
    font-weight: 600;
    color: var(--dark-green);
    font-size: 14px;
}

Botones Inferiores
.form-actions-footer {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    padding-top: 30px;
    border-top: 2px solid var(--soft-green);
}

.btn-guardar {
    background-color: var(--deep-dark);
    color: var(--white);
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transicion-suave);
}

    .btn-guardar:hover {
        background-color: var(--medium-green);
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(71, 40, 37, 0.15);
    }

.btn-cancelar {
    background: none;
    border: none;
    color: var(--dark-green);
    font-weight: 600;
    cursor: pointer;
    padding: 10px;
}

    .btn-cancelar:hover {
        color: #d9534f;
    }


.form-group-foto {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    Asegura que la imagen se centre correctamente justify-content: center;
    align-items: center;
}

    .form-group-foto img {
        width: 120px;
        Ajusta el tamaño que desees, por ejemplo 120px o 150px height: 120px;
        IMPORTANTE: El alto debe ser igual al ancho para un círculo perfecto border-radius: 50%;
        Esto crea el efecto redondo object-fit: cover;
        Evita que la imagen se deforme o estire dentro del círculo border: 4px solid var(--soft-green);
        Añade el borde característico margin-bottom: 15px;
    }



.btn-menu, .btn-finalizar, .btn-next, .btn-guardar, .btn-action-custom,
.cupón-card, .restaurant-card-minimal, .carrito-item, .search-box-custom,
.btn-qty, .rating-stars i, details {
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Animaciones de entrada (Keyframes) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Aplicación de entrada suave a tus contenedores */
.form-container, .ticket, .carrito-container, .cupones-grid, .grid-results-custom {
    animation: fadeInUp 0.7s ease-out forwards;
}

/* Feedback táctil al hacer click en tus botones */
.btn-menu:active, .btn-finalizar:active, .btn-next:active, .btn-guardar:active {
    transform: scale(0.95);
}

/* Efectos de elevación en tus cards */
.cupón-card:hover, .restaurant-card-minimal:hover, .carrito-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(71, 40, 37, 0.12);
}

/* ============================================================
   3. INYECTOR RESPONSIVE (ARREGLA LO "PEGADO")
   ============================================================ */

/* Espaciado global para evitar que el contenido choque con el Navbar */
body {
    padding-top: 80px;
}

@media (max-width: 1024px) {
    .carrito-container {
        grid-template-columns: 1fr;
    }

    .resumen-card {
        position: static;
        width: 100%;
        margin-top: 20px;
    }

    .cupones-grid-container {
        grid-template-columns: 1fr;
    }

    .ticket-card {
        flex-direction: column;
    }

    .ticket-left {
        width: 100%;
        flex-direction: row;
        gap: 20px;
        border-radius: 20px 20px 0 0;
        border-right: none;
        border-bottom: 2px dashed rgba(255,255,255,0.3);
    }

    .ticket-right {
        border-radius: 0 0 20px 20px;
    }

    .perforation {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Ajuste de márgenes para móvil */
    section {
        padding: 30px 5%;
    }

    .search-hero {
        padding: 60px 5%;
        border-radius: 0 0 30px 30px;
    }

        .search-hero h1 {
            font-size: 26px;
        }

    /* Los Grids (Cupones, Resultados) pasan a 1 columna */
    .cupones-grid, .grid-results-custom {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Items de carrito se apilan */
    .carrito-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .item-info {
        flex-direction: column;
    }

    .qty-controls {
        justify-content: center;
    }

    /* El Ticket de factura ocupa el ancho total */
    .ticket {
        width: 100%;
        padding: 30px 15px;
    }

    /* Formularios de gestión */
    .form-main-grid {
        grid-template-columns: 1fr;
    }

    .form-actions-footer {
        flex-direction: column;
        width: 100%;
    }

    .btn-guardar, .btn-cancelar {
        width: 100%;
        padding: 15px;
    }

    .cupones-grid-container {
        grid-template-columns: 1fr;
    }

    .ticket-card {
        flex-direction: column;
    }

    .ticket-left {
        width: 100%;
        flex-direction: row;
        gap: 20px;
        border-radius: 20px 20px 0 0;
        border-right: none;
        border-bottom: 2px dashed rgba(255,255,255,0.3);
    }

    .ticket-right {
        border-radius: 0 0 20px 20px;
    }

    .perforation {
        display: none;
    }
}

@media (max-width: 480px) {
    /* Ajustes finos para pantallas muy pequeñas */
    .search-box-custom {
        flex-direction: column;
        border-radius: 25px;
        padding: 15px;
    }

        .search-box-custom input {
            width: 100%;
            text-align: center;
            margin: 10px 0;
        }

    .btn-action-custom {
        width: 100%;
    }

    .ticket-logo {
        font-size: 1.8rem;
    }

    .total-bold, .linea-total-bold {
        font-size: 1.4rem;
    }

    .cupones-grid-container {
        grid-template-columns: 1fr;
    }

    .ticket-card {
        flex-direction: column;
    }

    .ticket-left {
        width: 100%;
        flex-direction: row;
        gap: 20px;
        border-radius: 20px 20px 0 0;
        border-right: none;
        border-bottom: 2px dashed rgba(255,255,255,0.3);
    }

    .ticket-right {
        border-radius: 0 0 20px 20px;
    }

    .perforation {
        display: none;
    }
}