:root{
  --active:#e36b5f;
  --line:#e9e9e9;
  --muted:#777;
  --tabsH:60px;
  --shadow: 0 10px 18px rgba(0,0,0,.06);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:#fff;
  color:#111;
}

/* NAVBAR (fixed + scroll horizontal + blur) */
.tabs{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:var(--tabsH);

  display:flex;
  align-items:center;
  gap:20px;
  padding:0 15px;

  overflow-x:auto;
  overflow-y:hidden;
  white-space:nowrap;
  -webkit-overflow-scrolling: touch;

  background: rgba(255,255,255,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom:1px solid rgba(233,233,233,.75);
  box-shadow: var(--shadow);
  z-index:999;

  scrollbar-width:none;
}
.tabs::-webkit-scrollbar{ display:none; }

.tab{
  flex:0 0 auto;
  text-decoration:none;
  color:#444;
  font-weight:600;
  padding:18px 4px;
  border-bottom:2px solid transparent;
}

/* Tab activo */
body:has(#entradas:target) .tabs a[href="#entradas"],
body:has(#fuertes:target) .tabs a[href="#fuertes"],
body:has(#bebidas:target) .tabs a[href="#bebidas"],
body:has(#cocteles:target) .tabs a[href="#cocteles"],
body:has(#postres:target) .tabs a[href="#postres"]{
  color:var(--active);
  border-bottom-color:var(--active);
}

/* Default: Entradas activa si no hay target */
body:not(:has(.section:target)) .tabs a[href="#entradas"]{
  color:var(--active);
  border-bottom-color:var(--active);
}

/* HERO */
.hero{
  margin-top:var(--tabsH);
  height:220px;
  overflow:hidden;
}
.hero__img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* TITLE */
.title{
  text-align:center;
  padding:20px 10px 10px;
}
.title h1{
  font-family:"Playfair Display", serif;
  margin:0;
  font-size:34px;
  font-weight:600;
}
.title p{
  margin:6px 0 0;
  color:var(--muted);
}

/* CONTENT */
.content{
  max-width:900px;
  margin:auto;
  padding:10px 14px 60px;
}

/* SECTION */
.section{
  margin-top:16px;
  scroll-margin-top: calc(var(--tabsH) + 12px);
}

/* Header sin foto */
.section__header{
  text-align:center;
  padding:20px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fafafa;
  margin-bottom:15px;
}
.section__header h2{
  font-family:"Playfair Display", serif;
  margin:0;
  font-size:30px;
  font-weight:600;
}
.section__header p{
  margin-top:6px;
  color:var(--muted);
}

/* LIST */
.list{
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  background:#fff;
}

.item{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:16px;
  border-top:1px solid var(--line);
}
.item:first-child{ border-top:none; }

.item__left{
  display:flex;
  align-items:flex-start;
  gap:12px;
  min-width:0;
}

.item__text{
  min-width:0;
}

.item h3{
  margin:0;
  font-size:16px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.item p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
}

/* Foto del plato */
.dish-img{
  width:52px;
  height:52px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid var(--line);
  flex: 0 0 auto;
  background:#f3f3f3;
}

/* Precio */
.price{
  color:var(--active);
  font-weight:800;
  white-space:nowrap;
  padding-top:2px;
}

/* ANIMACIÓN al cambiar sección */
.section .section__header,
.section .list{
  opacity: 1;
  transform: translateY(0);
  transition: opacity .35s ease, transform .35s ease;
}

.section:target .section__header,
.section:target .list{
  animation: sectionIn .42s ease both;
}

@keyframes sectionIn{
  from{ opacity:0; transform: translateY(10px); }
  to{ opacity:1; transform: translateY(0); }
}

/* Default anim para Entradas */
body:not(:has(.section:target)) #entradas .section__header,
body:not(:has(.section:target)) #entradas .list{
  animation: sectionIn .42s ease both;
}

/* Mobile tweaks */
@media (max-width: 420px){
  :root{ --tabsH:56px; }
  .title h1{ font-size:28px; }
  .tab{ padding:16px 4px; font-size:15px; }
  .hero{ height:190px; }
}
