/* ==========================================================================
   Broomi — styles built from the Figma file "broomi-final"
   Design frame width: 1134px. Sizes scale fluidly from that.
   ========================================================================== */

:root {
  --primary: #8e4d2f;      /* BROOMI/sys/light/primary */
  --secondary: #77574a;    /* BROOMI/sys/light/secondary */
  --rust: #9b4425;
  --rust-2: #984326;
  --bg: #fff8f6;           /* BROOMI/sys/light/background */
  --butter: #efe3a9;       /* tertiary-fixed */
  --butter-dim: #d2c78f;   /* tertiary-fixed-dim */
  --cream: #fff9f3;
  --cream-2: #fff9e8;
  --sand: #f4e8c6;
  --line: #d9c38d;
  --card-line: #e9d5c1;
  --peach: #f7d8bf;
  --ink: #3f281d;

  --f-hero: 'Eczar', Georgia, serif;
  --f-kicker: 'Cagliostro', Georgia, serif;
  --f-nav: 'Inria Serif', Georgia, serif;
  --f-serif: 'Lora', Georgia, serif;
  --f-display: 'Fraunces', Georgia, serif;
  --f-classic: Georgia, 'Times New Roman', serif;
  --f-sans: 'DM Sans', system-ui, sans-serif;
  --f-ui: 'AR One Sans', 'DM Sans', system-ui, sans-serif;
  --f-btn: 'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(.22, .8, .24, 1);
  --nav-h: 82px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.locked { overflow: hidden; }

/* ---------- Top navigation (Figma: logo 94×43, Inria Serif Bold 18, gap 42.75) ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4.6vw, 52px) 0 clamp(16px, 1.3vw, 15px);
  transition: background .35s ease, box-shadow .35s ease, transform .45s var(--ease);
}
.nav.scrolled { background: color-mix(in srgb, var(--nav-bg, var(--bg)) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav.hidden { transform: translateY(-100%); }
.nav__logo img { width: 94px; height: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 3.8vw, 43px); font-family: var(--f-nav); font-weight: 700; font-size: 18px; color: var(--primary); }
.nav__link { position: relative; padding: 4px 0; white-space: nowrap; }
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__cart {
  display: none; align-items: center; gap: 6px; font-family: var(--f-sans); font-size: 13px; font-weight: 600;
  background: var(--ink); color: var(--cream); padding: 7px 12px; border-radius: 20px;
}
.nav__cart.has-items { display: inline-flex; animation: pop .45s var(--ease); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 205px; height: 50px; padding: 0 26px; border-radius: 31px;
  font-family: var(--f-btn); font-size: 15px; letter-spacing: .01em; white-space: nowrap;
  transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s;
}
.pill--solid { background: var(--primary); color: #fff; }
.pill--ghost { border: .75px solid var(--primary); color: var(--primary); }
.pill:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(142, 77, 47, .7); }
.pill--ghost:hover { background: var(--primary); color: #fff; }

.cta { /* "EXPLORE MATCHA / SWEETS" — Georgia 21.75, #9b4425, radius 27.75 */
  display: inline-flex; align-items: center; justify-content: center;
  padding: 17px 47px 20px; border-radius: 28px; background: var(--rust); color: #fff8f4;
  font-family: var(--f-classic); font-size: clamp(15px, 1.92vw, 21.75px); white-space: nowrap;
  box-shadow: 0 14px 30px -18px rgba(63, 40, 29, .8);
  transition: transform .35s var(--ease), box-shadow .35s, background .3s;
}
.cta:hover { transform: translateY(-3px) scale(1.02); background: #86391d; box-shadow: 0 18px 34px -16px rgba(63, 40, 29, .85); }

.chip { /* small overlay buttons — DM Sans SemiBold, radius 16.5 */
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: 18px; font-family: var(--f-sans); font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, opacity .25s;
}
.chip--dark { background: var(--ink); color: #fff9f3; }
.chip--light { background: var(--butter); color: var(--ink); }
.chip:hover { transform: translateY(-1px); }
.chip--dark:hover { background: #2c1b13; }
.chip--light:hover { background: #e6d792; }
.chip[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Scroll reveal (motion carried over from the prototype) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.from-left { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.zoom { transform: scale(.94); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Splash (Figma frame "1")
   ========================================================================== */
.splash {
  position: fixed; inset: 0; z-index: 100; background: var(--butter);
  display: grid; place-items: center; cursor: pointer;
  transition: opacity .8s ease, transform 1s var(--ease);
}
.splash img { width: clamp(200px, 24vw, 280px); mix-blend-mode: multiply; animation: splashIn 1.1s var(--ease) both; }
.splash.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.splash.out img { transform: scale(.9); transition: transform .9s var(--ease); }
@keyframes splashIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Home — hero (Figma frame "3")
   ========================================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: 42.8% 1fr; align-items: center;
  padding: var(--nav-h) 0 40px;
  background: var(--bg);
}
.hero__art { width: 100%; max-width: 560px; aspect-ratio: 1; align-self: center; }
.hero__art img { width: 100%; height: 100%; object-fit: contain; }
.hero__copy { text-align: center; padding: 0 clamp(16px, 6vw, 90px) 0 0; }
.hero__kicker { font-family: var(--f-kicker); color: var(--secondary); font-size: clamp(19px, 2.38vw, 27px); letter-spacing: .03em; margin: 0 0 6px; }
.hero__title { font-family: var(--f-hero); font-weight: 400; color: var(--primary); font-size: clamp(44px, 6.35vw, 76px); line-height: .98; letter-spacing: .03em; margin: 0 0 clamp(26px, 3vw, 36px); }
.hero__title span { display: block; }
.hero__ctas { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero .reveal { transition-duration: 1.1s; }

/* ==========================================================================
   Home — Explore matcha (Figma frame "4")
   ========================================================================== */
.banner { position: relative; overflow: hidden; }
.banner--matcha { background: var(--butter-dim); aspect-ratio: 1134 / 425; min-height: 300px; }
.banner__img {
  position: absolute; left: 16.5%; top: 12.4%; width: 62.3%; height: auto;
  filter: blur(3.3px); will-change: transform, filter;
}
.banner__cta { position: absolute; left: 50%; top: 45%; translate: -50% -50%; z-index: 2; }

/* "Find your favourite" strips — one shared layout under Explore matcha and Explore sweets */
.fav { background: #f1e5a9; padding: clamp(20px, 2.6vw, 34px) clamp(16px, 4vw, 56px) clamp(24px, 3vw, 40px); }
.fav__kicker { margin: 0 0 clamp(10px, 1.4vw, 18px); font-family: var(--f-classic); font-size: clamp(12px, 1.1vw, 14px); letter-spacing: .2em; color: #994522; }
.fav__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2.5vw, 40px); }
.fav__item { min-width: 0; }
.fav__btn { display: flex; align-items: center; gap: clamp(10px, 1.4vw, 20px); width: 100%; padding: 6px; margin: -6px; border: 0; border-radius: 14px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background .3s, transform .35s var(--ease); }
.fav__btn:hover, .fav__btn:focus-visible { background: rgba(255, 249, 243, .55); }
.fav__btn:hover .fav__img { transform: translateY(-3px) rotate(-2deg); }
.fav__img { transition: transform .45s var(--ease); }
.fav__price { display: block; margin-top: 8px; font-family: var(--f-sans); font-size: 13px; font-weight: 600; color: var(--primary); }
.fav__img { flex: none; width: clamp(96px, 11vw, 150px); height: auto; aspect-ratio: 280 / 220; object-fit: contain; }
.fav__name { display: block; margin: 0; font-family: var(--f-classic); font-weight: 400; font-size: clamp(17px, 1.8vw, 24px); line-height: 1.12; color: #994522; }
.fav__note { display: block; margin: 6px 0 0; font-family: var(--f-classic); font-size: clamp(12px, 1.05vw, 14px); color: var(--secondary); }

/* ==========================================================================
   Home — Explore sweets (Figma frame "5")
   ========================================================================== */
.banner--sweets { background: #d3c78d; aspect-ratio: 1555 / 596; min-height: 300px; }
.banner--sweets .banner__img { inset: 0; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; filter: none; }

/* ==========================================================================
   Home — Explore the complete menu (Figma frame "6")
   ========================================================================== */
.complete {
  position: relative; display: grid; place-items: center; overflow: hidden;
  min-height: min(100vh, 65vw); min-height: max(460px, min(100svh, 65vw));
  text-align: center; color: var(--rust-2);
}
.complete__bg { position: absolute; inset: -10% -12%; background: url(../img/menu-bg.jpg) center / cover; filter: blur(7.7px); opacity: .94; will-change: transform; }
.complete::after { content: ''; position: absolute; inset: 0; background: rgba(213, 201, 147, .18); }
.complete__inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 22px; padding: 0 16px; }
.complete__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 6.35vw, 72px); line-height: 1; letter-spacing: .03em; margin: 0; font-variation-settings: "SOFT" 0, "WONK" 1; }
.complete__arrow { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; transition: transform .4s var(--ease), background .3s; }
.complete__arrow img { width: 76px; height: 76px; transition: transform .4s var(--ease); }
.complete:hover .complete__arrow img { transform: translateX(6px); }
.complete__arrow:hover { background: rgba(255, 248, 240, .5); }

/* ==========================================================================
   Home — Visit us (Figma frame "7")
   ========================================================================== */
.visit {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 9vw, 104px); align-items: center;
  padding: clamp(96px, 10vw, 120px) clamp(16px, 6vw, 80px) clamp(56px, 7vw, 84px) clamp(16px, 3.4vw, 32px);
  background: var(--bg); color: var(--rust-2); font-family: var(--f-classic);
  scroll-margin-top: 0;
}
.visit__photo { aspect-ratio: 455 / 524; border-radius: 12px; overflow: hidden; max-width: 460px; justify-self: end; width: 100%;
  background: url(../img/visit-us.jpg) 0 0 / 197.43% 117.3% no-repeat; box-shadow: 0 24px 50px -32px rgba(63, 40, 29, .6); }
.visit__eyebrow { font-family: Arial, sans-serif; font-size: 12.75px; letter-spacing: .04em; margin: 0 0 22px; }
.visit__title { font-weight: 400; font-size: clamp(36px, 5vw, 57px); line-height: 1.3; margin: 0 0 22px; }
.visit__text { font-size: clamp(17px, 1.98vw, 22.5px); line-height: 1.3; margin: 0 0 34px; }
.visit__address { display: flex; align-items: center; gap: 22px; font-size: clamp(17px, 1.98vw, 22.5px); line-height: 1.2; margin: 0 0 30px; font-style: normal; }
.visit__address img { width: 55px; flex: none; }
.visit__directions { display: inline-flex; align-items: center; gap: 8px; background: var(--rust); color: #fff8f4; border-radius: 31px; padding: 15px 38px; font-size: clamp(18px, 1.98vw, 22.5px); transition: transform .3s var(--ease), box-shadow .3s; }
.visit__directions:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(63, 40, 29, .8); }

.footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 112px; padding: 24px 16px;
  background: linear-gradient(180deg, #f6e4a6, #f3dc97);
  font-family: var(--f-classic); font-weight: 700; font-size: 36px; color: var(--rust-2);
}

/* ==========================================================================
   Explore carousel pages (Figma frames 09–18)
   ========================================================================== */
.page-explore { background: var(--butter); --nav-bg: var(--butter); }
.explore { position: relative; height: 320vh; }
.explore__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.explore__title {
  position: absolute; left: 50%; top: 50%; margin: 0; white-space: nowrap;
  font-family: var(--f-serif); font-weight: 400; color: var(--rust); letter-spacing: -.03em;
  font-size: clamp(38px, 4.9vw, 56px);
  transform: translate(calc(-50% + var(--tx, -22vw)), -60%);
  filter: blur(var(--blur, 0px)); opacity: var(--op, 1);
  will-change: transform, filter;
}
.explore__eyebrow { display: block; font-family: var(--f-sans); font-weight: 600; font-size: 10px; letter-spacing: .14em; text-align: center; margin-bottom: 8px; color: var(--rust); }
.explore__track {
  position: absolute; left: 0; top: 50%; display: flex; gap: clamp(18px, 3.1vw, 46px);
  transform: translate3d(var(--x, 50vw), -58%, 0); will-change: transform; touch-action: pan-y;
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.explore__track.dragging { cursor: grabbing; }
.pcard { position: relative; width: clamp(170px, 19.8vw, 225px); flex: none; color: var(--rust); opacity: var(--o, 1); transform: translateY(var(--y, 0)); transition: opacity .3s linear; }
.pcard__photo { position: relative; aspect-ratio: 225 / 253.5; border-radius: 10.5px; overflow: hidden; background: #e2d49a; }
.pcard__photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform .7s var(--ease); }
.pcard:hover .pcard__photo img { transform: scale(1.05); }
.pcard__select { position: absolute; inset: 0; z-index: 1; border-radius: 10.5px; }
.pcard__add { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 7.5px 10.5px; font-size: 11px; border-radius: 16.5px; }
.pcard__meta { margin: 10px 0 3px; font-family: var(--f-sans); font-weight: 500; font-size: 9.75px; letter-spacing: .12em; white-space: pre; }
.pcard__name { margin: 0; font-family: var(--f-serif); font-size: 20.25px; line-height: 27px; }
.explore__controls { position: absolute; left: 50%; bottom: clamp(36px, 9vh, 90px); transform: translateX(-50%); display: grid; justify-items: center; gap: 16px; z-index: 3; }
.explore__buttons { display: flex; align-items: center; gap: 18px; }
.gbtn { width: 165px; height: 48px; border-radius: 24px; border: .75px solid var(--primary); color: var(--primary); font-family: var(--f-nav); font-weight: 700; font-size: 18px; transition: opacity .3s, background .3s, color .3s, transform .3s var(--ease); }
.gbtn:hover { background: var(--primary); color: var(--butter); }
.gbtn[disabled] { opacity: .3; pointer-events: none; }
.explore__count { font-family: var(--f-sans); font-size: 12px; color: var(--primary); min-width: 34px; text-align: center; }
.explore__full { font-family: var(--f-nav); font-weight: 700; font-size: 14px; color: var(--primary); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.explore__hint { position: absolute; left: 50%; top: calc(var(--nav-h) + 12px); transform: translateX(-50%); font-family: var(--f-sans); font-size: 11px; letter-spacing: .12em; color: var(--primary); opacity: .7; transition: opacity .4s; white-space: nowrap; }

/* ==========================================================================
   Full menu (Figma frame "19 / Broomi — full menu")
   ========================================================================== */
.page-menu { background: var(--cream); }
.menu-layout { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--butter);
  padding: 34px 33px 28px 34px; display: flex; flex-direction: column;
}
.sidebar__brand { font-family: var(--f-serif); font-weight: 600; font-size: 32.25px; line-height: 43.5px; color: var(--rust); }
.sidebar__caption { margin: 26px 0 22px; font-family: var(--f-sans); font-weight: 600; font-size: 9.75px; letter-spacing: .06em; color: var(--ink); }
.cats { display: flex; flex-direction: column; gap: 7.5px; }
.cat { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 8px 0 10.5px; text-align: left; font-family: var(--f-sans); transition: background .35s var(--ease); border-radius: 2px; }
.cat:hover { background: #f4dfb5; }
.cat.active { background: var(--peach); }
.cat__num { width: 19px; font-weight: 600; font-size: 9px; color: var(--rust); }
.cat__label { font-weight: 500; font-size: 13px; color: var(--ink); }
.cat.active .cat__label { font-weight: 600; }
.sidebar__cart { margin-top: 28px; align-self: flex-start; }
.sidebar__note { margin: 10px 0 0; font-family: var(--f-sans); font-size: 9px; color: var(--rust); }
.sidebar__foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(155, 68, 37, .45); font-family: var(--f-sans); font-weight: 600; font-size: 8.5px; letter-spacing: .04em; line-height: 1.6; color: var(--ink); }
.sidebar__foot a { display: inline-block; margin-top: 10px; font-weight: 500; font-size: 10px; letter-spacing: 0; }
.sidebar__foot a:hover { color: var(--rust); }

.menu-main { padding: 34px clamp(16px, 4.2vw, 48px) 120px; max-width: 980px; }
.eyebrow { font-family: var(--f-sans); font-weight: 600; font-size: 9px; letter-spacing: .1em; color: var(--rust); white-space: pre; margin: 0; }
.menu-main__title { font-family: var(--f-serif); font-weight: 400; font-size: clamp(40px, 4.4vw, 50px); color: var(--ink); margin: 14px 0 8px; letter-spacing: -.01em; }
.menu-main__intro { font-family: var(--f-sans); font-size: 13px; color: var(--secondary); margin: 0 0 30px; }
.msection { padding-top: 26px; scroll-margin-top: 16px; }
.msection__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid #ead9c4; margin-bottom: 18px; }
.msection__title { font-family: var(--f-serif); font-weight: 400; font-size: 27px; color: var(--rust); margin: 0; }
.count { font-family: var(--f-sans); font-weight: 600; font-size: 8.25px; letter-spacing: .06em; color: var(--rust); }
.mgroups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.mgroup__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.mgroup__title { font-family: var(--f-serif); font-size: 18px; color: var(--ink); margin: 0; }
.mgroup__list { display: grid; gap: 9px; }
.mitem {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px; background: #fdf7f1; border: .6px solid var(--card-line); border-radius: 6px;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .3s;
}
.mitem:hover { transform: translateY(-2px); border-color: #dcbfa3; box-shadow: 0 10px 24px -18px rgba(63, 40, 29, .55); }
.mitem__photo { width: 52px; height: 52px; border-radius: 4px; overflow: hidden; background: #efe2cf; }
.mitem__photo img { width: 100%; height: 100%; object-fit: cover; }
.mitem__info { min-width: 0; text-align: left; }
.mitem__code { display: block; font-family: var(--f-sans); font-weight: 500; font-size: 7.5px; letter-spacing: .14em; color: var(--rust); margin-bottom: 3px; white-space: pre; }
.mitem__name { display: block; font-family: var(--f-serif); font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitem__buy { display: grid; justify-items: end; gap: 5px; }
.mitem__price { font-family: var(--f-serif); font-size: 13.5px; color: var(--ink); }
.mitem .chip { padding: 6px 10px; font-size: 10px; }

/* ==========================================================================
   Profile (Figma frame "Your Profile / Broomi")
   ========================================================================== */
.page-profile { background: var(--butter); --nav-bg: var(--butter); }
.profile { padding: calc(var(--nav-h) + 28px) clamp(16px, 17vw, 192px) 80px; min-height: 100vh; }
.back { font-family: var(--f-ui); font-weight: 700; font-size: 12px; color: var(--primary); }
.back:hover { text-decoration: underline; }
.profile__title { font-family: var(--f-nav); font-weight: 700; font-size: clamp(34px, 3.85vw, 43.5px); color: var(--primary); margin: 18px 0 4px; }
.profile__sub { font-family: var(--f-ui); font-size: 15px; color: var(--ink); margin: 0 0 18px; }
.profile__grid { display: grid; grid-template-columns: minmax(0, 382px) minmax(0, 350px); gap: 18px; align-items: start; }
.pcard2 { background: var(--cream-2); border: .75px solid var(--line); border-radius: 24px; padding: 24px; min-height: 262px; display: flex; flex-direction: column; gap: 12px; }
.who { display: flex; align-items: center; gap: 13.5px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--primary); color: var(--cream-2); display: grid; place-items: center; font-family: var(--f-nav); font-weight: 700; font-size: 27px; flex: none; }
.who__name { font-family: var(--f-nav); font-weight: 700; font-size: 22.5px; color: var(--primary); margin: 0 0 3px; }
.who__role { font-family: var(--f-ui); font-size: 12.75px; margin: 0; }
.rule { height: .75px; background: var(--line); }
.h3 { font-family: var(--f-nav); font-weight: 700; color: var(--primary); margin: 0; }
.details { display: grid; gap: 9px; margin: 0; font-family: var(--f-ui); font-size: 12.75px; }
.details div { display: grid; grid-template-columns: 75px 1fr; gap: 12px; }
.details dt { font-weight: 700; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.empty-box { background: var(--sand); border-radius: 13.5px; padding: 15px; font-family: var(--f-ui); }
.empty-box strong { display: block; font-size: 13.5px; margin-bottom: 6px; }
.empty-box p { margin: 0; font-size: 12.75px; }
.soft-btn { align-self: flex-start; background: var(--sand); border-radius: 30px; padding: 9px 16.5px; font-family: var(--f-ui); font-weight: 700; font-size: 12px; transition: background .25s, transform .25s var(--ease); }
.soft-btn:hover { background: #ecdcae; transform: translateY(-1px); }
.orders { display: grid; gap: 10px; max-height: 320px; overflow-y: auto; }
.order { background: var(--sand); border-radius: 13.5px; padding: 12px 14px; font-family: var(--f-ui); font-size: 12px; }
.order__top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.order__items { margin: 0; color: #5b4337; }
.signout { font-family: var(--f-ui); font-size: 12px; color: var(--primary); text-decoration: underline; align-self: flex-start; margin-top: auto; }

/* ==========================================================================
   Overlays: sign in, product, cart, checkout, payment
   ========================================================================== */
.overlay {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px;
  background: rgba(63, 40, 29, .23); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .35s ease;
}
.overlay.open { opacity: 1; }
.overlay--signin { background: rgba(239, 227, 169, .59); }
.panel {
  position: relative; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--cream); border-radius: 18px; padding: 26px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 13px;
  box-shadow: 0 30px 70px -30px rgba(63, 40, 29, .55);
  transform: translateY(24px) scale(.96); opacity: 0;
  transition: transform .5s var(--ease), opacity .35s ease;
}
.overlay.open .panel { transform: none; opacity: 1; }
.panel.swap { animation: swap .45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.panel__close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); font-size: 18px; line-height: 1; transition: background .2s; }
.panel__close:hover { background: var(--butter); }
.panel__title { font-family: var(--f-serif); font-weight: 400; font-size: 27px; color: var(--ink); margin: 0; }
.panel__text { margin: 0; font-family: var(--f-sans); font-size: 12.5px; color: var(--ink); }
.panel__text--rust { color: var(--rust); }
.panel__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel__photo { width: 100%; aspect-ratio: 368 / 162; border-radius: 9px; overflow: hidden; }
.panel__photo img { width: 100%; height: 100%; object-fit: cover; }
.panel__photo--contain { background: #f1e5a9; }
.panel__photo--contain img { object-fit: contain; padding: 10px; }
.panel__desc { margin: -4px 0 12px; font-family: var(--f-classic); font-size: 15px; color: var(--secondary); }
.panel__price { font-family: var(--f-serif); font-size: 18px; color: var(--ink); margin-right: 4px; }
.qty { display: inline-flex; align-items: center; gap: 2px; background: var(--butter); border-radius: 18px; padding: 2px; }
.qty button { width: 26px; height: 26px; border-radius: 50%; font-weight: 600; font-size: 15px; color: var(--ink); }
.qty button:hover { background: #e3d38c; }
.qty span { min-width: 18px; text-align: center; font-family: var(--f-sans); font-weight: 600; font-size: 13px; }

.lines { display: grid; gap: 10px; width: 100%; max-height: 260px; overflow-y: auto; }
.line { display: grid; grid-template-columns: 46px 1fr auto; gap: 11px; align-items: center; }
.line__img { width: 46px; height: 46px; border-radius: 7.5px; object-fit: cover; }
.line__name { margin: 0 0 3px; font-family: var(--f-sans); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.line__meta { margin: 0; font-family: var(--f-sans); font-size: 11px; color: var(--rust); white-space: pre; }
.line__actions { display: flex; align-items: center; gap: 6px; }
.line__remove { font-family: var(--f-sans); font-size: 11px; color: var(--rust); text-decoration: underline; }
.total { display: flex; align-items: baseline; gap: 9px; color: var(--ink); }
.total b { font-family: var(--f-sans); font-weight: 600; font-size: 12px; }
.total span { font-family: var(--f-serif); font-size: 18px; }

/* Sign in card — glass card from Figma "SIGN IN" */
.signin {
  width: min(430px, 100%); border-radius: 46px; padding: 54px clamp(28px, 13vw, 104px) 44px;
  background: linear-gradient(rgba(252, 252, 252, .58), rgba(252, 252, 252, .58)), rgba(255, 255, 255, .73);
  align-items: stretch; gap: 10px; text-align: center;
}
.signin__logo { width: 172px; margin: 0 auto 18px; }
.signin__note { margin: -6px 0 14px; padding: 9px 12px; border-radius: 9px; background: var(--butter); font-family: var(--f-ui); font-size: 12px; line-height: 1.4; color: var(--ink); text-align: center; }
.field { display: block; text-align: left; }
.field input {
  width: 100%; height: 38px; border: 0; border-radius: 9px; padding: 0 14px;
  background: rgba(142, 77, 47, .18); font-family: var(--f-ui); font-size: 13px; color: var(--ink);
  transition: box-shadow .2s, background .2s;
}
.field input::placeholder { color: rgba(0, 0, 0, .4); }
.field input:focus { outline: none; background: rgba(142, 77, 47, .24); box-shadow: 0 0 0 2px rgba(142, 77, 47, .45); }
.signin__btn { height: 34px; border-radius: 9px; background: var(--ink); color: #fff; font-family: var(--f-ui); font-weight: 500; font-size: 13px; transition: background .2s, transform .2s; }
.signin__btn:hover { background: #2c1b13; }
.signin__forgot { font-family: var(--f-ui); font-size: 12px; color: var(--ink); justify-self: center; margin: 2px auto 0; }
.signin__forgot:hover, .signin__switch button:hover { text-decoration: underline; }
.signin__switch { font-family: var(--f-ui); font-size: 11.5px; color: #766c66; margin: 4px 0 0; text-align: left; }
.signin__switch button { color: var(--ink); margin-left: 4px; font-size: 11.5px; }
.form-msg { min-height: 16px; margin: 0; font-family: var(--f-ui); font-size: 11.5px; text-align: left; color: #a3361a; }
.form-msg.ok { color: #4e6b2a; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 11px; background: rgba(142, 77, 47, .1); }
.seg button { height: 30px; border-radius: 8px; font-family: var(--f-ui); font-size: 12.5px; color: var(--ink); transition: background .2s, box-shadow .2s; }
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 2px 6px -3px rgba(63, 40, 29, .5); font-weight: 600; }
.signin__links { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.signin__links .signin__forgot { margin: 2px 0 0; }
.signin__forgot:disabled { opacity: .55; cursor: default; text-decoration: none; }
.signin .field + .field { margin-top: 8px; }
.linkish { font: inherit; color: var(--primary); text-decoration: underline; padding: 0; margin-left: 4px; }
.profile__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.muted { font-family: var(--f-ui); font-size: 12px; color: #766c66; margin: 0; }
button:disabled { cursor: default; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 30px); opacity: 0;
  background: var(--ink); color: var(--cream); border-radius: 22px; padding: 10px 18px;
  font-family: var(--f-sans); font-size: 13px; transition: transform .4s var(--ease), opacity .3s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .visit { grid-template-columns: 1fr; padding-top: 104px; }
  .visit__photo { justify-self: stretch; max-width: none; aspect-ratio: 4 / 3; background-size: 230% 117%; background-position: 0 30%; }
  .profile__grid { grid-template-columns: 1fr; max-width: 420px; }
  .mgroups { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  .nav__logo img { width: 74px; }
  .nav__links { font-size: 14px; gap: 14px; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: calc(var(--nav-h) + 8px); align-content: center; gap: 4px; }
  .hero__art { max-width: 300px; margin: 0 auto; }
  .hero__copy { padding: 0 16px; }
  .hero__ctas .pill { min-width: 0; height: 46px; padding: 0 20px; font-size: 13px; }
  .banner--matcha { aspect-ratio: auto; height: 320px; }
  .banner__img { left: -6%; top: 50%; width: 150%; max-width: none; transform: translateY(-50%); }
  .banner--sweets { aspect-ratio: auto; height: 320px; }
  .banner--sweets .banner__img { left: 0; top: 0; width: 100%; transform: none; }
  .fav__list { grid-template-columns: 1fr; gap: 6px; }
  .fav__img { width: 92px; }
  .cta { padding: 13px 30px 15px; }
  .complete__arrow, .complete__arrow img { width: 60px; height: 60px; }
  .footer { font-size: 30px; }

  .menu-layout { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; padding: 12px 16px 10px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; box-shadow: 0 8px 18px -16px rgba(63, 40, 29, .7); }
  .sidebar__brand { font-size: 24px; line-height: 1; margin-right: auto; }
  .sidebar__caption, .sidebar__note, .sidebar__foot { display: none; }
  .sidebar__cart { margin: 0; order: 2; }
  .cats { order: 3; flex-direction: row; width: 100%; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: none; height: 34px; border-radius: 17px; padding: 0 12px; }
  .cat__num { display: none; }
  .menu-main { padding-top: 22px; }
  .msection { scroll-margin-top: 112px; }

  .explore__controls { bottom: 28px; }
  .gbtn { width: 120px; height: 44px; font-size: 16px; }
  .explore__buttons { gap: 10px; }
  .profile { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 420px) {
  .nav__links { gap: 11px; font-size: 12.5px; }
  .nav__cart { padding: 6px 9px; font-size: 12px; }
  .signin { border-radius: 32px; }
}

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