/* =========================================
RESET
========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #050505;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

/* =========================================
VARIABLES
========================================= */

:root {
  --verde: #7fae8c;
  --verde-hover: #96c5a3;

  --negro: #050505;
  --gris: #121212;
  --gris-2: #1b1b1b;

  --texto: #ffffff;
  --texto-soft: rgba(255, 255, 255, 0.72);

  --borde: rgba(255, 255, 255, 0.08);

  --glass: rgba(255, 255, 255, 0.04);

  --blur: blur(18px);

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

  --radius: 26px;
}

/* =========================================
PAGE
========================================= */

.carta-page {
  width: 100%;
  min-height: 100vh;
  background: #050505;
}

/* =========================================
HERO
========================================= */

.carta-hero {
  position: relative;
  width: 100%;
  height: 58vh;
  overflow: hidden;
}

.carta-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;

  transform: scale(1.02);
}

.carta-hero-overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.82));

  z-index: 2;

  backdrop-filter: blur(1px);
}

.carta-hero-content {
  position: absolute;
  inset: 0;

  z-index: 3;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  text-align: center;

  padding: 40px;

  max-width: 1000px;

  margin: auto;
}

.carta-mini-title {
  display: inline-block;

  color: rgba(127, 174, 140, 0.98);

  font-size: 24px;

  font-weight: 500;

  letter-spacing: 10px;

  text-transform: uppercase;

  margin-bottom: 28px;

  opacity: 1;

  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

#heroTitle {
  font-family: "Cormorant Garamond", serif;

  font-size: clamp(64px, 9vw, 120px);

  font-weight: 300;

  line-height: 0.95;

  margin-bottom: 26px;

  letter-spacing: -2px;

  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

#heroDescription {
  font-size: clamp(18px, 2vw, 24px);

  line-height: 1.7;

  color: rgba(255, 255, 255, 0.82);

  max-width: 760px;

  margin: 0 auto;
}

.carta-hero::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 180px;

  background: linear-gradient(to bottom, transparent, #050505);

  z-index: 2;
}

/* =========================================
TOPBAR
========================================= */

.carta-topbar {
  position: sticky;
  top: 0;

  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 22px 7%;

  backdrop-filter: blur(20px);

  background: rgba(5, 5, 5, 0.82);

  border-bottom: 1px solid var(--borde);
}

.carta-label {
  display: block;

  margin-bottom: 10px;

  color: rgba(255, 255, 255, 0.62);

  font-size: 13px;

  letter-spacing: 1px;
}

.carta-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-color: #0b0b0b;

  color: #fff;

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid rgba(255, 255, 255, 0.08);

  color: #fff;

  padding: 14px 18px;

  border-radius: 14px;

  min-width: 260px;

  font-size: 15px;

  outline: none;

  backdrop-filter: blur(12px);

  transition: 0.3s;
}

/* OPCIONES DEL SELECT */

.carta-select option {
  background: #111;
  color: #fff;
}

.carta-select option:checked {
  background: var(--verde);
  color: #fff;
}

.carta-select:focus {
  background-color: #111;
  color: #fff;
}

.carta-select:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.carta-select:focus {
  border-color: var(--verde);
}

/* =========================================
LAYOUT
========================================= */

.carta-layout {
  display: grid;
  grid-template-columns: 280px 1fr;

  gap: 40px;

  width: 100%;

  padding: 60px 7%;
}

/* =========================================
SIDEBAR
========================================= */

.carta-sidebar {
  position: relative;
}

.sidebar-sticky {
  position: sticky;
  top: 120px;
}

.sidebar-title {
  display: block;

  margin-bottom: 22px;

  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.4);
}

.categorias-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.categoria-btn {
  width: 100%;

  background: transparent;

  border: 1px solid transparent;

  color: rgba(255, 255, 255, 0.72);

  text-align: left;

  padding: 16px 18px;

  border-radius: 16px;

  cursor: pointer;

  font-size: 16px;

  transition: 0.35s;
}

.categoria-btn:hover {
  background: rgba(255, 255, 255, 0.04);

  color: #fff;
}

.categoria-btn.active {
  background: rgba(127, 174, 140, 0.12);

  border-color: rgba(127, 174, 140, 0.35);

  color: #fff;
}

/* =========================================
CONTENT
========================================= */

.carta-content {
  width: 100%;
}

/* =========================================
GRID
========================================= */

.platos-grid {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));

  gap: 28px;
}

/* =========================================
CARD
========================================= */

.plato-card {
  position: relative;

  overflow: hidden;

  border-radius: 30px;

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid rgba(255, 255, 255, 0.06);

  backdrop-filter: blur(16px);

  transition:
    transform 0.45s ease,
    border 0.45s ease,
    box-shadow 0.45s ease;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.plato-card:hover {
  transform: translateY(-8px);

  border-color: rgba(255, 255, 255, 0.14);

  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

/* =========================================
IMAGE
========================================= */

.plato-image-wrapper {
  position: relative;

  width: 100%;
  height: 260px;

  overflow: hidden;
}

.plato-image {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.8s ease;
}

.plato-card:hover .plato-image {
  transform: scale(1.06);
}

/* =========================================
BODY
========================================= */

.plato-body {
  padding: 24px;
}

.plato-title {
  font-family: "Cormorant Garamond", serif;

  font-size: 34px;
  font-weight: 500;

  margin-bottom: 14px;

  line-height: 1.1;
}

.plato-description {
  color: rgba(255, 255, 255, 0.68);

  line-height: 1.7;

  font-size: 15px;

  margin-bottom: 26px;
}

/* =========================================
BOTTOM
========================================= */

.plato-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
}

.plato-price {
  font-size: 24px;
  font-weight: 700;

  color: var(--verde);
}

/* =========================================
ALERGENOS
========================================= */

.plato-alergenos {
  display: flex;
  align-items: center;
  gap: 10px;

  flex-wrap: wrap;
}

.alergeno-dot {
  width: 42px;
  height: 42px;

  border-radius: 50%;

  background: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 8px;

  cursor: pointer;

  transition: all 0.3s ease;

  border: 1px solid rgba(255, 255, 255, 0.15);

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.alergeno-dot img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.alergeno-dot:hover {
  transform: scale(1.15);
}

/* =========================================
MODAL IMAGE
========================================= */

.image-modal {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.92);

  padding: 40px;
}

.image-modal.active {
  display: flex;
}

.image-modal img {
  max-width: 90%;
  max-height: 88vh;

  border-radius: 24px;
}

.image-modal-close {
  position: absolute;

  top: 30px;
  right: 30px;

  width: 54px;
  height: 54px;

  border-radius: 50%;

  border: none;

  background: rgba(255, 255, 255, 0.12);

  color: #fff;

  font-size: 24px;

  cursor: pointer;
}

/* =========================================
ALERGENO MODAL
========================================= */

.alergeno-modal {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.82);

  padding: 20px;
}

.alergeno-modal.active {
  display: flex;
}

.alergeno-modal-box {
  position: relative;

  width: 100%;
  max-width: 500px;

  padding: 40px;

  border-radius: 30px;

  background: rgba(18, 18, 18, 0.96);

  border: 1px solid rgba(255, 255, 255, 0.08);
}

.alergeno-close {
  position: absolute;

  top: 20px;
  right: 20px;

  background: transparent;
  border: none;

  color: #fff;

  font-size: 22px;

  cursor: pointer;
}

.alergeno-color {
  width: 22px;
  height: 22px;

  border-radius: 50%;

  margin-bottom: 22px;
}

#alergenoNombre {
  font-size: 34px;

  margin-bottom: 14px;
}

#alergenoDescripcion {
  color: rgba(255, 255, 255, 0.72);

  line-height: 1.7;
}

/* =========================================
LOADER
========================================= */

.carta-loader {
  position: fixed;
  inset: 0;

  z-index: 999999;

  background: rgba(0, 0, 0, 0.92);

  display: none;
  align-items: center;
  justify-content: center;
}

.carta-loader.active {
  display: flex;
}

.loader-spinner {
  width: 70px;
  height: 70px;

  border-radius: 50%;

  border: 4px solid rgba(255, 255, 255, 0.1);

  border-top: 4px solid var(--verde);

  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================
SCROLLBAR
========================================= */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);

  border-radius: 20px;
}

/* =========================================
RESPONSIVE
========================================= */

@media (max-width: 1100px) {
  .carta-layout {
    grid-template-columns: 1fr;
  }

  .carta-sidebar {
    width: 100%;
  }

  .sidebar-sticky {
    position: relative;
    top: 0;
  }

  .categorias-container {
    flex-direction: row;
    overflow-x: auto;

    padding-bottom: 10px;
  }

  .categoria-btn {
    width: auto;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  /* =========================================
HERO
========================================= */

  .carta-hero {
    height: 62vh;
    min-height: 520px;
    max-height: 700px;
  }

  .carta-hero-content {
    padding: 140px 26px 90px;

    justify-content: center;
    align-items: center;

    text-align: center;
  }

  .carta-mini-title {
    font-size: 18px;

    letter-spacing: 7px;

    margin-bottom: 22px;

    color: rgba(127, 174, 140, 1);

    opacity: 1;

    font-weight: 500;

    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  }

  #heroTitle {
    font-size: clamp(74px, 16vw, 96px);

    line-height: 0.92;

    margin-bottom: 24px;

    letter-spacing: -2px;

    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  }

  #heroDescription {
    font-size: 24px;

    line-height: 1.45;

    max-width: 340px;

    opacity: 0.92;

    font-weight: 400;

    color: rgba(255, 255, 255, 0.9);
  }

  /* =========================================
TOPBAR
========================================= */

  .carta-topbar {
    position: relative;

    padding: 24px 20px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .carta-topbar-left {
    width: 100%;
  }

  .carta-label {
    font-size: 11px;

    margin-bottom: 12px;

    letter-spacing: 2px;

    text-transform: uppercase;
  }

  .carta-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-color: #0b0b0b;

    color: #fff;

    width: 100%;

    min-width: unset;

    height: 54px;

    border-radius: 18px;

    font-size: 15px;

    padding: 0 18px;

    background: rgba(255, 255, 255, 0.04);

    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .carta-select option {
    background: #111;
    color: #fff;
  }

  .carta-select option:checked {
    background: var(--verde);
    color: #fff;
  }
  /* =========================================
LAYOUT
========================================= */

  .carta-layout {
    display: flex;

    flex-direction: column;

    gap: 26px;

    padding: 0 18px 120px;
  }

  .carta-select:focus {
    background-color: #111;
    color: #fff;
  }

  /* =========================================
SIDEBAR
========================================= */

  .sidebar-sticky {
    position: relative;

    top: unset;
  }

  .sidebar-title {
    font-size: 11px;

    letter-spacing: 4px;

    margin-bottom: 16px;

    padding-left: 4px;
  }

  .categorias-container {
    display: flex;

    flex-direction: row;

    gap: 12px;

    overflow-x: auto;

    padding-bottom: 8px;

    scrollbar-width: none;

    -webkit-overflow-scrolling: touch;
  }

  .categorias-container::-webkit-scrollbar {
    display: none;
  }

  .categoria-btn {
    width: auto;

    min-width: max-content;

    padding: 14px 18px;

    border-radius: 999px;

    font-size: 14px;

    white-space: nowrap;

    background: rgba(255, 255, 255, 0.03);

    border: 1px solid transparent;
  }

  .categoria-btn.active {
    background: rgba(127, 174, 140, 0.16);

    border-color: rgba(127, 174, 140, 0.28);

    box-shadow: 0 10px 30px rgba(127, 174, 140, 0.12);
  }

  /* =========================================
GRID
========================================= */

  .platos-grid {
    display: flex;

    flex-direction: column;

    gap: 18px;
  }

  /* =========================================
CARD
========================================= */

  .plato-card {
    border-radius: 26px;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.035);

    border: 1px solid rgba(255, 255, 255, 0.06);

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  }

  .plato-image-wrapper {
    height: 230px;
  }

  .plato-body {
    padding: 22px;
  }

  .plato-title {
    font-size: 34px;

    line-height: 1;

    margin-bottom: 12px;
  }

  .plato-description {
    font-size: 14px;

    line-height: 1.7;

    margin-bottom: 22px;

    color: rgba(255, 255, 255, 0.68);
  }

  .plato-bottom {
    align-items: center;
  }

  .plato-price {
    font-size: 24px;
  }

  .plato-alergenos {
    gap: 8px;
  }

  .alergeno-dot {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  #heroTitle {
    font-size: 64px;
  }

  .plato-body {
    padding: 20px;
  }

  .plato-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

.plato-card {
  opacity: 0;

  transform: translateY(40px);

  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.plato-card.show {
  opacity: 1;

  transform: translateY(0);
}

.plato-image {
  opacity: 0;

  transition:
    opacity 0.6s ease,
    transform 0.5s ease;
}

.plato-image.loaded {
  opacity: 1;
}

.image-modal {
  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.92);

  display: flex;

  align-items: center;

  justify-content: center;

  opacity: 0;

  visibility: hidden;

  transition: 0.4s ease;

  z-index: 99999;
}

.image-modal.active {
  opacity: 1;

  visibility: visible;
}

.image-modal img {
  max-width: 90%;

  max-height: 88vh;

  border-radius: 24px;

  transform: scale(0.9);

  transition: 0.4s ease;
}

.image-modal.active img {
  transform: scale(1);
}

.image-modal-close {
  position: absolute;

  top: 30px;

  right: 30px;

  width: 52px;

  height: 52px;

  border-radius: 50%;

  border: none;

  background: rgba(255, 255, 255, 0.08);

  color: #fff;

  font-size: 24px;

  cursor: pointer;
}

.alergeno-modal {
  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.7);

  display: flex;

  align-items: center;

  justify-content: center;

  opacity: 0;

  visibility: hidden;

  transition: 0.3s ease;

  z-index: 99998;
}

.alergeno-modal.active {
  opacity: 1;

  visibility: visible;
}

.alergeno-modal-box {
  width: 420px;

  background: #111;

  border-radius: 28px;

  padding: 40px;

  position: relative;

  transform: translateY(30px);

  transition: 0.35s ease;
}

.alergeno-modal.active .alergeno-modal-box {
  transform: translateY(0);
}

.alergeno-close {
  position: absolute;

  top: 18px;

  right: 18px;

  background: none;

  border: none;

  color: #fff;

  font-size: 22px;

  cursor: pointer;
}

.alergeno-color {
  width: 18px;

  height: 18px;

  border-radius: 50%;

  margin-bottom: 18px;
}

body.modal-open {
  overflow: hidden;
}

.hero-restaurant-name {
  margin-top: 20px;

  font-size: 18px;

  letter-spacing: 4px;

  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.68);

  font-weight: 500;

  border-top: 1px solid rgba(255, 255, 255, 0.12);

  padding-top: 18px;

  animation: fadeHeroRestaurant 0.4s ease;
}

@keyframes fadeHeroRestaurant {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*Nombre del restaurante*/
@media (max-width: 768px) {
  .hero-restaurant-name {
    font-size: 13px;

    letter-spacing: 3px;

    margin-top: 16px;

    padding-top: 14px;
  }
}

.carta-topbar.solo-sede {
  justify-content: center;
}

.carta-topbar.solo-sede .carta-label {
  display: none;
}

/* =========================================
OCULTAR SELECTOR EN PÁGINAS DE RESTAURANTE
========================================= */

.carta-topbar.hide-selector {
  display: none;
}

.carta-topbar.hide-selector + .carta-layout {
  padding-top: 40px;
}

.carta-hero-image {
  transition:
    opacity 0.6s ease,
    transform 1.2s ease;
}

.alergeno-icon {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.3s ease;
}

.alergeno-icon:hover {
  transform: translateY(-2px) scale(1.08);

  background: rgba(127, 174, 140, 0.12);

  border-color: rgba(127, 174, 140, 0.25);
}

.alergeno-icon img {
  width: 100%;
  height: 100%;

  object-fit: contain;
}

/* =========================================
TOOLTIP ALÉRGENOS PRO
========================================= */

.alergeno-tooltip {
  position: fixed;

  z-index: 999999;

  padding: 12px 18px;

  border-radius: 16px;

  background: rgba(15, 15, 15, 0.92);

  border: 1px solid rgba(255, 255, 255, 0.08);

  backdrop-filter: blur(16px);

  color: #fff;

  font-size: 14px;

  font-weight: 500;

  letter-spacing: 0.5px;

  pointer-events: none;

  opacity: 0;

  transform: translateY(10px) scale(0.96);

  transition: all 0.22s ease;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.alergeno-tooltip.show {
  opacity: 1;

  transform: translateY(0) scale(1);
}

/* =========================================
COMBINADOS
========================================= */
.plato-combos {
  margin-top: 18px;

  padding: 14px 16px;

  border-radius: 16px;

  background: linear-gradient(135deg, rgba(160, 110, 45, 0.14), rgba(90, 60, 25, 0.1));

  border: 1px solid rgba(201, 145, 71, 0.28);

  box-shadow:
    0 0 0 1px rgba(201, 145, 71, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.18);
}

.combo-title {
  display: flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 12px;

  font-size: 0.74rem;

  font-weight: 700;

  letter-spacing: 0.16em;

  text-transform: uppercase;

  color: #d8a15a;
}

.combo-item {
  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 9px 0;

  border-bottom: 1px dashed rgba(216, 161, 90, 0.18);
}

.combo-item:last-child {
  border-bottom: none;
}

.combo-item span {
  color: #e99b35;

  font-size: 0.96rem;

  font-weight: 500;
}

.combo-item strong {
  color: #e0a55d;

  font-size: 0.98rem;

  font-weight: 700;
}

.plato-thumb {
  transition: 0.25s ease;
  cursor: pointer;
}

.plato-thumb:hover {
  transform: scale(2.3);
  position: relative;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
