/* ============================================================
   4A CERÁMICA — Navegación
   Logo izq · Secciones centro · WhatsApp + idioma der
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 var(--gutter);
  gap: 1rem;
  background: rgba(22,16,12,0);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-slow) var(--ease),
              border-color var(--dur-slow) var(--ease),
              height var(--dur-mid) var(--ease);
}
.nav.scrolled {
  background: color-mix(in oklab, #2a201a 78%, transparent);
  backdrop-filter: blur(10px);
  border-color: var(--border);
  box-shadow: 0 1px 0 rgba(236,225,205,.10), 0 10px 30px rgba(0,0,0,.18);
  height: 62px;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav__logo-img {
  height: 40px;
  width: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid rgba(200,169,110,0.5);
  background: rgba(237,231,220,0.92);
  transition: all var(--dur-mid) var(--ease);
}
.nav.scrolled .nav__logo-img { height: 38px; width: 38px; }

/* Links centrados */
.nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 2.2rem);
}
.nav__links a {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur-fast);
  position: relative;
  white-space: nowrap;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 100%;
  height: 1px;
  background: var(--terra);
  transition: right var(--dur-mid) var(--ease);
}
.nav__links a:hover,
.nav__links a.active { color: var(--text-pale); }
.nav__links a:hover::after,
.nav__links a.active::after { right: 0; }

/* Derecha: idioma + WA */
.nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav__wa {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--terra);
  padding: 6px 14px;
  white-space: nowrap;
  transition: background var(--dur-mid) var(--ease);
}
.nav__wa:hover { background: var(--bg-warm); }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 2px 0;
}
.nav__hamburger span {
  display: block;
  height: 1px;
  background: var(--text-arena);
  transition: all var(--dur-mid) var(--ease);
}
.nav__hamburger span:nth-child(2) { width: 70%; }
.nav__hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Menú móvil */
.nav__mobile {
  position: fixed;
  inset: 0;
  background: rgba(22,16,12,0.98);
  z-index: 490;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease);
}
.nav__mobile.open { opacity: 1; pointer-events: all; }
.nav__mobile a {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--text-pale);
  letter-spacing: 0.02em;
  transition: color var(--dur-fast);
}
.nav__mobile a:hover { color: var(--gold); }
.nav__mobile .nav__wa {
  margin-top: 1rem;
  font-size: var(--text-sm);
  padding: 10px 28px;
}
.nav__mobile-lang {
  margin-top: 1.5rem;
  gap: 0;
}
.nav__mobile-lang .lang-btn {
  font-size: var(--text-sm);
  padding: 8px 22px;
  letter-spacing: 0.2em;
}


/* ── Tabbar móvil ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none;
  height: 62px;
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in oklab, #2a201a 86%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(236,225,205,.12);
}
@media (max-width: 860px) { .tabbar { display: flex; } }

.tabbar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; color: var(--text-muted);
  text-decoration: none; min-height: 44px; position: relative;
  background: none; border: none; font-family: inherit; cursor: pointer;
  transition: color .25s var(--ease);
}
.tabbar__item.active { color: var(--terra); }
.tabbar__item.active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 2px; background: var(--terra); border-radius: 2px;
}
.tabbar__ic { display: block; flex-shrink: 0; }
.tabbar__lb {
  font-size: 8.5px; line-height: 1; letter-spacing: .05em;
  text-transform: uppercase; font-family: var(--font-body); font-weight: 500;
}
.tabbar__badge {
  position: absolute; top: 6px; right: calc(50% - 20px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  background: var(--terra); color: #fff; font: 10px/16px var(--font-body);
  text-align: center; display: none;
}
.tabbar__badge.show { display: block; }

/* ── FAB WhatsApp (solo móvil) ── */
.fab-wa {
  position: fixed; right: 16px; bottom: 78px; z-index: 61;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--terra); color: #fff;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(184,108,42,.42);
  transition: opacity .3s, transform .3s;
}
@media (max-width: 860px) { .fab-wa { display: flex; } }
.fab-wa.hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }

/* Ocultar cart-fab en móvil (lo reemplaza tabbar "Selección") */
@media (max-width: 860px) { .cart-fab { display: none !important; } }

/* Padding extra en body para que el footer no quede tapado por tabbar */
@media (max-width: 860px) { body { padding-bottom: 62px; } }

@media (max-width: 900px) {
  .nav { grid-template-columns: auto 1fr auto; }
  .nav__links { display: none; }
  .nav__right { grid-column: 2; justify-content: flex-end; }
  .nav__right .lang-toggle { display: none; }
  .nav__hamburger { display: flex; grid-column: 3; grid-row: 1; }
}

@media (max-width: 480px) {
  .nav__wa { display: none; }
  .nav__right { display: none; }
  .nav__hamburger { grid-column: 2; justify-content: flex-end; }
}
