/*
Theme Name: Grande Focaccia Carta
Theme URI: https://grandefocaccia.com
Author: Agencia
Author URI: https://
Description: Tema personalizado para la carta digital de Grande Focaccia. Bilingüe CA/ES, mobile-first, identidad de marca (negro + amarillo mostaza). Activar y la carta aparece en la home. Editar contenido en inc/carta-content.php.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: restaurant, menu, custom, bilingual
Text Domain: grande-focaccia-carta
*/

:root {
  --gfc-bg: #1A1614;
  --gfc-bg-elev: #252220;
  --gfc-bg-card: rgba(255, 255, 255, 0.03);
  --gfc-ink: #F5F1E8;
  --gfc-ink-soft: #A8A095;
  --gfc-ink-mute: #6F6960;
  --gfc-accent: #F5C518;
  --gfc-accent-deep: #C99A0E;
  --gfc-red: #E0533F;
  --gfc-green: #8FAE5C;
  --gfc-pistacho: #B4C36A;
  --gfc-hazelnut: #B8865A;
  --gfc-line: rgba(255, 255, 255, 0.08);
  --gfc-display: 'Oswald', 'Impact', sans-serif;
  --gfc-body: 'Manrope', system-ui, sans-serif;
}

/* RESET MÍNIMO - sin tocar elementos de admin WP */
.gfc-wrap *, .gfc-wrap *::before, .gfc-wrap *::after { box-sizing: border-box; }
.gfc-wrap h1, .gfc-wrap h2, .gfc-wrap h3, .gfc-wrap p, .gfc-wrap ul { margin: 0; padding: 0; }

html.gfc-active { scroll-behavior: smooth; scroll-padding-top: 110px; }

body.gfc-page {
  font-family: var(--gfc-body);
  background: var(--gfc-bg);
  color: var(--gfc-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  margin: 0;
}
body.gfc-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at top, rgba(245, 197, 24, 0.04), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(245, 197, 24, 0.02), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* LANG VISIBILITY */
html[lang="ca"] .gfc-wrap .lang-es { display: none !important; }
html[lang="es"] .gfc-wrap .lang-es { display: inline; }
html[lang="es"] .gfc-wrap .lang-ca { display: none !important; }
html[lang="ca"] .gfc-wrap .lang-ca { display: inline; }

.gfc-wrap { position: relative; z-index: 1; }

.gfc-wrap header.brand {
  position: relative;
  text-align: center;
  padding: 40px 24px 28px;
  z-index: 1;
}
.gfc-wrap .logo {
  font-family: var(--gfc-display);
  font-weight: 700;
  color: var(--gfc-accent);
  line-height: 0.9;
  letter-spacing: -0.01em;
}
.gfc-wrap .logo-grande {
  font-size: clamp(2.5rem, 9vw, 3.6rem);
  display: block;
  letter-spacing: 0.02em;
}
.gfc-wrap .logo-focaccia {
  font-size: clamp(2rem, 7vw, 2.8rem);
  display: block;
  letter-spacing: 0.04em;
}
.gfc-wrap .logo-tag {
  font-family: var(--gfc-body);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gfc-ink-soft);
  margin-top: 14px;
  text-transform: uppercase;
}
.gfc-wrap .logo-tag span { color: var(--gfc-accent); margin: 0 6px; }

.gfc-wrap .lang-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 2px;
  background: var(--gfc-bg-elev);
  border: 1px solid var(--gfc-line);
  border-radius: 999px;
  padding: 3px;
  z-index: 60;
}
.gfc-wrap .lang-toggle button {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--gfc-ink-soft);
  font-family: var(--gfc-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s;
}
.gfc-wrap .lang-toggle button.active {
  background: var(--gfc-accent);
  color: #1A1614;
}

.gfc-wrap nav.cats {
  position: sticky;
  top: 0;
  background: rgba(26, 22, 20, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gfc-line);
  z-index: 50;
  overflow-x: auto;
  scrollbar-width: none;
}
.gfc-wrap nav.cats::-webkit-scrollbar { display: none; }
.gfc-wrap nav.cats ul {
  display: flex;
  list-style: none;
  padding: 12px 16px;
  gap: 6px;
  min-width: max-content;
}
.gfc-wrap nav.cats a {
  text-decoration: none;
  color: var(--gfc-ink-soft);
  font-family: var(--gfc-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-transform: uppercase;
}
.gfc-wrap nav.cats a:hover, .gfc-wrap nav.cats a:focus-visible {
  color: var(--gfc-accent);
  border-color: var(--gfc-line);
}

.gfc-wrap main.gfc-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 100px;
  position: relative;
  z-index: 1;
}

.gfc-wrap section.category {
  margin-bottom: 64px;
  scroll-margin-top: 100px;
}
.gfc-wrap .cat-head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gfc-accent);
}
.gfc-wrap .cat-title {
  font-family: var(--gfc-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  color: var(--gfc-accent);
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}
.gfc-wrap .cat-note {
  font-size: 0.82rem;
  color: var(--gfc-ink-soft);
  margin-top: 10px;
  line-height: 1.5;
  font-style: italic;
}

.gfc-wrap .item {
  padding: 18px 0;
  border-bottom: 1px dashed var(--gfc-line);
}
.gfc-wrap .item:last-child { border-bottom: none; }
.gfc-wrap .item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 4px;
}
.gfc-wrap .item-name-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.gfc-wrap .item-name {
  font-family: var(--gfc-display);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--gfc-ink);
  letter-spacing: 0.01em;
}
.gfc-wrap .sup {
  color: var(--gfc-accent);
  font-size: 0.7rem;
  vertical-align: super;
}
.gfc-wrap .item-price {
  font-family: var(--gfc-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--gfc-accent);
  white-space: nowrap;
  font-feature-settings: 'tnum';
  letter-spacing: 0.02em;
}
.gfc-wrap .item-desc {
  font-size: 0.88rem;
  color: var(--gfc-ink-soft);
  line-height: 1.5;
  margin-bottom: 8px;
}
.gfc-wrap .item-allerg {
  font-size: 0.7rem;
  color: var(--gfc-ink-mute);
  letter-spacing: 0.05em;
  font-weight: 600;
}
.gfc-wrap .item-allerg .sep { color: var(--gfc-accent-deep); margin: 0 4px; }

.gfc-wrap .badge {
  display: inline-block;
  font-family: var(--gfc-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 1.4;
}
.gfc-wrap .b-picante { background: var(--gfc-red); color: #fff; }
.gfc-wrap .b-vegana { background: var(--gfc-green); color: #1A1614; }
.gfc-wrap .b-sg { background: var(--gfc-accent); color: #1A1614; }
.gfc-wrap .b-pistacho { background: var(--gfc-pistacho); color: #1A1614; }
.gfc-wrap .b-fs { background: var(--gfc-hazelnut); color: #fff; }
.gfc-wrap .b-avellana { background: #C9966C; color: #1A1614; }

.gfc-wrap .salsas {
  background: var(--gfc-bg-card);
  border: 1px solid var(--gfc-line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 20px;
}
.gfc-wrap .salsas-title {
  font-family: var(--gfc-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--gfc-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.gfc-wrap .salsas-note {
  font-size: 0.78rem;
  color: var(--gfc-ink-soft);
  margin-bottom: 12px;
  font-style: italic;
}
.gfc-wrap .salsas-list {
  list-style: none;
  display: grid;
  gap: 8px;
}
.gfc-wrap .salsas-list li {
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gfc-wrap .salsas-list li::before {
  content: '·';
  color: var(--gfc-accent);
  font-weight: 700;
  margin-right: 6px;
}
.gfc-wrap .salsa-name {
  flex: 1;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.gfc-wrap .salsa-a { color: var(--gfc-ink-mute); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; }

.gfc-wrap .howto {
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.08), rgba(245, 197, 24, 0.02));
  border-left: 3px solid var(--gfc-accent);
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  color: var(--gfc-ink);
}
.gfc-wrap .howto strong { color: var(--gfc-accent); font-family: var(--gfc-display); letter-spacing: 0.05em; }

.gfc-wrap .legend {
  background: var(--gfc-bg-elev);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 40px 0 0;
  border: 1px solid var(--gfc-line);
}
.gfc-wrap .legend-title {
  font-family: var(--gfc-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gfc-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.gfc-wrap .legend-codes {
  font-size: 0.82rem;
  color: var(--gfc-ink-soft);
  line-height: 1.8;
}
.gfc-wrap .legend-codes strong { color: var(--gfc-ink); font-weight: 700; }

.gfc-wrap footer.gfc-footer {
  max-width: 760px;
  margin: 40px auto 0;
  padding: 32px 20px 60px;
  border-top: 1px solid var(--gfc-line);
  text-align: center;
  font-size: 0.78rem;
  color: var(--gfc-ink-mute);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}
.gfc-wrap footer.gfc-footer p { margin-bottom: 6px; }
.gfc-wrap footer.gfc-footer .updated {
  font-style: italic;
  margin-top: 16px;
  color: var(--gfc-ink-soft);
}

/* Ocultar admin bar para look limpio si user logueado */
body.gfc-page.admin-bar nav.cats { top: 32px; }
@media screen and (max-width: 782px) {
  body.gfc-page.admin-bar nav.cats { top: 46px; }
}

@media print {
  .gfc-wrap nav.cats, .gfc-wrap .lang-toggle { display: none; }
  body.gfc-page { background: #fff; color: #000; }
  .gfc-wrap .item-name, .gfc-wrap .cat-title, .gfc-wrap .item-price { color: #000 !important; }
  .gfc-wrap section.category { page-break-inside: avoid; }
  body.gfc-page::before { display: none; }
}
