/* ==========================================================
   Ember & Oak Coffee — styles.css
   Warm minimalism. Cozy but modern.
   ========================================================== */

:root {
  --espresso: #2C1810;
  --roast: #5D3A2E;
  --cream: #F5F0E8;
  --latte: #E8DFD0;
  --steam: #FFFFFF;
  --copper: #C67B4E;
  --copper-dark: #A65D35;

  --bg: var(--cream);
  --fg: var(--espresso);
  --muted: #7a5b4d;
  --line: rgba(44, 24, 16, 0.12);

  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-script: 'Caveat', cursive;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(44, 24, 16, 0.06);
  --shadow-md: 0 8px 24px rgba(44, 24, 16, 0.08);
  --shadow-lg: 0 18px 48px rgba(44, 24, 16, 0.14);
  --shadow-glow: 0 0 0 4px rgba(198, 123, 78, 0.18);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark mode */
body.dark {
  --bg: #1a0f0a;
  --fg: #f3ece2;
  --muted: #b8a395;
  --line: rgba(243, 236, 226, 0.10);
  --cream: #221610;
  --latte: #2b1d14;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 18px 48px rgba(0,0,0,0.55);
}

/* ----- Reset / base ----- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Subtle grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--copper);
  color: var(--steam);
  box-shadow: 0 4px 12px rgba(198, 123, 78, 0.30);
}
.btn--primary:hover {
  background: var(--copper-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(198, 123, 78, 0.40);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--steam);
  border: 1.5px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--steam);
}

.btn--lg { padding: 16px 36px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: 0.7; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Eyebrow ----- */
.eyebrow {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--copper);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all 0.35s var(--ease);
  background: transparent;
}
.nav.is-scrolled {
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 16px rgba(44, 24, 16, 0.06);
  padding: 12px 0;
}
body.dark .nav.is-scrolled {
  background: rgba(26, 15, 10, 0.88);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--steam);
  transition: color 0.3s var(--ease);
}
.nav.is-scrolled .nav__logo { color: var(--fg); }
.logo-mark { color: var(--copper); display: inline-flex; }
.logo-text { letter-spacing: -0.01em; }

.nav__links {
  display: flex;
  gap: 32px;
}
.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}
.nav.is-scrolled .nav__link { color: var(--fg); }
.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--copper);
  transition: width 0.3s var(--ease);
}
.nav__link:hover { color: var(--copper); }
.nav__link:hover::after,
.nav__link.is-active::after { width: 100%; }

.nav__cta { color: var(--steam) !important; }
.nav__cta { background: var(--copper); }
.nav__cta:hover { background: var(--copper-dark); }

/* Burger */
.nav__burger {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav__burger span {
  width: 22px;
  height: 2px;
  background: var(--steam);
  transition: all 0.3s var(--ease);
}
.nav.is-scrolled .nav__burger span { background: var(--fg); }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--bg);
  padding: 96px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: var(--shadow-lg);
  z-index: 99;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu__link {
  font-family: var(--font-head);
  font-size: 1.5rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  color: var(--steam);
  padding: 120px 24px 80px;
}

.hero__bg {
  position: absolute;
  inset: -10% 0;
  background: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  z-index: -2;
  transform: translateY(0);
  will-change: transform;
  transition: transform 0.1s linear;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(44, 24, 16, 0.55) 0%, rgba(44, 24, 16, 0.85) 100%),
    linear-gradient(180deg, rgba(44, 24, 16, 0.4) 0%, rgba(44, 24, 16, 0.7) 100%);
  z-index: -1;
}

.hero__content { position: relative; z-index: 1; max-width: 820px; }

.hero__title {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.05;
}
.hero__title em {
  font-family: var(--font-script);
  font-weight: 500;
  color: var(--copper);
  font-style: normal;
  font-size: 1.15em;
}

.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 560px;
  margin: 0 auto 40px;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero__chips {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  font-size: 0.85rem;
  backdrop-filter: blur(8px);
}
.chip .dot {
  width: 8px;
  height: 8px;
  background: #6cd28e;
  border-radius: 50%;
  box-shadow: 0 0 8px #6cd28e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  transition: color 0.3s var(--ease);
}
.hero__scroll:hover { color: var(--steam); }
.hero__scroll .line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.4);
  position: relative;
  overflow: hidden;
}
.hero__scroll .line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--copper);
  transform: translateY(-100%);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ===== STORY STRIP ===== */
.strip {
  background: var(--latte);
  padding: 48px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
body.dark .strip { background: var(--latte); }

.strip__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.strip__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.strip__num {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--copper);
  line-height: 1;
}
.strip__label {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
  position: relative;
}

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section__title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin-bottom: 16px;
}
.section__title em {
  font-family: var(--font-script);
  font-weight: 500;
  color: var(--copper);
  font-style: normal;
  font-size: 1.1em;
}

.section__sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ===== MENU ===== */
.menu { background: var(--bg); }

.menu__filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.filter {
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--latte);
  color: var(--fg);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
}
.filter:hover { background: var(--cream); }
.filter.is-active {
  background: var(--espresso);
  color: var(--steam);
  box-shadow: var(--shadow-sm);
}

.menu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--latte);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  transition: all 0.35s var(--ease);
  border: 1px solid var(--line);
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--copper), var(--copper-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
}
.card:hover::before { transform: scaleX(1); }

.menu-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.menu-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--latte);
}
.menu-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.menu-card:hover .menu-card__img img { transform: scale(1.08); }
.menu-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(44, 24, 16, 0.4) 100%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.menu-card:hover .menu-card__img::after { opacity: 1; }
.menu-card__body {
  padding: 24px 24px 26px;
}

.menu-card.is-hidden {
  display: none;
}

.menu-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.menu-card__title {
  font-size: 1.25rem;
  color: var(--roast);
  font-weight: 600;
}
body.dark .menu-card__title { color: var(--steam); }
.menu-card__price {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--copper);
  font-weight: 600;
  white-space: nowrap;
}
.menu-card__desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 12px;
}
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(198, 123, 78, 0.15);
  color: var(--copper);
}
.tag--accent { background: var(--copper); color: var(--steam); }

.tag--soldout {
  background: rgba(192, 57, 43, 0.12);
  color: #b23a2f;
  border: 1px solid rgba(192, 57, 43, 0.25);
}
body.dark .tag--soldout {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.12);
}

/* Sold-out menu card */
.menu-card.is-soldout {
  opacity: 0.6;
  pointer-events: none;
}
.menu-card.is-soldout .menu-card__add {
  background: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.menu-card__sold-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--steam);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius) var(--radius) 0 0;
}
body.dark .menu-card__sold-overlay {
  background: rgba(0, 0, 0, 0.6);
}

.menu-card__add {
  margin-top: 14px;
  padding: 8px 16px;
  font-size: 0.85rem;
  width: 100%;
  justify-content: center;
}
.menu-card__add svg { stroke-width: 2.2; }

/* ===== REVIEWS ===== */
.reviews { background: var(--latte); }

.reviews__viewport {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  min-height: 320px;
}
.reviews__track {
  position: relative;
  min-height: 320px;
}
.review {
  position: absolute;
  inset: 0;
  background: var(--cream);
  padding: 48px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.review.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.review.is-leaving {
  opacity: 0;
  transform: translateX(-40px);
}

.stars {
  display: flex;
  gap: 4px;
  color: var(--copper);
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.stars span {
  opacity: 0;
  transform: translateY(8px);
  animation: starIn 0.4s var(--ease) forwards;
}
.stars span:nth-child(1) { animation-delay: 0.1s; }
.stars span:nth-child(2) { animation-delay: 0.2s; }
.stars span:nth-child(3) { animation-delay: 0.3s; }
.stars span:nth-child(4) { animation-delay: 0.4s; }
.stars span:nth-child(5) { animation-delay: 0.5s; }
@keyframes starIn { to { opacity: 1; transform: translateY(0); } }

.review__quote {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.5;
  color: var(--roast);
  font-style: italic;
  margin-bottom: 28px;
}
body.dark .review__quote { color: var(--steam); }

.review__author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--steam);
  background: linear-gradient(135deg, var(--c1, var(--copper)), var(--c2, var(--roast)));
  flex-shrink: 0;
}
.review__author strong { display: block; font-size: 0.95rem; }
.review__author span { font-size: 0.85rem; color: var(--muted); }

.reviews__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--fg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.25s var(--ease);
}
.reviews__nav:hover {
  background: var(--copper);
  color: var(--steam);
  transform: translateY(-50%) scale(1.1);
}
.reviews__nav--prev { left: -22px; }
.reviews__nav--next { right: -22px; }

.reviews__dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
}
.reviews__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.3;
  transition: all 0.3s var(--ease);
}
.reviews__dots button.is-active {
  width: 24px;
  border-radius: 4px;
  background: var(--copper);
  opacity: 1;
}

/* ===== VISIT / ADDRESS ===== */
.visit__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.visit__copy .section__title { text-align: left; }

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}
.info-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  background: var(--latte);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  transition: all 0.3s var(--ease);
}
.info-list li:hover {
  transform: translateX(4px);
  border-color: var(--copper);
}
.info-list__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--copper);
  color: var(--steam);
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-list strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--copper);
  margin-bottom: 4px;
}
.info-list span, .info-list a {
  display: block;
  color: var(--fg);
  font-size: 0.95rem;
}
.info-list a:hover { color: var(--copper); }

.visit__map {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background: var(--latte);
}
.visit__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.map__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  pointer-events: none;
}
.map__dot {
  position: absolute;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: var(--copper);
  border: 3px solid var(--steam);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 2;
}
.map__pulse {
  position: absolute;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: var(--copper);
  border-radius: 50%;
  animation: mapPulse 2s ease-out infinite;
}
@keyframes mapPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(3.5); opacity: 0; }
}

/* ===== CONTACT ===== */
.contact {
  background: var(--latte);
}
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.contact__copy .section__title { text-align: left; }
.contact__note {
  margin-top: 24px;
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--copper);
}

.contact__form { padding: 40px; }
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--fg);
  transition: all 0.25s var(--ease);
  width: 100%;
  resize: vertical;
}
body.dark .field input,
body.dark .field select,
body.dark .field textarea {
  background: var(--latte);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: var(--shadow-glow);
  background: var(--steam);
}
body.dark .field input:focus,
body.dark .field select:focus,
body.dark .field textarea:focus { background: var(--bg); }
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #c0392b;
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.15);
}
.field__err {
  font-size: 0.82rem;
  color: #c0392b;
  min-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.25s var(--ease);
}
.field.has-error .field__err {
  opacity: 1;
  transform: translateY(0);
}

.form__success {
  margin-top: 16px;
  text-align: center;
  padding: 14px;
  background: rgba(108, 210, 142, 0.15);
  color: #2c7a4b;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(108, 210, 142, 0.4);
  font-weight: 500;
  animation: fadeUp 0.4s var(--ease);
}
body.dark .form__success {
  color: #6cd28e;
  background: rgba(108, 210, 142, 0.1);
}
.form__submit-error {
  margin-top: 16px;
  text-align: center;
  padding: 14px;
  background: rgba(192, 57, 43, 0.12);
  color: #c0392b;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(192, 57, 43, 0.3);
  font-weight: 500;
  animation: fadeUp 0.4s var(--ease);
}
body.dark .form__submit-error {
  color: #e74c3c;
  background: rgba(192, 57, 43, 0.1);
}
.anti-bot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
  tab-index: -1;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--espresso);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 32px;
  text-align: center;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--steam);
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
}
.footer__tag {
  font-family: var(--font-script);
  color: var(--copper);
  font-size: 1.2rem;
}
.footer__socials {
  display: flex;
  gap: 12px;
}
.footer__socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  transition: all 0.25s var(--ease);
}
.footer__socials a:hover {
  background: var(--copper);
  color: var(--steam);
  transform: translateY(-3px);
}
.footer__copy {
  font-size: 0.85rem;
  margin-top: 8px;
  color: rgba(255,255,255,0.5);
}

/* ===== BACK TO TOP ===== */
.to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--copper);
  color: var(--steam);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s var(--ease);
  z-index: 90;
}
.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top:hover {
  background: var(--copper-dark);
  transform: translateY(-4px);
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== DARK MODE TOGGLE (floating) ===== */
.theme-toggle {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--latte);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 90;
  transition: all 0.3s var(--ease);
  border: 1px solid var(--line);
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.05); }
.theme-toggle svg { transition: transform 0.3s var(--ease); }

/* ==========================================================
   STORES SECTION
   ========================================================== */
.stores { background: var(--bg); }

.stores__showcase {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
  background: var(--latte);
  margin-bottom: 56px;
}

.stores__track {
  position: relative;
  width: 100%;
  height: 100%;
}
.stores__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease);
  pointer-events: none;
}
.stores__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.stores__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stores__slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(44, 24, 16, 0.65) 0%, rgba(44, 24, 16, 0) 50%);
}

.stores__caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  color: var(--steam);
  z-index: 2;
  text-align: left;
  max-width: 600px;
}
.stores__caption-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--copper);
  color: var(--steam);
  margin-bottom: 12px;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.6s var(--ease) 0.1s;
}
.stores__caption-title {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  color: var(--steam);
  margin-bottom: 4px;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.6s var(--ease) 0.2s;
}
.stores__caption-addr {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.6s var(--ease) 0.3s;
}
.stores__slide.is-active .stores__caption-tag,
.stores__slide.is-active .stores__caption-title,
.stores__slide.is-active .stores__caption-addr {
  transform: translateY(0);
  opacity: 1;
}

.stores__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--espresso);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.25s var(--ease);
}
.stores__nav:hover {
  background: var(--copper);
  color: var(--steam);
  transform: translateY(-50%) scale(1.1);
}
.stores__nav--prev { left: 20px; }
.stores__nav--next { right: 20px; }

.stores__dots {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 3;
}
.stores__dots button {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.4);
  transition: all 0.3s var(--ease);
  border: none;
  padding: 0;
  cursor: pointer;
}
.stores__dots button.is-active {
  background: var(--copper);
  width: 40px;
}

.stores__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.store-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.store-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--latte);
}
.store-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.store-card:hover .store-card__media img { transform: scale(1.06); }
.store-card__neighborhood {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(245, 240, 232, 0.95);
  color: var(--roast);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.store-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.store-card__name {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--roast);
  font-weight: 600;
}
body.dark .store-card__name { color: var(--steam); }
.store-card__addr {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.store-card__row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--fg);
  margin-top: 4px;
}
.store-card__row svg { color: var(--copper); flex-shrink: 0; }
.store-card__row a:hover { color: var(--copper); }
.store-card__order {
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--copper);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.25s var(--ease);
}
.store-card:hover .store-card__order { gap: 12px; }

/* ==========================================================
   MODAL
   ========================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 16, 10, 0.7);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal__dialog {
  position: relative;
  background: var(--cream);
  border-radius: 20px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  animation: modalIn 0.35s var(--ease);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--espresso);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.modal__close:hover {
  background: var(--copper);
  color: var(--steam);
  transform: rotate(90deg);
}

.modal__step {
  display: none;
}
.modal__step.is-active {
  display: block;
  animation: stepIn 0.35s var(--ease);
}
@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Detail step */
.modal__step--detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 480px;
}
.modal__media {
  position: relative;
  background: var(--latte);
  min-height: 320px;
}
.modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal__info {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
}
.modal__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 8px;
  color: var(--roast);
}
body.dark .modal__title { color: var(--steam); }
.modal__price {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--copper);
  font-weight: 600;
  margin-bottom: 16px;
}
.modal__desc {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 8px;
}
.modal__divider {
  height: 1px;
  background: var(--line);
  margin: 24px 0 20px;
}
.modal__sub {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--roast);
  margin-bottom: 14px;
  font-weight: 600;
}
body.dark .modal__sub { color: var(--steam); }
.modal__hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
  font-style: italic;
}
.modal__actions {
  margin-top: auto;
  padding-top: 20px;
}
.modal__actions--row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.modal__actions--row .btn { flex: 1; }

/* Store picker (radio cards) */
.store-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.store-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 14px 42px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--latte);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: left;
}
.store-option:hover {
  border-color: var(--copper);
  transform: translateY(-1px);
}
.store-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.store-option__radio {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: var(--cream);
  transition: all 0.2s var(--ease);
}
.store-option__radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--copper);
  transform: scale(0);
  transition: transform 0.2s var(--ease);
}
.store-option input:checked ~ .store-option__radio {
  border-color: var(--copper);
}
.store-option input:checked ~ .store-option__radio::after {
  transform: scale(1);
}
.store-option:has(input:checked) {
  border-color: var(--copper);
  background: rgba(198, 123, 78, 0.08);
  box-shadow: var(--shadow-glow);
}
.store-option__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg);
}
.store-option__sub {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Pay step */
.modal__pay-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  padding: 48px 44px;
  align-items: center;
}
.modal__qr {
  text-align: center;
}
.qr-placeholder {
  display: inline-block;
  padding: 16px;
  background: var(--steam);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(44, 24, 16, 0.2);
  position: relative;
}
.qr-placeholder::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px dashed var(--copper);
  border-radius: 18px;
  opacity: 0.3;
  animation: qrRotate 20s linear infinite;
}
@keyframes qrRotate { to { transform: rotate(360deg); } }
.qr-caption {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}
.qr-caption strong {
  color: var(--copper);
  font-weight: 600;
}
.modal__pay-info { padding: 0; }
.modal__pay-sub {
  color: var(--muted);
  margin-bottom: 20px;
}
.modal__pay-sub strong { color: var(--roast); }
body.dark .modal__pay-sub strong { color: var(--steam); }

.pay-summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.pay-summary li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.95rem;
}
.pay-summary li span { color: var(--muted); }
.pay-summary li strong { color: var(--fg); text-align: right; }
.pay-summary__total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.pay-summary__total span { color: var(--fg); font-weight: 600; }
.pay-summary__total strong {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--copper);
  font-weight: 700;
}
.pay-note {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  background: var(--latte);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--copper);
  margin-bottom: 4px;
}

/* body lock when modal is open */
body.modal-open { overflow: hidden; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }

  .visit__grid, .contact__inner { grid-template-columns: 1fr; gap: 40px; }
  .stores__grid { grid-template-columns: repeat(2, 1fr); }
  .visit__copy .section__title, .contact__copy .section__title { text-align: center; }
  .contact__copy { text-align: center; }
  .contact__copy .section__sub { text-align: center; }

  .strip__inner { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 72px 0; }
  .reviews__nav--prev { left: 4px; }
  .reviews__nav--next { right: 4px; }
}

/* ==========================================================
   CART DRAWER + NAV CART BUTTON (Step 3)
   ========================================================== */
.cart-drawer__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 16, 10, 0.6);
  backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.cart-drawer__backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.cart-drawer__backdrop[hidden] { display: none; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--cream);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.25);
}
body.dark .cart-drawer { background: #1a0f0a; }
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer[aria-hidden="true"] { /* still rendered for animation */ }

.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.cart-drawer__title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--roast);
  margin: 0;
}
body.dark .cart-drawer__title { color: var(--steam); }
.cart-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--latte);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: all 0.2s var(--ease);
}
.cart-drawer__close:hover { background: var(--copper); color: var(--steam); transform: rotate(90deg); }

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}

.cart-drawer__empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.cart-drawer__empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--latte);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--copper);
}
.cart-drawer__empty h3 {
  font-family: var(--font-head);
  color: var(--roast);
  margin-bottom: 8px;
  font-size: 1.2rem;
}
body.dark .cart-drawer__empty h3 { color: var(--steam); }
.cart-drawer__empty p { margin-bottom: 20px; }

/* Cart line */
.cart-line {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line:last-child { border-bottom: none; }
.cart-line__img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--latte);
}
.cart-line__body { flex: 1; min-width: 0; }
.cart-line__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.cart-line__name {
  font-weight: 600;
  color: var(--roast);
  font-size: 0.95rem;
}
body.dark .cart-line__name { color: var(--steam); }
.cart-line__price {
  color: var(--copper);
  font-weight: 600;
  font-family: var(--font-head);
  white-space: nowrap;
}
.cart-line__store {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.cart-line__addons {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cart-line__addons li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  padding: 3px 8px 3px 10px;
  border-radius: 999px;
  background: var(--latte);
  color: var(--muted);
}
body.dark .cart-line__addons li { background: #2b1d14; color: #d8c9b8; }
.cart-line__addons button {
  color: var(--copper);
  font-weight: 700;
  padding: 0 2px;
  font-size: 0.95rem;
  line-height: 1;
}
.cart-line__addons button:hover { color: #c0392b; }

.cart-line__qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--latte);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--fg);
  font-size: 0.95rem;
  transition: all 0.2s var(--ease);
}
.qty-btn:hover { background: var(--copper); color: var(--steam); }
.qty-val {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  color: var(--fg);
}
.cart-line__remove {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.cart-line__remove:hover { color: #c0392b; }

.cart-drawer__foot {
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  background: var(--cream);
  flex-shrink: 0;
}
body.dark .cart-drawer__foot { background: #1a0f0a; }
.cart-drawer__foot[hidden] { display: none; }
.cart-drawer__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}
.cart-drawer__row strong {
  color: var(--fg);
  font-family: var(--font-head);
  font-size: 1.2rem;
}
.cart-drawer__note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 14px;
  font-style: italic;
}

/* Nav cart icon + badge */
.nav__cart {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
}
.nav__cart:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--steam);
}
.nav.is-scrolled .nav__cart { color: var(--fg); }
.nav.is-scrolled .nav__cart:hover { background: var(--latte); color: var(--copper); }
.nav__cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--copper);
  color: var(--steam);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--cream);
}
.nav.is-scrolled .nav__cart-count { box-shadow: 0 0 0 2px var(--cream); }
.nav__cart-count.is-visible { display: inline-flex; }

/* Body lock when drawer is open */
body.drawer-open { overflow: hidden; }

/* Responsive tweaks for the drawer */
@media (max-width: 560px) {
  .cart-drawer { max-width: 100%; }
  .cart-drawer__head { padding: 16px 18px; }
  .cart-drawer__body { padding: 8px 18px; }
  .cart-drawer__foot { padding: 18px; }
}

@media (max-width: 560px) {
  .hero { padding: 100px 20px 60px; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__chips { flex-direction: column; align-items: center; }
  .review { padding: 32px 24px; }
  .contact__form { padding: 28px 20px; }
  .strip__inner { grid-template-columns: 1fr 1fr; gap: 20px; }

  .stores__nav { width: 36px; height: 36px; }
  .stores__nav--prev { left: 8px; }
  .stores__nav--next { right: 8px; }
  .stores__caption { bottom: 16px; left: 16px; right: 16px; }

  .modal { padding: 12px; }
  .modal__step--detail { grid-template-columns: 1fr; min-height: 0; }
  .modal__media { min-height: 220px; aspect-ratio: 16 / 10; }
  .modal__info { padding: 24px 20px; }
  .modal__pay-grid { grid-template-columns: 1fr; gap: 28px; padding: 28px 20px; }
  .store-picker { grid-template-columns: 1fr; }
  .modal__actions--row { flex-direction: column-reverse; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   CHECKOUT MODAL (Step 4)
   ========================================================== */
.modal {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(28, 16, 10, 0.7);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s var(--ease);
}
@keyframes fadeIn { from { opacity: 0} to {opacity: 1} }

.modal__dialog {
  position: relative;
  background: var(--cream);
  border-radius: 20px;
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  animation: modalIn 0.3s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.97);} to {opacity: 1; transform: none;} }

.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--espresso);
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  transition: all 0.2s var(--ease);
}
.modal__close:hover { background: var(--copper); color: var(--steam); transform: rotate(90deg); }

body.dark .modal__dialog { background: #1a0f0a; }
body.dark .modal__backdrop { background: rgba(0,0,0,0.75); }

/* Checkout dialog layout */
.checkout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  min-height: 540px;
}
.checkout > .modal__close { z-index: 10; }
.checkout__step { display: none; padding: 48px 48px 44px; }
.checkout__step.is-active { display: block; }

.checkout__title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  color: var(--roast);
  margin: 6px 0 6px;
}
body.dark .checkout__title { color: var(--steam); }
.checkout__sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 24px;
}
.checkout__sub--muted { color: var(--muted); margin: 0 0 8px; }
.checkout__sub strong { color: var(--fg); }

.form { display: flex; flex-direction: column; gap: 16px; }
.form__group { display: flex; flex-direction: column; gap: 6px; }
.form__group--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__group label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.form__group input,
.form__group select,
.form__group textarea {
  background: var(--steam);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--fg);
  transition: all 0.2s var(--ease);
}
.form__group textarea { resize: vertical; min-height: 60px; }
.form__group select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a5b4d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 36px;
}
.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: var(--shadow-glow);
  background: var(--steam);
}
body.dark .form__group input,
body.dark .form__group select,
body.dark .form__group textarea { background: #2b1d14; border-color: rgba(243,236,226,0.10); color: var(--steam); }
.form__opt { color: var(--muted); font-weight: 400; text-transform: none; font-size: 0.85em; }
.form__error {
  color: #c0392b;
  font-size: 0.8rem;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.2s var(--ease);
}
.form__group.has-error input,
.form__group.has-error select,
.form__group.has-error textarea { border-color: #c0392b; }
.form__group.has-error .form__error { max-height: 40px; opacity: 1; }

.checkout__summary {
  margin: 8px 0 16px;
  padding: 16px;
  background: var(--latte);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
body.dark .checkout__summary { background: #2b1d14; }
.checkout__summary-row {
  display: flex; justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.checkout__summary-row:last-child { margin-bottom: 0; }
.checkout__summary-row strong { color: var(--copper); font-family: var(--font-head); }

.btn--block { width: 100%; }
.form__legal { text-align: center; font-size: 0.78rem; color: var(--muted); margin: 4px 0 0; }

.btn__spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--steam);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: -2px;
}
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: 0.6; }
@keyframes spin { to { transform: rotate(360deg); } }

.success__check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(108, 210, 142, 0.2);
  color: #2c7a4b;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  animation: pop 0.4s var(--ease) both;
}
body.dark .success__check { color: #6cd28e; }
@keyframes pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

.checkout__actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; }

@media (max-width: 760px) {
  .checkout { grid-template-columns: 1fr; }
  .checkout__step { padding: 56px 24px 32px; }
  .form__group--row { grid-template-columns: 1fr; }
  .modal { padding: 0; align-items: flex-end; }
  .modal__dialog { max-width: 100%; max-height: 96vh; border-radius: 20px 20px 0 0; }
}

/* ==========================================================
   AUTH MODAL (login / signup)
   ========================================================== */
.auth-modal {
  position: fixed; inset: 0; z-index: 260;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-modal[hidden] { display: none; }
.auth-modal .modal__dialog {
  max-width: 460px;
}
.auth { position: relative; padding: 44px 40px 36px; }
.auth > .modal__close { z-index: 10; }

.auth__tabs {
  display: flex; gap: 8px;
  background: var(--latte);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
body.dark .auth__tabs { background: rgba(255,255,255,0.08); }
.auth__tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all 0.2s var(--ease);
  cursor: pointer;
}
.auth__tab.is-active {
  background: var(--steam);
  color: var(--copper);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
body.dark .auth__tab.is-active { background: #2a1a12; color: var(--copper); }

.auth__pane { display: none; }
.auth__pane.is-active { display: block; animation: modalIn 0.25s var(--ease); }
.auth__title {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  color: var(--roast);
  margin: 6px 0 6px;
}
body.dark .auth__title { color: var(--steam); }

.auth__links {
  margin-top: 12px;
  text-align: center;
}
.auth__links a {
  font-size: 0.84rem;
  color: var(--copper);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.auth__links a:hover { color: var(--copper-dark); }

.form__legal {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}
.form__group .form__error { color: #c0392b; font-size: 0.78rem; min-height: 14px; }
.form__group.has-error input,
.form__group.has-error select { border-color: #c0392b; }

@media (max-width: 760px) {
  .auth-modal { padding: 0; align-items: flex-end; }
  .auth-modal .modal__dialog { max-width: 100%; max-height: 96vh; border-radius: 20px 20px 0 0; }
  .auth { padding: 40px 24px 32px; }
}
