.delivery-banner {
  background: #193a2d;
  color: #f8edda;
  font-size: .8125rem;
  font-weight: 600;
}

.delivery-banner .container {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 18px;
  padding-block: 8px;
  text-align: center;
}

.delivery-banner a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.delivery-banner a:focus-visible { outline-color: #efd092; }
.delivery-banner span { color: #ead4a7; }

.catalog-shell,
.catalog-aisles .container { max-inline-size: calc(68rem + 48px); }

.storefront-page:has(.catalog-shell) { background: #fff; }

.storefront-page:has(:is(.catalog-shell, .product-page)) .shop-header {
  background: #112d23;
  border-color: #2c5545;
}

.storefront-page:has(:is(.catalog-shell, .product-page)) .shop-header .market-lockup {
  --mark-gold: #efd092;
  --mark-green: #a1c5ab;
  color: #fff8ea;
}

.storefront-page:has(:is(.catalog-shell, .product-page)) .shop-header .shop-actions a { color: #fff8ea; }
.storefront-page:has(:is(.catalog-shell, .product-page)) .shop-header .shop-actions a:hover { color: #efd092; }
.storefront-page:has(:is(.catalog-shell, .product-page)) .shop-header .shop-actions .cart-nav {
  background: #1d4435;
  border-color: #5a7d68;
  color: #fff8ea;
}

.storefront-page:has(:is(.catalog-shell, .product-page)) .shop-header .shop-search { background: #fffef8; }
.storefront-page:has(:is(.catalog-shell, .product-page)) .shop-header .shop-search .button { background: #efd092; color: #142e22; }
.storefront-page:has(:is(.catalog-shell, .product-page)) .shop-header .shop-search .button:hover { background: #ffe5ad; }
.storefront-page:has(:is(.catalog-shell, .product-page)) .shop-header :is(a, select):focus-visible { outline-color: #efd092; }

.market-hero {
  --hero-gold: #efd092;
  --hero-green: #2a6649;
  --hero-glow: #c2a35b;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns:
    [full-start] minmax(24px, 1fr)
    [content-start] minmax(0, 30rem)
    [media-start] minmax(0, 38rem)
    [content-end] minmax(24px, 1fr)
    [full-end];
  overflow: hidden;
  min-height: clamp(270px, 26vw, 388px);
  border-radius: 0 0 22px 22px;
  background:
    radial-gradient(ellipse at 95% 136%, var(--hero-glow), transparent 48%),
    radial-gradient(ellipse at 56% 138%, var(--hero-green), transparent 71%),
    linear-gradient(135deg, #0c241a, #163d2d);
}

.market-hero::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, var(--hero-gold) .65px, transparent 1px) 0 0 / 7px 7px;
  mask-image: radial-gradient(ellipse 56% 100% at 99% 92%, #000, transparent 85%);
  opacity: .44;
  pointer-events: none;
  content: "";
}

.market-hero-copy {
  position: relative;
  z-index: 1;
  grid-column: content-start / media-start;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(28px, 4.2vw, 56px) clamp(16px, 3vw, 42px) clamp(28px, 4.2vw, 56px) 0;
}

.market-hero-copy :is(h1, h2) {
  margin: 0;
  color: #fff;
  font: 800 clamp(2.05rem, 4vw, 3.75rem)/1.04 "DM Sans", "Malgun Gothic", system-ui, sans-serif;
  letter-spacing: -.052em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.market-hero h1 em {
  display: block;
  color: var(--hero-gold);
  font-style: normal;
}

:lang(ko) .market-hero-copy :is(h1, h2) {
  line-height: 1.15;
  word-break: keep-all;
}

@media (min-width: 701px) {
  :lang(uz) .market-hero-copy :is(h1, h2) { font-size: clamp(2.05rem, 3.3vw, 3.25rem); }
}

.market-hero p {
  max-width: 34ch;
  margin: 13px 0 20px;
  color: #e5efe7;
  font-size: clamp(.9375rem, 1.3vw, 1.0625rem);
}

.market-hero .button {
  gap: 14px;
  min-height: 44px;
  padding: 7px 17px;
}

.market-hero .button.primary { background: var(--hero-gold); color: #142e22; }
.market-hero .button.primary:hover { background: #ffe5ad; }
.market-hero .button:focus-visible { outline-color: #fff; }

.market-hero-figure {
  display: grid;
  position: relative;
  grid-column: media-start / content-end;
  grid-row: 1;
  min-width: 0;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid #efd09255;
  border-radius: 12px;
  background: #173b2d;
  box-shadow: 0 10px 30px #081c1666;
}

.market-hero-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.market-hero-photo--preset { object-fit: cover; object-position: 50% 57%; }

.market-hero--panorama { background: #122c20; }

.market-hero--panorama::before {
  mask-image: radial-gradient(ellipse 50% 75% at 19% 110%, #000, transparent 84%);
  opacity: .22;
}

.market-hero--panorama .market-hero-figure {
  grid-column: full-start / full-end;
  inline-size: min(76%, 86rem);
  justify-self: end;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.market-hero--panorama .market-hero-figure::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #122c20, #122c20b3 15%, transparent 41%);
  pointer-events: none;
  content: "";
}

.market-hero--panorama .market-hero-photo { object-position: right 56%; }

.catalog-section {
  padding-block: clamp(32px, 4vw, 48px) 68px;
  scroll-margin-top: 18px;
}
.catalog-heading { margin-bottom: 20px; }
.catalog-section--home { padding-top: clamp(16px, 1.7vw, 24px); }
.catalog-section--home .catalog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 14px;
}
.catalog-section--home .catalog-heading { margin-bottom: 0; }
.catalog-section--home .catalog-toolbar { margin: 0; padding: 0; border: 0; }
.catalog-sort-menu { position: relative; }
.catalog-sort-menu summary {
  gap: 8px;
  min-height: 44px;
  padding: 5px 10px;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  font-size: .875rem;
}
.catalog-sort-menu summary::-webkit-details-marker { display: none; }
.catalog-sort-menu summary::after { content: "▾"; }
.catalog-sort-menu .catalog-sort {
  position: absolute;
  z-index: 3;
  inset: calc(100% + 6px) 0 auto auto;
  width: min(280px, 82vw);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 5px 16px #193a2d20;
}
.catalog-sort-menu .catalog-sort select { flex: 1; min-width: 0; }

.catalog-heading :is(h1, h2) {
  margin: 0;
  color: var(--dark);
  font: 700 clamp(1.9rem, 3.5vw, 3rem)/1.14 "Playfair Display", Georgia, serif;
  letter-spacing: -.04em;
}

:lang(ko) .catalog-heading :is(h1, h2) { font-family: "DM Sans", "Malgun Gothic", sans-serif; }

.catalog-aisles {
  border-bottom: 1px solid #31634d;
  background: #21523e;
}

.catalog-aisle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(7px, 1.2vw, 16px);
  padding-block: 4px;
}

.catalog-aisle-track {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #c7a969 #21523e;
}

.catalog-aisle-layout[data-enhanced] .catalog-aisle-track {
  scrollbar-width: none;
  mask-image: linear-gradient(to right, var(--aisle-start, #000), #000 12px, #000 calc(100% - 12px), var(--aisle-end, #000));
}
.catalog-aisle-layout[data-enhanced] .catalog-aisle-track::-webkit-scrollbar { display: none; }
.catalog-aisle-track[data-more-before] { --aisle-start: transparent; }
.catalog-aisle-track[data-more-after] { --aisle-end: transparent; }

.catalog-aisle-links {
  display: flex;
  gap: 7px;
  inline-size: max-content;
}

.catalog-aisle-controls {
  display: flex;
  padding: 1px;
  border: 1px solid #b8a77c;
  border-radius: 999px;
  background: #143c2e;
}

.catalog-aisle-controls[hidden] { display: none; }

.catalog-aisle-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #efd092;
}

.catalog-aisle-controls button::before {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}

.catalog-aisle-controls [data-aisle-shift="-1"]::before { transform: rotate(135deg); }
.catalog-aisle-controls button:not([aria-disabled="true"]):hover { background: #efd092; color: #142e22; }
.catalog-aisle-controls button[aria-disabled="true"] { opacity: .45; cursor: default; }
.catalog-aisle-controls button:focus-visible { outline: 2px solid #efd092; outline-offset: -2px; }

.catalog-aisles a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 44px;
  padding: 5px clamp(11px, 1.3vw, 16px);
  border-radius: 8px;
  color: #fff8e8;
  font-size: .875rem;
  font-weight: 700;
}

.catalog-aisles a:hover { background: #326950; color: #fff; }
.catalog-aisles a[aria-current="true"] { background: #efd092; color: #142e22; }
.catalog-aisles a:focus-visible { outline-color: #efd092; outline-offset: -3px; }
.catalog-aisles a[aria-current="true"]:focus-visible { outline-color: #18412e; }

.catalog-current-search {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 8px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.catalog-current-search a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.catalog-toolbar, .catalog-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.catalog-toolbar {
  justify-content: space-between;
  margin-block: 0 19px;
  padding-block: 11px;
  border-block: 1px solid var(--line);
}

.catalog-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.catalog-count strong {
  min-width: 1.8em;
  padding: 2px 7px;
  border-radius: 4px;
  background: #e7efe3;
  color: var(--dark);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.catalog-sort { font-size: .875rem; }
.catalog-sort label { font-weight: 700; }
.catalog-sort select {
  min-height: 44px;
  max-width: 100%;
  padding-inline: 10px;
  border: 1px solid #bac8bc;
  border-radius: 7px;
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
}

.catalog-sort .button { min-height: 44px; padding: 5px 12px; font-size: .875rem; }

.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); }
.product-card { display: flex; flex-direction: column; border-radius: 14px; }
.product-card:hover,
.product-card:focus-within { border-color: #86a185; }
.product-media {
  position: relative;
  height: auto;
  aspect-ratio: 2 / 1;
  border-bottom: 1px solid #e8e4d9;
  background: #f1eee4;
}
.catalog-section--home .product-media { aspect-ratio: 5 / 2; }
.product-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }

.product-media-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  padding: 10px;
  background: #f1eee4;
  color: #56634e;
  font-size: .75rem;
  text-align: center;
}

.catalog-section--home .product-media-empty {
  gap: clamp(4px, 1vw, 12px);
  padding: clamp(4px, 1vw, 10px);
  font-size: clamp(.7rem, 1.5vw, .75rem);
  line-height: 1.25;
}
.catalog-section--home .product-media-empty .bag-placeholder { font-size: clamp(.8rem, 2vw, 1.4rem); }

.product-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: clamp(11px, 1.65vw, 19px);
}

.product-content h3 {
  flex: 1;
  min-height: 0;
  margin: 0;
  color: var(--dark);
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.product-content h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-content .product-category { color: var(--muted); font-size: .8125rem; text-transform: none; letter-spacing: 0; }
.product-bottom { margin: 5px 0; flex-wrap: wrap; gap: 5px 10px; }
.product-bottom strong { font-size: clamp(1.12rem, 1.75vw, 1.45rem); font-variant-numeric: tabular-nums; }
.product-bottom .stock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 99px;
  background: #eaf1e7;
  color: #30543a;
  font-size: .75rem;
}
.product-bottom .stock::before {
  width: .48em;
  height: .48em;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.product-content .button.add {
  gap: 7px;
  padding-inline: 8px;
  background: var(--green);
  color: #fffdf8;
  font-size: .875rem;
}

.product-content .button.add:hover:not(:disabled) { background: #193e2e; }
.product-content .button.add:disabled { background: #eeeae1; color: #6a6558; cursor: default; }
.catalog-empty { padding: 36px 16px; }
.catalog-empty h3 { margin: 14px 0 5px; }
.catalog-empty p { margin: 0 0 10px; }

.product-recommendations {
  margin-top: clamp(26px, 4vw, 52px);
  padding-top: clamp(16px, 2.8vw, 30px);
  border-top: 1px solid var(--line);
}

.catalog-shell > .product-recommendations {
  margin-top: clamp(18px, 2.7vw, 32px);
  padding-top: 0;
  border-top: 0;
}

.product-carousel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.product-carousel-header h2 {
  margin: 0;
  color: var(--dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  line-height: 1.2;
  scroll-margin-top: 14px;
}

.product-carousel-empty { margin: 0; color: var(--muted); font-size: .875rem; }

.product-carousel-controls { display: flex; gap: 6px; }
.product-carousel-controls[hidden] { display: none; }
.product-carousel-controls .button {
  inline-size: 44px;
  min-block-size: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
}
.product-carousel-controls .button[aria-disabled="true"] { opacity: .45; cursor: default; }

.product-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(11rem, 31%, 17rem);
  gap: clamp(10px, 1.6vw, 20px);
  margin-inline: -3px;
  padding: 4px 3px 8px;
  overflow-x: auto;
  scroll-padding-inline: 3px;
  scroll-snap-type: x mandatory;
}

.product-carousel-track[data-enhanced] { scrollbar-width: none; }
.product-carousel-track[data-enhanced]::-webkit-scrollbar { display: none; }
.product-carousel-track .product-card { scroll-snap-align: start; }
.product-carousel-track .product-media { aspect-ratio: 4 / 3; }

@media (max-width: 700px) {
  .product-carousel-track { grid-auto-columns: clamp(9.5rem, 44%, 14rem); }
  .market-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 0 0 14px 14px; }
  .market-hero-copy {
    display: grid;
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    align-items: center;
    gap: 5px 10px;
    padding: 10px 17px 13px;
  }
  .market-hero-copy :is(h1, h2) { grid-area: 1 / 1; }
  .market-hero-copy :is(h1, h2) {
    font-size: clamp(1.42rem, 5.5vw, 2.5rem);
  }
  .market-hero p {
    grid-column: 1 / -1;
    max-width: none;
    margin: 0;
    font-size: .875rem;
    line-height: 1.35;
  }
  .market-hero .button {
    grid-area: 1 / 2;
    gap: 6px;
    max-width: min(8.5rem, 37vw);
    padding-inline: 9px;
    font-size: .8125rem;
    text-align: center;
  }
  .market-hero .button > span { display: none; }
  .market-hero-figure {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    aspect-ratio: 2.2;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .market-hero-photo--preset { object-position: center 66%; }
  .market-hero:not(.market-hero--panorama) .market-hero-photo--preset {
    object-fit: contain;
    object-position: center;
  }
  .market-hero--panorama .market-hero-figure {
    grid-column: 1;
    inline-size: 100%;
    aspect-ratio: 1.9;
  }
  .market-hero--panorama .market-hero-photo {
    inset-inline-start: auto;
    width: 120%;
  }
  .market-hero--panorama .market-hero-figure::after {
    background: linear-gradient(0deg, #122c204d, transparent 26%);
  }
  .catalog-section { padding-block: 27px 46px; }
  .catalog-section--home { padding-top: 14px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-media, .catalog-section--home .product-media { aspect-ratio: 4 / 3; }
}

@media (max-width: 550px) {
  .market-hero-figure { aspect-ratio: 2.6; }
  .catalog-toolbar { gap: 8px; }
  .catalog-section--home { padding-top: 8px; }
  .catalog-section--home .catalog-header { flex-wrap: nowrap; gap: 5px 12px; margin-bottom: 9px; }
  .catalog-section--home .catalog-heading { min-width: 0; }
  .catalog-section--home .catalog-heading h2 { font-size: clamp(1.25rem, 5.45vw, 1.65rem); overflow-wrap: anywhere; }
  .catalog-section--home .catalog-toolbar { flex: none; }
  .catalog-section--home .catalog-count { display: none; }
  .catalog-section--home .product-media { aspect-ratio: 2 / 1; }
  .catalog-section--home .product-category { display: none; }
  .catalog-sort { width: 100%; gap: 6px; }
  .catalog-sort select { flex: 1; min-width: 0; }
  .catalog-sort .button { padding-inline: 8px; }
}

@media (max-width: 550px) and (max-height: 740px) {
  .delivery-banner .container { padding-block: 4px; }
  .catalog-aisle-layout { padding-block: 2px; }
  .market-hero-figure { aspect-ratio: 2.7; }
  .market-hero--panorama .market-hero-figure { aspect-ratio: 2.05; }
  .market-hero--panorama .market-hero-photo { width: 112%; }
  .market-hero-copy { padding-block: 8px; }
  .market-hero p { font-size: .8125rem; }
  .market-hero .button { max-width: min(7rem, 36vw); }
  .market-hero-copy :is(h1, h2) { font-size: clamp(1.15rem, 5.5vw, 1.375rem); }
  .market-hero:has(.market-hero-photo--preset):has(.market-hero-copy .button) .market-hero-copy p { display: none; }
  .catalog-section--home .product-bottom { margin-block: 1px 3px; flex-direction: row; align-items: baseline; }
}

@media (max-width: 430px) {
  .delivery-banner .container { gap: 1px 11px; }
  .product-media-empty { font-size: .8125rem; }
  .product-media-empty .bag-placeholder { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-card { transition: none; }
  .product-card:hover { transform: none; }
}

/* Homepage slides share the storefront hero layout. */
.homepage-slide-2 { --hero-green: #245d42; --hero-glow: #9a854c; }
.homepage-slide-3 { --hero-green: #366748; --hero-glow: #b49b59; }

.homepage-carousel { position: relative; }
.homepage-carousel-stage { display: grid; overflow: hidden; overflow: clip; }
.homepage-carousel[data-enhanced] .homepage-carousel-stage { touch-action: pan-y; touch-action: pan-y pinch-zoom; }
.homepage-slide { grid-area: 1 / 1; }
.homepage-slide:not([data-current], [data-leaving]) { visibility: hidden; }
.homepage-slide[data-leaving] { pointer-events: none; }

.homepage-carousel-controls {
  position: absolute;
  z-index: 2;
  inset-inline-end: max(24px, calc((100% - 68rem) / 2));
  inset-block-end: 16px;
  display: flex;
  width: max-content;
  justify-content: center;
  align-items: center;
  padding-inline: 4px;
  border: 1px solid #234b38;
  border-radius: 99px;
  background: #153b2bf0;
}
.homepage-carousel-controls[hidden] { display: none; }
.homepage-carousel-controls button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
}
.homepage-carousel-controls button:focus-visible { outline: 2px solid #efd092; outline-offset: -3px; }
.homepage-carousel-controls button:hover { background: #295641; }
.homepage-carousel-controls .homepage-carousel-arrow {
  font-size: 1.65rem;
  line-height: 1;
}
.homepage-carousel-dot span {
  width: 9px;
  height: 9px;
  background: #94ab9e;
  border-radius: 99px;
}
.homepage-carousel-dot[aria-current="true"] span { width: 18px; background: #efd092; }

@media (max-width: 700px) {
  .homepage-slide { grid-template-rows: auto 1fr; }
  .homepage-slide .market-hero-figure { aspect-ratio: 3 / 2; }
  .homepage-slide-text-only .market-hero-copy { grid-row: 1 / -1; min-height: 142px; }
  .homepage-carousel-controls { position: static; margin: 6px auto 0; }
}

