:root {
  --wine: #8e1719;
  --wine-dark: #6f1012;
  --wine-soft: #f6e9e6;
  --gold: #ba8641;
  --gold-soft: #fff4db;
  --ink: #201d1a;
  --muted: #706963;
  --paper: #ffffff;
  --canvas: #fbfaf7;
  --line: #e7e1da;
  --line-strong: #d8cdc0;
  --green: #25d366;
  --shadow: 0 18px 50px rgba(57, 38, 21, 0.10);
  --shadow-small: 0 8px 24px rgba(57, 38, 21, 0.08);
  --sidebar-width: 320px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(186, 134, 65, 0.28);
  outline-offset: 2px;
}

.order-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.order-sidebar {
  position: relative;
  z-index: 20;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.sidebar-inner {
  position: sticky;
  top: 0;
  max-height: 100vh;
  padding: 28px 22px 120px;
  overflow-y: auto;
}

.brand-link {
  display: block;
  width: min(245px, 100%);
  margin: 0 auto;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.pilot-label {
  width: fit-content;
  margin: 10px auto 28px;
  padding: 6px 11px;
  color: var(--wine);
  border: 1px solid rgba(142, 23, 25, 0.28);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.identity-panel {
  padding: 0 2px 24px;
  border-bottom: 1px solid var(--line);
}

.identity-panel label {
  display: block;
  margin-bottom: 9px;
  color: #6d431d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.identity-panel input {
  width: 100%;
  min-height: 51px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid #cdb38f;
  border-radius: 11px;
  background: #fffefa;
}

.identity-panel input:focus {
  border-color: var(--gold);
}

.identity-help,
.field-error {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.identity-help {
  color: var(--muted);
}

.field-error {
  color: var(--wine);
  font-weight: 750;
}

.how-panel {
  margin-top: 24px;
  padding: 22px 14px 14px;
  border: 1px solid #efe8dd;
  border-radius: 16px;
  background: linear-gradient(145deg, #fffefb, #f8f2e8);
}

.how-panel h2 {
  margin: 0 0 20px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.how-panel h2::before {
  content: "— ";
  color: var(--gold);
}

.how-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 20px;
}

.how-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #805b2f;
  border-radius: 9px;
  background: #f0dfbd;
  font-size: 0.82rem;
  font-weight: 900;
}

.whatsapp-step {
  color: white;
  background: var(--green);
}

.how-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.how-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.48;
}

.confirmation-box {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(186, 134, 65, 0.09);
}

.confirmation-box span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #805b2f;
  border: 1px solid #a37842;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
}

.confirmation-box p {
  margin: 0;
  color: #4e4135;
  font-size: 0.73rem;
  line-height: 1.5;
}

.menu-main {
  min-width: 0;
  padding: 14px 22px 126px;
}

.top-notice {
  position: sticky;
  top: 0;
  z-index: 18;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #f0d39a;
  border-radius: 13px;
  background: rgba(255, 248, 229, 0.95);
  box-shadow: 0 8px 20px rgba(89, 63, 25, 0.05);
  backdrop-filter: blur(12px);
}

.drinks-message {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.drinks-icon {
  display: grid;
  flex: 0 0 43px;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: #f6e4b9;
}

.drinks-message strong {
  display: block;
  color: #6a3b13;
  font-size: 0.86rem;
}

.drinks-message p {
  margin: 3px 0 0;
  color: #7b4e25;
  font-size: 0.78rem;
  line-height: 1.35;
}

.language-menu {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #dec9a5;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.46);
}

.language-menu select {
  color: #6a3b13;
  border: 0;
  background: transparent;
  font-weight: 900;
  outline: none;
}

.category-nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(116px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 14px;
  scrollbar-width: thin;
}

.category-nav button {
  min-height: 55px;
  padding: 9px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 160ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.category-nav button:hover {
  transform: translateY(-1px);
  border-color: #cbb6a0;
}

.category-nav button.active {
  color: white;
  border-color: var(--wine);
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
  box-shadow: 0 9px 22px rgba(142, 23, 25, 0.20);
}

.menu-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 10px 18px;
  border-bottom: 1px solid var(--line-strong);
}

.eyebrow {
  color: var(--wine);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.menu-heading h1 {
  margin: 4px 0 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
}

.menu-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.heading-mark {
  flex: 0 0 auto;
  color: var(--wine);
  font-size: 1.3rem;
}

.menu-container {
  padding: 22px 0 8px;
}

.menu-section {
  margin-bottom: 14px;
  scroll-margin-top: 140px;
}

.section-heading {
  display: none;
}

.category-products[hidden] {
  display: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 280px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: var(--shadow-small);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.product-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #efe9e0;
}

.product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 15px 15px 16px;
}

.product-tags {
  margin-bottom: 7px;
}

.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #94621f;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product-body h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.15;
}

.product-description {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 15px;
}

.product-price {
  color: var(--wine);
  font-size: 1.06rem;
  white-space: nowrap;
}

.add-button {
  min-height: 37px;
  padding: 0 14px;
  color: white;
  border: 0;
  border-radius: 999px;
  background: var(--wine);
  font-size: 0.74rem;
  font-weight: 900;
}

.quantity-control {
  display: inline-grid;
  grid-template-columns: 33px 28px 33px;
  align-items: center;
  gap: 2px;
}

.quantity-control button {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  padding: 0;
  color: white;
  border: 0;
  border-radius: 50%;
  background: var(--wine);
  font-size: 1.2rem;
  line-height: 1;
}

.quantity-control strong {
  text-align: center;
  font-size: 1rem;
}

.allergy-note {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid #ead8b6;
  border-radius: 13px;
  background: #fff8e8;
}

.allergy-note strong {
  display: block;
  margin-bottom: 5px;
  color: #69451e;
}

.allergy-note p {
  margin: 0;
  color: #795b38;
  font-size: 0.8rem;
  line-height: 1.5;
}

.cart-bar {
  position: fixed;
  z-index: 40;
  right: 22px;
  bottom: calc(18px + var(--safe-bottom));
  left: calc(var(--sidebar-width) + 22px);
  display: grid;
  grid-template-columns: auto auto auto auto auto auto auto 1fr;
  gap: 16px;
  align-items: center;
  min-height: 66px;
  padding: 10px 16px 10px 20px;
  color: white;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
  box-shadow: 0 20px 42px rgba(112, 13, 16, 0.30);
}

.cart-symbol {
  font-size: 1.35rem;
}

.cart-count {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  color: #65401d;
  border-radius: 999px;
  background: #ead1a4;
  font-size: 0.78rem;
  font-weight: 900;
}

.cart-caption {
  font-weight: 900;
}

.cart-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.32);
}

.cart-action {
  justify-self: end;
  min-width: 154px;
  padding: 13px 18px;
  color: #65401d;
  border-radius: 10px;
  background: #ead1a4;
  font-weight: 900;
  text-align: center;
}

.drawer-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(22, 14, 10, 0.54);
  backdrop-filter: blur(3px);
}

.cart-drawer {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(470px, 100%);
  padding: 28px 24px calc(28px + var(--safe-bottom));
  overflow-y: auto;
  background: var(--paper);
  box-shadow: -20px 0 60px rgba(20, 14, 10, 0.22);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  font-size: 1.7rem;
  line-height: 1;
}

.cart-items {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefb;
}

.cart-item h3 {
  margin: 0 0 5px;
  font-size: 0.95rem;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.empty-cart {
  margin: 28px 0;
  padding: 30px 18px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  text-align: center;
}

.empty-cart span {
  font-size: 2rem;
}

.empty-cart p {
  margin: 8px 0 0;
}

.notes-label {
  display: block;
  margin: 22px 0 8px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

#orderNotes {
  width: 100%;
  min-height: 112px;
  padding: 13px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fffefb;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.total-row strong {
  color: var(--wine);
  font-size: 1.4rem;
}

.whatsapp-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  color: white;
  border: 0;
  border-radius: 12px;
  background: #1fb657;
  font-weight: 900;
}

.whatsapp-button:disabled,
.whatsapp-button.is-closed {
  cursor: not-allowed;
  background: #8b8580;
  opacity: 0.82;
}

.ordering-hours-status {
  margin: 12px 0 0;
  color: #267545;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.ordering-hours-status.is-closed {
  color: var(--wine);
}

.confirmation-note {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

.clear-button {
  width: 100%;
  min-height: 43px;
  color: var(--wine);
  border: 1px solid rgba(142, 23, 25, 0.25);
  border-radius: 11px;
  background: transparent;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 100;
  top: 18px;
  left: 50%;
  padding: 11px 15px;
  color: white;
  border-radius: 999px;
  background: #22201d;
  box-shadow: var(--shadow-small);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -14px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1260px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-nav {
    grid-template-columns: repeat(7, minmax(126px, 1fr));
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-width: 268px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cart-bar {
    gap: 10px;
  }

  .cart-caption,
  .cart-divider,
  #cartItemsText {
    display: none;
  }
}

@media (max-width: 760px) {
  .order-shell {
    display: block;
  }

  .order-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-inner {
    position: static;
    max-height: none;
    padding: 18px 16px 20px;
    overflow: visible;
  }

  .brand-link {
    width: 190px;
  }

  .brand-logo {
    height: 85px;
  }

  .pilot-label {
    margin: 4px auto 18px;
  }

  .how-panel {
    display: none;
  }

  .identity-panel {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .menu-main {
    padding: 12px 14px 116px;
  }

  .top-notice {
    position: static;
    align-items: flex-start;
  }

  .drinks-icon {
    flex-basis: 37px;
    width: 37px;
    height: 37px;
  }

  .drinks-message p {
    display: none;
  }

  .language-menu {
    padding: 7px 8px;
  }

  .category-nav {
    display: flex;
    margin-right: -14px;
    margin-left: -14px;
    padding: 4px 14px 12px;
    overflow-x: auto;
  }

  .category-nav button {
    flex: 0 0 auto;
    min-width: 112px;
    min-height: 48px;
  }

  .menu-heading {
    padding: 16px 2px 16px;
  }

  .menu-heading h1 {
    font-size: 2.25rem;
  }

  .heading-mark {
    display: none;
  }

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

  .product-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .product-card:not(:has(.product-photo)) {
    display: block;
  }

  .product-photo {
    height: 100%;
    min-height: 150px;
    aspect-ratio: auto;
  }

  .product-body {
    padding: 14px;
  }

  .product-body h3 {
    font-size: 1.03rem;
  }

  .product-footer {
    padding-top: 12px;
  }

  .cart-bar {
    right: 10px;
    bottom: calc(10px + var(--safe-bottom));
    left: 10px;
    grid-template-columns: auto auto 1fr auto;
    min-height: 60px;
    padding: 8px 10px 8px 15px;
  }

  .cart-caption {
    display: inline;
  }

  .cart-action {
    min-width: 120px;
    padding: 11px 13px;
  }
}

@media (max-width: 430px) {
  .top-notice {
    gap: 10px;
  }

  .drinks-message strong {
    font-size: 0.78rem;
  }

  .product-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .product-photo {
    min-height: 142px;
  }

  .product-body {
    padding: 12px;
  }

  .product-price {
    font-size: 0.94rem;
  }

  .quantity-control {
    grid-template-columns: 30px 23px 30px;
  }

  .quantity-control button {
    width: 30px;
    height: 30px;
  }

  .cart-caption {
    display: none;
  }

  .cart-bar {
    grid-template-columns: auto auto 1fr;
  }

  .cart-action {
    min-width: 108px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}


/* SABOR ALEGRE v6.5 — accesos a carta e inicio */
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.return-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(143, 23, 25, 0.18);
  border-radius: 14px;
  color: #7d1719;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.return-link:hover,
.return-link:focus-visible {
  background: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .return-home {
    display: none;
  }
}


/* v6.6: iconos SVG visibles y consistentes en todos los dispositivos */
.drinks-icon svg,
.language-icon svg,
.heading-mark svg,
.cart-symbol svg,
.whatsapp-icon svg,
.category-icon svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.category-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.language-icon,
.whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-symbol svg {
  width: 1.8rem;
  height: 1.8rem;
}

.heading-mark svg {
  width: 2rem;
  height: 2rem;
}
