/* Zestia storefront structures v1.0
   Structure is independent from palette and operational data. */

:root {
  /* White-label semantic contract. Business/editor tokens only need to
     replace the legacy primitives (--brand, --surface, --text, ...); every
     customer component consumes this single stable Zestia layer. */
  --zsf-canvas-max: 1500px;
  --zsf-page-gutter: clamp(16px, 3vw, 44px);
  --zsf-section-gap: clamp(28px, 4vw, 64px);
  --zsf-brand-primary: var(--brand, #d93622);
  --zsf-brand-primary-hover: var(--brand-dark, #a92b1a);
  --zsf-brand-surface: var(--surface-alt, color-mix(in srgb, var(--surface, #fff) 92%, var(--zsf-brand-primary) 8%));
  --zsf-page-bg: var(--bg, #080808);
  --zsf-page-bg-deep: var(--bg-deep, #030303);
  --zsf-surface: var(--surface, #151515);
  --zsf-surface-raised: color-mix(in srgb, var(--zsf-surface) 92%, var(--zsf-text, #fff) 8%);
  --zsf-text: var(--text, #fff);
  --zsf-text-muted: var(--muted, #b8b8b8);
  --zsf-line: var(--border, rgba(255, 255, 255, .16));
  --zsf-focus: color-mix(in srgb, var(--accent, #f6be55) 78%, #fff);
  --zsf-success: #168653;
  --zsf-warning: #9a5b00;
  --zsf-danger: #a52834;
  --zsf-on-state: #fff;
  --zsf-on-brand: var(--brand-contrast, #fff);
  --zsf-glass-header: color-mix(in srgb, var(--zsf-page-bg-deep) 86%, transparent);
  --zsf-glass-dock: color-mix(in srgb, var(--zsf-page-bg-deep) 82%, transparent);
  --zsf-glass-blur: 12px;
  --zsf-font-heading: var(--font-heading, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  --zsf-font-body: var(--font-body, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  --zsf-text-xs: clamp(.72rem, .69rem + .12vw, .8rem);
  --zsf-text-sm: clamp(.82rem, .78rem + .16vw, .92rem);
  --zsf-text-base: clamp(.96rem, .91rem + .22vw, 1.08rem);
  --zsf-text-lg: clamp(1.12rem, 1.02rem + .42vw, 1.36rem);
  --zsf-text-xl: clamp(1.42rem, 1.19rem + .9vw, 1.95rem);
  --zsf-text-2xl: clamp(1.85rem, 1.43rem + 1.65vw, 2.85rem);
  --zsf-text-display: clamp(2.7rem, 1.72rem + 3.8vw, 5.4rem);
  --zsf-radius-sm: 8px;
  --zsf-radius-md: 16px;
  --zsf-radius-lg: 22px;
  --zsf-radius-action: var(--radius-button, 999px);
  --zsf-card-radius: var(--radius-card, var(--zsf-radius-md));
  --zsf-elevation-1: 0 8px 24px rgba(15, 23, 42, .08);
  --zsf-elevation-2: 0 18px 48px rgba(15, 23, 42, .12);
  --zsf-elevation-brand: 0 14px 32px -12px color-mix(in srgb, var(--zsf-brand-primary) 46%, transparent);
  --zsf-soft-shadow: var(--shadow, var(--zsf-elevation-2));
  --zsf-category-card-min: 210px;
  --zsf-product-card-min: 280px;
  --zsf-grid-gap: clamp(12px, 1.35vw, 22px);
  --zsf-motion-standard: 280ms cubic-bezier(.22, .61, .36, 1);
}

.app-body .site-header,
.app-body .store-context-bar__inner,
.app-body .footer-main,
.app-body .footer-bottom {
  padding-inline: max(var(--zsf-page-gutter), calc((100vw - var(--zsf-canvas-max)) / 2));
}

.app-body .content {
  width: min(100%, calc(var(--zsf-canvas-max) + (var(--zsf-page-gutter) * 2)));
  margin-inline: auto;
  padding: clamp(18px, 2.2vw, 34px) var(--zsf-page-gutter);
}

.app-body .home-section {
  margin-block: var(--zsf-section-gap);
}

.app-body .section-header {
  gap: 18px;
  margin-bottom: clamp(14px, 1.8vw, 24px);
}

.app-body .section-header h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.6rem);
  line-height: 1;
}

.app-body .category-card,
.app-body .featured-card,
.app-body .promo-card,
.app-body .product-card,
.app-body .card,
.app-body .cart-panel,
.app-body .checkout-panel,
.app-body .auth-card,
.app-body .order-card {
  border-radius: var(--zsf-card-radius);
}

.app-body .category-card,
.app-body .featured-card,
.app-body .promo-card,
.app-body .product-card {
  padding: 0;
  overflow: hidden;
}

.app-body .site-footer {
  margin-top: clamp(36px, 6vw, 84px);
}

/* ------------------------------------------------------------------ */
/* Zestia Editorial: cinematic story, restrained grid, premium rhythm. */

.storefront-template-editorial {
  --zsf-canvas-max: 1540px;
  --zsf-card-radius: 16px;
  --editorial-rail-height: 98px;
  --editorial-action: #c93a24;
  --editorial-accent: #d8aa58;
}

/* Editorial already exposes the ordering phone inside the primary header.
   Removing the legacy strip keeps the useful storefront visible above the
   fold and mirrors the compact two-row hierarchy of the selected template. */
.storefront-template-editorial .topbar {
  display: none;
}

.storefront-template-editorial .home-section {
  margin-block: clamp(24px, 2.5vw, 38px);
}

.storefront-template-editorial .site-header {
  min-height: 72px;
  background: color-mix(in srgb, var(--bg, #080808) 94%, transparent);
  color: var(--text, #fff);
  border-color: color-mix(in srgb, var(--border, #333) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
}

.storefront-template-editorial .site-header .nav-link,
.storefront-template-editorial .site-header .brand-name,
.storefront-template-editorial .site-header .brand-tagline {
  color: inherit;
}

.storefront-template-editorial .hero--full {
  width: 100vw;
  min-height: clamp(500px, calc(100svh - 320px), 540px);
  margin: calc(-1 * clamp(18px, 2.2vw, 34px)) calc(50% - 50vw) 0;
  padding: clamp(38px, 5vw, 66px)
    max(var(--zsf-page-gutter), calc((100vw - var(--zsf-canvas-max)) / 2))
    calc(var(--editorial-rail-height) + 38px);
  align-items: center;
  border: 0;
  border-radius: 0;
}

.storefront-template-editorial .hero-content--solas {
  width: min(540px, 100%);
  max-width: 540px;
  gap: 13px;
}

.storefront-template-editorial .hero-content h1 {
  max-width: 100%;
  font-size: clamp(3.15rem, 4.7vw, 4.4rem);
  line-height: .9;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.storefront-template-editorial .hero-content > p {
  max-width: 100%;
  font-size: clamp(.98rem, 1.12vw, 1.15rem);
  line-height: 1.45;
}

.storefront-template-editorial .hero-carousel .hero-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .65s ease, transform 6.5s ease;
}

.storefront-template-editorial .hero-carousel .hero-image.is-visible {
  opacity: 1;
  transform: scale(1);
}

.storefront-template-editorial .hero--solas:not([data-zestia-block-id]) .hero-overlay {
  background:
    linear-gradient(90deg, rgba(4, 5, 7, .95) 0%, rgba(4, 5, 7, .72) 35%, rgba(4, 5, 7, .14) 72%),
    linear-gradient(0deg, rgba(4, 5, 7, .62), transparent 46%);
}

.storefront-template-editorial .hero-actions--solas {
  margin-top: 2px;
  gap: 10px;
}

.storefront-template-editorial .hero-actions--solas .button,
.storefront-template-editorial .hero-actions--solas .ghost-button {
  min-height: 50px;
  padding-inline: 22px;
  border-radius: 10px;
}

.storefront-template-editorial .hero-actions--solas .button {
  border-color: color-mix(in srgb, var(--editorial-action) 74%, #fff);
  background: var(--editorial-action);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.storefront-template-editorial .editorial-hero-copy {
  min-height: 2.9em;
  margin: 0;
}

.storefront-template-editorial .editorial-hero-availability {
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(5, 6, 8, .58);
  color: #fff;
  font-size: .75rem;
  backdrop-filter: blur(12px);
}

.storefront-template-editorial .editorial-hero-availability > span {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--editorial-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--editorial-accent) 18%, transparent);
}

.storefront-template-editorial .storefront-confidence[data-storefront-region="trust"] {
  width: min(520px, 100%);
  margin: 4px 0 0;
  padding: 13px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.storefront-template-editorial .storefront-confidence[data-storefront-region="trust"] > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.storefront-template-editorial .storefront-confidence[data-storefront-region="trust"] strong,
.storefront-template-editorial .storefront-confidence[data-storefront-region="trust"] small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storefront-template-editorial .storefront-confidence[data-storefront-region="trust"] strong {
  color: #fff;
  font-size: .72rem;
  letter-spacing: .02em;
}

.storefront-template-editorial .storefront-confidence[data-storefront-region="trust"] small {
  color: rgba(255, 255, 255, .64);
  font-size: .64rem;
  font-weight: 650;
}

.storefront-template-editorial .editorial-specialty-rail {
  position: absolute;
  inset: auto 0 0;
  z-index: 5;
  height: var(--editorial-rail-height);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, .2);
  background: rgba(8, 9, 10, .86);
  backdrop-filter: blur(18px) saturate(1.1);
}

.storefront-template-editorial .editorial-specialty-rail__inner {
  width: min(100%, var(--zsf-canvas-max));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--zsf-page-gutter);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.storefront-template-editorial .editorial-specialty-rail__inner::-webkit-scrollbar {
  display: none;
}

.storefront-template-editorial .editorial-hero-tab {
  min-width: 0;
  min-height: var(--editorial-rail-height);
  padding: 12px clamp(10px, 1.35vw, 20px);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(255, 255, 255, .76) !important;
  -webkit-text-fill-color: currentColor !important;
  font: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.storefront-template-editorial .editorial-hero-tab:first-child {
  border-left: 1px solid rgba(255, 255, 255, .14) !important;
}

.storefront-template-editorial .editorial-hero-tab__media {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.storefront-template-editorial .editorial-hero-tab__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.storefront-template-editorial .editorial-hero-tab__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.storefront-template-editorial .editorial-hero-tab strong,
.storefront-template-editorial .editorial-hero-tab small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storefront-template-editorial .editorial-hero-tab strong {
  color: inherit;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.storefront-template-editorial .editorial-hero-tab small {
  color: rgba(255, 255, 255, .56);
  font-size: .65rem;
  font-weight: 700;
}

.storefront-template-editorial .editorial-hero-tab:hover,
.storefront-template-editorial .editorial-hero-tab:focus-visible,
.storefront-template-editorial .editorial-hero-tab.is-active {
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
  box-shadow: inset 0 3px 0 var(--editorial-accent);
}

.storefront-template-editorial .editorial-hero-controls {
  position: absolute;
  right: max(var(--zsf-page-gutter), calc((100vw - var(--zsf-canvas-max)) / 2));
  bottom: calc(var(--editorial-rail-height) + 14px);
  z-index: 6;
  display: grid;
  grid-template-columns: 38px auto 38px;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  background: rgba(5, 6, 8, .72);
  color: #fff;
  backdrop-filter: blur(15px);
}

.storefront-template-editorial .editorial-hero-controls button {
  min-width: 38px;
  min-height: 36px;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: .75rem;
  font-weight: 850;
  cursor: pointer;
}

.storefront-template-editorial .editorial-hero-controls button:hover,
.storefront-template-editorial .editorial-hero-controls button:focus-visible {
  background: rgba(255, 255, 255, .13) !important;
}

.storefront-template-editorial .editorial-hero-progress {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
}

.storefront-template-editorial .editorial-hero-progress i {
  width: var(--editorial-progress, 33.333%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--editorial-accent);
  transition: width .3s ease;
}

.storefront-template-editorial .editorial-promotion {
  position: relative;
  min-height: 148px;
  margin-block: clamp(18px, 1.8vw, 26px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--zsf-card-radius);
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--brand, #d93622) 16%, transparent), transparent 34%),
    color-mix(in srgb, var(--surface, #111) 94%, #000);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .2);
  isolation: isolate;
}

.storefront-template-editorial .editorial-promotion.has-media {
  grid-template-columns: minmax(0, 1.25fr) auto minmax(300px, .75fr);
}

.storefront-template-editorial .editorial-promotion__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: clamp(18px, 1.8vw, 26px);
  display: grid;
  align-content: center;
  gap: 7px;
}

.storefront-template-editorial .editorial-promotion__eyebrow {
  color: var(--editorial-accent);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.storefront-template-editorial .editorial-promotion h2 {
  margin: 0;
  color: var(--text, #fff);
  font-size: clamp(1.65rem, 2.7vw, 2.65rem);
  line-height: .98;
  text-wrap: balance;
}

.storefront-template-editorial .editorial-promotion p {
  max-width: 64ch;
  margin: 0;
  overflow: hidden;
  color: var(--muted, #bbb);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.storefront-template-editorial .editorial-promotion__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--muted, #bbb);
  font-size: .72rem;
}

.storefront-template-editorial .editorial-promotion__meta strong {
  color: var(--text, #fff);
  font-size: .9rem;
}

.storefront-template-editorial .editorial-promotion .promo-conditions {
  margin: 0;
  padding: 0;
  display: inline;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.storefront-template-editorial .editorial-promotion__action {
  position: relative;
  z-index: 2;
  padding: 20px;
  display: flex;
  align-items: center;
}

.storefront-template-editorial .editorial-promotion__action .ghost-button {
  min-height: 48px;
  white-space: nowrap;
}

.storefront-template-editorial .editorial-promotion__media {
  position: relative;
  min-width: 0;
  height: clamp(150px, 12vw, 168px);
  min-height: 0;
  overflow: hidden;
}

.storefront-template-editorial .editorial-promotion__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, var(--surface, #111), transparent 48%);
  pointer-events: none;
}

.storefront-template-editorial .editorial-promotion__media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: cover;
}

.storefront-template-editorial .category-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.15vw, 16px);
}

.storefront-template-editorial .category-card:nth-child(n) {
  grid-column: auto;
}

.storefront-template-editorial .category-card.has-image {
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
}

.storefront-template-editorial .category-card.has-image .category-image {
  min-height: 0;
  height: 100%;
  aspect-ratio: auto;
  padding: 0;
  object-fit: cover;
}

.storefront-template-editorial .category-card__overlay {
  padding: 12px;
}

.storefront-template-editorial .category-card__title {
  font-size: clamp(.88rem, 1vw, 1.05rem);
}

.storefront-template-editorial .category-card__meta {
  font-size: .68rem;
}

.storefront-template-editorial .featured-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.storefront-template-editorial .featured-body > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.storefront-template-editorial .featured-category {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.storefront-template-editorial .home-section {
  margin-block: clamp(30px, 3.5vw, 52px);
}

/* ------------------------------------------------------------------ */
/* Zestia Mercado: visual abundance, fast comparison and discovery. */

.storefront-template-mercado {
  --zsf-canvas-max: 1600px;
  --zsf-card-radius: 16px;
  --zsf-section-gap: clamp(24px, 3vw, 48px);
}

.storefront-template-mercado .site-header {
  min-height: 70px;
  background: color-mix(in srgb, var(--surface, #fff) 96%, transparent);
  box-shadow: 0 8px 28px rgba(16, 45, 31, .08);
}

.storefront-template-mercado .hero--full {
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(0, 1.22fr);
  min-height: clamp(440px, 54vw, 660px);
  margin: 0 0 clamp(24px, 3vw, 48px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--zsf-soft-shadow);
}

.storefront-template-mercado .hero-carousel {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-height: 100%;
  overflow: hidden;
}

.storefront-template-mercado .hero-image {
  position: absolute;
  inset: 0;
}

.storefront-template-mercado .hero-overlay {
  display: none;
}

.storefront-template-mercado .hero-content {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  max-width: none;
  padding: clamp(28px, 4vw, 68px);
  color: var(--text);
}

.storefront-template-mercado .hero-content h1 {
  font-size: clamp(2.5rem, 4.6vw, 5.3rem);
  line-height: .92;
  letter-spacing: -.04em;
}

.storefront-template-mercado .hero-content p {
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.55;
}

.storefront-template-mercado .hero-actions .ghost-button {
  color: var(--text);
  background: var(--surface-alt, color-mix(in srgb, var(--surface) 82%, var(--brand)));
  border-color: var(--border);
}

.storefront-template-mercado .featured-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.storefront-template-mercado .featured-image {
  aspect-ratio: 4 / 3;
  height: auto;
}

.storefront-template-mercado .category-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.storefront-template-mercado .category-card.has-image {
  min-height: clamp(150px, 13vw, 230px);
}

.storefront-template-mercado .category-image {
  height: 100%;
}

.storefront-template-mercado .promo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.storefront-template-mercado .menu-shell {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
}

.storefront-template-mercado .product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.storefront-template-mercado .main-menu {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 45, 30, .08);
}

/* ------------------------------------------------------------------ */
/* Zestia Directo: high-throughput ordering workspace. */

.storefront-template-directo {
  --zsf-canvas-max: 1720px;
  --zsf-card-radius: 14px;
  --zsf-section-gap: clamp(20px, 2.4vw, 36px);
}

.storefront-template-directo .site-header {
  min-height: 62px;
}

.storefront-template-directo .store-context-bar {
  position: sticky;
  top: 62px;
  z-index: 5;
}

.storefront-template-directo .content {
  padding-top: 20px;
}

.storefront-template-directo .home-section:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: end;
  padding: clamp(20px, 2.5vw, 36px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--surface) 78%, var(--brand)));
  box-shadow: var(--zsf-soft-shadow);
}

.storefront-template-directo .home-section:first-child .section-header,
.storefront-template-directo .home-section:first-child .steps-grid {
  grid-column: 1 / -1;
}

.storefront-template-directo .home-section:first-child .steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.storefront-template-directo .home-section:nth-child(2) .hero-carousel {
  position: relative;
  height: clamp(220px, 28vw, 420px);
  overflow: hidden;
  border-radius: var(--zsf-card-radius);
  isolation: isolate;
}

.storefront-template-directo .category-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.storefront-template-directo .category-card.has-image {
  min-height: 140px;
}

.storefront-template-directo .category-card__overlay {
  padding: 10px;
}

.storefront-template-directo .promo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.storefront-template-directo .menu-shell {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 18px;
}

.storefront-template-directo .menu-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px 20px;
  align-items: start;
}

.storefront-template-directo .menu-header,
.storefront-template-directo .storefront-catalog-tools,
.storefront-template-directo .lunch-banner,
.storefront-template-directo .empty-state {
  grid-column: 1 / -1;
}

.storefront-template-directo .main-menu {
  grid-column: 1;
  grid-row: 4 / span 40;
  top: 126px;
  padding: 10px;
  border-radius: 14px;
}

.storefront-template-directo .main-menu__list {
  display: grid;
  gap: 5px;
  justify-content: stretch;
  overflow: visible;
}

.storefront-template-directo .main-menu__link {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
}

.storefront-template-directo .menu-section {
  grid-column: 2;
  margin: 0 0 30px;
}

.storefront-template-directo .product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.storefront-template-directo .mini-cart {
  top: 126px;
  border-width: 2px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.storefront-template-directo .cart-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, .75fr);
}

.storefront-template-directo .checkout-panel {
  position: sticky;
  top: 126px;
}

/* Shared complete-surface treatment. */

.storefront-template-editorial .auth-shell,
.storefront-template-mercado .auth-shell,
.storefront-template-directo .auth-shell {
  min-height: min(720px, calc(100svh - 210px));
  align-items: center;
}

.storefront-template-editorial .auth-card,
.storefront-template-mercado .auth-card,
.storefront-template-directo .auth-card {
  width: min(100%, 720px);
  margin-inline: auto;
  box-shadow: var(--zsf-soft-shadow);
}

.storefront-template-editorial .order-head-card,
.storefront-template-mercado .order-head-card,
.storefront-template-directo .order-head-card,
.storefront-template-editorial .product-page,
.storefront-template-mercado .product-page,
.storefront-template-directo .product-page {
  box-shadow: var(--zsf-soft-shadow);
}

/* Editorial complete journey -------------------------------------------------
   The same visual language follows the customer after leaving the home page:
   catalogue, product, basket, checkout, confirmation, tracking and account.
   Operational data remains in the existing protected widgets; this layer only
   controls composition and presentation. */

.storefront-template-editorial .storefront-surface:not(.storefront-surface--index) {
  position: relative;
  isolation: isolate;
}

.storefront-template-editorial .storefront-surface:not(.storefront-surface--index)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--editorial-action) 12%, transparent), transparent 34rem),
    radial-gradient(circle at 92% 28%, color-mix(in srgb, var(--editorial-accent) 9%, transparent), transparent 30rem);
}

.storefront-template-editorial .card,
.storefront-template-editorial .cart-panel,
.storefront-template-editorial .checkout-panel,
.storefront-template-editorial .auth-card,
.storefront-template-editorial .order-card,
.storefront-template-editorial .account-section {
  border: 1px solid color-mix(in srgb, var(--border, #343434) 76%, transparent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface, #111) 96%, #fff 2%), var(--surface, #111));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
}

.storefront-template-editorial .menu-header,
.storefront-template-editorial .storefront-checkout-head,
.storefront-template-editorial .order-head-card,
.storefront-template-editorial .account-header {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border, #343434) 78%, transparent);
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--surface, #111) 96%, #fff 2%) 0 68%, color-mix(in srgb, var(--editorial-action) 18%, var(--surface, #111)) 100%);
  box-shadow: 0 24px 62px rgba(0, 0, 0, .24);
}

.storefront-template-editorial .menu-header,
.storefront-template-editorial .storefront-checkout-head,
.storefront-template-editorial .order-head-card {
  position: relative;
}

.storefront-template-editorial .menu-header::before,
.storefront-template-editorial .storefront-checkout-head::before,
.storefront-template-editorial .order-head-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--editorial-action), var(--editorial-accent));
}

.storefront-template-editorial .menu-header h1,
.storefront-template-editorial .storefront-checkout-head h1,
.storefront-template-editorial .order-head-card h1,
.storefront-template-editorial .account-header h1,
.storefront-template-editorial .auth-card h1,
.storefront-template-editorial .category-hero h1,
.storefront-template-editorial .product-page h1 {
  letter-spacing: -.035em;
  text-wrap: balance;
}

.storefront-template-editorial .storefront-checkout-head {
  margin-bottom: 22px;
  padding: clamp(22px, 3vw, 38px);
  border-radius: 18px;
}

.storefront-template-editorial .storefront-checkout-steps li {
  color: color-mix(in srgb, var(--muted, #aaa) 84%, transparent);
}

.storefront-template-editorial .storefront-checkout-steps li span {
  border-color: color-mix(in srgb, var(--border, #444) 86%, transparent);
  background: color-mix(in srgb, var(--bg-deep, #050505) 90%, transparent);
}

.storefront-template-editorial .storefront-checkout-steps li.is-active {
  color: var(--text, #fff);
}

.storefront-template-editorial .storefront-checkout-steps li.is-active span {
  border-color: var(--editorial-action);
  background: var(--editorial-action);
  color: #fff;
}

.storefront-template-editorial .cart-layout {
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, .78fr);
  gap: clamp(18px, 2.2vw, 30px);
  align-items: start;
}

.storefront-template-editorial .cart-panel,
.storefront-template-editorial .checkout-panel {
  padding: clamp(20px, 2.3vw, 32px);
}

.storefront-template-editorial .checkout-panel {
  position: static;
}

.storefront-template-editorial .cart-item {
  border-color: color-mix(in srgb, var(--border, #3b3b3b) 76%, transparent);
  background: color-mix(in srgb, var(--bg-deep, #070707) 72%, transparent);
}

.storefront-template-editorial .cart-item__media {
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-deep, #070707);
}

.storefront-template-editorial .cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-template-editorial .checkout-totals-card,
.storefront-template-editorial .checkout-final-card {
  border-color: color-mix(in srgb, var(--editorial-accent) 34%, var(--border, #333));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--editorial-accent) 9%, var(--surface, #111)), var(--surface, #111));
}

.storefront-template-editorial .checkout-totals-row.is-total,
.storefront-template-editorial .checkout-final-card .is-total {
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--editorial-accent) 35%, var(--border, #333));
  color: var(--text, #fff);
  font-size: 1.14rem;
}

.storefront-template-editorial .checkout-panel input,
.storefront-template-editorial .checkout-panel select,
.storefront-template-editorial .checkout-panel textarea,
.storefront-template-editorial .auth-card input,
.storefront-template-editorial .auth-card select,
.storefront-template-editorial .auth-card textarea,
.storefront-template-editorial .product-page input,
.storefront-template-editorial .product-page select {
  min-height: 48px;
  border-color: color-mix(in srgb, var(--border, #3b3b3b) 86%, transparent);
  background: color-mix(in srgb, var(--bg-deep, #070707) 84%, transparent);
  color: var(--text, #fff);
}

.storefront-template-editorial .category-hero,
.storefront-template-editorial .product-page--featured {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--border, #343434) 76%, transparent);
  background: var(--surface, #111);
}

.storefront-template-editorial .category-hero__image,
.storefront-template-editorial .product-page__image {
  transition: transform .5s ease;
}

.storefront-template-editorial .category-hero:hover .category-hero__image,
.storefront-template-editorial .product-page__media:hover .product-page__image {
  transform: scale(1.025);
}

.storefront-template-editorial #configurar-pedido {
  width: min(100%, 1120px);
  margin: clamp(18px, 2.5vw, 30px) auto 0;
}

.storefront-template-editorial #configurar-pedido > .card {
  padding: clamp(22px, 3vw, 38px);
  border-color: color-mix(in srgb, var(--border, #343434) 76%, transparent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface, #111) 96%, #fff 2%), var(--surface, #111));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
}

.storefront-template-editorial .product-configurator {
  border-color: color-mix(in srgb, var(--border, #343434) 84%, transparent);
  background: color-mix(in srgb, var(--bg-deep, #070707) 82%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text, #fff) 6%, transparent);
}

.storefront-template-editorial .product-configurator summary {
  min-height: 52px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  color: var(--text, #fff);
}

.storefront-template-editorial .product-configurator[open] summary {
  border-bottom-color: color-mix(in srgb, var(--border, #343434) 76%, transparent);
  background: color-mix(in srgb, var(--editorial-action) 8%, transparent);
}

.storefront-template-editorial .product-form {
  gap: 16px;
  padding: 18px;
}

.storefront-template-editorial .product-form .option-group,
.storefront-template-editorial .product-form .ingredient-control,
.storefront-template-editorial .product-form > label.row {
  border-color: color-mix(in srgb, var(--border, #343434) 82%, transparent);
  background: color-mix(in srgb, var(--surface, #111) 82%, var(--bg-deep, #070707));
  border-radius: 12px;
}

.storefront-template-editorial .product-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),
.storefront-template-editorial .product-form select,
.storefront-template-editorial .product-form textarea {
  min-height: 48px;
  border-color: color-mix(in srgb, var(--border, #3b3b3b) 86%, transparent);
  background: color-mix(in srgb, var(--bg-deep, #070707) 84%, transparent);
  color: var(--text, #fff);
}

.storefront-template-editorial .product-form .product-actions {
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--border, #343434) 76%, transparent);
}

.storefront-template-editorial .order-head-card__highlights {
  gap: 10px;
}

.storefront-template-editorial .order-kpi {
  border: 1px solid color-mix(in srgb, var(--border, #393939) 76%, transparent);
  background: color-mix(in srgb, var(--bg-deep, #070707) 74%, transparent);
}

.storefront-template-editorial .order-head-card .badge {
  border-color: color-mix(in srgb, var(--editorial-accent) 55%, transparent);
  background: color-mix(in srgb, var(--editorial-accent) 14%, var(--surface, #111));
  color: color-mix(in srgb, var(--editorial-accent) 88%, #fff);
}

.storefront-template-editorial .order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, .58fr);
  grid-template-areas:
    "status location"
    "ticket location"
    "ticket review"
    "ticket notices";
  gap: clamp(16px, 2vw, 26px);
  align-items: start;
  margin-top: clamp(18px, 2vw, 26px);
}

.storefront-template-editorial .order-detail-layout > .card,
.storefront-template-editorial .order-detail-layout > .alert {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.storefront-template-editorial .order-detail-layout > .card {
  padding: clamp(20px, 2.4vw, 32px);
}

.storefront-template-editorial .order-detail-layout__status {
  grid-area: status;
}

.storefront-template-editorial .order-detail-layout__location {
  grid-area: location;
}

.storefront-template-editorial .order-detail-layout__ticket {
  grid-area: ticket;
}

.storefront-template-editorial .order-detail-layout__review {
  grid-area: review;
}

.storefront-template-editorial .order-detail-layout__notices {
  grid-area: notices;
}

.storefront-template-editorial .account-shell {
  width: min(100%, 1220px);
  margin-inline: auto;
}

.storefront-template-editorial .account-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr);
  gap: clamp(18px, 2.2vw, 28px);
  align-items: start;
}

.storefront-template-editorial .account-workspace > .account-section {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: clamp(20px, 2.4vw, 32px);
}

.storefront-template-editorial .account-header {
  padding: clamp(22px, 3vw, 36px);
  border-radius: 18px;
}

.storefront-template-editorial .auth-shell {
  position: relative;
  padding-block: clamp(34px, 7vw, 90px);
}

.storefront-template-editorial .auth-card {
  padding: clamp(24px, 4vw, 44px);
  border-top: 3px solid var(--editorial-action);
}

.storefront-template-editorial .storefront-surface > .card:not(.category-hero):not(.product-page):not(.order-head-card),
.storefront-template-editorial .storefront-surface > article.card {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding: clamp(22px, 3vw, 38px);
}

.storefront-template-editorial .legal-page {
  width: min(100%, 820px) !important;
}

.storefront-template-editorial .legal-prose {
  font-size: 1rem;
  line-height: 1.72;
}

.storefront-template-editorial .legal-prose h1 {
  max-width: 18ch;
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -.035em;
  text-wrap: balance;
}

.storefront-template-editorial .legal-prose h2 {
  margin: 30px 0 10px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--border, #343434) 72%, transparent);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.storefront-template-editorial .legal-prose p,
.storefront-template-editorial .legal-prose li {
  max-width: 72ch;
}

.storefront-template-editorial .legal-prose ul,
.storefront-template-editorial .legal-prose ol {
  padding-left: 1.35rem;
}

.storefront-template-editorial .site-footer {
  border-top: 1px solid color-mix(in srgb, var(--border, #333) 76%, transparent);
  background:
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--editorial-action) 12%, transparent), transparent 32rem),
    var(--bg-deep, #050505);
}

@media (max-width: 1250px) {
  .storefront-template-editorial .category-grid,
  .storefront-template-mercado .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .storefront-template-mercado .category-grid,
  .storefront-template-directo .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 980px) {
  .app-body .content {
    padding-inline: 16px;
  }

  .storefront-template-editorial .cart-layout {
    grid-template-columns: 1fr;
  }

  .storefront-template-editorial .checkout-panel {
    position: static;
  }

  .storefront-template-editorial .order-detail-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "status"
      "location"
      "ticket"
      "review"
      "notices";
  }

  .storefront-template-editorial .account-workspace {
    grid-template-columns: 1fr;
  }

  .storefront-template-editorial .hero--full {
    margin-inline: -16px;
    padding-inline: 22px;
  }

  .storefront-template-editorial .editorial-hero-controls {
    right: 22px;
  }

  .storefront-template-mercado .featured-grid,
  .storefront-template-mercado .category-grid,
  .storefront-template-directo .category-grid,
  .storefront-template-directo .promo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storefront-template-editorial .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .storefront-template-editorial .editorial-specialty-rail__inner {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(158px, 1fr);
    scroll-snap-type: x proximity;
  }

  .storefront-template-editorial .editorial-promotion.has-media {
    grid-template-columns: minmax(0, 1fr) auto minmax(220px, .55fr);
  }

  .storefront-template-editorial .category-card:nth-child(n) {
    grid-column: auto;
  }

  .storefront-template-editorial .promo-grid,
  .storefront-template-mercado .promo-grid {
    grid-template-columns: 1fr;
  }

  .storefront-template-mercado .hero--full {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .storefront-template-mercado .hero-carousel {
    grid-column: 1;
    grid-row: 1;
    min-height: 360px;
  }

  .storefront-template-mercado .hero-content {
    grid-column: 1;
    grid-row: 2;
  }

  .storefront-template-directo .menu-main {
    display: block;
  }

  .storefront-template-directo .main-menu,
  .storefront-template-directo .menu-section {
    grid-column: auto;
    grid-row: auto;
  }

  .storefront-template-directo .main-menu {
    top: 116px;
    padding: 8px;
  }

  .storefront-template-directo .main-menu__list {
    display: flex;
    overflow-x: auto;
  }

  .storefront-template-directo .main-menu__link {
    width: auto;
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  :root {
    --zsf-page-gutter: 14px;
    --zsf-card-radius: 14px;
  }

  .app-body .site-header,
  .app-body .store-context-bar__inner,
  .app-body .footer-main,
  .app-body .footer-bottom {
    padding-inline: 12px;
  }

  .storefront-template-editorial .hero--full {
    --editorial-rail-height: 88px;
    min-height: min(650px, calc(100svh - 90px));
    padding: 30px 18px calc(var(--editorial-rail-height) + 94px);
    align-items: flex-end;
  }

  .storefront-template-editorial .hero-content h1 {
    font-size: clamp(2.35rem, 12vw, 3.8rem);
  }

  .storefront-template-editorial .hero-content--solas {
    width: min(100%, 520px);
    gap: 10px;
  }

  .storefront-template-editorial .editorial-hero-copy {
    min-height: auto;
    margin: 0;
    overflow: hidden;
    font-size: .9rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .storefront-template-editorial .storefront-confidence[data-storefront-region="trust"] {
    gap: 8px;
    padding-top: 10px;
  }

  .storefront-template-editorial .storefront-confidence[data-storefront-region="trust"] small {
    display: none;
  }

  .storefront-template-editorial .storefront-confidence[data-storefront-region="trust"] strong {
    font-size: .64rem;
  }

  .storefront-template-editorial .editorial-specialty-rail__inner {
    padding-inline: 12px;
    grid-auto-columns: 148px;
  }

  .storefront-template-editorial .editorial-specialty-rail {
    bottom: 64px;
  }

  .storefront-template-editorial .editorial-hero-tab {
    min-height: var(--editorial-rail-height);
    padding: 10px;
    gap: 9px;
  }

  .storefront-template-editorial .editorial-hero-tab__media {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .storefront-template-editorial .editorial-hero-tab strong {
    font-size: .68rem;
  }

  .storefront-template-editorial .editorial-hero-tab small {
    font-size: .59rem;
  }

  .storefront-template-editorial .editorial-hero-controls {
    right: 14px;
    left: auto;
    top: 14px;
    bottom: auto;
  }

  .storefront-template-mercado .featured-grid,
  .storefront-template-mercado .category-grid,
  .storefront-template-directo .category-grid,
  .storefront-template-directo .promo-grid,
  .storefront-template-directo .home-section:first-child .steps-grid,
  .storefront-template-directo .product-grid,
  .storefront-template-mercado .product-grid {
    grid-template-columns: 1fr;
  }

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

  .storefront-template-editorial .category-card.has-image {
    aspect-ratio: 1 / 1;
  }

  .storefront-template-editorial .editorial-promotion,
  .storefront-template-editorial .editorial-promotion.has-media {
    grid-template-columns: 1fr;
  }

  .storefront-template-editorial .editorial-promotion__media {
    grid-row: 1;
    height: 180px;
    min-height: 170px;
  }

  .storefront-template-editorial .editorial-promotion__media::before {
    background: linear-gradient(0deg, var(--surface, #111), transparent 50%);
  }

  .storefront-template-editorial .editorial-promotion__media img {
    min-height: 170px;
    max-height: 210px;
  }

  .storefront-template-editorial .editorial-promotion__copy {
    grid-row: 2;
    padding: 20px 18px 10px;
  }

  .storefront-template-editorial .editorial-promotion__action {
    grid-row: 3;
    padding: 10px 18px 20px;
  }

  .storefront-template-editorial .editorial-promotion__action .ghost-button {
    width: 100%;
  }

  .storefront-template-mercado .hero--full {
    border-radius: 18px;
  }

  .storefront-template-mercado .hero-carousel {
    min-height: 260px;
  }

  .storefront-template-mercado .hero-content {
    padding: 24px 20px 28px;
  }

  .storefront-template-directo .home-section:first-child {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .storefront-template-directo .store-context-bar {
    position: static;
  }
}

/* ------------------------------------------------------------------ */
/* Zestia Storefront foundation 1.0.06.
   These aliases sit on top of the colours and typefaces injected by each
   business. They add fluid scale, stable media geometry and responsive grids
   without downloading a remote font or duplicating operational content. */

.app-body.storefront-shell {
  font-family: var(--zsf-font-body);
  font-size: var(--zsf-text-base);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.app-body.storefront-shell :where(h1, h2, h3, h4, h5, h6, .price, .product-title, .category-card__title) {
  font-family: var(--zsf-font-heading);
  font-kerning: normal;
  letter-spacing: -.025em;
}

.app-body.storefront-shell h1 {
  font-size: var(--zsf-text-2xl);
  line-height: 1.02;
}

.app-body.storefront-shell h2 {
  font-size: var(--zsf-text-xl);
  line-height: 1.08;
}

.app-body.storefront-shell h3,
.app-body.storefront-shell .product-title,
.app-body.storefront-shell .price {
  font-size: var(--zsf-text-lg);
  line-height: 1.16;
}

.app-body.storefront-shell :where(.muted, .product-desc, .category-card__meta, .section-count) {
  font-size: var(--zsf-text-sm);
}

/* Functional copy must remain readable on a phone and must also scale on a
   large operations/customer display. Tiny fixed legacy labels are promoted
   to the shared fluid scale; icon-only counters keep their compact geometry. */
.app-body.storefront-shell :where(
  .topbar-phone,
  .store-context-bar__status strong,
  .store-context-bar__status > span:last-child > span,
  .store-context-bar__label,
  .store-context-choice,
  .store-context-bar__time span,
  .store-context-bar__time strong,
  .store-context-bar__cta,
  .meta-pill,
  .product-card__allergens,
  .product-card__status,
  .product-card__details-link,
  .storefront-checkout-steps li
) {
  font-size: var(--zsf-text-xs);
}

.app-body.storefront-shell :where(
  .product-desc--compact,
  .schedule-alert,
  .cart-line__meta,
  .checkout-panel label,
  .order-timeline,
  .legal-prose
) {
  font-size: var(--zsf-text-sm);
}

.app-body.storefront-shell :where(.card, .cart-panel, .checkout-panel, .auth-card, .order-card) {
  border-radius: var(--zsf-card-radius);
  box-shadow: var(--zsf-elevation-1);
}

.app-body.storefront-shell :where(.button, .ghost-button) {
  border-radius: var(--zsf-radius-action);
}

.app-body.storefront-shell .button:not(.ghost-button) {
  box-shadow: var(--zsf-elevation-brand);
}

/* Tactile feedback is intentionally visual only. It never anticipates a
   server result and therefore cannot make an add-to-cart or checkout action
   look completed before its response arrives. */
.app-body.storefront-shell :where(
  .button,
  .ghost-button,
  .nav-link,
  .store-context-choice,
  .store-context-bar__cta,
  .editorial-hero-tab,
  .category-card,
  .customer-mobile-dock a
) {
  transition:
    transform 120ms cubic-bezier(.2, .7, .3, 1),
    background-color var(--zsf-motion-standard),
    border-color var(--zsf-motion-standard),
    color var(--zsf-motion-standard),
    box-shadow var(--zsf-motion-standard);
  transform-origin: center;
}

.app-body.storefront-shell :where(
  .button,
  .ghost-button,
  .nav-link,
  .store-context-choice,
  .store-context-bar__cta,
  .editorial-hero-tab,
  .category-card,
  .customer-mobile-dock a
):active {
  transform: scale(.97);
}

.storefront-promotion-countdown {
  width: fit-content;
  margin-top: 3px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--zsf-warning) 54%, var(--zsf-line));
  border-radius: 999px;
  color: var(--zsf-text);
  background: color-mix(in srgb, var(--zsf-warning) 17%, var(--zsf-surface));
  font-size: var(--zsf-text-xs);
}

.storefront-promotion-countdown[hidden] {
  display: none;
}

.storefront-promotion-countdown strong {
  color: inherit;
  font-variant-numeric: tabular-nums;
}

/* Auto-fill keeps catalogue density useful from compact laptops to 4K and
   min(100%, …) prevents a card from forcing horizontal overflow. */
.app-body.storefront-shell .category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--zsf-category-card-min)), 1fr));
  gap: var(--zsf-grid-gap);
  align-items: stretch;
}

.app-body.storefront-shell .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--zsf-product-card-min)), 1fr));
  gap: var(--zsf-grid-gap);
  align-items: start;
}

/* A reserved media skeleton is visible only while the browser is fetching a
   real product asset.  Server-rendered catalogue data never receives an
   artificial delay or a pretend loading state. */
.app-body.storefront-shell .product-card .product-media {
  position: relative;
  isolation: isolate;
  aspect-ratio: 3 / 2;
}

.app-body.storefront-shell .product-card .product-media::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  content: "";
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(
      105deg,
      color-mix(in srgb, var(--zsf-surface) 82%, #fff 3%) 12%,
      color-mix(in srgb, var(--zsf-surface) 68%, #fff 14%) 28%,
      color-mix(in srgb, var(--zsf-surface) 82%, #fff 3%) 44%
    );
  background-size: 220% 100%;
  transition: opacity 160ms ease;
}

.app-body.storefront-shell .product-card .product-media.is-media-loading::after {
  opacity: 1;
  animation: zsf-product-media-shimmer 1.15s linear infinite;
}

@keyframes zsf-product-media-shimmer {
  to { background-position-x: -220%; }
}

@media (prefers-reduced-motion: reduce) {
  .app-body.storefront-shell .product-card .product-media.is-media-loading::after {
    animation: none;
    background-position: 50% 0;
  }
}

/* The out-of-box treatment is deliberately opt-in.  The uploader inspects
   real alpha pixels and labels that asset cutout; ordinary rectangular food
   photos retain object-fit: cover even when their container is PNG. */
.app-body.storefront-shell .product-card.has-cutout-media {
  margin-top: 28px;
  overflow: visible;
}

.app-body.storefront-shell .product-card.has-cutout-media .product-media--cutout {
  margin-top: -28px;
  overflow: visible;
  background: transparent;
}

.app-body.storefront-shell .product-card.has-cutout-media .product-image {
  padding: 8px 12px 0;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .34));
}

.storefront-template-editorial {
  --zsf-category-card-min: 210px;
  --zsf-product-card-min: 280px;
}

.storefront-template-mercado {
  --zsf-category-card-min: 220px;
  --zsf-product-card-min: 290px;
}

.storefront-template-directo {
  --zsf-category-card-min: 175px;
  --zsf-product-card-min: 300px;
}

/* Every image-backed category reserves a 4:3 box before the asset arrives.
   The explicit dimensions in the HTML can therefore never distort the card. */
.app-body.storefront-shell .category-card.has-image {
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--zsf-radius-md);
  box-shadow: var(--zsf-elevation-1);
  isolation: isolate;
  transition:
    transform var(--zsf-motion-standard),
    border-color var(--zsf-motion-standard),
    box-shadow var(--zsf-motion-standard);
}

.app-body.storefront-shell .category-card.has-image .category-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  transition: transform 420ms cubic-bezier(.22, .61, .36, 1);
}

.app-body.storefront-shell .category-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--zsf-brand-primary) 72%, #fff);
  outline-offset: 4px;
  box-shadow: var(--zsf-elevation-brand);
}

@media (hover: hover) and (pointer: fine) {
  .app-body.storefront-shell .category-card.has-image:is(:hover, :focus-visible) {
    transform: translateY(-3px);
    box-shadow: var(--zsf-elevation-2);
  }

  .app-body.storefront-shell .category-card.has-image:is(:hover, :focus-visible) .category-image {
    transform: scale(1.045);
  }
}

/* Category rails behave like native controls on touch screens. The scroll
   remains keyboard accessible; only the decorative scrollbar is hidden. */
.app-body.storefront-shell :where(.editorial-specialty-rail__inner, .main-menu, .main-menu__list, .subnav) {
  overscroll-behavior-inline: contain;
  scroll-padding-inline: var(--zsf-page-gutter);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.app-body.storefront-shell :where(.editorial-specialty-rail__inner, .main-menu, .main-menu__list, .subnav)::-webkit-scrollbar,
.app-body.storefront-shell .category-grid::-webkit-scrollbar {
  display: none;
}

.app-body.storefront-shell :where(.editorial-hero-tab, .main-menu__item, .main-menu__link, .subnav__link) {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

@media (max-width: 980px) {
  .app-body.storefront-shell {
    --zsf-category-card-min: 180px;
    --zsf-product-card-min: 250px;
  }
}

@media (max-width: 720px) {
  .app-body.storefront-shell {
    --zsf-grid-gap: 12px;
  }

  .app-body.storefront-shell .category-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, min(82vw, 320px));
    justify-content: start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 2px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .app-body.storefront-shell .category-grid > .category-card {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .app-body.storefront-shell :where(.editorial-specialty-rail__inner, .main-menu, .main-menu__list, .subnav) {
    scroll-snap-type: x mandatory;
  }

  .app-body.storefront-shell .category-card.has-image {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .storefront-template-editorial *,
  .storefront-template-mercado *,
  .storefront-template-directo * {
    scroll-behavior: auto !important;
  }

  .storefront-template-editorial .hero-carousel .hero-image,
  .storefront-template-editorial .editorial-hero-progress i,
  .app-body.storefront-shell .category-card,
  .app-body.storefront-shell .category-image {
    transition: none !important;
  }

  .app-body.storefront-shell .category-card.has-image:is(:hover, :focus-visible),
  .app-body.storefront-shell .category-card.has-image:is(:hover, :focus-visible) .category-image {
    transform: none !important;
  }

  .app-body.storefront-shell :where(
    .button,
    .ghost-button,
    .nav-link,
    .store-context-choice,
    .store-context-bar__cta,
    .editorial-hero-tab,
    .category-card,
    .customer-mobile-dock a
  ) {
    transition: none !important;
  }

  .app-body.storefront-shell :where(
    .button,
    .ghost-button,
    .nav-link,
    .store-context-choice,
    .store-context-bar__cta,
    .editorial-hero-tab,
    .category-card,
    .customer-mobile-dock a
  ):active {
    transform: none !important;
  }
}

/* ------------------------------------------------------------------ */
/* Product purchase interaction 1.0.06.
   Operational inputs stay native and server validated. These rules only
   provide a larger modular skin and explicit asynchronous submit states. */

.app-body.storefront-shell .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-body.storefront-shell .product-page__price,
.app-body.storefront-shell .product-add-button__price {
  font-variant-numeric: tabular-nums;
}

.app-body.storefront-shell .product-page__price.is-price-rolling {
  transform-origin: 50% 58%;
  animation: zsf-price-odometer 240ms cubic-bezier(.22, .61, .36, 1);
}

@keyframes zsf-price-odometer {
  0% { transform: translateY(0) rotateX(0); opacity: 1; }
  48% { transform: translateY(-.28em) rotateX(26deg); opacity: .44; }
  52% { transform: translateY(.28em) rotateX(-26deg); opacity: .44; }
  100% { transform: translateY(0) rotateX(0); opacity: 1; }
}

.app-body.storefront-shell .product-page__media {
  aspect-ratio: 3 / 2;
}

.app-body.storefront-shell .product-page__image {
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .28));
}

/* This layer is emitted only for explicit ingredient.image_url values. The
   server deliberately excludes generated fallback icons from the effect. */
.app-body.storefront-shell .product-page__ingredient-visuals {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.app-body.storefront-shell .product-page__ingredient-visual {
  --ingredient-x: 10%;
  --ingredient-delay: 0ms;
  position: absolute;
  top: -18%;
  left: var(--ingredient-x);
  width: clamp(54px, 8vw, 112px);
  height: clamp(54px, 8vw, 112px);
  object-fit: contain;
  opacity: .28;
  mix-blend-mode: screen;
  filter: saturate(.88) drop-shadow(0 10px 16px rgba(0, 0, 0, .24));
  animation: zsf-ingredient-drift 8s var(--ingredient-delay) ease-in-out infinite;
}

@keyframes zsf-ingredient-drift {
  0%, 100% { transform: translate3d(-6px, -10px, 0) rotate(-7deg); opacity: 0; }
  16% { opacity: .28; }
  72% { opacity: .2; }
  86% { transform: translate3d(12px, 430%, 0) rotate(16deg); opacity: 0; }
}

.app-body.storefront-shell .product-purchase-card {
  container-type: inline-size;
}

.app-body.storefront-shell .product-form .option-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  padding: 14px;
}

.app-body.storefront-shell .product-form .option-group > :where(p, .option-group__status) {
  grid-column: 1 / -1;
}

.app-body.storefront-shell .product-form .option-choice {
  position: relative;
  min-width: 0;
  min-height: 72px;
  margin: 0;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--border, #343434) 84%, transparent);
  border-radius: var(--zsf-radius-md);
  background: color-mix(in srgb, var(--surface, #111) 90%, var(--zsf-brand-primary) 3%);
  cursor: pointer;
  transition:
    border-color var(--zsf-motion-standard),
    background-color var(--zsf-motion-standard),
    transform var(--zsf-motion-standard),
    box-shadow var(--zsf-motion-standard);
}

.app-body.storefront-shell .product-form .option-choice--menu {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 80px;
  border-color: color-mix(in srgb, var(--zsf-brand-primary) 48%, var(--border, #343434));
}

.app-body.storefront-shell .product-form .option-choice:has(.option-choice__thumb) {
  grid-template-columns: 26px 52px minmax(0, 1fr);
}

.app-body.storefront-shell .product-form .option-choice__thumb {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border, #343434) 84%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-raised, #171717) 88%, #fff 4%);
}

.app-body.storefront-shell .product-form .option-choice__thumb img {
  width: 100%;
  height: 100%;
  padding: 3px;
  display: block;
  object-fit: contain;
}

.app-body.storefront-shell .product-form .option-choice__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.app-body.storefront-shell .product-form .option-choice__mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--muted, #aaa) 70%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-deep, #070707) 82%, transparent);
}

.app-body.storefront-shell .product-form input[type="radio"] + .option-choice__mark {
  border-radius: 50%;
}

.app-body.storefront-shell .product-form .option-choice__mark::after {
  content: "";
  width: 11px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 0 3px 3px;
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg) scale(.5);
  transition: opacity 160ms ease, transform 160ms ease;
}

.app-body.storefront-shell .product-form .option-choice__input:checked + .option-choice__mark {
  border-color: var(--zsf-brand-primary);
  color: var(--zsf-on-brand);
  background: var(--zsf-brand-primary);
}

.app-body.storefront-shell .product-form .option-choice__input:checked + .option-choice__mark::after {
  opacity: 1;
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.app-body.storefront-shell .product-form .option-choice:has(.option-choice__input:checked) {
  border-color: color-mix(in srgb, var(--zsf-brand-primary) 72%, #fff 8%);
  background: color-mix(in srgb, var(--surface, #111) 82%, var(--zsf-brand-primary) 12%);
  box-shadow: 0 12px 28px -20px var(--zsf-brand-primary);
}

.app-body.storefront-shell .product-form .option-choice:has(.option-choice__input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--zsf-brand-primary) 68%, #fff);
  outline-offset: 3px;
}

.app-body.storefront-shell .product-form .option-choice:has(.option-choice__input:disabled) {
  opacity: .48;
  cursor: not-allowed;
}

.app-body.storefront-shell .option-choice__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.app-body.storefront-shell .option-choice__copy strong {
  color: var(--text, #fff);
  line-height: 1.2;
}

.app-body.storefront-shell .option-choice__copy > span {
  color: var(--muted, #aaa);
  font-size: var(--zsf-text-xs);
}

.app-body.storefront-shell .product-form .ingredient-control {
  min-height: 78px;
  padding: 12px;
  transition:
    opacity var(--zsf-motion-standard),
    border-color var(--zsf-motion-standard),
    background-color var(--zsf-motion-standard);
}

.app-body.storefront-shell .product-form .ingredient-control.is-extra {
  border-color: color-mix(in srgb, var(--zsf-brand-primary) 72%, var(--border, #343434));
  background: color-mix(in srgb, var(--surface, #111) 82%, var(--zsf-brand-primary) 10%);
}

.app-body.storefront-shell .product-form .ingredient-control.is-fixed {
  border-color: color-mix(in srgb, var(--zsf-brand-primary) 30%, var(--border, #343434));
  background: color-mix(in srgb, var(--surface, #111) 94%, var(--zsf-brand-primary) 4%);
}

.app-body.storefront-shell .product-form .ingredient-essential {
  color: color-mix(in srgb, var(--text, #fff) 82%, var(--zsf-brand-primary));
  font-weight: 700;
}

.app-body.storefront-shell .product-form .ingredient-control.is-removed .ingredient-main {
  opacity: .5;
}

.app-body.storefront-shell .product-form .ingredient-stepper {
  min-height: 44px;
}

.app-body.storefront-shell .product-form .stepper-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
}

.app-body.storefront-shell .product-form .product-actions {
  position: sticky;
  bottom: 12px;
  z-index: 24;
  min-height: 78px;
  margin-top: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(210px, 1fr);
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--border, #343434) 84%, transparent);
  border-radius: var(--zsf-radius-md);
  background: color-mix(in srgb, var(--bg-deep, #070707) 88%, transparent);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
  backdrop-filter: blur(14px) saturate(1.14);
}

.app-body.storefront-shell .product-add-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.app-body.storefront-shell .product-add-button__price {
  padding-left: 9px;
  border-left: 1px solid currentColor;
  opacity: .84;
}

.app-body.storefront-shell .product-add-button__spinner {
  width: 18px;
  height: 18px;
  display: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.app-body.storefront-shell .product-add-button.is-pending .product-add-button__spinner {
  display: inline-block;
  animation: zsf-product-submit-spin .72s linear infinite;
}

.app-body.storefront-shell .product-add-button.is-success {
  color: #fff !important;
  border-color: #14804a !important;
  background: #14804a !important;
}

.app-body.storefront-shell .product-add-button.is-error {
  color: #fff !important;
  border-color: #b42318 !important;
  background: #b42318 !important;
}

.app-body.storefront-shell .product-form__feedback {
  grid-column: 1 / -1;
  min-height: 1.35em;
  margin: 0;
  color: var(--muted, #aaa);
  font-size: var(--zsf-text-xs);
}

@keyframes zsf-product-submit-spin {
  to { transform: rotate(360deg); }
}

@container (max-width: 620px) {
  .app-body.storefront-shell .product-form .ingredient-control {
    align-items: stretch;
    flex-direction: column;
  }

  .app-body.storefront-shell .product-form .ingredient-stepper {
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  .app-body.storefront-shell .product-form .product-actions {
    bottom: calc(82px + env(safe-area-inset-bottom));
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .app-body.storefront-shell .product-add-button {
    min-width: 0;
    padding-inline: 12px;
  }

  .app-body.storefront-shell .product-page__ingredient-visual {
    width: 62px;
    height: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-body.storefront-shell .product-page__price.is-price-rolling {
    animation: none !important;
    transform: none !important;
  }

  .app-body.storefront-shell .product-page__ingredient-visual {
    animation: none !important;
    opacity: .16;
    transform: translateY(160%) !important;
  }

  .app-body.storefront-shell .product-add-button__spinner,
  .app-body.storefront-shell .option-choice__mark::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ------------------------------------------------------------------ */
/* Final native storefront mobile-grid contract.
   Keep compact discovery cards at a maximum of two per row and give complex
   product, promotion and loyalty cards the full row. This block intentionally
   comes last so legacy template density cannot reintroduce 3/4-column phone
   layouts or horizontal card rails. */
@media (max-width: 768px) {
  .app-body.storefront-shell :where(
    .category-grid,
    .featured-grid,
    .steps-grid,
    .grid,
    .order-head-card__meta,
    .order-head-card__highlights,
    .order-fee-grid
  ) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    justify-content: stretch;
    gap: 12px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .app-body.storefront-shell :where(
    .product-grid,
    .promo-grid,
    .loyalty-reward-grid,
    .loyalty-cart-rewards,
    .orders-grid,
    .address-grid
  ) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  .app-body.storefront-shell :where(
    .category-grid,
    .featured-grid,
    .product-grid,
    .promo-grid,
    .loyalty-reward-grid,
    .loyalty-cart-rewards,
    .orders-grid,
    .address-grid,
    .steps-grid,
    .grid,
    .order-head-card__meta,
    .order-head-card__highlights,
    .order-fee-grid
  ) > * {
    min-width: 0;
    max-width: 100%;
  }

  .app-body.storefront-shell .featured-card {
    min-width: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .app-body.storefront-shell .featured-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: var(--media-product-fit, cover);
  }

  .app-body.storefront-shell .featured-body {
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .app-body.storefront-shell .featured-body :where(strong, .price),
  .app-body.storefront-shell .featured-card > .muted {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .app-body.storefront-shell .featured-card > .muted {
    margin: 0;
    padding-inline: 12px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .app-body.storefront-shell .featured-card > :where(.button, .ghost-button) {
    width: calc(100% - 24px);
    min-width: 0;
    margin: auto 12px 12px;
    white-space: normal;
    text-align: center;
  }

  .app-body.storefront-shell :where(.product-card, .promo-card, .loyalty-reward, .loyalty-cart-reward) {
    min-width: 0;
    max-width: 100%;
  }

  .app-body.storefront-shell :where(
    .product-card__actions,
    .promo-footer,
    .loyalty-reward__body,
    .loyalty-cart-reward__body
  ) :where(a, button) {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 360px) {
  .app-body.storefront-shell :where(
    .category-grid,
    .featured-grid,
    .steps-grid,
    .grid,
    .order-head-card__meta,
    .order-head-card__highlights,
    .order-fee-grid
  ) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ================================================================== */
/* Zestia Storefront structural adapters v2.
   These rules are intentionally namespaced. The five layouts share all
   operational markup from pizza_solas; only composition and responsive
   behaviour change here. Palette tokens remain business-owned. */

.zestia-storefront-surface {
  --zst-reading-measure: 78rem;
  --zst-layout-gap: clamp(18px, 2.6vw, 42px);
  width: 100%;
  min-width: 0;
  container: zestia-surface / inline-size;
}

.zestia-storefront-surface__body {
  width: min(100%, var(--zst-reading-measure));
  min-width: 0;
  margin-inline: auto;
}

/* The complete 25-surface contract. Each surface receives a useful measure
   or flow constraint rather than a palette override. */
.zestia-storefront-surface--home { --zst-reading-measure: 100%; }
.zestia-storefront-surface--menu { --zst-reading-measure: 100%; }
.zestia-storefront-surface--category { --zst-reading-measure: 92rem; }
.zestia-storefront-surface--product { --zst-reading-measure: 86rem; }
.zestia-storefront-surface--offers { --zst-reading-measure: 92rem; }
.zestia-storefront-surface--cart { --zst-reading-measure: 84rem; }
.zestia-storefront-surface--checkout { --zst-reading-measure: 84rem; }
.zestia-storefront-surface--order_confirmation { --zst-reading-measure: 76rem; }
.zestia-storefront-surface--multi_order { --zst-reading-measure: 82rem; }
.zestia-storefront-surface--tracking { --zst-reading-measure: 76rem; }
.zestia-storefront-surface--account { --zst-reading-measure: 88rem; }
.zestia-storefront-surface--login { --zst-reading-measure: 72rem; }
.zestia-storefront-surface--register { --zst-reading-measure: 72rem; }
.zestia-storefront-surface--password { --zst-reading-measure: 72rem; }
.zestia-storefront-surface--addresses { --zst-reading-measure: 72rem; }
.zestia-storefront-surface--privacy { --zst-reading-measure: 68rem; }
.zestia-storefront-surface--cookies { --zst-reading-measure: 68rem; }
.zestia-storefront-surface--terms { --zst-reading-measure: 68rem; }
.zestia-storefront-surface--shipping { --zst-reading-measure: 68rem; }
.zestia-storefront-surface--sitemap { --zst-reading-measure: 82rem; }
.zestia-storefront-surface--local_landing { --zst-reading-measure: 82rem; }
.zestia-storefront-surface--maintenance { --zst-reading-measure: 48rem; }
.zestia-storefront-surface--403 { --zst-reading-measure: 48rem; }
.zestia-storefront-surface--404 { --zst-reading-measure: 48rem; }
.zestia-storefront-surface--500 { --zst-reading-measure: 48rem; }
.zestia-storefront-chrome--header { --zst-chrome-order: 1; }
.zestia-storefront-chrome--footer { --zst-chrome-order: 2; }

.zestia-storefront-surface--role-system .zestia-storefront-surface__body {
  min-height: min(68svh, 680px);
  display: grid;
  place-items: center;
}

.zestia-storefront-status {
  width: min(100%, 42rem);
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid var(--zsf-line);
  border-radius: var(--zsf-card-radius);
  background: var(--zsf-surface);
}

.zestia-storefront-status__code {
  font: 700 var(--zsf-text-sm) / 1 var(--zsf-font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Editorial: asymmetrical narrative canvas. */
.zestia-storefront-surface[data-zestia-layout="editorial"]
  .zestia-storefront-surface__story-canvas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--zst-layout-gap);
}

.zestia-storefront-surface[data-zestia-layout="editorial"][data-zestia-surface-role="commerce"]
  .product-page__hero,
.zestia-storefront-surface[data-zestia-layout="editorial"][data-zestia-surface-role="transaction"]
  .cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: var(--zst-layout-gap);
}

/* Mercado: dense comparison grid and persistent catalogue navigation. */
.zestia-storefront-surface[data-zestia-layout="mercado"]
  .zestia-storefront-surface__market-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row dense;
  gap: clamp(12px, 1.4vw, 22px);
}

.zestia-storefront-surface[data-zestia-layout="mercado"] :is(.product-grid, .featured-grid) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(10px, 1.2vw, 18px);
}

/* Directo: action first, with the purchase/confirmation rail kept visible. */
.zestia-storefront-surface[data-zestia-layout="directo"]
  .zestia-storefront-surface__action-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--zst-layout-gap);
}

.zestia-storefront-surface[data-zestia-layout="directo"]
  :is(.checkout-panel, .product-page__summary, .portal-account-panel) {
  position: sticky;
  top: 112px;
  align-self: start;
}

/* Carta: typographic reading column and horizontal dish rows. */
.zestia-storefront-surface[data-zestia-layout="carta"]
  .zestia-storefront-surface__reading-column {
  width: min(100%, 70rem);
  display: flow-root;
}

.zestia-storefront-surface[data-zestia-layout="carta"] :is(.product-grid, .featured-grid) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.zestia-storefront-surface[data-zestia-layout="carta"] :is(.product-card, .featured-card) {
  display: grid;
  grid-template-columns: minmax(88px, 132px) minmax(0, 1fr) auto;
  align-items: center;
  border-width: 0 0 1px;
  border-radius: 0;
}

/* Galeria: visual masonry for discovery and a split purchase panel. */
.zestia-storefront-surface[data-zestia-layout="galeria"]
  .zestia-storefront-surface__gallery-canvas {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--zst-layout-gap);
}

.zestia-storefront-surface[data-zestia-layout="galeria"] :is(.product-grid, .featured-grid) {
  display: block;
  columns: 280px 4;
  column-gap: clamp(12px, 1.6vw, 24px);
}

.zestia-storefront-surface[data-zestia-layout="galeria"] :is(.product-card, .featured-card) {
  width: 100%;
  margin: 0 0 clamp(12px, 1.6vw, 24px);
  break-inside: avoid;
}

.zestia-storefront-surface[data-zestia-layout="galeria"] .product-page__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, .65fr);
  gap: var(--zst-layout-gap);
}

/* ------------------------------------------------------------------ */
/* Native Carta layout. These selectors apply before route adapters are
   enabled because pizza_solas already puts the chosen structure on body. */

.storefront-template-carta {
  --zsf-canvas-max: 1280px;
  --zsf-card-radius: 4px;
  --zsf-product-card-min: 100%;
}

.storefront-template-carta .site-header {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--zsf-line);
}

.storefront-template-carta .site-header .brand-tagline,
.storefront-template-carta .topbar {
  display: none;
}

.storefront-template-carta .site-footer .footer-main {
  display: grid;
  grid-template-columns: minmax(220px, .6fr) minmax(0, 1.4fr);
  gap: clamp(28px, 5vw, 72px);
}

.storefront-template-carta .carta-home {
  width: min(100%, 1180px);
  margin-inline: auto;
  display: grid;
  gap: clamp(48px, 7vw, 96px);
}

.storefront-template-carta .carta-home__masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .72fr);
  align-items: center;
  gap: clamp(28px, 6vw, 88px);
  min-height: min(74svh, 760px);
}

.storefront-template-carta .carta-home__intro {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.storefront-template-carta .carta-home__intro h1 {
  max-width: 12ch;
  margin: 0;
  font: 500 clamp(3rem, 7vw, 7rem) / .88 var(--zsf-font-heading);
  letter-spacing: -.055em;
}

.storefront-template-carta .carta-home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.storefront-template-carta .carta-home__figure {
  min-height: 0;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: calc(var(--zsf-card-radius) * 2);
}

.storefront-template-carta .carta-home__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-template-carta .carta-index {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding-block: 22px;
  border-block: 1px solid var(--zsf-line);
}

.storefront-template-carta .carta-index > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 28px;
}

.storefront-template-carta .carta-index a {
  display: grid;
  gap: 2px;
}

.storefront-template-carta .carta-list {
  display: grid;
  grid-template-columns: minmax(180px, .36fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}

.storefront-template-carta .carta-list__heading {
  position: sticky;
  top: 110px;
  align-self: start;
}

.storefront-template-carta .carta-list__items {
  display: grid;
}

.storefront-template-carta .carta-dish {
  display: grid;
  grid-template-columns: 72px minmax(140px, auto) minmax(30px, 1fr) auto 42px;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  border-bottom: 1px solid var(--zsf-line);
}

.storefront-template-carta .carta-dish__media {
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 50%;
}

.storefront-template-carta .carta-dish__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-template-carta .carta-dish > i {
  border-bottom: 1px dotted var(--zsf-line);
}

.storefront-template-carta .carta-dish__action {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--zsf-line);
  border-radius: 50%;
}

.storefront-template-carta .carta-notes__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--zsf-grid-gap);
}

.storefront-template-carta .carta-notes__grid > article {
  min-width: 0;
  padding: clamp(20px, 3vw, 34px);
  border-top: 1px solid var(--zsf-line);
}

.storefront-template-carta :is(.menu-header, .storefront-catalog-tools) {
  max-width: 70rem;
  margin-inline: auto;
}

.storefront-template-carta .main-menu {
  position: sticky;
  top: 64px;
  z-index: 20;
  border-width: 1px 0;
  border-radius: 0;
}

.storefront-template-carta .menu-section {
  max-width: 70rem;
  margin-inline: auto;
}

.storefront-template-carta .product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.storefront-template-carta .product-card--compact {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  min-height: 156px;
  border-width: 0 0 1px;
  border-radius: 0;
}

.storefront-template-carta .product-card--compact .product-media {
  height: 132px;
  align-self: center;
}

.storefront-template-carta .product-card--compact .product-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 8px 24px;
}

.storefront-template-carta .product-card--compact :is(.product-meta, .product-desc, .product-card__allergens, .product-card__availability) {
  grid-column: 1;
}

.storefront-template-carta .product-card--compact .product-card__actions {
  grid-column: 2;
  grid-row: 1 / span 5;
  align-self: center;
  flex-direction: column;
}

.storefront-template-carta .product-page__hero {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
}

.storefront-template-carta .product-page__media {
  position: sticky;
  top: 92px;
  aspect-ratio: 4 / 5;
}

.storefront-template-carta :is(.auth-shell, .account-workspace, .portal-account-workspace, .cart-layout, .order-detail-layout) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 70rem;
  margin-inline: auto;
}

.storefront-template-carta .auth-visual {
  display: none;
}

.storefront-template-carta .auth-card,
.storefront-template-carta .legal-page,
.storefront-template-carta .order-head-card {
  width: min(100%, 54rem);
  margin-inline: auto;
  box-shadow: none;
}

.storefront-template-carta .legal-page {
  font-size: var(--zsf-text-base);
  line-height: 1.75;
}

.storefront-template-carta .zestia-storefront-status {
  width: min(100%, 46rem);
  min-height: 360px;
  align-content: center;
}

/* ------------------------------------------------------------------ */
/* Native Galeria layout. */

.storefront-template-galeria {
  --zsf-canvas-max: 1780px;
  --zsf-card-radius: 20px;
}

.storefront-template-galeria .site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  backdrop-filter: blur(18px) saturate(1.15);
}

.storefront-template-galeria .site-footer .footer-main {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 96px);
}

.storefront-template-galeria .gallery-home {
  width: 100%;
  display: grid;
  gap: clamp(54px, 8vw, 120px);
}

.storefront-template-galeria .gallery-hero {
  position: relative;
  min-height: min(82svh, 900px);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: var(--zsf-card-radius);
}

.storefront-template-galeria .gallery-hero > img,
.storefront-template-galeria .gallery-hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.storefront-template-galeria .gallery-hero > img {
  object-fit: cover;
}

.storefront-template-galeria .gallery-hero__veil {
  background: linear-gradient(0deg, color-mix(in srgb, var(--zsf-page-bg-deep) 92%, transparent), transparent 68%);
}

.storefront-template-galeria .gallery-hero__copy {
  position: relative;
  z-index: 2;
  width: min(100%, 54rem);
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: clamp(28px, 6vw, 82px);
}

.storefront-template-galeria .gallery-hero__copy h1 {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 8.5rem);
  line-height: .84;
  letter-spacing: -.06em;
}

.storefront-template-galeria .gallery-hero__rail {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--zsf-line);
  backdrop-filter: blur(14px);
}

.storefront-template-galeria .gallery-hero__rail a {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-right: 1px solid var(--zsf-line);
}

.storefront-template-galeria .gallery-hero__rail img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
}

.storefront-template-galeria .gallery-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 24px;
  margin-bottom: clamp(20px, 3vw, 42px);
}

.storefront-template-galeria .gallery-section-heading > span {
  grid-column: 1 / -1;
}

.storefront-template-galeria .gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(84px, 8vw);
  gap: clamp(10px, 1.2vw, 18px);
}

.storefront-template-galeria .gallery-tile {
  position: relative;
  grid-column: span 3;
  grid-row: span 3;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--zsf-card-radius);
}

.storefront-template-galeria .gallery-tile--wide { grid-column: span 6; }
.storefront-template-galeria .gallery-tile--tall { grid-row: span 5; }

.storefront-template-galeria .gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--zsf-motion-standard);
}

.storefront-template-galeria .gallery-tile:hover img { transform: scale(1.035); }

.storefront-template-galeria .gallery-tile > span {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 3px;
  padding: 52px 18px 18px;
  background: linear-gradient(0deg, color-mix(in srgb, var(--zsf-page-bg-deep) 90%, transparent), transparent);
}

.storefront-template-galeria .gallery-product-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--zsf-grid-gap);
}

.storefront-template-galeria .gallery-product {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.storefront-template-galeria .gallery-product__media {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--zsf-card-radius);
}

.storefront-template-galeria .gallery-product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-template-galeria .gallery-product__action { grid-column: 1 / -1; }

.storefront-template-galeria .gallery-promotions__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--zsf-grid-gap);
}

.storefront-template-galeria .gallery-promotions__grid article {
  display: grid;
  grid-template-rows: minmax(260px, 1fr) auto;
  overflow: hidden;
  border-radius: var(--zsf-card-radius);
  border: 1px solid var(--zsf-line);
}

.storefront-template-galeria .gallery-promotions__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-template-galeria .gallery-promotions__grid article > div {
  padding: clamp(18px, 2.4vw, 30px);
}

.storefront-template-galeria .menu-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 300px;
  align-items: end;
}

.storefront-template-galeria .main-menu {
  position: sticky;
  top: 72px;
  z-index: 22;
  backdrop-filter: blur(16px);
}

.storefront-template-galeria .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  grid-auto-flow: row dense;
  align-items: start;
}

.storefront-template-galeria .product-card--compact:nth-child(5n + 1) {
  grid-row: span 2;
}

.storefront-template-galeria .product-card--compact:nth-child(5n + 1) .product-media {
  min-height: clamp(300px, 34vw, 520px);
}

.storefront-template-galeria .product-page__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, .65fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
}

.storefront-template-galeria .product-page__media {
  min-height: min(76svh, 820px);
}

.storefront-template-galeria .product-page__summary,
.storefront-template-galeria .checkout-panel,
.storefront-template-galeria .portal-account-panel {
  position: sticky;
  top: 104px;
  align-self: start;
}

.storefront-template-galeria :is(.cart-layout, .order-detail-layout, .account-workspace, .portal-account-workspace) {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: clamp(24px, 4vw, 56px);
}

.storefront-template-galeria .auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, .75fr);
  min-height: min(74svh, 760px);
}

.storefront-template-galeria .auth-visual {
  min-height: 100%;
}

.storefront-template-galeria .legal-page {
  width: min(100%, 76rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(28px, 6vw, 80px);
}

.storefront-template-galeria .zestia-storefront-status {
  min-height: 440px;
  align-content: end;
}

/* Tablet: each composition keeps its identity while shedding side rails. */
@media (max-width: 1024px) {
  .zestia-storefront-surface[data-zestia-layout]
    :is(.product-page__hero, .cart-layout, .order-detail-layout, .account-workspace, .portal-account-workspace) {
    grid-template-columns: minmax(0, 1fr);
  }

  .storefront-template-carta .carta-home__masthead,
  .storefront-template-carta .carta-list,
  .storefront-template-galeria :is(.product-page__hero, .cart-layout, .order-detail-layout, .account-workspace, .portal-account-workspace, .auth-shell) {
    grid-template-columns: minmax(0, 1fr);
  }

  .storefront-template-carta .carta-list__heading,
  .storefront-template-carta .product-page__media,
  .storefront-template-galeria :is(.product-page__summary, .checkout-panel, .portal-account-panel) {
    position: static;
  }

  .storefront-template-galeria .gallery-hero__rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .storefront-template-galeria .gallery-hero__rail a:nth-child(n + 4) { display: none; }
  .storefront-template-galeria .gallery-product-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phone: one action column, touch-safe controls and no horizontal overflow. */
@media (max-width: 768px) {
  .zestia-storefront-surface[data-zestia-layout="carta"] :is(.product-card, .featured-card),
  .storefront-template-carta .product-card--compact {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .storefront-template-carta .site-header,
  .storefront-template-galeria .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .storefront-template-carta .site-footer .footer-main,
  .storefront-template-galeria .site-footer .footer-main,
  .storefront-template-carta .carta-home__masthead,
  .storefront-template-carta .carta-index,
  .storefront-template-carta .carta-list,
  .storefront-template-galeria .gallery-section-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .storefront-template-carta .carta-home__masthead { min-height: auto; }
  .storefront-template-carta .carta-home__figure { aspect-ratio: 16 / 10; }
  .storefront-template-carta .carta-index > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storefront-template-carta .carta-dish { grid-template-columns: 58px minmax(0, 1fr) auto 38px; }
  .storefront-template-carta .carta-dish > i { display: none; }
  .storefront-template-carta .carta-dish__media { width: 52px; height: 52px; }
  .storefront-template-carta .carta-notes__grid { grid-template-columns: minmax(0, 1fr); }

  .storefront-template-carta .product-card--compact .product-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .storefront-template-carta .product-card--compact .product-card__actions {
    grid-column: 1;
    grid-row: auto;
    align-items: stretch;
  }

  .storefront-template-galeria .gallery-hero { min-height: 68svh; }
  .storefront-template-galeria .gallery-hero__rail { display: flex; overflow-x: auto; }
  .storefront-template-galeria .gallery-hero__rail a { min-width: min(82vw, 260px); }
  .storefront-template-galeria .gallery-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; }
  .storefront-template-galeria .gallery-tile,
  .storefront-template-galeria .gallery-tile--wide { grid-column: span 1; grid-row: span 1; min-height: 0; }
  .storefront-template-galeria .gallery-tile--tall { grid-row: span 2; }
  .storefront-template-galeria .gallery-product-strip,
  .storefront-template-galeria .gallery-promotions__grid { grid-template-columns: minmax(0, 1fr); }
  .storefront-template-galeria .product-grid { grid-template-columns: minmax(0, 1fr); }
  .storefront-template-galeria .product-card--compact:nth-child(5n + 1) { grid-row: auto; }
  .storefront-template-galeria .product-card--compact:nth-child(5n + 1) .product-media { min-height: 0; }
  .storefront-template-galeria .product-page__media { min-height: 0; aspect-ratio: 4 / 5; }
}

@media (max-width: 420px) {
  .storefront-template-carta .carta-index > div,
  .storefront-template-galeria .gallery-mosaic {
    grid-template-columns: minmax(0, 1fr);
  }

  .storefront-template-carta .carta-dish {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .storefront-template-carta .carta-dish__media { display: none; }
  .storefront-template-galeria .gallery-tile--tall { grid-row: span 1; }
}

@media (prefers-reduced-motion: reduce) {
  .storefront-template-galeria .gallery-tile img {
    transition: none;
  }

  .storefront-template-galeria .gallery-tile:hover img {
    transform: none;
  }
}
