/* V13: coherent 16:9 component system.
   Keep all image-driven modules on 16:9 frames. Text-driven site sections
   remain content-height, because forcing a 15-item order form into 16:9
   would clip or shrink real controls, especially on phones. */
.site-v5 {
  --media-ratio: 16 / 9;
  --section-space: clamp(42px, 4.6vw, 82px);
}
.site-v5 img { max-width: 100%; }
.site-v5 .specials-section,
.site-v5 .steps-section,
.site-v5 .delivery-section,
.site-v5 .menu-section,
.site-v5 .faq-section { padding-block: var(--section-space); }
.site-v5 .specials-grid,
.site-v5 .category-grid { gap: clamp(14px, 1.7vw, 25px); }

/* House special cards: 16:9 compositions with embedded, real HTML labels. */
.site-v5 .special-card {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: var(--media-ratio);
  border: 1px solid #ebe0d1;
  border-radius: 15px;
  overflow: hidden;
  background: #053f49;
}
.site-v5 .special-card > img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 50%;
  z-index: 0;
}
.site-v5 .special-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0,39,47,.96) 0%, rgba(0,39,47,.84) 20%, rgba(0,39,47,.48) 43%, transparent 71%);
}
.site-v5 .special-content {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: end;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: clamp(18px, 2.1vw, 35px);
  gap: 4px;
  color: #fff;
}
.site-v5 .special-tag {
  display: inline-block;
  background: rgba(255,255,255,.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 100px;
  padding: 3px 9px;
}
.site-v5 .special-content h3 {
  font-size: clamp(23px, 2vw, 35px) !important;
  line-height: 1.14;
  color: #fff !important;
  text-shadow: 0 1px 7px #00191caa;
  margin: 5px 0 1px;
}
.site-v5 .special-content p {
  font-size: 14px !important;
  line-height: 1.42;
  color: #e8f6f4;
  margin: 0;
}
.site-v5 .special-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.site-v5 .special-actions strong { color: #fff; font-size: 22px; }
.site-v5 .special-actions button {
  min-height: 44px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,.55);
  background: #d50c1e;
  color: #fff;
  box-shadow: 0 3px 9px #001f2733;
}

/* Ordering steps: 3 legible 16:9 information panels. */
.site-v5 .steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(13px, 1.6vw, 23px);
  border: 0;
}
.site-v5 .step,
.site-v5 .step:nth-child(2),
.site-v5 .step:last-child {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: var(--media-ratio);
  padding: clamp(19px, 2.2vw, 36px);
  border: 1px solid #e8decd;
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: 0 5px 18px #223a3d0c;
}
.site-v5 .step-num {
  font-size: clamp(36px, 4vw, 69px);
  line-height: 1;
  color: #c81025;
  letter-spacing: -.09em;
  height: auto;
  min-height: 0;
  flex: 0 0 auto;
}
.site-v5 .step h3 {
  font-size: clamp(17px, 1.45vw, 23px) !important;
  margin-bottom: 6px;
}
.site-v5 .step p {
  max-width: 340px;
  font-size: clamp(13px, 1.04vw, 16px) !important;
}
.site-v5 .steps-note { margin-top: 18px; }

/* Delivery artwork: 16:9 media frame, with a natural center crop. */
.site-v5 .delivery-photo {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: var(--media-ratio);
  overflow: hidden;
  border-radius: 15px;
  background: #d9e7df;
}
.site-v5 .delivery-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 50% 49%;
}
.site-v5 .delivery-layout {
  align-items: center;
  gap: clamp(30px, 5vw, 100px);
}

/* Category cards: 16:9 photo tiles, with titles in a gradient within the frame. */
.site-v5 .category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin-bottom: clamp(40px, 4.8vw, 75px);
  overflow: visible;
}
.site-v5 .category-card {
  position: relative;
  display: block;
  isolation: isolate;
  aspect-ratio: var(--media-ratio);
  min-height: 0;
  max-height: none;
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  background: #003e48;
}
.site-v5 .category-card img {
  position: absolute;
  display: block;
  inset: 0;
  width: 100%;
  height: 100% !important;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 50%;
  filter: none;
  transform: none !important;
}
.site-v5 .category-card::after {
  display: block;
  content: '';
  position: absolute;
  inset: 33% 0 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0,36,46,.94) 0%, rgba(0,36,46,.55) 42%, transparent 100%);
}
.site-v5 .category-info {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: flex;
  flex: 0 0 auto;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
  max-width: 100%;
  padding: clamp(12px, 1.4vw, 24px);
  background: transparent !important;
}
.site-v5 .category-info strong { font-size: clamp(19px, 1.7vw, 28px); text-shadow: 0 2px 4px #00202e77; }
.site-v5 .category-info small { display: block; color: #e8f3ef; font-size: 12px; }
.site-v5 .category-arrow { flex-shrink: 0; }

/* Product cards retain their fully interactive information and controls,
   but every food/drink image lives in its own 16:9 frame. */
.site-v5 .product-card .product-photo,
.site-v5 #drink-products .product-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: var(--media-ratio);
  overflow: hidden;
  background: #f4eade;
}
.site-v5 .product-card .product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.site-v5 #drink-products .product-photo img { object-fit: contain; }
.site-v5 .product-body { gap: 8px; }
.site-v5 .product-bottom { margin-top: auto; }

@media (max-width: 990px) {
  .site-v5 .steps-grid { gap: 12px; }
  .site-v5 .step,
  .site-v5 .step:nth-child(2),
  .site-v5 .step:last-child { padding: 17px; gap: 7px; }
  .site-v5 .step-num { font-size: 38px; }
  .site-v5 .step h3 { font-size: 16px !important; }
  .site-v5 .step p { font-size: 12.5px !important; }
  .site-v5 .delivery-layout { gap: 25px; }
  .site-v5 .special-content { padding: 16px; gap: 3px; }
  .site-v5 .special-content h3 { font-size: 23px !important; }
  .site-v5 .special-content p { display: none; }
  .site-v5 .special-tag { font-size: 10px !important; }
  .site-v5 .special-actions { gap: 9px; margin-top: 6px; }
  .site-v5 .special-actions strong { font-size: 17px; }
  .site-v5 .special-actions button { min-height: 38px; padding: 6px 10px; }
}
@media (max-width: 680px) {
  .site-v5 { --section-space: 38px; }
  .site-v5 .specials-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
  .site-v5 .special-card {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: var(--media-ratio);
  }
  .site-v5 .special-card > img { width: 100%; height: 100%; object-position: 50% 45%; }
  .site-v5 .special-content {
    padding: 14px 17px;
    width: 100%;
    max-width: none;
    gap: 2px;
  }
  .site-v5 .special-content h3 { font-size: 21px !important; margin: 2px 0; }
  .site-v5 .special-tag { font-size: 9.5px !important; }
  .site-v5 .special-actions { margin-top: 3px; gap: 13px; }
  .site-v5 .special-actions button { min-height: 39px; font-size: 12.5px; }
  .site-v5 .steps-grid { display: grid; grid-template-columns: 1fr; gap: 11px; }
  .site-v5 .step,
  .site-v5 .step:nth-child(2),
  .site-v5 .step:last-child {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: var(--media-ratio);
    padding: 19px 22px;
    border: 1px solid #e8decd;
  }
  .site-v5 .step-num { font-size: 43px; }
  .site-v5 .step h3 { font-size: 17px !important; }
  .site-v5 .step p { font-size: 14px !important; }
  .site-v5 .delivery-layout { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }
  .site-v5 .delivery-photo {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: var(--media-ratio);
  }
  .site-v5 .delivery-photo img { object-fit: cover; object-position: 50% 50%; }
  .site-v5 .category-grid {
    display: grid !important;
    grid-auto-flow: column;
    grid-template-columns: none !important;
    grid-auto-columns: minmax(244px, 78vw);
    overflow-x: auto;
    gap: 11px;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
  }
  .site-v5 .category-card {
    display: block;
    min-height: 0;
    height: auto;
    aspect-ratio: var(--media-ratio);
    scroll-snap-align: start;
  }
  .site-v5 .category-card img {
    position: absolute;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
  }
  .site-v5 .category-info { position: absolute; inset: auto 0 0; padding: 10px 12px; gap: 6px; }
  .site-v5 .category-info strong { font-size: 19px; overflow-wrap: break-word; }
  .site-v5 .category-info small { display: none; }
  .site-v5 .category-arrow { height: 30px; width: 30px; flex: 0 0 30px; }

  .site-v5 .product-card {
    display: grid;
    grid-template-columns: 114px minmax(0, 1fr);
    align-items: center;
    min-height: 112px;
    max-height: none;
    aspect-ratio: auto;
    padding: 0;
  }
  .site-v5 .product-card .product-photo,
  .site-v5 #drink-products .product-photo {
    display: block;
    align-self: center;
    grid-column: 1;
    width: calc(100% - 10px);
    margin-left: 9px;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: var(--media-ratio);
    border-radius: 8px;
  }
  .site-v5 .product-card .product-photo img { width: 100%; height: 100%; }
  .site-v5 .product-body {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    gap: 9px;
  }
  .site-v5 .product-name {
    min-height: 0;
    width: 100%;
    flex: 0 0 auto;
    font-size: 14px !important;
    line-height: 1.3 !important;
  }
  .site-v5 .product-bottom {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 7px;
    margin-top: 0;
  }
  .site-v5 .price { font-size: 16px !important; }
  .site-v5 .product-bottom .add {
    display: inline-flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
  }
  .site-v5 .menu-section { padding-block: 43px 58px; }
  .site-v5 .faq-section { padding-block: 42px; }
}
@media (max-width: 375px) {
  .site-v5 .product-card { grid-template-columns: 91px minmax(0,1fr); }
  .site-v5 .product-card .product-photo,
  .site-v5 #drink-products .product-photo { width: calc(100% - 9px); margin-left: 7px; }
  .site-v5 .product-body { padding: 9px; gap: 6px; }
  .site-v5 .product-name { font-size: 13.4px !important; }
  .site-v5 .price { font-size: 15px !important; }
  .site-v5 .step-num { font-size: 39px; }
  .site-v5 .step,
  .site-v5 .step:nth-child(2),
  .site-v5 .step:last-child { padding: 14px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-v5 .category-card img { transition: none !important; }
}

/* Final refinement: put category captions under the title, never beside it. */
.site-v5 .category-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title arrow" "caption arrow";
  align-items: end;
  column-gap: 10px;
  row-gap: 3px;
}
.site-v5 .category-info strong { grid-area: title; min-width: 0; }
.site-v5 .category-info small { grid-area: caption; min-width: 0; }
.site-v5 .category-arrow { grid-area: arrow; align-self: end; }
@media (max-width: 1200px) {
  .site-v5 .category-info small { display: none; }
  .site-v5 .category-info { grid-template-areas: "title arrow"; }
}
/* 16:9 step tiles at 681-850px were 5px too short for their copy. */
@media (min-width: 681px) and (max-width: 850px) {
  .site-v5 .step,
  .site-v5 .step:nth-child(2),
  .site-v5 .step:last-child {
    padding: 11px 14px;
    gap: 4px;
  }
  .site-v5 .step-num { font-size: 32px; }
  .site-v5 .step h3 { font-size: 14px !important; line-height: 1.18; margin-bottom: 4px; }
  .site-v5 .step p { font-size: 12px !important; line-height: 1.25 !important; }
}

/* Bring the separate Nuestra Historia page into the same 16:9 media system. */
.page-about .about-hero-photo {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
}
.page-about .about-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 54%;
}
.page-about .about-values-grid article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 0;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
@media (min-width: 681px) and (max-width: 900px) {
  .page-about .about-values-grid article { padding: 16px; }
  .page-about .about-values-grid article i { font-size: 25px; }
  .page-about .about-values-grid article h3 { font-size: 15px; margin: 5px 0; }
  .page-about .about-values-grid article p { font-size: 12px; line-height: 1.34; }
}
@media (max-width: 680px) {
  .page-about .about-hero-photo { aspect-ratio: 16 / 9; }
  .page-about .about-values-grid article { padding: 18px; aspect-ratio: 16 / 9; }
  .page-about .about-values-grid article i { font-size: 32px; }
  .page-about .about-values-grid article h3 { font-size: 18px; margin: 7px 0; }
  .page-about .about-values-grid article p { font-size: 13px; line-height: 1.42; }
}
