/* ==========================================================================
   LA BARRICA GASTROBAR - CARTA DIGITAL UX/UI
   Inspirada en navegación moderna mobile-first con identidad mediterránea
   ========================================================================== */

:root {
  --primary: #16988f;
  --primary-dark: #116e68;
  --primary-deep: #0b4541;
  --primary-light: #2bc0b6;
  --primary-subtle: #e8f7f5;
  --primary-glow: rgba(22, 152, 143, 0.18);
  
  --gold-accent: #c49a45;
  --gold-subtle: #fbf7ee;
  
  --bg-page: #f9f8f3;
  --bg-card: #ffffff;
  --bg-subtle: #f3f1e9;
  
  --text-title: #142a28;
  --text-body: #2e4442;
  --text-muted: #5e7976;
  --text-light: #889e9c;
  
  --border-light: #e4ebe9;
  --border-focus: #16988f;
  --border-accent: #bce1dc;
  
  --shadow-sm: 0 2px 8px rgba(11, 69, 65, 0.05);
  --shadow-md: 0 4px 18px rgba(11, 69, 65, 0.08);
  --shadow-lg: 0 10px 30px rgba(11, 69, 65, 0.12);
  --shadow-sticky: 0 4px 20px rgba(11, 69, 65, 0.09);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-script: 'Caveat', 'Playfair Display', cursive, serif;
  --font-price: 'Inter', system-ui, sans-serif;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: 90px;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   TOP BAR & BRAND HEADER
   ========================================================================== */
.site-header {
  background: linear-gradient(180deg, #106f68 0%, #16988f 100%);
  color: #ffffff;
  padding: 24px 16px 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 16px rgba(16, 111, 104, 0.15);
}

.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Banner Logo Oficial de La Barrica */

.banner-logo-wrap {
  width: 120px;
  max-width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.22));
}

.banner-logo-img {
  width: 120px !important;
  max-width: 120px !important;
  height: 120px !important;
  object-fit: contain !important;
  display: block !important;
}




.header-title-wrap {
  margin-bottom: 4px;
}

.header-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.15;
}

.header-subtitle {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: #d8f5f1;
  margin-top: -4px;
  font-style: italic;
}

.header-tagline {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.95);
  max-width: 540px;
  margin: 6px auto 14px;
  line-height: 1.45;
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-header:hover, .btn-header:active {
  background: #ffffff;
  color: var(--primary-dark);
}

.btn-header svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ==========================================================================
   SEARCH & FILTERS BAR
   ========================================================================== */
.search-filter-section {
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
}

.search-box-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 12px 42px 12px 42px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  background-color: var(--bg-page);
  color: var(--text-title);
  outline: none;
  transition: all 0.25s ease;
}

.search-input:focus {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-light);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  display: none;
}

.search-clear-btn.visible {
  display: block;
}

.search-sub-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 8px auto 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-allergen-toggle {
  background: none;
  border: 1px solid var(--border-light);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-allergen-toggle:hover, .btn-allergen-toggle.active {
  background: var(--primary-subtle);
  color: var(--primary-dark);
  border-color: var(--primary);
}

/* ==========================================================================
   STICKY CATEGORY BAR
   ========================================================================== */
.sticky-nav-container {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sticky);
}

.category-nav-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 16px;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.category-nav-track::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
}

.category-pill:hover {
  color: var(--primary-dark);
  background: var(--primary-subtle);
  border-color: var(--primary-light);
}

.category-pill.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary-dark);
  box-shadow: 0 2px 10px var(--primary-glow);
}

.category-pill .pill-count {
  font-size: 0.72rem;
  padding: 1px 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  font-weight: 500;
}

.category-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ==========================================================================
   MENU CONTENT SECTIONS
   ========================================================================== */
.menu-main {
  padding: 24px 0 40px;
}

.category-section {
  scroll-margin-top: 75px;
  margin-bottom: 38px;
}

.section-header {
  position: relative;
  text-align: center;
  margin-bottom: 20px;
  padding: 18px 16px 14px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.section-header::before,
.section-header::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--primary);
  border-style: solid;
  pointer-events: none;
}

.section-header::before {
  top: 6px;
  left: 6px;
  border-width: 2px 0 0 2px;
  border-top-left-radius: 4px;
}

.section-header::after {
  bottom: 6px;
  right: 6px;
  border-width: 0 2px 2px 0;
  border-bottom-right-radius: 4px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary-deep);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.1;
  display: inline-block;
}

.section-script {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: #222;
  margin-left: 8px;
  text-transform: none;
  font-style: italic;
  vertical-align: middle;
}

.section-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.section-notice {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: var(--gold-subtle);
  border: 1px solid #ebd8b2;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: #8c631e;
  font-weight: 600;
}

.section-notice .notice-en {
  display: block;
  font-size: 0.74rem;
  font-weight: 400;
  font-style: italic;
  color: #a07833;
}

/* ==========================================================================
   PRODUCT / DISH CARDS
   ========================================================================== */
.items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

.dish-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dish-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.dish-card.has-image {
  padding: 0;
  overflow: hidden;
}

.dish-image-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background-color: #f0ede1;
  overflow: hidden;
  cursor: pointer;
}

.dish-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.dish-card:hover .dish-img {
  transform: scale(1.04);
}

.dish-photo-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(19, 126, 118, 0.9);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

.dish-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.dish-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.dish-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.3;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.dish-unit {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--primary-dark);
  display: inline-block;
  background: var(--primary-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.dish-price {
  font-family: var(--font-price);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-deep);
  white-space: nowrap;
  flex-shrink: 0;
}

.dish-en {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.35;
  margin-bottom: 8px;
}

.dish-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #f0f0f0;
}

.allergens-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.allergen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 0.75rem;
  position: relative;
  cursor: help;
  transition: transform 0.15s ease, background-color 0.15s;
}

.allergen-badge:hover {
  transform: scale(1.18);
  background-color: #fff;
  border-color: var(--primary);
}

.allergen-badge[data-title]:hover::after {
  content: attr(data-title);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-title);
  color: #fff;
  padding: 3px 8px;
  font-size: 0.7rem;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}

/* ==========================================================================
   SUBSECTIONS
   ========================================================================== */
.subsection-header {
  margin: 24px 0 12px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.subsection-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-deep);
  text-transform: uppercase;
}

.subsection-title-en {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   WINE SECTION SPECIAL LAYOUT
   ========================================================================== */
.wine-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
}

.wine-card:hover {
  background: #fafaf7;
  border-color: var(--border-accent);
}

.wine-info {
  flex-grow: 1;
}

.wine-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.25;
}

.wine-pricing-group {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-shrink: 0;
}

.wine-price-col {
  text-align: right;
  min-width: 52px;
}

.wine-price-label {
  font-size: 0.65rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.wine-price-val {
  font-family: var(--font-price);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--primary-deep);
}

.wine-price-empty {
  color: #ccc;
  font-size: 0.9rem;
}

/* ==========================================================================
   ALLERGENS DRAWER / MODAL
   ========================================================================== */
.allergens-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
  padding: 20px 20px 28px;
  z-index: 1000;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.allergens-drawer.open {
  transform: translateY(0);
}

.allergens-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.allergens-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary-deep);
  font-weight: 700;
}

.drawer-close-btn {
  background: var(--bg-subtle);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.allergens-grid-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 500px) {
  .allergens-grid-legend {
    grid-template-columns: repeat(3, 1fr);
  }
}

.allergen-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-body);
}

.allergen-legend-icon {
  font-size: 1.1rem;
}

/* ==========================================================================
   PHOTO LIGHTBOX MODAL
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 25, 24, 0.88);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 560px;
  width: 100%;
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.lightbox-modal.open .lightbox-content {
  transform: scale(1);
}

.lightbox-img-wrap {
  position: relative;
  width: 100%;
  max-height: 55vh;
  background: #000;
}

.lightbox-img-wrap img {
  width: 100%;
  height: 100%;
  max-height: 55vh;
  object-fit: contain;
  display: block;
}

.lightbox-details {
  padding: 16px 20px;
}

.lightbox-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 4px;
}

.lightbox-en {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}

.lightbox-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-deep);
}

.lightbox-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* ==========================================================================
   FLOATING ACTION BUTTONS
   ========================================================================== */
.floating-actions {
  position: fixed;
  bottom: 20px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 85;
}

.btn-float {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s, opacity 0.2s;
  text-decoration: none;
}

.btn-float:active {
  transform: scale(0.92);
}

.btn-scroll-top {
  background: #ffffff;
  color: var(--primary-deep);
  border: 1px solid var(--border-light);
  opacity: 0;
  pointer-events: none;
}

.btn-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.btn-call-float {
  background: var(--primary);
  color: #ffffff;
}

.btn-float svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==========================================================================
   FOOTER INFO & CONTACT
   ========================================================================== */
.site-footer {
  margin-top: 40px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 30px 16px;
  text-align: center;
}

.footer-logo {
  max-width: 140px;
  margin: 0 auto 14px;
  display: block;
}

.footer-phones {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-deep);
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
}

.phone-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 14px;
}

/* ==========================================================================
   NO RESULTS STATE
   ========================================================================== */
.no-results {
  text-align: center;
  padding: 40px 20px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-light);
  margin: 20px 0;
  display: none;
}

.no-results.visible {
  display: block;
}

.no-results-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.no-results-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   RESPONSIVE & ACCESSIBILITY REFINEMENTS
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .banner-logo-img {
    width: 110px;
    height: 110px;
  }
  .header-title {
    font-size: 1.85rem;
  }
  .header-subtitle {
    font-size: 1.35rem;
  }
  .section-title {
    font-size: 1.4rem;
  }
  .section-script {
    font-size: 1.25rem;
  }
  .dish-image-wrap {
    height: 160px;
  }
}

@media print {
  .sticky-nav-container,
  .search-filter-section,
  .floating-actions,
  .btn-header {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .dish-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
