/* ============================================
   Mis Raízes - Cocina Peruana
   Digital Menu Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Raleway:wght@300;400;500;600;700&display=swap');

/* === CSS Variables === */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --gold: #d4a853;
  --gold-light: #e8c97a;
  --gold-dark: #b8903f;
  --gold-glow: rgba(212, 168, 83, 0.15);
  --gold-glow-strong: rgba(212, 168, 83, 0.3);
  --text-primary: #f5f0e8;
  --text-secondary: #a89e8c;
  --text-muted: #6b6358;
  --border-gold: rgba(212, 168, 83, 0.25);
  --border-gold-hover: rgba(212, 168, 83, 0.5);
  --shadow-gold: 0 0 30px rgba(212, 168, 83, 0.08);
  --radius: 12px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Raleway', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* === Animated Background === */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(212, 168, 83, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(212, 168, 83, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(212, 168, 83, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* === Decorative Pattern Overlay === */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a853' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* === Header === */
.header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 50px 20px 30px;
  background: linear-gradient(180deg, rgba(212, 168, 83, 0.06) 0%, transparent 100%);
}

.logo-container {
  margin-bottom: 15px;
  animation: fadeInScale 1s ease-out;
}

.logo {
  max-width: 280px;
  width: 80%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 20px rgba(212, 168, 83, 0.2));
  transition: var(--transition);
}

.logo:hover {
  filter: drop-shadow(0 0 30px rgba(212, 168, 83, 0.4));
  transform: scale(1.02);
}

.header-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px auto;
  max-width: 400px;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.3s forwards;
}

.header-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.header-divider .diamond {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.header-subtitle {
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeIn 1s ease-out 0.5s forwards;
}

/* === Navigation / Category Filter === */
.category-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-gold);
  padding: 12px 0;
  transition: var(--transition);
}

.category-nav.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  flex-shrink: 0;
  padding: 8px 20px;
  border: 1px solid var(--border-gold);
  border-radius: 50px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-btn:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold-light);
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-color: var(--gold);
  color: var(--bg-primary);
  font-weight: 600;
  box-shadow: 0 0 20px rgba(212, 168, 83, 0.3);
}

.nav-btn.highlight-gold {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
  font-weight: 700;
}

.nav-btn.highlight-gold:hover {
  background: var(--gold);
  color: var(--bg-primary);
}

/* === Main Content === */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px 80px;
}

/* === Category Section === */
.category-section {
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.category-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 25px;
  padding-bottom: 12px;
  position: relative;
}

.category-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent 80%);
}

.category-icon {
  font-size: 1.6rem;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-glow);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  flex-shrink: 0;
}

.category-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.category-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 3px;
}

/* === Menu Item === */
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 18px;
  margin-bottom: 6px;
  border-radius: var(--radius);
  background: transparent;
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--gold);
  opacity: 0;
  transition: var(--transition);
}

.menu-item:hover {
  background: var(--bg-card);
  transform: translateX(5px);
}

.menu-item:hover::before {
  opacity: 1;
}

.item-info {
  flex: 1;
  margin-right: 15px;
}

.item-name {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  transition: var(--transition);
}

.menu-item:hover .item-name {
  color: var(--gold-light);
}

.item-description {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.4;
  font-style: italic;
}

.item-dots {
  flex: 1;
  min-width: 30px;
  border-bottom: 1px dotted var(--border-gold);
  margin: 0 10px;
  align-self: center;
  opacity: 0.5;
}

.item-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

.item-price .euro {
  font-size: 0.85rem;
  font-weight: 400;
  margin-left: 2px;
}

/* === Combo special style === */
.menu-item.combo {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  margin-bottom: 12px;
  padding: 20px;
}

.menu-item.combo:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  background: var(--bg-card-hover);
}

/* === Desayuno note === */
.category-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--gold-glow);
  border: 1px solid var(--border-gold);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--gold-light);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.category-note .icon {
  font-size: 0.9rem;
}

/* === Footer === */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border-gold);
  background: linear-gradient(0deg, rgba(212, 168, 83, 0.04) 0%, transparent 100%);
}

.footer-logo {
  max-width: 120px;
  margin-bottom: 15px;
  opacity: 0.6;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.footer-iva {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.6;
}

/* === Loading Spinner === */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 2px solid var(--border-gold);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* === Animations === */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* === Scroll to top button === */
.scroll-top {
  position: fixed;
  bottom: 85px;
  right: 25px;
  z-index: 200;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--bg-primary);
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

.scroll-top:hover {
  background: var(--gold);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(212, 168, 83, 0.3);
}

/* === Responsive === */
@media (max-width: 600px) {
  .header {
    padding: 35px 15px 20px;
  }

  .logo {
    max-width: 220px;
  }

  .header-subtitle {
    font-size: 0.7rem;
    letter-spacing: 3px;
  }

  .category-title {
    font-size: 1.25rem;
  }

  .menu-item {
    padding: 12px 14px;
  }

  .item-name {
    font-size: 0.92rem;
  }

  .item-price {
    font-size: 1rem;
  }

  .main-content {
    padding: 20px 15px 60px;
  }

  .nav-btn {
    padding: 7px 14px;
    font-size: 0.7rem;
  }

  .item-dots {
    display: none;
  }

  .weekly-menu-container {
    aspect-ratio: auto;
  }
}

/* === Weekly Menu Modal === */
.weekly-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.weekly-modal-content {
  position: relative;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.weekly-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.weekly-modal-close:hover {
  color: var(--gold);
  transform: rotate(90deg);
}

.weekly-menu-section {
  max-width: 600px;
  margin: 0 auto 50px;
  padding: 0 20px;
}

.weekly-menu-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-gold);
}

.menu-bg {
  width: 100%;
  height: auto;
  display: block;
}

.menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.menu-column {
  position: absolute;
  width: 70%;
  left: 15%;
  text-align: center;
}

.menu-column.primeros {
  top: 40%;
}

.menu-column.segundos {
  top: 58%;
}

.menu-column ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.menu-column li {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(0.75rem, 2.6vw, 0.95rem);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.2px;
  line-height: 1;
  margin-bottom: 1px;
}

@media (min-width: 768px) {
  .header {
    padding: 60px 20px 40px;
  }

  .logo {
    max-width: 320px;
  }

  .category-title {
    font-size: 1.7rem;
  }

  .menu-item {
    padding: 18px 22px;
  }
}