:root {
  color-scheme: light;
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  color: #11110e;
  background: #fdf9f0;
  --green: #123e17;
  --yellow: #ffc32b;
  --border: #dacebe;
}
* { box-sizing: border-box; }
body { margin: 0; }
html { --menu-height: clamp(5rem, 7vw, 7rem); scroll-padding-top: var(--menu-height); }
html:has(.store-menu .departments) { scroll-padding-top: calc(var(--menu-height) + 6.5rem); }
button, input, select { font: inherit; color: inherit; }
button, .hero-button { cursor: pointer; }
button { background: transparent; border: 0; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #307922; outline-offset: 3px; }
[hidden], .symbols { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: absolute; top: 0; left: 0; z-index: 2; background: white; padding: .7rem; }
.page { width: min(94.8%, 1600px); margin: auto; padding-bottom: 1.8rem; }
.icon { width: 1.65em; height: 1.65em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.small { width: 1em; height: 1em; stroke-width: 2.7; }
.store-menu {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flow-root;
  background: #fdf9f0;
}
.topbar {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.9vw, 32px);
  padding: clamp(12px, 1vw, 18px) .55vw clamp(18px, 1.55vw, 26px);
  font-size: clamp(1rem, 1.35vw, 1.45rem);
}
.brand { display: flex; align-items: center; flex: none; padding-left: .2vw; }
.brand img { width: clamp(130px,14.2vw,240px); height: auto; display: block; }
.nav-button { display: inline-flex; align-items: center; gap: .56em; padding: 0; min-height: 42px; white-space: nowrap; font-weight: 600; letter-spacing: -.035em; }
.location::before, #cart::before { content: ""; height: 1.55em; width: 1px; background: #64655e; margin-right: 1.05vw; }
.location .icon:first-of-type { color: #549c18; width: 1.35em; }
#location-label, #account-label { max-width: 12.5vw; overflow: hidden; text-overflow: ellipsis; }
.search { display: flex; align-items: center; flex: 1; min-width: 11rem; gap: .65em; border: 1px solid #898a81; border-radius: 3rem; padding: .44em 1.1em; height: clamp(44px,3.35vw,58px); margin-left: .45vw; }
.search:focus-within { outline: 2px solid var(--green); }
.search input { min-width: 0; width: 100%; background: transparent; border: 0; outline: 0; letter-spacing: -.025em; }
input::placeholder { color: #8a8379; }
.actions { display: flex; align-items: center; gap: 1.9vw; margin-left: 1.35vw; }
.location + .actions { margin-left: auto; }
#cart { position: relative; }
#cart-count { background: var(--green); border-radius: 2em; color: white; font-size: .72em; padding: .15em .45em; }
.departments {
  display: flex;
  gap: .45rem;
  margin: 0 .25vw .85rem;
  padding: .35rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: .35rem;
  scrollbar-width: none;
}
.departments::-webkit-scrollbar { display: none; }
.departments button {
  flex: 0 0 5rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .2rem 0;
  border-radius: .5rem;
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: -.025em;
  white-space: nowrap;
  scroll-snap-align: start;
}
.departments img, .department-icon {
  display: block;
  width: 3.1rem;
  height: 3.1rem;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 50%;
}
.departments button:hover > :first-child { border-color: #c8ad80; }
.departments button[aria-pressed="true"] { color: var(--green); }
.departments button[aria-pressed="true"] > :first-child { border-color: var(--green); }
.card:hover { border-color: #c8ad80; }
.hero { width: 100%; aspect-ratio: 1456 / 378; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 6.15% 1.5%; border-radius: clamp(15px,1.5vw,26px); background: #ffc32b url("../assets/hero/grocery-bag.jpg") center / cover no-repeat; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.8rem,5.7vw,6.1rem); font-weight: 750; letter-spacing: -.045em; line-height: .98; }
@media (min-width: 1001px) {
  h1 { transform: scaleX(1.14); transform-origin: left center; }
}
.hero-button { display: inline-flex; justify-content: center; align-items: center; width: 19.1vw; max-width: 304px; min-height: 44px; height: 4vw; border-radius: .65em; margin-top: 1.55vw; background: var(--green); color: white; text-decoration: none; font-size: clamp(1.15rem,2vw,2.15rem); font-weight: 700; letter-spacing: -.035em; }
.hero-button:hover, .primary:hover { background: #215b24; }
.catalog { margin: 0 .55vw; scroll-margin-top: 1rem; }
.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.6vw .2vw .95vw; }
h2 { font-size: clamp(1.65rem,2.9vw,3.1rem); line-height: 1.18; letter-spacing: -.047em; }
.view-all { display: inline-flex; align-items: center; gap: .35em; color: var(--green); font-size: clamp(1rem,1.4vw,1.45rem); font-weight: 700; min-height: 44px; padding: 0; }
.products { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .9vw; }
.card { overflow: hidden; border: 1px solid var(--border); border-radius: clamp(12px,1vw,18px); }
.product-photo { display: block; width: 100%; height: auto; aspect-ratio: 1.81; object-fit: cover; border-radius: 0 0 .85vw .85vw; }
.card-body { padding: .65vw .95vw .9vw 1.3vw; }
h3 { font-size: clamp(1rem,1.5vw,1.65rem); letter-spacing: -.04em; line-height: 1.2; }
.buy-row { margin-top: .45vw; display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.price { font-size: clamp(1.35rem,2.1vw,2.25rem); font-weight: 750; letter-spacing: -.045em; }
.quantity { display: flex; justify-content: center; align-items: center; min-width: clamp(68px,6.8vw,118px); min-height: 36px; background: var(--yellow); border-radius: .65rem; font-size: clamp(1rem,1.45vw,1.5rem); font-weight: 700; }
.quantity button { flex: 1; min-height: 36px; font-weight: inherit; }
.quantity button:hover { background: #0000000b; }
.quantity span { min-width: 1em; text-align: center; font-size: .8em; }
.empty { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: 14px; padding: 2rem; }
.empty button, .text-button { padding: .6rem 0; font-weight: 650; color: var(--green); text-decoration: underline; }
#sort-wrap { font-size: .95rem; }
select, .field { border: 1px solid var(--border); border-radius: .65rem; background: #fffcf6; padding: .6em; }
dialog { width: min(440px,calc(100% - 2rem)); max-height: 85dvh; overflow: auto; padding: 1.5rem; background: #fdf9f0; color: inherit; border: 1px solid var(--border); border-radius: 1.2rem; box-shadow: 0 20px 90px #10220f38; }
dialog::backdrop { background: #15201363; }
.panel-head, .cart-item, .subtotal { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.panel-head { margin-bottom: 1rem; }
.panel-head h2 { font-size: 1.75rem; }
.close { background: #eee8dc; border-radius: 50%; width: 38px; height: 38px; font-size: 1.6rem; line-height: 1; }
form label, .field { display: block; width: 100%; }
.field { margin: .5rem 0 1rem; }
.primary { background: var(--green); color: white; padding: .7rem 1.25rem; border-radius: .65rem; font-weight: 650; }
.cart-item { padding: .85rem 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: .6rem; }
.item-info { flex: 1; }
.item-info small { display: block; margin-top: .2rem; }
.cart-item .quantity { min-width: 84px; font-size: 1.1rem; }
.subtotal { font-size: 1.2rem; margin: 1.2rem 0; }
@media (max-width: 1000px) {
  html:has(.topbar .search) { --menu-height: 8.5rem; }
  .topbar { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem 1rem; }
  .search { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  .location { justify-self: start; }
  #location-label { max-width: 30vw; }
  .hero { min-height: 225px; }
}
@media (max-width: 650px) {
  .page { width: calc(100% - 24px); }
  .topbar { gap: .45rem .6rem; padding: .7rem .15rem .85rem; }
  .brand img { width: clamp(84px,22vw,125px); }
  .nav-button { min-height: 42px; gap: .2rem; }
  .location { font-size: .86rem; }
  .actions { gap: .6rem; margin: 0; }
  .actions .nav-button > span, .location::before, #cart::before { display: none; }
  .actions .icon { width: 1.4rem; }
  #cart-count { position: absolute; right: -.45rem; top: -.05rem; }
  .departments { margin: 0 0 .6rem; }
  .hero { aspect-ratio: auto; min-height: clamp(188px,48vw,260px); padding: 1.2rem 4%; background-position: 36% center; }
  h1 { font-size: clamp(2rem,6.9vw,2.85rem); }
  .hero-button { width: auto; padding: 0 1.1rem; min-height: 38px; margin-top: .9rem; font-size: 1rem; }
  .catalog { margin: 0; }
  .catalog-head { padding: .9rem .1rem .5rem; }
  .catalog-head h2 { font-size: 1.65rem; }
  .products { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
  .product-photo { border-radius: 0 0 .6rem .6rem; }
  .card-body { padding: .6rem; }
  .buy-row { margin-top: .4rem; }
  .quantity { min-width: 61px; }
  #sort-wrap { display: grid; }
}
@media (max-width: 360px) {
  .topbar { column-gap: .35rem; }
  #location-label { max-width: 27vw; }
}

.featured-carousel { position: relative; overflow: hidden; border-radius: clamp(15px,1.5vw,26px); }
.featured-track { display: flex; transition: transform 480ms ease-in-out; touch-action: pan-y pinch-zoom; }
.featured-track .hero { flex: 0 0 100%; border-radius: 0; }
.hero-tomatoes, .hero-oats {
  background-color: var(--slide-color);
  background-image: linear-gradient(90deg, var(--slide-color) 44%, transparent 66%), var(--slide-photo);
  background-size: 100% 100%, 59% auto;
  background-position: center, right center;
  background-repeat: no-repeat;
}
.hero-tomatoes { --slide-color: #e0ebbd; --slide-photo: url("../assets/products/fresh-tomatoes.png"); }
.hero-oats { --slide-color: #f3e3c5; --slide-photo: url("../assets/products/rolled-oats.png"); }
.catalog-actions { display: flex; align-items: center; gap: .3rem; }
.carousel-arrow {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border-radius: 50%; color: var(--green);
}
.carousel-arrow.previous svg { transform: rotate(180deg); }
.carousel-arrow:hover { background: #e8ead7; }
.catalog-actions .carousel-arrow { border: 1px solid var(--border); }
.catalog-actions .view-all { margin-left: .6rem; }
.products.deals-track {
  position: relative; display: grid; grid-auto-flow: column; grid-template-columns: none;
  grid-auto-columns: 29%; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.deals-track::-webkit-scrollbar { display: none; }
.deals-track .card { scroll-snap-align: start; }
.deals-track .card:last-child { scroll-snap-align: end; }
.offer-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  border-radius: 1rem; scrollbar-width: none;
}
.offer-track::-webkit-scrollbar { display: none; }
.offer-slide {
  flex: 0 0 100%; display: grid; grid-template-columns: 1fr 44%; align-items: stretch;
  scroll-snap-align: start; background: #e3ebd2; color: #173d20;
}
.offer-slide:nth-child(even) { background: #ffedc5; }
.offer-copy { align-self: center; padding: clamp(1rem, 3vw, 3rem); }
.offer-copy p { font-weight: 700; margin-bottom: .5rem; }
.offer-copy h3 { font-size: clamp(1.45rem, 3.3vw, 3.5rem); line-height: 1.03; }
.offer-price { display: flex; align-items: baseline; gap: .5rem; margin: .65rem 0 1rem; }
.offer-price strong { font-size: clamp(1.3rem, 2vw, 2rem); }
.offer-copy a { display: inline-block; text-decoration: none; }
.offer-slide img { width: 100%; height: 100%; min-height: 0; max-height: 20rem; align-self: center; object-fit: cover; }
@media (max-width: 650px) {
  .featured-track .hero { min-height: clamp(212px,52vw,270px); padding-bottom: 2.5rem; }
  .hero-tomatoes, .hero-oats { background-size: 100% 100%, auto 100%; background-position: center, right -60px center; }
  .catalog-head { gap: .3rem; flex-wrap: wrap; }
  .catalog-actions { margin-left: auto; gap: .15rem; }
  .catalog-actions .view-all { margin-left: .25rem; }
  .catalog-actions .carousel-arrow { width: 30px; height: 30px; }
  .products.deals-track { grid-auto-columns: minmax(155px,46%); }
}
@media (prefers-reduced-motion: reduce) {
  .featured-track { transition: none; }
  .products.deals-track { scroll-behavior: auto; }
}

.nav-button, .card a, .item-info a { color: inherit; text-decoration: none; }
.card h3 a:hover, .item-info a:hover { text-decoration: underline; }
.product-image-link { display: block; }
.shop-footer { border-top: 1px solid var(--border); margin: 2rem .5vw 0; padding: 1rem 0; }
.shop-footer nav { display: flex; gap: 1.5rem; }
.shop-footer a, .breadcrumbs a { color: var(--green); font-weight: 650; text-underline-offset: .2rem; }
.inner-page { max-width: 1080px; margin: 0 auto; padding: 1rem .4rem 2rem; }
.breadcrumbs { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.6rem; font-size: .95rem; color: #5d6155; }
.inner-page h1 { font-size: clamp(2.1rem,4.5vw,4rem); line-height: 1.04; transform: none; margin-bottom: 1.5rem; }
.inner-page h2 { font-size: clamp(1.25rem,2vw,1.65rem); }
.product-detail { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: clamp(1.5rem,4vw,4rem); }
.detail-photo { width: 100%; border-radius: 1.1rem; }
.category-label { color: var(--green); font-size: .9rem; font-weight: 650; margin-bottom: .7rem; }
.detail-copy > p:not(.category-label), .surface > p { line-height: 1.55; color: #56584e; }
.detail-price { display: block; font-size: 2rem; margin: 1.2rem 0 .7rem; }
.page-actions { display: flex; gap: 1rem; align-items: center; }
.shopping-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 1rem; align-items: start; }
.surface { border: 1px solid var(--border); background: #fffdf7; border-radius: 1rem; padding: clamp(1rem,2vw,1.65rem); }
.surface > p { margin: .65rem 0; }
.surface .primary, a.text-button { display: inline-block; }
.surface .primary { margin-top: .65rem; text-decoration: none; }
.surface .cart-item:first-child { padding-top: 0; }
.surface .item-info a { font-weight: 650; }
.surface > .text-button { margin-top: .5rem; }
.profile-details { margin: .9rem 0 0; }
.profile-details > div { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--border); }
.profile-details dt { color: #56584e; font-size: .9rem; }
.profile-details dd { margin: .2rem 0 0; overflow-wrap: anywhere; font-weight: 650; }
.profile-details button { grid-column: 2; grid-row: 1 / 3; }
.order-list, .narrow { max-width: 45rem; }
.order-list { display: grid; gap: 1rem; }
.receipt header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.receipt time { font-size: .9rem; color: #56584e; }
.order-prices { width: 100%; margin-top: 1.25rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.order-prices caption { padding-bottom: .6rem; text-align: left; font-weight: 700; }
.order-prices th, .order-prices td { padding: .65rem 0 .65rem .5rem; text-align: right; border-top: 1px solid var(--border); }
.order-prices th:first-child { padding-left: 0; text-align: left; }
.order-prices thead th { font-size: .875rem; font-weight: 600; color: #56584e; }
.order-prices tbody th { font-weight: 500; overflow-wrap: anywhere; }
.order-prices td { white-space: nowrap; }
.order-prices tfoot { font-size: 1.1rem; font-weight: 700; }
.order-prices tfoot :is(th,td) { padding-bottom: 0; }
@media (max-width: 700px) {
  .shopping-layout, .product-detail { grid-template-columns: minmax(0,1fr); }
  .inner-page { padding: .25rem 0 1rem; }
  .detail-photo { max-height: 16rem; object-fit: cover; }
  .breadcrumbs { margin-bottom: 1rem; }
}
