/* Restaurante A La Cazuela — hoja de estilos */
:root {
  --rojo: #dd3333;
  --rojo-osc: #b82626;
  --verde: #339e0f;
  --verde-osc: #2a830c;
  --texto: #1d1d23;
  --suave: #5b5b66;
  --fondo: #ffffff;
  --crema: #faf6f1;
  --linea: #ece6df;
  --oscuro: #1b1514;
  --radio: 14px;
  --max: 1120px;
  --f-texto: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-titulo: 'Abril Fatface', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.65;
  color: var(--texto);
  background: var(--fondo);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rojo); }
h1, h2, h3 { font-family: var(--f-titulo); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.print-only { display: none; }

/* Imágenes que aún no se han descargado */
img.img-missing { display: none; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em; border-radius: 50px; border: 0; cursor: pointer;
  font: 600 1rem/1.2 var(--f-texto); text-decoration: none;
  background: var(--verde); color: #fff; transition: background .2s, transform .2s;
}
.btn:hover { background: var(--verde-osc); transform: translateY(-1px); }
.btn--rojo { background: var(--rojo); }
.btn--rojo:hover { background: var(--rojo-osc); }
.btn--linea { background: transparent; color: var(--texto); box-shadow: inset 0 0 0 2px var(--linea); }
.btn--linea:hover { background: var(--crema); }
.btn--blanco { background: #fff; color: var(--texto); }
.btn--blanco:hover { background: var(--crema); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--texto); }
.brand img { height: 44px; width: auto; }
.brand-text { display: none; font-family: var(--f-titulo); font-size: 1.5rem; color: var(--rojo); }
.brand.no-logo .brand-text { display: inline; }
.nav { display: flex; align-items: center; gap: .3rem; }
.nav a {
  text-decoration: none; color: var(--texto); font-weight: 500; font-size: .95rem;
  padding: .5rem .8rem; border-radius: 8px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--rojo); }
.nav .btn { padding: .6em 1.2em; margin-left: .4rem; color: #fff; }
.nav-toggle {
  display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--texto);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: .6rem 1.25rem 1.2rem; border-bottom: 1px solid var(--linea);
    display: none; box-shadow: 0 12px 24px rgba(0,0,0,.06);
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .4rem; border-bottom: 1px solid var(--linea); }
  .nav .btn { margin: .8rem 0 0; border-bottom: 0; }
}

/* Portada */
.hero {
  position: relative; color: #fff; text-align: center; overflow: hidden;
  background: var(--oscuro) center/cover no-repeat;
  padding: clamp(5rem, 14vw, 9rem) 0 clamp(4.5rem, 12vw, 8rem);
}
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,10,.55), rgba(20,12,10,.75)); }
.hero > * { position: relative; }
.hero-kicker { text-transform: uppercase; letter-spacing: .3em; font-size: .85rem; font-weight: 600; margin-bottom: 1.2rem; opacity: .9; }
.hero-logo { width: min(560px, 86%); margin: 0 auto 1.4rem; }
.hero-title-fallback { display: none; font-size: clamp(2.6rem, 8vw, 4.6rem); }
.hero.no-logo .hero-title-fallback { display: block; }
.hero-address { font-size: 1.05rem; margin-bottom: 2rem; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--crema { background: var(--crema); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.6rem; }
.eyebrow { color: var(--rojo); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; margin-bottom: .6rem; }

.intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.intro-logo { width: 180px; margin-bottom: 1.2rem; }
.intro-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.intro-photos .ph { aspect-ratio: 3/4; border-radius: var(--radio); background: var(--crema) center/cover; overflow: hidden; }
.intro-photos .ph:nth-child(2) { margin-top: 2.5rem; }
.intro-photos img { width: 100%; height: 100%; object-fit: cover; }
.price-tag { color: var(--rojo); font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.badges li { background: var(--crema); border: 1px solid var(--linea); border-radius: 50px; padding: .3rem .9rem; font-size: .85rem; font-weight: 500; }
@media (max-width: 820px) { .intro { grid-template-columns: 1fr; } }

/* Tarjetas */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.card {
  background: #fff; border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 0 var(--linea), 0 10px 30px rgba(40,20,10,.06); text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 var(--linea), 0 16px 40px rgba(40,20,10,.1); }
.card-img { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, #e9dccf, #d9c3ae); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--suave); flex: 1; }
.card-link { font-weight: 600; color: var(--rojo); }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* Mapa con carga bajo demanda (sin cookies de Google hasta que se pulsa) */
.location { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2rem; align-items: stretch; }
.location-info { background: #fff; border-radius: var(--radio); padding: 2rem; border: 1px solid var(--linea); }
.location-info dl { margin: 0 0 1.5rem; }
.location-info dt { font-weight: 600; margin-top: 1rem; }
.location-info dd { margin: 0; color: var(--suave); }
.map {
  border-radius: var(--radio); overflow: hidden; min-height: 340px; position: relative;
  background: #e8e3dc repeating-linear-gradient(45deg, #ebe6df 0 18px, #e4ded6 18px 36px);
  display: grid; place-items: center; text-align: center; padding: 1.5rem;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map p { color: var(--suave); font-size: .9rem; max-width: 320px; margin: .8rem auto 0; }
@media (max-width: 820px) { .location { grid-template-columns: 1fr; } }

/* Página interior */
.page-hero { background: var(--oscuro) center/cover; color: #fff; padding: 3.2rem 0 2.6rem; position: relative; text-align: center; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: rgba(20,12,10,.62); }
.page-hero > * { position: relative; }
.page-hero h1 { margin: 0; }
.page-hero p { margin: .6rem 0 0; opacity: .9; }

/* Menús */
.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; }
.menu-card {
  background: #fff; border-radius: var(--radio); padding: clamp(1.6rem, 4vw, 3rem);
  border: 1px solid var(--linea); box-shadow: 0 10px 30px rgba(40,20,10,.05);
}
.menu-banner { width: 100%; max-width: 640px; margin: 0 auto 1.8rem; }
.menu-head { text-align: center; border-bottom: 2px solid var(--linea); padding-bottom: 1.4rem; margin-bottom: 1.6rem; }
.menu-title { color: var(--rojo); margin-bottom: .2em; }
.menu-date { font-weight: 600; margin: 0 0 .3rem; }
.menu-date::first-letter { text-transform: uppercase; }
.menu-price {
  display: inline-block; background: var(--rojo); color: #fff; font-weight: 700; font-size: 1.15rem;
  padding: .35rem 1.2rem; border-radius: 50px; margin: 0;
}
.menu-prices { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: .4rem 0 .8rem; }
.menu-price-label { font-weight: 500; font-size: .85rem; opacity: .92; margin-right: .25rem; }
.menu-intro { color: var(--suave); max-width: 560px; margin: 0 auto; }
.menu-section { margin-bottom: 1.8rem; }
.menu-section-title {
  font-size: 1.6rem; text-align: center; margin-bottom: .2rem; display: flex; align-items: center; gap: 1rem;
}
.menu-section-title::before, .menu-section-title::after { content: ''; flex: 1; height: 1px; background: var(--linea); }
.menu-section-note { text-align: center; color: var(--suave); font-style: italic; font-size: .92rem; margin: 0 0 .6rem; }
.menu-dishes { list-style: none; margin: .6rem 0 0; padding: 0; text-align: center; }
.menu-dishes li { padding: .45rem 0; border-bottom: 1px dashed var(--linea); }
.menu-dishes li:last-child { border-bottom: 0; }
.menu-foot { text-align: center; color: var(--suave); font-size: .92rem; border-top: 2px solid var(--linea); padding-top: 1.2rem; margin: 1rem 0 0; }
.menu-empty { text-align: center; padding: 2rem 0; }

.menu-aside { position: sticky; top: 96px; display: grid; gap: 1rem; }
.aside-box { background: var(--crema); border-radius: var(--radio); padding: 1.5rem; }
.aside-box h3 { font-size: 1.25rem; }
.aside-box .btn { width: 100%; margin-top: .5rem; }
.aside-box p { font-size: .92rem; color: var(--suave); }
.print-hint { font-size: .8rem; color: var(--suave); margin: .6rem 0 0; }
@media (max-width: 900px) {
  .menu-layout { grid-template-columns: 1fr; }
  .menu-aside { position: static; }
}

/* Formulario WhatsApp */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .3rem; }
.form input, .form textarea, .form select {
  width: 100%; font: inherit; padding: .8rem 1rem; border: 1px solid #ddd5cc; border-radius: 10px; background: #fff;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--verde); border-color: transparent; }
.form small { color: var(--suave); }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: start; }
.contact-box { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: clamp(1.4rem, 4vw, 2.4rem); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; }
.contact-list strong { display: block; }
.contact-list a { font-size: 1.15rem; font-weight: 600; text-decoration: none; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* Pie */
.site-footer { background: var(--oscuro); color: #d8cfc7; padding: 3.5rem 0 1.5rem; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font: 600 1rem var(--f-texto); margin: 0 0 .8rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-logo { width: 220px; margin-bottom: 1rem; }
.footer-brand { font-family: var(--f-titulo); color: #fff; font-size: 1.6rem; display: none; }
.no-logo .footer-brand { display: block; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .82rem; opacity: .75; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }

/* Botón flotante WhatsApp (móvil) */
.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.wa-float svg { width: 30px; height: 30px; }

.note-box { background: #fff7e6; border: 1px solid #f3dca5; border-radius: 10px; padding: .8rem 1rem; font-size: .9rem; }

/* Impresión de la web pública: sin cabecera, pie ni botones */
@media print {
  .site-header, .site-footer, .wa-float, .skip, .no-print, .preview-bar { display: none !important; }
  * { box-shadow: none !important; }
}

.page-hero-title { font-family: var(--f-titulo); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0; }
.prose { max-width: 760px; margin-inline: auto; }
.prose .btn { margin: .3rem .4rem .3rem 0; }

/* Galería */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radio); overflow: hidden; aspect-ratio: 4/5; background: var(--crema); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem .9rem; color: #fff; font-size: .9rem; font-weight: 500;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
}
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; } }
.location-photo { border-radius: 10px; margin-bottom: 1rem; aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* Solo en la vista previa */
.preview-bar { background: #1d1d23; color: #fff; text-align: center; font-size: .8rem; padding: .45rem 1rem; }
.preview-bar a { color: #ffd166; font-weight: 600; margin-left: .4rem; }

.card-price {
  position: absolute; top: .8rem; right: .8rem; background: var(--rojo); color: #fff; font-weight: 700;
  font-size: .9rem; padding: .3rem .85rem; border-radius: 50px; box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.card-price:empty { display: none; }
.card-price { text-align: right; line-height: 1.25; }
.card-price small { display: block; font-weight: 500; font-size: .75rem; opacity: .95; }

/* Páginas legales */
.page-hero--plain { background: var(--oscuro); padding: 2.6rem 0 2.2rem; }
.page-hero--plain::before { display: none; }
.legal { max-width: 780px; margin-inline: auto; font-size: .97rem; }
.legal h2 { font-family: var(--f-texto); font-weight: 700; font-size: 1.15rem; margin: 2rem 0 .6rem; }
.legal h3 { font-family: var(--f-texto); font-weight: 600; font-size: 1rem; margin: 1.2rem 0 .4rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .3rem; }
.legal-datos { list-style: none; padding: 1rem 1.2rem !important; background: var(--crema); border-radius: 10px; }
.legal-tabla { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; font-size: .9rem; }
.legal-tabla th, .legal-tabla td { border: 1px solid var(--linea); padding: .55rem .7rem; text-align: left; vertical-align: top; }
.legal-tabla th { background: var(--crema); }
.legal-fecha { color: var(--suave); font-size: .85rem; margin-top: 2.5rem; }
mark.pendiente { background: #ffe066; color: #000; padding: 0 .3em; border-radius: 3px; font-weight: 600; }
.footer-legal a { color: inherit; }
.form small a { color: inherit; text-decoration: underline; }
@media (max-width: 600px) { .legal-tabla { font-size: .82rem; } }
.legal > h2:first-child { margin-top: 0; }

/* Formulario de reserva: selectores en lugar de escribir */
.form select, .form input[type="date"] {
  width: 100%; font: inherit; color: var(--texto); padding: .8rem 1rem; min-height: 50px;
  border: 1px solid #ddd5cc; border-radius: 10px; background: #fff; -webkit-appearance: none; appearance: none;
}
.form select {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b5b66' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .9rem center / 18px;
  padding-right: 2.6rem; cursor: pointer;
}
.form input[type="date"] { cursor: pointer; }
.form input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.form select:focus, .form input[type="date"]:focus { outline: 2px solid var(--verde); border-color: transparent; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #ddd5cc; border-radius: 12px; overflow: hidden; background: #fff; }
.stepper button {
  width: 54px; height: 50px; border: 0; background: var(--crema); font: 600 1.5rem/1 var(--f-texto); color: var(--texto); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stepper button:active { background: #efe6dc; }
.stepper input {
  width: 64px; height: 50px; border: 0; text-align: center; font: 600 1.15rem var(--f-texto); background: #fff; padding: 0;
  -moz-appearance: textfield; pointer-events: none;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.form-warn { margin: -.3rem 0 0; color: var(--rojo); font-size: .88rem; font-weight: 500; }
.optional { font-weight: 400; color: var(--suave); }

/* Desplegable «Menús» del menú de arriba */
.nav-drop { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: .25rem; background: none; border: 0; cursor: pointer;
  font: 500 .95rem var(--f-texto); color: var(--texto); padding: .5rem .8rem; border-radius: 8px;
}
.nav-drop-btn svg { width: 16px; height: 16px; transition: transform .2s; }
.nav-drop-btn:hover, .nav-drop.open .nav-drop-btn { color: var(--rojo); }
.nav-drop.open .nav-drop-btn svg { transform: rotate(180deg); }
.nav-sub {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: #fff; border: 1px solid var(--linea);
  border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.12); padding: .4rem; display: none; z-index: 60;
}
.nav-drop.open .nav-sub { display: block; }
@media (hover: hover) and (min-width: 1101px) {
  .nav-drop:hover .nav-sub, .nav-drop:focus-within .nav-sub { display: block; }
  .nav-drop::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; } /* puente para el ratón */
}
.nav .nav-sub a { display: block; padding: .6rem .8rem; border-radius: 8px; }
.nav .nav-sub a:hover { background: var(--crema); }
@media (max-width: 1100px) {
  .nav-drop-btn { width: 100%; justify-content: space-between; padding: .8rem .4rem; border-bottom: 1px solid var(--linea); border-radius: 0; font-size: 1rem; }
  .nav-sub { position: static; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 0 .8rem; min-width: 0; }
  .nav .nav-sub a { border-radius: 0; }
}
