/* ===== GoMacroBites: light theme. Neutrals only; orange is reserved for cart actions. ===== */
:root {
  --white: #FFFFFF;
  --surface: #F5F5F7;      /* Apple-style section grey */
  --surface-2: #EDEDEF;
  --line: #E3E3E6;
  --ink: #1D1D1F;          /* near-black text */
  --ink-2: #424245;
  --grey: #6E6E73;
  --grey-2: #8E8E93;
  --brown: #6B4F3A;        /* brand */
  --brown-2: #A68A6D;
  --tan: #F3EDE6;
  --espresso: #2B2420;
  --cart: #F08A24;         /* cart / add-to-cart only */
  --cart-hover: #DB7714;

  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 56px;
  --gutter: 16px;
  --max: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 768px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brown); margin-bottom: 10px; }
.todo { background: #FFF6D6; color: #6B5A1E; border-radius: 4px; padding: 0 4px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.btn:active { transform: scale(.97); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--tan); }
.btn--cart { background: var(--cart); color: #fff; width: 100%; }
.btn--cart:disabled { background: var(--surface-2); color: var(--grey-2); cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--grey); text-decoration: underline; cursor: pointer; padding: 10px; font-size: 14px; }

.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 50%; cursor: pointer; position: relative; transition: background .2s; }
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  padding-top: env(safe-area-inset-top);
}
.header-inner { max-width: var(--max); margin: 0 auto; height: var(--header-h); padding: 0 calc(var(--gutter) - 8px) 0 var(--gutter); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--brown); margin-right: auto; }
.brand-mark { width: 28px; height: 28px; }
.brand-word { font-size: 19px; letter-spacing: -0.02em; color: var(--brown); }
.brand-word b { color: var(--ink); font-weight: 700; }
.desktop-nav { display: none; gap: 28px; }
.desktop-nav a { text-decoration: none; font-size: 14px; color: var(--ink-2); transition: color .2s; }
.desktop-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; }
.cart-btn { color: var(--cart); }
.cart-btn:hover { color: var(--cart-hover); }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--cart); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid #fff; box-sizing: content-box; }
@media (min-width: 900px) {
  .desktop-nav { display: flex; position: absolute; left: 50%; transform: translateX(-50%); }
  .header-inner { position: relative; }
}

/* ===== Hero slideshow ===== */
.hero { position: relative; max-width: var(--max); margin: 12px auto 0; padding: 0 var(--gutter); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr; min-height: 560px; overflow: hidden; }
.slide img { width: 100%; max-width: 380px; justify-self: center; align-self: end; order: -1; margin-top: 8px; }
.slide-copy { padding: 4px 24px 32px; text-align: center; align-self: start; }
.slide h1, .slide h2 { font-size: clamp(28px, 7vw, 56px); font-weight: 700; margin-bottom: 12px; }
.slide .lede { font-size: 17px; color: var(--ink-2); margin: 0 auto 20px; max-width: 32ch; }
.slide--warm { background: var(--tan); }
.slide--grey { background: var(--surface); }
.slide--dark { background: var(--espresso); color: #fff; }
.slide--dark .eyebrow { color: var(--brown-2); }
.slide--dark .lede { color: #CFC7BF; }
@media (min-width: 768px) {
  .slide { grid-template-columns: 1fr 1fr; grid-template-rows: none; min-height: 520px; align-items: center; }
  .slide img { order: 0; max-width: 520px; align-self: center; margin: 0; }
  .slide-copy { text-align: left; padding: 48px 0 48px 64px; align-self: center; }
  .slide .lede { margin-left: 0; }
}

.slide-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); display: none; place-items: center; cursor: pointer; transition: background .2s; }
.slide-arrow:hover { background: #fff; }
.slide-arrow svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.slide-arrow--prev { left: calc(var(--gutter) + 14px); }
.slide-arrow--next { right: calc(var(--gutter) + 14px); }
@media (hover: hover) and (min-width: 768px) { .slide-arrow { display: grid; } }

.dots { display: flex; justify-content: center; gap: 4px; padding: 10px 0 0; }
.dots button { width: 28px; height: 28px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.dots button::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: #C7C7CC; transition: width .3s var(--ease), background .3s; }
.dots button[aria-selected="true"]::before { width: 22px; background: var(--ink); }

/* ===== Info cards ===== */
.info { max-width: var(--max); margin: 40px auto 0; padding: 0 var(--gutter); display: grid; gap: 16px; }
.info-card { background: var(--surface); border-radius: var(--radius); padding: 20px; display: grid; gap: 18px; }
.info-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.info-card h2 { font-size: 26px; margin-bottom: 10px; }
.info-card p:not(.eyebrow) { color: var(--ink-2); font-size: 16px; }
@media (min-width: 600px) {
  .info-card { grid-template-columns: 38% 1fr; align-items: center; padding: 24px; }
  .info-card--flip img { order: 2; }
}
@media (min-width: 1000px) {
  .info { grid-template-columns: 1fr 1fr; }
  .info-card { grid-template-columns: 42% 1fr; }
  .info-card h2 { font-size: 24px; }
  .info-card p:not(.eyebrow) { font-size: 15px; }
}

/* ===== Product shelves ===== */
.shelf { max-width: var(--max); margin: 56px auto 0; padding: 0 var(--gutter); }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.shelf-head h2 { font-size: clamp(24px, 5vw, 32px); }
.shelf-head p { color: var(--grey); font-size: 15px; margin-top: 4px; }
.shelf-arrows { display: none; gap: 8px; }
@media (hover: hover) { .shelf-arrows { display: flex; } }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background .2s, opacity .2s; }
.round-btn:hover:not(:disabled) { background: var(--surface-2); }
.round-btn:disabled { opacity: .35; cursor: default; }
.round-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.track {
  list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }
@media (min-width: 600px) { .track { grid-auto-columns: 30%; gap: 16px; } }
@media (min-width: 900px) { .track { grid-auto-columns: calc((100% - 4 * 16px) / 4.4); } }
@media (min-width: 1200px) { .track { grid-auto-columns: calc((100% - 4 * 16px) / 5); margin: 0; padding: 0 0 4px; scroll-padding: 0; } }

.card { scroll-snap-align: start; min-width: 0; }
.card-media { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.card-media img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s var(--ease); }
@media (hover: hover) { .card:not(.card--soon):hover .card-media img { transform: scale(1.04); } }
.card-name { font-size: 15px; font-weight: 600; margin-top: 10px; line-height: 1.3; }
.card-note { font-size: 13px; color: var(--grey); margin-top: 2px; line-height: 1.35; }
.card--soon .card-name { color: var(--grey); }

.add-btn {
  position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--cart); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 12px rgba(240, 138, 36, .35); transition: background .2s, transform .2s var(--ease);
}
.add-btn:hover { background: var(--cart-hover); }
.add-btn:active { transform: scale(.9); }
.add-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.add-btn.is-added { animation: pop .4s var(--ease); }
@media (max-width: 599px) {
  .add-btn { width: 38px; height: 38px; right: 6px; bottom: 6px; }
  .add-btn::after { content: ""; position: absolute; inset: -6px; } /* keeps a 50px tap target */
  .add-btn svg { width: 19px; height: 19px; }
}
@keyframes pop { 50% { transform: scale(1.18); } }

.progress { height: 3px; background: var(--surface-2); border-radius: 2px; margin-top: 18px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ink-2); border-radius: 2px; transition: transform .1s linear; }

/* ===== Footer ===== */
.site-footer { background: var(--surface); margin-top: 80px; font-size: 13px; color: var(--grey); padding-bottom: env(safe-area-inset-bottom); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 20px; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }
.footer-cols h3 { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; letter-spacing: 0; }
.footer-cols a { display: block; text-decoration: none; padding: 5px 0; overflow-wrap: break-word; }
.footer-cols a:hover, .footer-legal a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 18px; }
.footer-legal nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-legal a { text-decoration: none; }
.version-mark { text-align: center; color: var(--grey-2); font-size: 11px; margin-top: 20px; }

/* ===== Drawers ===== */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .32); z-index: 50; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(380px, 88vw);
  background: #fff; display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  transform: translateX(100%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .1);
}
.drawer.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding: 0 8px 0 24px; border-bottom: 1px solid var(--line); }
.drawer-title { font-weight: 600; font-size: 17px; }
.drawer-nav { overflow-y: auto; padding: 8px 0 24px; }
.drawer-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-2); padding: 20px 24px 6px; }
.drawer-nav a { display: block; padding: 12px 24px; font-size: 20px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.drawer-nav a:hover { background: var(--surface); }

.cart-list { list-style: none; margin: 0; padding: 8px 0; overflow-y: auto; flex: 1; }
.cart-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.cart-name { font-size: 15px; font-weight: 500; }
.qty { display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 999px; padding: 2px; flex-shrink: 0; }
.qty button { width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; cursor: pointer; font-size: 18px; }
.qty button:hover { background: #fff; }
.qty span { min-width: 20px; text-align: center; font-weight: 600; font-size: 14px; }
.cart-empty { padding: 32px 24px; color: var(--grey); flex: 1; }
.cart-list:empty { display: none; }
.cart-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: grid; justify-items: center; gap: 4px; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  max-width: calc(100vw - 32px); text-align: center; transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
