/* Reset & Variables */
:root {
  --bg-dark: #13251c;
  --bg-darker: #0b1510;
  --accent: #e8d8c1;
  --gold: #f0d2a4;
  --text-white: #ffffff;
  --text-muted: #a3b6ab;
  --text-muted-dark: #7a8c82;
  --card-bg: rgba(232, 216, 193, 0.03);
  --card-bg-hover: rgba(232, 216, 193, 0.06);
  --border-color: rgba(232, 216, 193, 0.12);
  --border-color-strong: rgba(232, 216, 193, 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  --font-brand: 'Cinzel', serif;
  --font-title: 'Cormorant Garamond', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-darker);
  font-family: var(--font-body);
  color: var(--text-white);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  line-height: 1.5;
  overflow-x: hidden;
}

/* App Container - Centered and max-width for mobile viewports */
.app-container {
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  border-left: 1px solid rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.02);
  position: relative;
}

/* Header Styles */
.main-header {
  padding: 30px 20px 15px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  background-color: #13251c; /* Solid dark green so the banner always stays dark */
}

.main-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('header-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.6; /* 60% opacity */
  z-index: 0;
  transition: var(--transition-smooth);
}

.light-mode .main-header::before {
  opacity: 0.25; /* Soften in light mode */
}

.main-header * {
  position: relative;
  z-index: 1;
}

.brand-logo {
  max-width: 140px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
  mix-blend-mode: screen;
  transition: var(--transition-smooth);
}

.brand-logo:hover {
  transform: scale(1.02);
}

/* Soporte para logo en temas claros - Deshabilitado para mantener logo blanco sobre el banner oscuro */
.light-mode .brand-logo {
  mix-blend-mode: screen;
}

.menu-main-title {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 6px;
  color: var(--text-white);
  margin-top: 10px;
  position: relative;
  display: inline-block;
}

.menu-main-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 15%;
  width: 70%;
  height: 1px;
  background-color: var(--border-color-strong);
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 16px 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
  position: relative;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tab-btn.active {
  color: var(--accent);
}

.tab-btn.active::after {
  transform: scaleX(1);
}

.btn-icon {
  width: 20px;
  height: 20px;
  transition: var(--transition-smooth);
}

.tab-btn.active .btn-icon {
  transform: translateY(-2px);
  color: var(--accent);
}

/* Menu Content & Panels */
.menu-content {
  flex: 1;
  padding: 24px 20px;
  position: relative;
}

.tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  text-align: center;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 24px;
}

/* Menu Category Card */
.menu-category {
  margin-bottom: 32px;
}

.category-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--border-color-strong);
  padding-bottom: 6px;
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.category-items {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Menu Item */
.menu-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
  transition: var(--transition-smooth);
}

.menu-item:hover {
  background-color: var(--card-bg-hover);
  border-color: var(--border-color-strong);
  transform: translateY(-2px);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.item-name {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-white);
}

.item-price {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.item-description {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.4;
}

.item-meta {
  margin-top: 4px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

/* Intensity display */
.intensity-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.intensity-label {
  font-size: 0.75rem;
  color: var(--text-muted-dark);
  font-weight: 600;
}

.beans {
  display: flex;
  gap: 4px;
}

.bean {
  width: 12px;
  height: 12px;
  color: rgba(232, 216, 193, 0.15); /* Inactive bean */
  transition: var(--transition-smooth);
}

.bean.active {
  color: var(--gold); /* Active bean color */
}

/* Scale Legend */
.scale-legend {
  background-color: var(--card-bg);
  border: 1px dashed var(--border-color-strong);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  margin-bottom: 36px;
}

.legend-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 8px;
}

.legend-scale {
  display: flex;
  justify-content: space-around;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.scale-point {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scale-point span {
  font-weight: 400;
  color: var(--text-muted-dark);
  margin-top: 2px;
}

/* Special Recommendations Section */
.special-category {
  background-color: rgba(240, 210, 164, 0.02);
  border: 1px solid rgba(240, 210, 164, 0.15);
  border-radius: 12px;
  padding: 20px 16px;
}

.star-title {
  color: var(--gold);
  border-color: rgba(240, 210, 164, 0.25);
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-icon {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.grid-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.recom-card {
  background-color: rgba(240, 210, 164, 0.03);
  border: 1px solid rgba(240, 210, 164, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  transition: var(--transition-smooth);
}

.recom-card:hover {
  background-color: rgba(240, 210, 164, 0.06);
  border-color: var(--gold);
  transform: scale(1.01);
}

.recom-name {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
  display: block;
  margin-bottom: 2px;
}

.recom-desc {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Customizations Card */
.custom-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}

.custom-card-title {
  font-family: var(--font-brand);
  font-size: 1.1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 1px;
}

.custom-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.custom-group {
  padding-bottom: 12px;
}

.custom-group:not(:last-child) {
  border-bottom: 1px dashed var(--border-color);
}

.group-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-white);
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.price-tag {
  color: var(--gold);
}

.custom-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.custom-list li {
  position: relative;
  padding-left: 12px;
}

.custom-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.custom-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer & SVG Illustration */
.main-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 30px 20px 40px;
  text-align: center;
  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
}

.illustration-container {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.barista-illustration {
  width: 100%;
  max-width: 320px;
  height: auto;
  color: var(--accent);
  opacity: 0.65;
  transition: var(--transition-smooth);
}

.barista-illustration:hover {
  opacity: 0.9;
  color: var(--gold);
}

.footer-text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted-dark);
  letter-spacing: 0.5px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-panel.active .menu-category {
  animation: fadeInUp 0.4s ease forwards;
}

/* Category staggered animation delay */
.tab-panel.active .menu-category:nth-child(1) { animation-delay: 0.05s; }
.tab-panel.active .menu-category:nth-child(2) { animation-delay: 0.15s; }
.tab-panel.active .menu-category:nth-child(3) { animation-delay: 0.25s; }
.tab-panel.active .menu-category:nth-child(4) { animation-delay: 0.35s; }

/* Custom Scrollbar for desktop preview */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Seccion Quienes Somos (Nosotros) */
.about-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeInUp 0.4s ease forwards;
}

.about-hero {
  text-align: center;
  margin-bottom: 10px;
}

.about-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-items);
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
  transition: var(--transition-smooth);
}

.about-img:hover {
  transform: scale(1.01);
  border-color: var(--border-color-strong);
}

.about-img.secondary-img {
  height: 180px;
  margin: 10px 0;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 15px 0;
}

.about-gallery .gallery-img {
  height: 120px;
  margin: 0;
}

.about-tagline {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1.4;
}

.about-subtitle {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--accent);
  margin-top: 15px;
  margin-bottom: 8px;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

.about-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: justify;
}

.about-footer-info {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-items);
  padding: 15px;
  text-align: center;
  margin-top: 10px;
}

.about-highlight {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
}

/* Quantity Selector & Floating Cart Bar Styles */
.item-selector {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.qty-btn {
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.qty-btn:hover {
  background-color: var(--accent);
  color: #13251c;
  border-color: var(--accent);
}

.qty-val {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 20px;
  text-align: center;
  color: var(--text-main);
}

.menu-item.active-order {
  border-color: var(--accent);
  background-color: rgba(232, 216, 193, 0.03);
}

.cart-floating-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  width: calc(100% - 32px);
  max-width: 500px;
  background: rgba(19, 37, 28, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 216, 193, 0.2);
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.cart-floating-bar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cart-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-count {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.cart-total {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 700;
}

.cart-btn {
  background-color: #25D366;
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.cart-btn:active {
  transform: scale(0.97);
}

.cart-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

body {
  padding-bottom: 90px;
}
