﻿:root {
  --bg:          #faf6ef;
  --bg-2:        #ede5d4;
  --gold:        #5A3217;
  --gold-dark:   #3d1f0a;
  --gold-faint:  rgba(90,50,23,.08);
  --green:       #80BA27;
  --brown:       #5A3217;
  --cream:       #1e0e05;
  --cream-muted: #7a5c40;
  --divider:     rgba(90,50,23,.15);
  --radius:      8px;
  --radius-sm:   6px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--cream);
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#menu-app {
  max-width: 780px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

/* ─── ESTADOS ────────────────────────────────────────────── */
.state-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg);
  color: var(--cream-muted);
}

.loading-dot {
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .3; transform: scale(.8); }
  50%       { opacity: 1;  transform: scale(1.2); }
}

.state-icon  { font-size: 40px; }
.state-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; color: var(--gold); }
.state-text  { font-size: 15px; color: var(--cream-muted); }

/* ─── HEADER ─────────────────────────────────────────────── */
header {
  background: var(--bg);
  padding: 56px 24px 44px;
  text-align: center;
  border-bottom: 1px solid var(--divider);
  position: relative;
}

.header-logo-img {
  width: 150px;
  max-width: 58%;
  height: auto;
  display: block;
  margin: 0 auto 32px;
  opacity: .92;
  filter: brightness(1.05);
}

.header-divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 20px;
  opacity: .45;
}

.header-sub {
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 5px;
  color: var(--cream-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.header-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 7px;
  line-height: 1;
}

/* ─── LEYENDA INLINE (oculta) ────────────────────────────── */
.legend { display: none; }

/* ─── LEYENDA STICKY DERECHA ────────────────────────────── */
.legend-sticky {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 6px;
  background: rgba(250,246,239,.96);
  border: 1px solid var(--divider);
  border-right: none;
  border-radius: 8px 0 0 8px;
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: padding .25s ease;
}

.legend-item-sticky {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: default;
  overflow: hidden;
}

.legend-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: .3px;
  transition: max-width .3s ease, opacity .3s ease, margin .3s ease;
  margin-right: 0;
}

.legend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.legend-sticky:hover              { padding: 10px 13px 10px 15px; }
.legend-sticky:hover .legend-label { max-width: 90px; opacity: 1; margin-right: 8px; }
.legend-sticky.expanded            { padding: 10px 13px 10px 15px; }
.legend-sticky.expanded .legend-label { max-width: 90px; opacity: 1; margin-right: 8px; }

/* ─── NAVEGACIÓN ─────────────────────────────────────────── */
.nav-tabs-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-2);
  border-bottom: 1px solid var(--divider);
}

.nav-tabs {
  display: flex;
  overflow-x: auto;
  padding: 0 20px;
  gap: 0;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  flex-shrink: 0;
  padding: 17px 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--cream-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
}
.nav-tab:hover { color: var(--cream); }
.nav-tab.active {
  color: var(--gold);
  border-bottom-color: #eed521;
}

/* ─── SECCIONES ──────────────────────────────────────────── */
main { padding: 0 0 80px; }

.section { display: none; animation: fadeIn .3s ease; }
.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── CATEGORÍAS ─────────────────────────────────────────── */
.cat-header {
  padding: 44px 28px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.cat-header h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--gold);
  white-space: nowrap;
}
.cat-line {
  flex: 1;
  height: 1px;
  background: var(--divider);
}

/* ─── ITEMS ──────────────────────────────────────────────── */
.items-list { padding: 0 28px 20px; }

.menu-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  transition: opacity .2s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { opacity: .75; }

.item-left { flex: 1; min-width: 0; }

.item-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.item-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.2;
  letter-spacing: .1px;
}

.item-desc    { font-size: 15px; color: var(--cream-muted); line-height: 1.5; margin-bottom: 4px; }
.item-desc-fr { font-size: 13px; color: rgba(90,50,23,.38); font-style: italic; line-height: 1.3; }

.item-price {
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 5px;
  letter-spacing: .3px;
}

.item-tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--tag-color, #80BA27);
  opacity: .85;
  flex-shrink: 0;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 32px 24px 48px;
  font-size: 13px;
  color: var(--cream-muted);
  border-top: 1px solid var(--divider);
  margin-top: 20px;
  line-height: 1.9;
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 12px;
  letter-spacing: .5px;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 720px) {
  header         { padding: 44px 20px 34px; }
  .header-label  { font-size: 22px; letter-spacing: 5px; }
  .nav-tab       { padding: 15px 16px; font-size: 11px; letter-spacing: 1.2px; }
  .items-list    { padding: 0 20px 14px; }
  .cat-header    { padding: 36px 20px 14px; }
  .item-name     { font-size: 17px; }
  .item-desc     { font-size: 14px; }
  .menu-item     { gap: 16px; }
}
