/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    /* Paleta de Colores */
    --bg-cream: #F9F7F2;
    --white: #ffffff;
    --text-black: #1F1F1F;
    --text-grey: #666666;
    
    /* Acentos */
    --accent-toast: #b5a28f;       /* Color Pan */
    --accent-toast-dark: #8c7b6b;  /* Color Corteza (textos) */
    --accent-success: #25D366;     /* WhatsApp / Éxito */
    
    /* Tipografía */
    --font-serif: 'Merriweather', serif;
    --font-sans: 'Poppins', sans-serif;
    
    /* Dimensiones */
    --navbar-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-black);
    font-family: var(--font-sans);
    line-height: 1.6;
    /* Evita que el navbar fijo tape contenido al inicio */
    padding-top: var(--navbar-height); 
}

/* =========================================
   2. TIPOGRAFÍA Y UTILIDADES
   ========================================= */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 20px; }

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
}

.text-center { text-align: center; }
.full-width { width: 100%; }

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in { animation: fadeIn 0.6s ease-out forwards; }

/* =========================================
   3. COMPONENTES GLOBALES (Botones)
   ========================================= */
/* Botón Principal (Negro) */
.btn-primary {
    background-color: var(--text-black);
    color: var(--bg-cream);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: var(--accent-toast);
    color: var(--white);
    transform: translateY(-2px);
}

/* Botón Secundario (Borde) */
.btn-secondary {
    background: transparent;
    border: 2px solid var(--text-black);
    color: var(--text-black);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-block;
}
.btn-secondary:hover {
    background: var(--text-black);
    color: var(--white);
}

/* Botón Invertido (Blanco para fondos oscuros) */
.btn-primary-invert {
    background-color: var(--white);
    color: var(--text-black);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    display: inline-block;
}
.btn-primary-invert:hover {
    background-color: var(--text-black);
    color: var(--white);
}

/* Botón Mini (Texto subrayado) */
.btn-mini {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--text-black);
    padding-bottom: 2px;
    cursor: pointer;
}
.btn-mini:hover {
    color: var(--accent-toast);
    border-color: var(--accent-toast);
}

/* Botón WhatsApp */
.btn-whatsapp {
    background-color: var(--accent-success);
    color: var(--white);
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 30px;
    font-weight: 600;
    margin-top: 20px;
}
.btn-whatsapp:hover {
    background-color: #1ebc57;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

/* Botón Google */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--white);
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: 0.2s;
}
.btn-google:hover { background: #f1f1f1; }
.btn-google img { width: 20px; height: 20px; }

/* =========================================
   4. LAYOUT GENERAL (Navbar y Footer)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--navbar-height); /* Altura fija */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(249, 247, 242, 0.98); /* Casi sólido */
    backdrop-filter: blur(8px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}
.nav-links a.active { color: var(--accent-toast); }
.nav-links a:hover { color: var(--accent-toast); }

.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }

footer {
    background-color: var(--text-black);
    color: var(--bg-cream);
    text-align: center;
    padding: 40px 20px;
    margin-top: auto; /* Push to bottom if content is short */
}

/* =========================================
   5. MÓDULO: PÁGINA DE INICIO
   ========================================= */
/* Hero Section */
.hero {
    height: 100vh; /* Pantalla completa */
    margin-top: calc(-1 * var(--navbar-height)); /* Compensa el padding-top del body */
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('https://images.unsplash.com/photo-1509440159596-0249088772ff?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--bg-cream);
}
.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; }

/* Estilo Carta / Menú */
.menu-section {
    background-color: var(--white);
    padding: 60px 40px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 10px 10px 0px rgba(181, 162, 143, 0.2);
    max-width: 900px;
    margin: 0 auto;
}

.divider-icon {
    text-align: center;
    margin: 30px 0;
    color: var(--accent-toast);
    position: relative;
}
.divider-icon::before, .divider-icon::after {
    content: ""; display: inline-block; width: 50px; height: 1px;
    background: var(--accent-toast); vertical-align: middle; margin: 0 15px; opacity: 0.5;
}

.menu-category {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    color: var(--accent-toast);
    margin-bottom: 30px;
    border-bottom: 2px solid var(--bg-cream);
    display: inline-block;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.menu-item-name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.2rem;
    padding-right: 10px;
    background: var(--white);
    z-index: 2;
}
.menu-dots {
    flex-grow: 1;
    border-bottom: 1px dotted #ccc;
    position: relative; top: -5px;
    margin: 0 10px;
}
.menu-item-price {
    font-weight: 600;
    color: var(--accent-toast-dark);
    font-size: 1.1rem;
    background: var(--white);
    padding-left: 10px;
    z-index: 2;
}
.menu-item-desc {
    font-size: 0.9rem;
    color: var(--text-grey);
    font-style: italic;
    margin-bottom: 25px;
    max-width: 85%;
}

.banner-offer {
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
    position: relative;
    background-color: var(--accent-toast); /* Fallback */
}

/* =========================================
   6. MÓDULO: PÁGINA DE PRODUCTO
   ========================================= */
.breadcrumbs {
    padding: 20px 0;
    font-size: 0.9rem;
    color: var(--text-grey);
}
.breadcrumbs span { color: var(--accent-toast); margin: 0 10px; }

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding-bottom: 80px;
}

.main-image-container {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.main-image-container img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.main-image-container:hover img { transform: scale(1.05); }

.thumbnail-row {
    display: flex; gap: 15px; margin-top: 20px;
}
.thumb {
    width: 80px; height: 80px; object-fit: cover;
    border-radius: 10px; cursor: pointer; opacity: 0.6;
    border: 2px solid transparent; transition: 0.3s;
}
.thumb:hover, .thumb.active { opacity: 1; border-color: var(--accent-toast); }

.product-title { font-size: 3rem; line-height: 1.1; margin: 15px 0; }
.price { font-size: 2rem; font-weight: 700; color: var(--accent-toast-dark); }

.radio-inputs { display: flex; gap: 15px; margin-top: 10px; }
.radio-box {
    border: 1px solid #ccc; padding: 10px 20px; border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.radio-box input:checked + span { font-weight: 600; color: var(--accent-toast); }

.quantity-selector {
    display: flex; align-items: center;
    border: 1px solid #ddd; border-radius: 30px; overflow: hidden;
}
.quantity-selector button {
    background: var(--white); border: none; padding: 0 15px;
    font-size: 1.2rem; cursor: pointer; height: 100%;
}
.quantity-selector input {
    width: 40px; text-align: center; border: none;
    font-weight: 600; font-size: 1.1rem; -moz-appearance: textfield;
}

.actions-group { display: flex; gap: 20px; margin-bottom: 20px; margin-top: 30px; }

/* Tabs */
.tabs-container { border-top: 1px solid #eee; padding-top: 20px; margin-top: 30px; }
.tab-headers { display: flex; gap: 30px; margin-bottom: 15px; border-bottom: 2px solid #eee; }
.tab-btn {
    background: none; border: none; padding-bottom: 10px;
    font-family: var(--font-serif); font-size: 1.1rem;
    cursor: pointer; color: #888;
}
.tab-btn.active {
    color: var(--text-black); font-weight: 700;
    border-bottom: 3px solid var(--accent-toast);
}
.tab-content { display: none; animation: fadeIn 0.5s; }
.tab-content.active { display: block; }

/* =========================================
   7. MÓDULO: AUTENTICACIÓN (Login/Registro)
   ========================================= */
.split-screen {
    display: flex;
    /* Ajustamos altura para descontar el navbar */
    min-height: calc(100vh - var(--navbar-height));
}

.split-image {
    flex: 1;
    background-image: url('../img/baguette.png');
    background-size: cover;
    background-position: center;
    position: relative;
}
.split-image::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.3);
}

.split-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-cream);
    padding: 40px;
}

.form-wrapper { width: 100%; max-width: 400px; }
.auth-title { font-size: 2.5rem; margin-bottom: 10px; }
.auth-subtitle { color: var(--text-grey); margin-bottom: 40px; }

/* Inputs Elegantes (Solo borde inferior) */
.input-elegant {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 2px solid #ddd;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 1rem;
    margin-bottom: 25px;
    transition: 0.3s;
}
.input-elegant:focus {
    outline: none;
    border-bottom-color: var(--accent-toast);
}
.input-label {
    font-size: 0.85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
}
.auth-link {
    color: var(--accent-toast-dark);
    font-weight: 600; text-decoration: underline;
}

.alert-message {
    background: #ffe6e6; color: #d63031;
    padding: 10px; border-radius: 8px; margin-bottom: 20px;
    border: 1px solid #ff7675; text-align: center;
}

/* =========================================
   8. FORMULARIOS GENERALES (Contacto)
   ========================================= */
.contact-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
}
.contact-form {
    background: var(--white); padding: 40px;
    border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
/* Inputs estándar (Cajas) */
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px;
    border: 1px solid #ddd; border-radius: 8px;
    background: var(--bg-cream); font-family: inherit;
}
.form-group input:focus { outline: none; border-color: var(--accent-toast); }

/* =========================================
   9. RESPONSIVE (MÓVIL Y TABLET)
   ========================================= */
@media (max-width: 900px) {
    /* Layout */
    .contact-grid, .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Navbar */
    .nav-links { display: none; } /* En JS se activaría */
    .hamburger { display: block; }

    /* Hero */
    .hero-content h1 { font-size: 2.5rem; }

    /* Auth Split Screen */
    .split-screen { flex-direction: column; }
    .split-image { display: none; } /* Ocultar imagen en móvil para cargar rápido */
    .split-form { padding: 60px 20px; }

    /* Producto */
    .main-image-container { height: 350px; }
    .product-title { font-size: 2rem; }
    .actions-group { flex-direction: column; }
    
    /* Menú Carta */
    .menu-section { padding: 30px 20px; }
    .menu-dots { display: none; } /* En móvil los puntos pueden verse mal */
    .menu-item { flex-direction: column; gap: 5px; }
    .menu-item-price { padding-left: 0; align-self: flex-start; }
}

/* =========================================
   10. NUEVO DISEÑO LOGIN (ESTILO TARJETA)
   ========================================= */

/* Fondo general de la página de login */
.login-body {
    background-color: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    padding-top: 0 !important; /* Sobrescribe el padding-top del body general */
}

.login-wrapper {
    width: 100%;
    max-width: 420px; /* Ancho similar a la imagen de referencia */
}

.login-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); /* Sombra suave y elegante */
    border: 1px solid rgba(0,0,0,0.02);
}

/* Header del Login */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.logo-text {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-black);
    margin-bottom: 5px;
    letter-spacing: 2px;
}
.login-header p {
    color: var(--text-grey);
    font-size: 0.9rem;
    font-style: italic;
}

/* Estilo de los Inputs (Réplica de referencia) */
.input-block {
    margin-bottom: 20px;
}

.input-block label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-grey);
    margin-bottom: 8px;
    text-transform: uppercase; /* MAYÚSCULAS COMO REFERENCIA */
    letter-spacing: 1px;
}

.input-box-styled {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; /* Para que el borde redondeado corte el fondo */
    transition: 0.3s;
}

.input-box-styled:focus-within {
    border-color: var(--accent-toast);
    box-shadow: 0 0 0 3px rgba(181, 162, 143, 0.2);
}

/* Parte del Icono (Izquierda) */
.icon-part {
    background-color: #F0EEE9; /* Un crema un poco más oscuro que el fondo general */
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-grey);
    border-right: 1px solid #eee;
}

/* Parte del Input (Derecha) */
.input-box-styled input {
    flex-grow: 1;
    border: none;
    padding: 12px 15px;
    outline: none;
    font-family: var(--font-sans);
    color: var(--text-black);
    background: #F9F9F9; /* Casi blanco */
}

/* Botón de Acción */
.btn-login-action {
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Separador */
.divider-text {
    text-align: center;
    margin: 25px 0;
    font-size: 0.85rem;
    color: #999;
    position: relative;
}
.divider-text::before, .divider-text::after {
    content: ""; display: inline-block; width: 30%; height: 1px;
    background: #eee; vertical-align: middle; margin: 0 10px;
}

/* Botones Sociales (Círculos pequeños) */
.social-login-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
}

.social-btn.google { color: #DB4437; } /* Color Google */
.social-btn.facebook { color: #4267B2; } /* Color FB */

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    border-color: currentColor; /* El borde toma el color del icono al hover */
}

/* Footer Links */
.login-footer-links {
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.login-footer-links a {
    color: var(--accent-toast-dark);
    font-weight: 600;
}

.back-link {
    display: block;
    margin-top: 15px;
    color: #999 !important; /* Gris suave */
    font-weight: 400 !important;
    font-size: 0.85rem;
    transition: 0.3s;
}
.back-link:hover { color: var(--text-black) !important; }