/* ======================================================= */
/* CERRODELIVERY - STYLE.CSS (ESTILOS GLOBALES Y BASE)     */
/* ======================================================= */

/* 1. FUENTES E IMPORTACIONES */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* 2. VARIABLES GLOBALES (GAMA DE COLORES CERRO DE PASCO) */
:root {
    /* Identidad de Marca */
    --primary-color: #d65a31;  /* Ladrillo / Cobre (Principal) */
    --secondary-color: #bf4d26; /* Tono más oscuro para hovers */
    
    /* Tonos Oscuros (Noche Cerreña) */
    --dark-blue: #222831; 
    --light-blue: #393e46;
    
    /* Textos y Fondos */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6; /* Gris Nieve suave */
    --white: #ffffff;
    
    /* Navbar Scrolled (Efecto Cristal Oscuro) */
    --navbar-scrolled-bg: rgba(34, 40, 49, 0.95);
    
    /* Sombras Globales */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --overlay-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
}

/* 3. RESET Y CONFIGURACIÓN BÁSICA */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden; /* Evita scroll horizontal indeseado */
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

/* 4. NAVBAR UNIFICADO (BASE PARA TODAS LAS PÁGINAS) */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.sticky-top {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1050;
    background: transparent; /* Transparente por defecto */
}

/* Estado "Scrolled" (Cuando bajas con el mouse) */
.navbar.sticky-top.navbar-scrolled {
    background: var(--navbar-scrolled-bg) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0.6rem 0;
}

.navbar-brand img {
    height: 40px; /* Tamaño consistente del logo */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Enlaces del menú */
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 0.95rem;
    margin: 0 5px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.navbar .nav-link:hover, 
.navbar .nav-link.active {
    color: #ffffff !important;
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Dropdown Menús */
.navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    margin-top: 10px;
    background-color: var(--white);
}

.navbar .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.navbar .dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Icono Hamburguesa (Móvil) */
.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.4rem 0.6rem;
}
.navbar-toggler:focus {
    box-shadow: none; /* Quitar borde azul feo por defecto */
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* 5. HERO Y LAYOUT GENERAL (Fallback para páginas sin index.css) */
.hero-quickbite {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50vh; /* Altura por defecto para páginas internas */
    padding-bottom: 80px; 
    background-size: cover;
    background-position: center;
    background-color: var(--dark-blue);
    color: #ffffff;
}

/* Overlay oscuro por defecto */
.hero-quickbite::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(34, 40, 49, 0.9), rgba(57, 62, 70, 0.8));
    z-index: 1;
}

.hero-quickbite .container {
    position: relative;
    z-index: 3;
    padding-top: 60px;
}

.main-content-overlay {
    background-color: var(--bg-light);
    position: relative;
    border-radius: 1.5rem 1.5rem 0 0;
    padding: 3rem 0;
    margin-top: -80px;
    z-index: 10;
    box-shadow: var(--overlay-shadow);
}

/* 6. COMPONENTES Y UTILIDADES */

/* Botones */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(214, 90, 49, 0.3);
}

/* Preloader */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #fff; z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
body.loaded #preloader { opacity: 0; visibility: hidden; }

/* 7. ESTILOS DE AUTENTICACIÓN (LOGIN/REGISTER) */
.auth-page {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; padding: 2rem;
    background: url('../img/plaza.jpg') center/cover no-repeat;
    position: relative;
}
.auth-page::before {
    content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.6); z-index: 1; /* Un poco más oscuro */
}
.auth-card {
    width: 100%; max-width: 420px; z-index: 2;
    border-radius: 1.5rem; border: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px); 
    background: rgba(255,255,255,0.95);
    padding: 2rem;
}

/* 8. BARRA DE SCROLL PERSONALIZADA */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #e5e7eb;
}
::-webkit-scrollbar-thumb {
    background-color: var(--light-blue); /* Gris oscuro azulado */
    border-radius: 6px;
    border: 2px solid #e5e7eb;
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color); /* Ladrillo al interactuar */
}

/* 9. RESPONSIVIDAD BASE */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--dark-blue);
        padding: 1rem;
        border-radius: 0 0 15px 15px;
        margin-top: 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    
    .hero-quickbite {
        padding-top: 80px;
        text-align: center;
    }
    
    .main-content-overlay {
        padding: 2rem 0;
    }
}