/* =========================================
   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:disabled {
    background-color: #ddd; color: #999; cursor: not-allowed; transform: none;
}
.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; }
.info-pill + .actions-group { margin-top: 14px; }

/* Franja informativa (mínimo de compra / lote de producción) */
.info-pill {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; color: #777; background: #f7f5f0;
    border-radius: 8px; padding: 9px 14px; margin-top: 14px;
    line-height: 1.5;
}
.info-pill i { color: var(--accent-toast); flex-shrink: 0; }
.info-pill-green {
    color: #1b7a43; background: #eafaf1; border: 1px solid #c8e6c9;
    font-weight: 600;
}
.info-pill-green i { color: #27ae60; }

/* Caja de "pedido grande/especial" — sutil por defecto, se destaca cuando
   la cantidad elegida cruza el umbral configurado (multiplicador × mínimo). */
.caja-pedido-especial {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    padding: 12px 4px; margin-bottom: 18px;
    border-top: 1px solid #eee; font-size: 0.85rem; color: #888;
    transition: 0.25s ease;
}
.caja-pedido-especial-texto { display: flex; align-items: center; gap: 8px; }
.caja-pedido-especial i.fa-star { color: #ddd; transition: 0.25s ease; }
.caja-pedido-especial #linkPedidoEspecial {
    display: inline-flex; align-items: center; gap: 6px;
    color: #666; font-weight: 600; text-decoration: none;
    padding: 6px 14px; border-radius: 20px; border: 1px solid #ddd;
    transition: 0.25s ease;
}
.caja-pedido-especial #linkPedidoEspecial:hover { border-color: #25D366; color: #1b7a43; }

.caja-pedido-especial--grande {
    background: linear-gradient(135deg,#eafaf1 0%,#e8f8ee 100%);
    border: 1.5px solid #25D366; border-top: 1.5px solid #25D366;
    border-radius: 10px; padding: 14px 18px; color: #1b7a43;
}
.caja-pedido-especial--grande i.fa-star { color: #D98C45; }
.caja-pedido-especial--grande #linkPedidoEspecial {
    background: #25D366; color: white; border-color: #25D366;
}
.caja-pedido-especial--grande #linkPedidoEspecial:hover { background: #20bd5a; color: white; }

/* ── Franja de confianza (reemplaza el bloque grande de "Nuestra Filosofía") */
.trust-strip { padding: 36px 20px; background: white; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.trust-strip-grid {
    display: flex; justify-content: center; align-items: stretch; gap: 0; flex-wrap: wrap;
}
.trust-item {
    display: flex; align-items: center; gap: 14px; padding: 10px 36px;
    border-right: 1px solid #eee; flex: 1 1 220px; max-width: 320px; justify-content: center;
}
.trust-item:last-child { border-right: none; }
.trust-item i { font-size: 1.5rem; color: var(--accent-toast); flex-shrink: 0; }
.trust-item strong { display: block; font-size: 0.9rem; color: #1F1F1F; margin-bottom: 2px; }
.trust-item span { display: block; font-size: 0.78rem; color: #999; }

@media (max-width: 700px) {
    .trust-strip-grid { flex-direction: column; align-items: center; }
    .trust-item { border-right: none; border-bottom: 1px solid #eee; width: 100%; max-width: 320px; padding: 16px 0; }
    .trust-item:last-child { border-bottom: none; }
}

/* ── Carrusel de "También te puede interesar" ─────────────────────────── */
.recomendados-section { padding: 60px 20px 80px; }
.recomendados-header { margin-bottom: 24px; }
.recomendados-header h2 {
    font-family: var(--font-serif); font-size: 1.7rem; font-weight: 700;
    color: var(--text-black); margin-bottom: 4px;
}
.recomendados-header p { color: #888; font-size: 0.9rem; }

.recomendados-wrapper { position: relative; display: flex; align-items: center; gap: 12px; }

.recomendados-track {
    display: flex; gap: 18px; overflow-x: auto; scroll-behavior: smooth;
    scroll-snap-type: x proximity; padding: 4px 2px 14px; flex: 1;
    scrollbar-width: thin; scrollbar-color: #ddd transparent;
}
.recomendados-track::-webkit-scrollbar { height: 6px; }
.recomendados-track::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }
.recomendados-track::-webkit-scrollbar-track { background: transparent; }

.recomendado-card {
    flex: 0 0 180px; scroll-snap-align: start; text-decoration: none; color: inherit;
    background: white; border: 1px solid #eee; border-radius: 12px; overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.recomendado-card:hover {
    transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--accent-toast);
}
.recomendado-img-wrap { position: relative; width: 100%; height: 140px; background: #f7f5f0; }
.recomendado-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recomendado-badge {
    position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.75); color: white;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.3px; padding: 3px 8px; border-radius: 4px;
}
.recomendado-card--agotado { opacity: 0.6; filter: grayscale(0.4); }
.recomendado-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.recomendado-nombre {
    font-size: 0.87rem; font-weight: 600; color: #333; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.4em;
}
.recomendado-precio { font-size: 0.95rem; font-weight: 700; color: #D98C45; }

.recomendados-nav {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #eee;
    background: white; color: #333; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.recomendados-nav:hover { background: #1F1F1F; color: white; border-color: #1F1F1F; }
.recomendados-wrapper--inicio .recomendados-nav--prev,
.recomendados-wrapper--fin .recomendados-nav--next { opacity: 0; pointer-events: none; }

@media (max-width: 600px) {
    .recomendados-nav { display: none; }
    .recomendado-card { flex-basis: 150px; }
    .recomendado-img-wrap { height: 120px; }
}

/* ── Selector de "cantidad de lotes" (compartido: simple y combinable) ──── */
.lote-simple { margin-top: 14px; margin-bottom: 6px; }
.lote-simple label,
.lote-combinable-header label {
    display: block; font-weight: 700; font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 0.5px; color: #555; margin-bottom: 8px;
}
.lotes-stepper {
    display: inline-flex; align-items: center; border: 1.5px solid #eee;
    border-radius: 30px; overflow: hidden; background: white;
}
.lotes-stepper button {
    background: white; border: none; width: 42px; height: 42px; font-size: 1.2rem;
    cursor: pointer; color: #333; transition: 0.15s;
}
.lotes-stepper button:hover { background: #f7f5f0; color: var(--accent-toast); }
.lotes-stepper input {
    width: 56px; text-align: center; border: none; border-left: 1.5px solid #eee;
    border-right: 1.5px solid #eee; font-weight: 700; font-size: 1.05rem;
    height: 42px; -moz-appearance: textfield; color: #1F1F1F;
}
.lotes-stepper input::-webkit-outer-spin-button,
.lotes-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lote-simple small, .lote-combinable-header small { display: block; margin-top: 8px; color: #999; font-size: 0.78rem; }

.actions-group--sinselector { margin-top: 18px; }

/* ── Repartidor de sabores (lote combinable) ──────────────────────────── */
.lote-combinable { margin: 20px 0; background: #fdfdfd; border: 1px solid #eee; border-radius: 14px; padding: 20px; }
.lote-combinable-header { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px dashed #e5e5e5; }

.repartidor-titulo {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
    font-size: 0.85rem; color: #555; margin-bottom: 14px;
}
.repartidor-contador {
    font-weight: 700; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem;
    background: #f0f0f0; color: #888; transition: 0.2s;
}
.repartidor-contador--ok { background: #eafaf1; color: #27ae60; }
.repartidor-contador--mal { background: #fdecea; color: #c0392b; }

.repartidor-fila {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid #f3f3f3;
}
.repartidor-fila:last-child { border-bottom: none; }
.repartidor-nombre { font-size: 0.9rem; font-weight: 600; color: #333; }

.repartidor-stepper { display: inline-flex; align-items: center; border: 1.5px solid #eee; border-radius: 24px; overflow: hidden; flex-shrink: 0; }
.repartidor-stepper button {
    background: white; border: none; width: 32px; height: 32px; font-size: 1rem; cursor: pointer; color: #333;
}
.repartidor-stepper button:hover { background: #f7f5f0; color: var(--accent-toast); }
.repartidor-stepper input {
    width: 44px; text-align: center; border: none; border-left: 1.5px solid #eee; border-right: 1.5px solid #eee;
    font-weight: 700; font-size: 0.92rem; height: 32px; -moz-appearance: textfield;
}
.repartidor-stepper input::-webkit-outer-spin-button,
.repartidor-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (max-width: 480px) {
    .lotes-stepper button, .lotes-stepper input { height: 38px; }
    .repartidor-titulo { flex-direction: column; align-items: flex-start; }
}

/* 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; }

/* =========================================
   11. NUEVO CATALOGO (ESTILO GRID / TARJETAS)
   ========================================= */

/* El contenedor de la cuadrícula */
.catalog-grid {
    display: grid;
    /* Esto crea columnas automáticas que se ajustan (mínimo 250px de ancho) */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 30px;
    margin-top: 30px;
}

/* La Tarjeta Individual */
.card-modern {
    background-color: var(--white);
    border: 1px solid rgba(0,0,0,0.05); /* Borde muy sutil */
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--accent-toast);
}

/* Imagen del producto */
.card-img-wrapper {
    width: 100%;
    height: 250px; /* Altura fija para que todas se vean iguales */
    overflow: hidden;
    position: relative;
    background-color: #f4f4f4;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el espacio sin deformar */
    transition: transform 0.5s ease;
}

.card-modern:hover .card-img-wrapper img {
    transform: scale(1.05);
}

/* Contenido (Texto) */
.card-body {
    padding: 20px 15px;
    text-align: left; /* Alineado a la izquierda como la referencia */
    flex-grow: 1; /* Empuja el selector hacia abajo */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 5px;
    line-height: 1.3;
}

.card-price {
    font-size: 1.1rem;
    color: var(--accent-toast); /* Naranja tostado */
    font-weight: 700;
    margin-bottom: 15px;
}

/* El Selector de Cantidad ( - 0 + ) */
.card-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 5px;
    margin-top: auto; /* Se pega al fondo */
    background: white;
}

.btn-counter {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-counter:hover {
    color: var(--text-black);
    background-color: #f9f9f9;
    border-radius: 4px;
}

.counter-display {
    font-weight: 600;
    color: var(--text-black);
    font-size: 1rem;
}

/* Enlace invisible que cubre la imagen y título para ir al detalle */
.card-link-overlay {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   12. CARRITO DESLIZANTE (SLIDE-OUT)
   ========================================= */

/* Fondo oscuro transparente */
.cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none; /* Oculto por defecto */
    backdrop-filter: blur(2px);
}
.cart-overlay.active { display: block; }

/* El Panel Lateral */
.cart-sidebar {
    position: fixed; top: 0; right: -400px; /* Escondido a la derecha */
    width: 350px; height: 100vh;
    background: var(--bg-cream);
    z-index: 2001;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s ease; /* Animación suave */
    display: flex; flex-direction: column;
}
.cart-sidebar.open { right: 0; } /* Clase para mostrarlo */

/* Cabecera del Carrito */
.cart-header-panel {
    padding: 20px;
    background: var(--white);
    border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.cart-header-panel h3 { font-family: var(--font-serif); margin: 0; }
.close-cart {
    background: none; border: none; font-size: 2rem; cursor: pointer; line-height: 1;
}

/* Lista de Items */
.cart-items-container {
    flex-grow: 1; overflow-y: auto; padding: 20px;
}

/* Item Individual */
.cart-item {
    display: flex; gap: 15px; margin-bottom: 20px;
    background: white; padding: 10px; border-radius: 8px;
    border: 1px solid #f0f0f0; position: relative;
}
.cart-item img {
    width: 60px; height: 60px; object-fit: cover; border-radius: 5px;
}
.cart-item-details { flex-grow: 1; }
.cart-item-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 5px; }
.cart-item-price { color: var(--accent-toast); font-weight: 600; font-size: 0.9rem; }
.cart-item-meta { font-size: 0.72rem; color: #999; margin-top: 3px; line-height: 1.4; }
.cart-item-meta--warn { color: #c0392b; font-weight: 600; }

/* Controles Pequeños (+ - Basura) */
.cart-controls {
    display: flex; align-items: center; gap: 10px; margin-top: 5px;
}
.btn-qty-mini {
    width: 20px; height: 20px; border-radius: 50%; border: 1px solid #ccc;
    background: white; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.btn-delete-item {
    position: absolute; top: 10px; right: 10px;
    color: #ff7675; cursor: pointer; font-size: 0.9rem;
}

/* Footer (Total y Botón) */
.cart-footer-panel {
    padding: 20px; background: white; border-top: 1px solid #eee;
}
.cart-total {
    display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700;
    margin-bottom: 15px; border-bottom: 1px dashed #ddd; padding-bottom: 15px;
}

/* Responsive Móvil */
@media (max-width: 500px) {
    .cart-sidebar { width: 100%; right: -100%; }
}

/* =========================================
   13. ANIMACIÓN: Shake para mínimo de compra
   ========================================= */
@keyframes shake-no {
    0%   { transform: translateX(0); }
    15%  { transform: translateX(-5px); }
    30%  { transform: translateX(5px); }
    45%  { transform: translateX(-4px); }
    60%  { transform: translateX(4px); }
    75%  { transform: translateX(-2px); }
    90%  { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

.shake-no {
    animation: shake-no 0.4s ease;
    border-color: #e74c3c !important;
    color: #e74c3c !important;
}

/* ==================================================== */
/* COMPONENTES EXTRAÍDOS (index, catalogo, checkout) */
/* ==================================================== */

/* Grid Responsivo */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px; margin-top: 30px; width: 100%; }

/* Tarjeta de Producto (Simple) */
.product-card-simple { background: #fff; border: 1px solid #eee; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: transform 0.3s; }
.product-card-simple:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-color: var(--accent-toast); }
.card-img-top { width: 100% !important; height: 220px !important; object-fit: cover; display: block; }
.card-body-simple { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title-simple { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: #333; text-decoration: none; }
.card-desc-simple { font-size: 0.85rem; color: #666; margin-bottom: 20px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer-simple { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #f9f9f9; }
.card-price-simple { font-size: 1.2rem; font-weight: 700; color: #D98C45; }
.btn-icon-add { width: 35px; height: 35px; border-radius: 50%; background: #1F1F1F; color: white; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: 0.3s; border: none; cursor: pointer; }
.btn-icon-add:hover { background: #D98C45; }
.btn-disabled { background: #eee !important; color: #999 !important; cursor: default; }

/* Buscador y Filtros */
.catalog-controls { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); margin-bottom: 40px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.search-box { position: relative; flex-grow: 1; max-width: 400px; }
.search-box input { width: 100%; padding: 12px 15px 12px 40px; border: 1px solid #ddd; border-radius: 50px; outline: none; transition: 0.3s; }
.search-box input:focus { border-color: var(--accent-toast); box-shadow: 0 0 0 3px rgba(217, 140, 69, 0.1); }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #999; }
.filter-group { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn { background: #f4f4f4; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-size: 0.9rem; transition: 0.3s; color: #555; }
.filter-btn:hover { background: #e0e0e0; }
.filter-btn.active { background: var(--accent-toast); color: white; font-weight: 600; }

/* Paginación */
.pagination-container { display: flex; justify-content: center; gap: 10px; margin-top: 50px; }
.page-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid #ddd; background: white; border-radius: 50%; cursor: pointer; transition: 0.3s; }
.page-btn:hover { border-color: var(--accent-toast); color: var(--accent-toast); }
.page-btn.active { background: var(--accent-toast); color: white; border-color: var(--accent-toast); }

/* Badges flotantes */
.badge-overlay { position: absolute; top: 10px; padding: 4px 10px; font-size: 0.75rem; font-weight: bold; border-radius: 4px; color: white; z-index: 10; }
.badge-agotado { right: 10px; background: rgba(0,0,0,0.8); }
.badge-oferta { left: 10px; background: var(--accent-toast); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }

/* Animación */
.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Checkout Grid */
.checkout-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
@media (max-width: 768px) { .checkout-grid { grid-template-columns: 1fr; } }