/* =========================
   THEME TOKENS (DARK/LIGHT)
   ========================= */
:root {
    --color-aqua: #00cccc;
    --color-purple: #67528a;
    --color-red: #ff3b3b;
    --color-gold: #d4af37;

    /* defaults (dark) */
    --bg: #141414;
    --text: #ffffff;
    --muted: rgba(255,255,255,0.65);
    --bg-card: #1f1f1f;
    --border: rgba(255,255,255,0.10);
    --nav-bg: rgba(20,20,20,0.90);
}

html[data-theme="light"]{
    --bg: #f6f7fb;
    --text: #151515;
    --muted: rgba(10,10,10,0.60);
    --bg-card: #ffffff;
    --border: rgba(0,0,0,0.10);
    --nav-bg: rgba(246,247,251,0.85);
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Libre Franklin', sans-serif;
    padding-top: 170px;
    padding-bottom: 120px;
    overflow-x: hidden;
    transition: background-color .35s ease, color .35s ease;
}

/* --- NAVBAR --- */
.navbar-custom {
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--color-purple);
    z-index: 1050;
    transition: background .35s ease, border-color .35s ease;
}

.brand-text{
    color: var(--color-aqua);
    font-weight: 900;
    letter-spacing: 0.5px;
    margin: 0;
}

.nav-pills .nav-link {
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50px;
    margin: 4px;
    transition: 0.25s ease;
    font-weight: 700;
    font-size: 0.85rem;
    background: transparent;
}

.nav-pills .nav-link:hover{
    transform: translateY(-1px);
}

.nav-pills .nav-link.active {
    background-color: var(--color-aqua);
    color: #0b0b0b;
    border-color: var(--color-aqua);
    box-shadow: 0 0 20px rgba(0, 204, 204, 0.35);
}

/* --- THEME TOGGLE BUTTON --- */

.theme-toggle{
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text);
      border-radius: 999px;
      padding: 10px 12px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      transition: transform .2s ease, background .2s ease, border-color .2s ease;
      position: static;   /* <- importante */
    }

.theme-toggle:hover{ transform: translateY(-1px); }
.theme-toggle .chip{
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(0,0,0,0.25);
    display: grid;
    place-items: center;
    backdrop-filter: blur(8px);
    transition: transform .35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
html[data-theme="light"] .theme-toggle .chip{
    background: rgba(255,255,255,0.75);
}
.theme-toggle.theme-bounce .chip{
    transform: rotate(14deg) scale(1.12);
}

/* --- ANIMACIÓN DE APARICIÓN AL HACER SCROLL --- */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
    will-change: transform, opacity;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Animación premium al filtrar (stagger) --- */
@keyframes fadeUpIn {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeDownOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(10px) scale(0.98); }
}

/* --- TARJETAS CON ZOOM MEJORADO --- */
.card-menu {
    background: var(--bg-card);
    border: none;
    border-radius: 25px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-bottom 0.35s ease, background .35s ease;
    position: relative;
    border-bottom: 0px solid var(--color-aqua);
}
.card-menu .card-body h5{
      color: var(--text);
      transition: color .35s ease;
    }


.image-container {
    overflow: hidden;
    height: 250px;
    position: relative;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0, 0, 0.2, 1);
}

.card-menu:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 204, 204, 0.16);
    border-bottom: 5px solid var(--color-aqua);
}

.card-menu:hover .card-img-top {
    transform: scale(1.2) rotate(2deg);
}

.text-muted{ color: var(--muted) !important; transition: color .35s ease; }

/* Efecto Destello al seleccionar desde favoritos */
@keyframes highlightPulse {
    0% { box-shadow: 0 0 0px var(--color-purple); transform: scale(1); }
    50% { box-shadow: 0 0 40px var(--color-purple); transform: scale(1.05); }
    100% { box-shadow: 0 0 0px var(--color-purple); transform: scale(1); }
}
.item-highlight {
    animation: highlightPulse 1s ease-out;
    border: 2px solid var(--color-purple) !important;
}

/* --- CORAZÓN TIPO INSTAGRAM + POP --- */
.btn-heart {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.35);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: white;
    z-index: 10;
    transition: 0.25s ease;
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
}
html[data-theme="light"] .btn-heart{
    background: rgba(255,255,255,0.65);
    color: #111;
}

.btn-heart.active {
    color: var(--color-red);
    background: white;
    transform: scale(1.10);
}

@keyframes heartPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.28); }
    100% { transform: scale(1.10); }
}
.btn-heart.pop { animation: heartPop 260ms ease-out; }

/* --- DOCK DE FAVORITOS --- */
.fav-dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(160%);
    width: 90%;
    max-width: 560px;
    background: rgba(31, 31, 31, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 10px 16px;
    border: 1px solid var(--color-aqua);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
}
html[data-theme="light"] .fav-dock{
    background: rgba(255,255,255,0.88);
}
.fav-dock.show { transform: translateX(-50%) translateY(0); }

.fav-item {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-purple);
    cursor: pointer;
    transition: 0.25s ease;
    flex-shrink: 0;
}
.fav-item:hover {
    transform: scale(1.10) translateY(-5px);
    border-color: var(--color-aqua);
}

/* animación al renderizar favoritos (stagger) */
.fav-item.in {
    animation: fadeUpIn 420ms cubic-bezier(0.17, 0.55, 0.55, 1) both;
}

.dock-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 5px;
    scrollbar-width: none;
}
.dock-scroll::-webkit-scrollbar { display: none; }

.brand-wrap{
  gap: 12px;
  min-width: 0; /* evita problemas en pantallas chicas */
}

.brand-logo{
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px; /* opcional */
  flex-shrink: 0;
}

/* Opcional: en móviles, un poquito más chico */
@media (max-width: 420px){
  .brand-logo{ width: 36px; height: 36px; }
  .brand-text{ font-size: 1.2rem; }
}

/* --- ESTILOS PARA LAS TAGS (Agrega esto en tu CSS) --- */
.badges-container {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column; /* Apilados verticalmente para no tapar la foto */
    gap: 6px;
    z-index: 5;
    pointer-events: none; /* Permite hacer clic en la foto aunque el mouse esté sobre el badge */
}

.badge-custom {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
}

/* Colores específicos usando tus variables */
.bg-chef { background: var(--color-purple); }
.bg-veggie { background: var(--color-aqua); color: #000; } /* Letra negra para contraste */
.bg-picoso { background: var(--color-red); }
.bg-unico { background: var(--color-gold); }


/* --- BANNER DE SALUD / BIENVENIDA --- */
.health-banner {
    background: linear-gradient(90deg, rgba(0, 204, 204, 0.05) 0%, rgba(103, 82, 138, 0.05) 100%);
    border: 1px solid var(--border);
    border-left: 4px solid var(--color-aqua); /* Acento visual */
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeUpIn 0.8s ease-out forwards; /* Tu misma animación de entrada */
}

.health-banner p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    font-weight: 500;
}

/* Icono de fondo decorativo */
.health-icon-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 5rem;
    color: var(--color-aqua);
    opacity: 0.05;
    transform: rotate(-15deg);
    pointer-events: none;
}

/* Resaltar palabras clave */
.highlight-text {
    color: var(--color-aqua);
    font-weight: 800;
}

/* --- ESTILOS DESCUENTOS --- */
.discount-select {
    background-color: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    outline: none;
    max-width: 130px;
}

/* Contenedor del precio para manejar dos líneas */
.price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
}

/* Precio original tachado (solo aparece con descuento) */
.old-price {
    text-decoration: line-through;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 2px;
    display: none; /* Oculto por defecto */
}

/* Cuando hay descuento activo */
.has-discount .old-price { display: block; }
.has-discount .current-price { color: var(--color-red); } /* Precio nuevo en rojo o color destacado */

/* --- ESTILOS HORARIO HEADER --- */
.brand-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hours-sub {
    font-size: 0.75rem; /* Pequeño pero legible */
    color: var(--muted);
    font-weight: 600;
    margin-top: -2px; /* Pegadito al título */
    white-space: nowrap; /* Que no se rompa la línea */
}

/* Indicador visual pequeño */
.dot-status {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--muted);
    margin-right: 4px;
    margin-bottom: 1px;
}


/* Estilos para estado AGOTADO en Menú */
.card-menu.agotado {
    filter: grayscale(100%);     /* Blanco y negro */
    opacity: 0.75;               /* Un poco transparente */
    pointer-events: none;        /* Bloquea clicks en el corazón y enlaces */
    user-select: none;           /* No permite seleccionar texto */
}

/* El sello rojo sobre la imagen */
.agotado-badge-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background-color: rgba(220, 53, 69, 0.95); /* Rojo intenso */
    color: white;
    padding: 8px 20px;
    font-weight: 900;
    font-size: 1.2rem;
    text-transform: uppercase;
    border: 3px solid white;
    border-radius: 4px;
    z-index: 20; /* Por encima de badges de Chef/Veggie */
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    white-space: nowrap;
}