:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --line: #eaeaea;
  --accent: #0f0f0f;
  /* Paleta azul del login */
  --blue-1: #000;
  --blue-2: #000;
  --blue-focus: rgba(59,169,255,.2);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ======= HEADER PÚBLICO ======= */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line);
}
.site-header.home { background:#000; border-bottom-color:#000; }
.site-header.home .main-nav a, .site-header.home .brand { color:#fff; }
.site-header.home .nav-toggle { border-color:#333; }
.site-header.home .nav-toggle span { background:#fff; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { font-weight: 800; letter-spacing: 1px; text-decoration: none; color: var(--fg); }
.brand img { display:block; height:40px; }
.main-nav { display: flex; gap: 20px; align-items: center; }
.main-nav a { color: var(--fg); text-decoration: none; font-weight: 600; }
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: transparent; border-radius: 8px; align-items: center; justify-content: center; gap: 4px; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--fg); }

body.no-header-nav .main-nav,
body.no-header-nav .nav-toggle { display: none !important; }

/* ======= BOTONES (base) ======= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--line);
  font-weight: 700; text-decoration: none; color: var(--fg);
  transition: transform .12s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: #f5f5f5; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { background: #141414; }
.btn-ghost { background: transparent; }

/* ======= SECCIONES PÚBLICAS ======= */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-copy h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.02em; }
.hero-copy p { font-size: clamp(16px, 2vw, 18px); color: var(--muted); margin: 0 0 24px; }
.hero-ctas { display: flex; gap: 12px; margin-bottom: 14px; }
.hero-facts { display: flex; gap: 20px; flex-wrap: wrap; list-style: none; padding: 0; margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.accent-underline { position: relative; display: inline-block; }
.accent-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px; background: linear-gradient(90deg, #000, #7f7f7f);
  opacity: .08; border-radius: 6px; transform: translateY(6px);
}

.hero-visual { position: relative; }
.photo-stack { position: relative; height: clamp(320px, 44vw, 540px); }
.photo { position: absolute; width: 72%; height: 72%; object-fit: cover; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.12); border: 1px solid var(--line); }
.photo:nth-child(1){ top: 0; left: 0; transform: rotate(-3deg); }
.photo:nth-child(2){ bottom: 4%; right: 0; transform: rotate(2deg); }
.photo:nth-child(3){ top: 22%; left: 18%; width: 64%; height: 64%; transform: rotate(0.5deg); }

.section-head { text-align: center; padding: 80px 0 18px; }
.section-head h2 { font-size: clamp(26px, 4.2vw, 40px); margin: 0 0 6px; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); margin: 0; }

.menu { padding-bottom: 24px; }
.menu .section-head { padding-top: 32px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: clip; display: grid; grid-template-rows: auto 1fr; transition: box-shadow .2s ease, transform .2s ease; }
.card:hover { box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.card-media img { width: 100%; height: 220px; object-fit: cover; display: block; }
.card-body { padding: 16px; display: grid; gap: 10px; }
.card-body .allergens { display:flex; gap:6px; flex-wrap:wrap; margin:8px 0 0; padding:0; list-style:none; }
.card-body .allergens li { font-size:12px; color:#555; border:1px solid var(--line); background:#f7f7f7; padding:3px 8px; border-radius:999px; }
.card-body h3 { margin: 0; font-size: 18px; }
.card-body p { margin: 0; color: var(--muted); }
.price { margin-top: 6px; font-weight: 800; font-family: "Space Mono", monospace; background: #f7f7f7; padding: 4px 8px; border-radius: 8px; width: fit-content; }

.menu-cta { display: flex; gap: 12px; justify-content: center; padding: 18px 0 28px; }

.gallery { padding: 16px 0 40px; border-top: 1px solid var(--line); }
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.gallery-grid img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); transition: transform .25s ease; }
.gallery-grid img:nth-child(1){ grid-column: span 3; height: 260px; }
.gallery-grid img:nth-child(2){ grid-column: span 3; height: 260px; }
.gallery-grid img:nth-child(5){ grid-column: span 2; }
.gallery-grid img:hover { transform: scale(1.02); }

.visit { padding: 50px 0; border-top: 1px solid var(--line); }
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.visit .lead { color: var(--muted); margin-bottom: 12px; }
.hours h3 { margin-bottom: 6px; }
.hours-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hours-list li { display: flex; justify-content: space-between; border-bottom: 1px dashed #eee; padding-bottom: 6px; }
.hours-list li:last-child { border-bottom: none; padding-bottom: 0; }
address { font-style: normal; margin: 10px 0 18px; }

.map-wrap { width: 100%; height: 520px; border-radius: 16px; overflow: clip; border: 1px solid var(--line); align-self: center; }

.reserve { padding: 80px 0; border-top: 1px solid var(--line); }
.reserve-card { border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 10px; background: #fff; }
.reserve-form { display: grid; gap: 14px; }
.reserve-form label { display: grid; gap: 6px; font-weight: 600; }
.reserve-form input {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.reserve-form input:focus { border-color: #c9c9c9; box-shadow: 0 0 0 4px rgba(0,0,0,0.05); }
.grid-two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.form-note { color: var(--muted); font-size: 14px; margin: 0; }

.site-footer { border-top: 1px solid var(--line); padding: 26px 0; background:#000; border-top-color:#000; }
.footer-grid { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; }
.footer-nav, .social { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a, .social a { color: var(--muted); text-decoration: none; }
.social a + a { margin-left: 12px; }
.tiny { color: var(--muted); font-size: 12px; }

.site-footer .footer-nav a, .site-footer .social a, .site-footer .tiny, .site-footer .brand { color:#fff; }
.site-footer .brand img { height:40px; }

/* Interactions */
.tilt { will-change: transform; transform-style: preserve-3d; }
.tilt:hover { transform: perspective(600px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateZ(0); }
.card:hover .card-media img { transform: translateZ(16px); }

/* Menu page filters */
.filters { display: flex; gap: 10px; justify-content: center; padding: 8px 0 18px; flex-wrap: wrap; }
.chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.chip.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ======= RESPONSIVE PÚBLICO ======= */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .photo-stack { height: 420px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .visit-grid { grid-template-columns: 1fr; }
  .info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
  .info-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
}
@media (max-width: 680px) {
  .btn { padding: 14px 18px; min-height: 44px; font-size: 16px; }
  .mesa-tag { font-size:14px; padding:8px 12px; }
  .main-nav { display: none; }
  .nav-toggle { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid img { height: 160px; }
  .footer-grid { grid-template-columns: 1fr; justify-items: start; }
  .brand img { height:32px; }
  .card-media img { height: auto; max-height: 200px; object-fit: contain; }
  .hero { padding: 36px 0 32px; }
  .visit { padding: 40px 0; }
  .visit-grid { grid-template-columns: 1fr; gap: 18px; }
  .info-cards { grid-template-columns: 1fr; gap: 12px; }
  .info-card { padding: 14px; }
  .map-wrap { height: 320px; border-radius: 12px; }
  .visit .lead { margin-bottom: 8px; font-size: 15px; }
  .hours-list li { padding-bottom: 4px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =========================================================
   ESTILOS ADMIN — alineados a tu admin.php (appbar/admin-shell)
   ========================================================= */

/* Top bar */
.appbar{
  background:000;
  border-bottom:1px solid #0a0f19;
}

.appbar .wrap {
  width:min(1200px,92%); margin:0 auto;
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:10px 0;
}
.appbrand { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--fg); }
.appbrand img { height:40px; width:auto; display:block; border-radius:8px; }
.appbrand strong { font-size:18px; letter-spacing:.2px; }
.app-actions { display:flex; align-items:center; gap:10px; }
.user-pill {
  display:flex; align-items:center; gap:10px;
  padding:8px 10px; border:1px solid var(--line); border-radius:999px; background:#fff;
}
.user-pill .avatar {
  width:28px; height:28px; border-radius:50%;
  background:#eee url('./img/aljibe.png') center/cover no-repeat; border:1px solid var(--line);
}
.user-pill .meta { display:flex; flex-direction:column; line-height:1.05; }
.user-pill .meta b { font-size:13px; }
.user-pill .meta span { font-size:12px; color:var(--muted); }

/* Layout */
.admin-shell { width:min(1200px,92%); margin:18px auto 40px; display:grid; grid-template-columns: 220px 1fr; gap:16px; }
@media (max-width: 900px){ .admin-shell { grid-template-columns: 1fr; } }

.side {
  position: sticky; top:72px; align-self:start;
  background:#fff; border:1px solid var(--line); border-radius:14px; padding:10px;
}
.tab-list { display:grid; gap:6px; }
.tab-list .btn {
  justify-content:flex-start; border-radius:10px; padding:10px 12px; font-weight:700;
}
.tab-list .btn[aria-current="true"] {
  background: var(--fg); color:#fff; border-color: var(--fg);
}

.content {
  background:#fff; border:1px solid var(--line); border-radius:16px; padding:18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.06);
}

.grid { display:grid; grid-template-columns:180px 1fr; gap:12px; margin:10px 0; align-items:center; }
@media (max-width: 700px){ .grid { grid-template-columns: 1fr; } }
.field-label { font-size:12px; color:#6b6b6b; font-weight:700; }

.list .row {
  display:grid; grid-template-columns: 1fr 120px auto; align-items:start; gap:10px; margin:10px 0;
  background:#fafafa; border:1px solid var(--line); border-radius:12px; padding:10px;
}
@media (max-width: 900px){ .list .row { grid-template-columns: 1fr; } }

.list input, .list textarea, .list select,
.grid input, .grid textarea, .grid select {
  padding:10px 12px; border:1px solid var(--line); border-radius:10px; outline:none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.list input:focus, .list textarea:focus, .list select:focus,
.grid input:focus, .grid textarea:focus, .grid select:focus {
  border-color:#c9c9c9; box-shadow:0 0 0 4px rgba(0,0,0,.05);
}

/* Barra inferior acciones */
.bar {
  position: sticky; bottom: 12px; display:flex; gap:10px; margin-top:16px;
  background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px;
  box-shadow:0 6px 20px rgba(0,0,0,.06);
}
.status { font-size:13px; color:#6b6b6b; margin-top:8px; }

/* Modal inventario (admin) */
.modal { position:fixed; inset:0; background:rgba(0,0,0,.42); display:none; align-items:center; justify-content:center; z-index:100; }
.modal-content { width:min(680px,92%); background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px; box-shadow:0 10px 30px rgba(0,0,0,.12); }
#invModalList { max-height: 60vh; overflow:auto; border:1px solid var(--line); border-radius:12px; -webkit-overflow-scrolling: touch; }

/* Menú admin (móvil) */
.list.menu-items { overflow-y:auto; padding-bottom:8px; }
.list.menu-items .header { display:none !important; }
.list.menu-items .row { grid-template-columns:1fr; gap:12px; padding:14px; background:#fff; border-radius:12px; }
.list.menu-items .row button.btn { justify-self:end; }
@media (max-width: 640px) {
  .list input, .list textarea, .list select { font-size:16px; min-height:44px; }
  .bar { position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%); width: min(680px, 96%); z-index: 50; }
  .list.menu-items .row button.btn { width:100%; }
}

/* ======= AZULES DEL LOGIN APLICADOS SOLO EN ADMIN ======= */
.appbar .btn-primary,
.admin-shell .btn-primary {
  border-color: var(--blue-2);
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
  color:#fff;
  font-weight:800;
}
.appbar .btn-primary:hover,
.admin-shell .btn-primary:hover { filter: brightness(1.06); }
.appbar .btn:focus,
.admin-shell .btn:focus {
  outline:0;
  box-shadow:0 0 0 4px var(--blue-focus);
}

/* ======= FONDO OSCURO “LOGIN” (también en admin) ======= */
.bg-login {
  min-height: 100dvh;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(31, 41, 55, 0.6), transparent 60%),
    radial-gradient(1000px 500px at 90% 10%, rgba(59, 169, 255, 0.12), transparent 60%),
    radial-gradient(1100px 600px at 10% 20%, rgba(59, 169, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #0b1220 0%, #0a0f19 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed;
  background-position: 50% -10%, 100% 0%, 0% 20%, center;
  background-size: 1400px 800px, 1200px 600px, 1300px 700px, cover;
}
@media (min-width: 1600px) {
  .bg-login {
    background-size: 1800px 1000px, 1600px 800px, 1700px 900px, cover;
  }
}
/* Sombras un poco más marcadas sobre el fondo oscuro */
.bg-login .content,
.bg-login .side,
.bg-login .bar,
.bg-login .modal-content {
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
