:root {
  --green-950: #2e2e2e;
  --green-900: #3c3c3c;
  --green-800: #484848;
  --green-700: #5d5d5d;
  --green-100: #efefef;
  --lime-500: #bababa;
  --lime-100: #f2f2f2;
  --cream-50: #fdfdfd;
  --cream-100: #f3f3f3;
  --cream-200: #e8e8e8;
  --white: #ffffff;
  --ink-900: #323232;
  --ink-700: #5d5d5d;
  --ink-500: #7f7f7f;
  --ink-300: #b8b8b8;
  --danger-700: #515151;
  --danger-100: #ededed;
  --success-700: #5a5a5a;
  --success-100: #efefef;
  --warning-700: #5f5f5f;
  --warning-100: #f2f2f2;
  --border: rgba(50,50,50, 0.13);
  --border-strong: rgba(50,50,50, 0.22);
  --shadow-sm: 0 10px 28px rgba(50,50,50, 0.08);
  --shadow-md: 0 22px 60px rgba(45,45,45, 0.14);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 36px;
  --header-height: 72px;
  --mobile-nav-height: 76px;
  --content-width: 1180px;
  --ease: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
  background: var(--cream-100);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 9%, rgba(186,186,186, 0.13), transparent 18rem),
    linear-gradient(180deg, var(--cream-50), var(--cream-100));
  color: var(--ink-900);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.panel-open,
body.dialog-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:not(:disabled),
a[href] {
  cursor: pointer;
}

img,
svg {
  display: block;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
}

fieldset,
legend,
dl,
dd,
p,
h1,
h2,
h3 {
  margin: 0;
}

fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--green-950);
  color: var(--white);
  transform: translateY(-160%);
  transition: transform var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: rgba(253,253,253, 0.82);
  backdrop-filter: blur(18px);
  transition:
    border-color var(--ease),
    box-shadow var(--ease);
}

.site-header.is-scrolled {
  border-color: var(--border);
  box-shadow: 0 8px 30px rgba(44,44,44, 0.06);
}

.header-inner {
  width: min(calc(100% - 32px), var(--content-width));
  min-height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
}

.brand:focus-visible,
.icon-button:focus-visible,
.cart-trigger:focus-visible,
.mobile-nav-item:focus-visible,
.mobile-cart-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.product-card:focus-within,
.category-button:focus-visible,
.checkout-button:focus-visible,
.add-cart-button:focus-visible,
.clear-cart-button:focus-visible,
.quantity-control button:focus-visible,
.option-card:focus-within,
.addon-card:focus-within,
.search-field:focus-within {
  outline: 3px solid rgba(186,186,186, 0.55);
  outline-offset: 3px;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px 15px 18px 18px;
  background: var(--green-800);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: -3px;
  height: 7px;
  border-radius: 0 0 12px 12px;
  background: var(--lime-500);
  opacity: 0.78;
}

.brand-leaf {
  position: absolute;
  top: -6px;
  width: 12px;
  height: 8px;
  border-radius: 100% 0 100% 0;
  background: var(--lime-500);
}

.brand-leaf-left {
  left: 18px;
  transform: rotate(38deg);
}

.brand-leaf-right {
  left: 25px;
  transform: rotate(-22deg) scaleX(-1);
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-copy strong {
  color: var(--green-800);
  font-size: 1.18rem;
  letter-spacing: -0.05em;
}

.brand-copy small {
  margin-top: 6px;
  color: var(--ink-700);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.38em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.cart-trigger {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255, 0.82);
  transition:
    transform var(--ease),
    border-color var(--ease),
    background var(--ease);
}

.icon-button:hover,
.cart-trigger:hover {
  border-color: var(--border-strong);
  background: var(--white);
}

.icon-button:active,
.cart-trigger:active,
.primary-button:active,
.secondary-button:active,
.checkout-button:active,
.add-cart-button:active,
.category-button:active {
  transform: scale(0.98);
}

.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
}

.icon-button svg {
  width: 21px;
  height: 21px;
}

.cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 13px;
}

.cart-trigger svg {
  width: 21px;
  height: 21px;
}

.cart-trigger-label {
  display: none;
  font-size: 0.88rem;
  font-weight: 750;
}

.cart-count,
.mobile-cart-count {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-800);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
}

.eyebrow {
  color: var(--green-700);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 540px;
  padding-block: 56px 44px;
  display: grid;
  align-items: center;
  gap: 38px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 25px 0 0;
  z-index: -2;
  border: 1px solid rgba(72,72,72, 0.08);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255,255,255, 0.78), rgba(243,243,243, 0.42)),
    radial-gradient(circle at 82% 34%, rgba(186,186,186, 0.18), transparent 17rem);
}

.hero-content {
  max-width: 590px;
  padding-inline: 24px;
}

.hero h1 {
  margin-top: 12px;
  max-width: 9ch;
  color: var(--green-950);
  font-size: clamp(3rem, 13vw, 5.8rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.89;
}

.hero h1 span {
  display: block;
  color: var(--green-700);
}

.hero-description {
  max-width: 50ch;
  margin-top: 22px;
  color: var(--ink-700);
  font-size: 1rem;
  line-height: 1.72;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.primary-button,
.secondary-button,
.checkout-button,
.add-cart-button {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition:
    transform var(--ease),
    background var(--ease),
    opacity var(--ease);
}

.primary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 21px;
  background: var(--green-800);
  color: var(--white);
}

.primary-button:hover {
  background: var(--green-700);
}

.primary-button svg {
  width: 18px;
  height: 18px;
}

.secondary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--green-800);
}

.secondary-button:hover {
  background: var(--green-100);
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-700);
  font-size: 0.82rem;
  font-weight: 650;
}

.hero-note span {
  color: var(--lime-500);
  font-size: 1.2rem;
}

.hero-art {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
}

.hero-art::before {
  content: "";
  position: absolute;
  width: min(76vw, 330px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(186,186,186, 0.32), rgba(186,186,186, 0.06) 58%, transparent 60%);
  filter: blur(1px);
}

.hero-cup {
  position: relative;
  z-index: 1;
  width: 166px;
  height: 260px;
  border: 8px solid rgba(255,255,255, 0.76);
  border-top-width: 4px;
  border-radius: 24px 24px 42px 42px;
  background:
    linear-gradient(
      180deg,
      rgba(227,227,227, 0.82) 0%,
      rgba(198,198,198, 0.92) 32%,
      rgba(122,122,122, 0.94) 72%,
      rgba(57,57,57, 0.98) 100%
    );
  box-shadow:
    inset 0 0 0 1px rgba(86,86,86, 0.18),
    0 34px 55px rgba(62,62,62, 0.18);
  transform: rotate(4deg);
}

.hero-lid {
  position: absolute;
  top: -18px;
  left: -15px;
  width: 180px;
  height: 28px;
  border-radius: 14px;
  background: var(--green-800);
  box-shadow: inset 0 -5px 0 rgba(0,0,0, 0.12);
}

.hero-straw {
  position: absolute;
  top: -94px;
  right: 28px;
  width: 17px;
  height: 90px;
  border-radius: 10px 10px 0 0;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--green-800) 0 12px,
      var(--cream-50) 12px 22px
    );
  transform: rotate(4deg);
}

.hero-drink {
  position: absolute;
  inset: 40px 0 0;
  border-radius: 18px 18px 34px 34px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255, 0.26), transparent 10px),
    radial-gradient(circle at 70% 34%, rgba(255,255,255, 0.19), transparent 13px);
}

.hero-ice {
  position: absolute;
  border: 2px solid rgba(255,255,255, 0.42);
  border-radius: 9px;
  background: rgba(255,255,255, 0.13);
  transform: rotate(18deg);
}

.hero-ice-one {
  top: 48px;
  left: 28px;
  width: 36px;
  height: 28px;
}

.hero-ice-two {
  top: 72px;
  right: 24px;
  width: 31px;
  height: 31px;
  transform: rotate(-12deg);
}

.hero-pearls {
  position: absolute;
  inset: auto 12px 14px;
  height: 57px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 9% 62%, #252525 0 7px, transparent 8px),
    radial-gradient(circle at 25% 36%, #292929 0 8px, transparent 9px),
    radial-gradient(circle at 42% 67%, #202020 0 8px, transparent 9px),
    radial-gradient(circle at 59% 34%, #2e2e2e 0 8px, transparent 9px),
    radial-gradient(circle at 76% 66%, #232323 0 8px, transparent 9px),
    radial-gradient(circle at 91% 39%, #282828 0 7px, transparent 8px);
}

.hero-logo {
  position: absolute;
  top: 112px;
  left: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(253,253,253, 0.82);
  color: var(--green-800);
  font-size: 1.55rem;
  font-weight: 900;
  transform: translateX(-50%);
}

.hero-leaf {
  position: absolute;
  z-index: 2;
  width: 38px;
  height: 24px;
  border-radius: 100% 0 100% 0;
  background: var(--green-700);
  opacity: 0.82;
}

.hero-leaf-one {
  top: 21%;
  left: 13%;
  transform: rotate(42deg);
}

.hero-leaf-two {
  right: 11%;
  bottom: 23%;
  width: 28px;
  height: 18px;
  transform: rotate(-32deg) scaleX(-1);
}

.hero-leaf-three {
  top: 12%;
  right: 22%;
  width: 22px;
  height: 14px;
  background: var(--lime-500);
  transform: rotate(16deg);
}

.menu-section {
  padding-block: 66px 58px;
}

.section-heading {
  display: grid;
  gap: 14px;
}

.section-heading h2 {
  margin-top: 7px;
  color: var(--green-950);
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.section-copy {
  max-width: 560px;
  color: var(--ink-700);
  font-size: 0.94rem;
  line-height: 1.65;
}

.menu-toolbar {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.search-field {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255, 0.82);
  transition:
    border-color var(--ease),
    background var(--ease);
}

.search-field:focus-within {
  border-color: var(--green-700);
  background: var(--white);
}

.search-field svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: var(--ink-500);
}

.search-field input {
  min-width: 0;
  width: 100%;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-900);
}

.search-field input::placeholder {
  color: var(--ink-500);
}

.category-strip {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-button {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255, 0.75);
  color: var(--ink-700);
  font-size: 0.82rem;
  font-weight: 750;
  transition:
    transform var(--ease),
    background var(--ease),
    border-color var(--ease),
    color var(--ease);
}

.category-button:hover {
  border-color: var(--border-strong);
}

.category-button.is-active {
  border-color: var(--green-800);
  background: var(--green-800);
  color: var(--white);
}

.menu-status {
  min-height: 24px;
  margin-top: 22px;
  color: var(--ink-500);
  font-size: 0.82rem;
}

.menu-grid {
  display: grid;
  gap: 15px;
}

.product-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255, 0.83);
  box-shadow: 0 8px 24px rgba(45,45,45, 0.035);
  transition:
    transform var(--ease),
    box-shadow var(--ease),
    border-color var(--ease);
}

.product-card:hover {
  border-color: rgba(72,72,72, 0.2);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.product-visual {
  position: relative;
  min-height: 166px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 18%, rgba(255,255,255, 0.65), transparent 42%),
    var(--visual-bg, #f2f2f2);
}

.product-visual::before,
.dialog-drink-visual::before {
  content: "";
  position: absolute;
  width: 62px;
  height: 95px;
  border: 4px solid rgba(255,255,255, 0.7);
  border-top-width: 2px;
  border-radius: 11px 11px 18px 18px;
  background:
    linear-gradient(
      180deg,
      var(--drink-top, #d8d8d8),
      var(--drink-middle, #8c8c8c) 58%,
      var(--drink-bottom, #3b3b3b)
    );
  box-shadow:
    inset 0 0 0 1px rgba(44,44,44, 0.11),
    0 15px 24px rgba(55,55,55, 0.12);
  transform: rotate(var(--cup-rotation, 2deg));
}

.product-visual::after,
.dialog-drink-visual::after {
  content: "S";
  position: absolute;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255, 0.82);
  color: var(--green-800);
  font-size: 0.72rem;
  font-weight: 900;
  transform: translateY(1px);
}

.product-straw {
  position: absolute;
  z-index: 1;
  width: 6px;
  height: 36px;
  margin: -103px -28px 0 0;
  border-radius: 6px 6px 0 0;
  background: var(--green-800);
  transform: rotate(7deg);
}

.product-lid {
  position: absolute;
  z-index: 2;
  width: 70px;
  height: 10px;
  margin-top: -91px;
  border-radius: 8px;
  background: var(--green-800);
  box-shadow: inset 0 -3px 0 rgba(0,0,0, 0.1);
  transform: rotate(var(--cup-rotation, 2deg));
}

.product-pearls {
  position: absolute;
  z-index: 1;
  width: 47px;
  height: 17px;
  margin-top: 65px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 8% 55%, #2a2a2a 0 4px, transparent 5px),
    radial-gradient(circle at 28% 35%, #262626 0 4px, transparent 5px),
    radial-gradient(circle at 49% 62%, #2f2f2f 0 4px, transparent 5px),
    radial-gradient(circle at 70% 34%, #242424 0 4px, transparent 5px),
    radial-gradient(circle at 91% 60%, #2b2b2b 0 4px, transparent 5px);
}

.product-card-content {
  min-width: 0;
  padding: 17px 16px 15px;
  display: flex;
  flex-direction: column;
}

.product-category {
  color: var(--green-700);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-card h3 {
  margin-top: 6px;
  color: var(--green-950);
  font-size: 1rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.product-description {
  margin-top: 7px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-700);
  font-size: 0.76rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card-footer {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.product-price {
  color: var(--green-950);
  font-size: 0.92rem;
  font-weight: 850;
}

.product-price small {
  color: var(--ink-500);
  font-size: 0.66rem;
  font-weight: 600;
}

.customize-button {
  min-height: 37px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--green-800);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 800;
  transition:
    transform var(--ease),
    background var(--ease);
}

.customize-button:hover {
  background: var(--green-700);
}

.empty-state {
  margin-top: 26px;
  padding: 42px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 1.55rem;
  font-weight: 850;
}

.empty-icon svg {
  width: 26px;
  height: 26px;
}

.empty-state h3,
.cart-empty h3 {
  color: var(--green-950);
  font-size: 1.05rem;
}

.empty-state p,
.cart-empty p {
  margin: 7px auto 18px;
  color: var(--ink-700);
  font-size: 0.86rem;
  line-height: 1.5;
}

.how-it-works {
  padding-block: 58px 92px;
}

.steps-grid {
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  list-style: none;
}

.steps-grid li {
  padding: 20px;
  display: flex;
  gap: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255, 0.66);
}

.step-number {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--green-800);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 850;
}

.steps-grid h3 {
  color: var(--green-950);
  font-size: 0.95rem;
}

.steps-grid p {
  margin-top: 6px;
  color: var(--ink-700);
  font-size: 0.8rem;
  line-height: 1.5;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255,255,255, 0.5);
}

.footer-inner {
  padding-block: 36px calc(36px + var(--mobile-nav-height));
  display: grid;
  gap: 15px;
  color: var(--ink-700);
  font-size: 0.79rem;
  text-align: center;
}

.brand-footer {
  margin-inline: auto;
}

.mobile-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 75;
  min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  padding: 8px 16px calc(7px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255, 0.92);
  box-shadow: 0 -10px 30px rgba(45,45,45, 0.08);
  backdrop-filter: blur(18px);
}

.mobile-nav-item,
.mobile-cart-button {
  min-width: 0;
  min-height: 52px;
  padding: 5px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink-500);
  font-size: 0.64rem;
  font-weight: 750;
}

.mobile-nav-item svg,
.mobile-cart-button svg {
  width: 22px;
  height: 22px;
}

.mobile-nav-item.is-active {
  color: var(--green-800);
}

.mobile-cart-button {
  position: relative;
  color: var(--green-800);
}

.mobile-cart-icon {
  position: relative;
  width: 46px;
  height: 46px;
  margin-top: -27px;
  display: grid;
  place-items: center;
  border: 5px solid var(--cream-100);
  border-radius: 50%;
  background: var(--green-800);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(72,72,72, 0.22);
}

.mobile-cart-icon svg {
  width: 20px;
  height: 20px;
}

.mobile-cart-count {
  position: absolute;
  top: -8px;
  right: -9px;
  min-width: 20px;
  height: 20px;
  border: 2px solid var(--cream-100);
  background: var(--lime-500);
  color: var(--green-950);
  font-size: 0.62rem;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(27,27,27, 0.47);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--ease);
}

.overlay.is-visible {
  opacity: 1;
}

.cart-panel {
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  width: 100%;
  max-height: min(88dvh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--cream-50);
  box-shadow: var(--shadow-md);
  transform: translateY(105%);
  visibility: hidden;
  transition:
    transform 250ms ease,
    visibility 250ms;
}

.cart-panel.is-open {
  transform: translateY(0);
  visibility: visible;
}

.panel-handle {
  width: 46px;
  height: 5px;
  margin: 10px auto 2px;
  border-radius: 999px;
  background: var(--ink-300);
}

.cart-header {
  padding: 13px 18px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  margin-top: 4px;
  color: var(--green-950);
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.panel-close-button {
  background: var(--cream-100);
}

.cart-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cart-empty {
  min-height: 330px;
  padding: 48px 24px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.cart-list {
  padding: 8px 18px 20px;
  display: grid;
}

.cart-item {
  padding-block: 15px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-item-visual {
  position: relative;
  width: 62px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--visual-bg, var(--green-100));
}

.cart-item-visual::before {
  content: "";
  width: 29px;
  height: 47px;
  border: 2px solid rgba(255,255,255, 0.72);
  border-radius: 6px 6px 10px 10px;
  background:
    linear-gradient(
      180deg,
      var(--drink-top, #d8d8d8),
      var(--drink-middle, #8c8c8c) 58%,
      var(--drink-bottom, #3b3b3b)
    );
}

.cart-item-content {
  min-width: 0;
}

.cart-item-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cart-item h3 {
  min-width: 0;
  color: var(--green-950);
  font-size: 0.91rem;
  line-height: 1.3;
}

.cart-item-price {
  flex: 0 0 auto;
  color: var(--green-950);
  font-size: 0.84rem;
  font-weight: 850;
}

.cart-item-options {
  margin-top: 5px;
  color: var(--ink-700);
  font-size: 0.71rem;
  line-height: 1.45;
}

.cart-item-addon {
  display: block;
  color: var(--ink-500);
}

.cart-item-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
}

.quantity-control button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--green-800);
  font-size: 1.15rem;
  font-weight: 750;
}

.quantity-control button:hover {
  background: var(--green-100);
}

.quantity-control output {
  min-width: 28px;
  color: var(--green-950);
  font-size: 0.83rem;
  font-weight: 800;
  text-align: center;
}

.remove-item-button {
  min-height: 36px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--danger-700);
  font-size: 0.72rem;
  font-weight: 750;
}

.cart-footer {
  padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--white);
}

.clear-cart-button {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--danger-700);
  font-size: 0.75rem;
  font-weight: 750;
}

.cart-summary {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.cart-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-700);
  font-size: 0.78rem;
}

.cart-summary dd {
  color: var(--green-950);
  font-weight: 750;
}

.cart-summary .cart-total-row {
  margin-top: 4px;
  color: var(--green-950);
  font-size: 1rem;
  font-weight: 850;
}

.checkout-button,
.add-cart-button {
  width: 100%;
  min-height: 53px;
  margin-top: 15px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--green-800);
  color: var(--white);
}

.checkout-button:hover,
.add-cart-button:hover {
  background: var(--green-700);
}

.checkout-button:disabled,
.add-cart-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.checkout-note {
  margin-top: 10px;
  color: var(--ink-500);
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: center;
}

.customize-dialog {
  width: min(100% - 20px, 650px);
  max-height: min(92dvh, 880px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--cream-50);
  color: var(--ink-900);
  box-shadow: var(--shadow-md);
}

.customize-dialog::backdrop {
  background: rgba(27,27,27, 0.52);
  backdrop-filter: blur(4px);
}

.customize-dialog[open] {
  animation: dialog-enter 210ms ease both;
}

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.customize-dialog form {
  max-height: min(92dvh, 880px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dialog-hero {
  position: relative;
  min-height: 190px;
  padding: 26px 22px 20px 160px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 24%, rgba(255,255,255, 0.72), transparent 40%),
    var(--visual-bg, var(--green-100));
}

.dialog-close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

.dialog-drink-visual {
  position: absolute;
  left: 28px;
  bottom: 21px;
  width: 100px;
  height: 140px;
  display: grid;
  place-items: center;
}

.dialog-drink-visual::before {
  width: 82px;
  height: 126px;
  border-width: 5px;
  border-radius: 15px 15px 25px 25px;
}

.dialog-drink-visual::after {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 0.9rem;
}

.dialog-product-copy {
  min-width: 0;
}

.dialog-product-copy h2 {
  margin-top: 7px;
  color: var(--green-950);
  font-size: clamp(1.45rem, 6vw, 2rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.dialog-product-copy > p:last-child {
  margin-top: 9px;
  color: var(--ink-700);
  font-size: 0.79rem;
  line-height: 1.5;
}

.dialog-content {
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.option-group + .option-group {
  margin-top: 25px;
}

.option-group legend {
  width: 100%;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--green-950);
  font-size: 0.93rem;
  font-weight: 850;
}

.option-group legend span {
  color: var(--ink-500);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.segmented-options,
.chip-options {
  display: grid;
  gap: 8px;
}

.segmented-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chip-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-card {
  position: relative;
  min-width: 0;
}

.option-card input,
.addon-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card label {
  min-height: 48px;
  padding: 8px 10px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink-700);
  font-size: 0.75rem;
  font-weight: 750;
  text-align: center;
  transition:
    border-color var(--ease),
    background var(--ease),
    color var(--ease);
}

.option-card label small {
  color: var(--ink-500);
  font-size: 0.62rem;
  font-weight: 650;
}

.option-card input:checked + label {
  border-color: var(--green-800);
  background: var(--green-100);
  color: var(--green-800);
  box-shadow: inset 0 0 0 1px var(--green-800);
}

.option-card input:checked + label small {
  color: var(--green-700);
}

.addon-list {
  display: grid;
  gap: 9px;
}

.addon-card {
  position: relative;
}

.addon-card label {
  min-height: 54px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--white);
  transition:
    border-color var(--ease),
    background var(--ease);
}

.addon-check {
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--cream-50);
  color: transparent;
  font-size: 0.74rem;
  font-weight: 900;
}

.addon-name {
  min-width: 0;
  flex: 1;
  color: var(--green-950);
  font-size: 0.78rem;
  font-weight: 750;
}

.addon-price {
  flex: 0 0 auto;
  color: var(--ink-700);
  font-size: 0.73rem;
  font-weight: 700;
}

.addon-card input:checked + label {
  border-color: var(--green-800);
  background: var(--green-100);
}

.addon-card input:checked + label .addon-check {
  border-color: var(--green-800);
  background: var(--green-800);
  color: var(--white);
}

.quantity-row {
  margin-top: 26px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
}

.quantity-row > div:first-child {
  display: grid;
  gap: 4px;
}

.quantity-row strong {
  color: var(--green-950);
  font-size: 0.9rem;
}

.quantity-row span {
  color: var(--ink-500);
  font-size: 0.66rem;
}

.dialog-footer {
  padding: 0 20px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--white);
}

.toast-region {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  right: 14px;
  z-index: 150;
  width: min(calc(100% - 28px), 360px);
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.toast {
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255, 0.96);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toast-enter 190ms ease both;
}

.toast.is-leaving {
  animation: toast-leave 170ms ease both;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-leave {
  to {
    opacity: 0;
    transform: translateY(-7px) scale(0.98);
  }
}

.toast-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 0.75rem;
  font-weight: 900;
}

.toast-success .toast-icon {
  background: var(--success-100);
  color: var(--success-700);
}

.toast-error .toast-icon {
  background: var(--danger-100);
  color: var(--danger-700);
}

.toast-info .toast-icon {
  background: var(--green-100);
  color: var(--green-800);
}

.toast-warning .toast-icon {
  background: var(--warning-100);
  color: var(--warning-700);
}

.toast-copy {
  min-width: 0;
}

.toast-copy strong {
  display: block;
  color: var(--green-950);
  font-size: 0.8rem;
}

.toast-copy p {
  margin-top: 3px;
  color: var(--ink-700);
  font-size: 0.73rem;
  line-height: 1.4;
}

.toast-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-500);
  font-size: 1rem;
}

.toast-close:hover {
  background: var(--cream-100);
}

.noscript-message {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
  display: grid;
  place-items: center;
  background: var(--cream-100);
  color: var(--green-950);
  font-weight: 750;
  text-align: center;
}

@media (min-width: 560px) {
  .cart-trigger-label {
    display: inline;
  }

  .hero {
    min-height: 610px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.78fr);
  }

  .hero-art {
    min-height: 430px;
  }

  .hero-cup {
    width: 190px;
    height: 298px;
  }

  .hero-lid {
    width: 204px;
  }

  .hero-straw {
    top: -104px;
    height: 100px;
  }

  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .steps-grid li {
    display: grid;
  }

  .footer-inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    text-align: left;
  }

  .brand-footer {
    margin-inline: 0;
  }

  .footer-inner > p:last-child {
    text-align: right;
  }

  .chip-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .addon-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 820px) {
  :root {
    --header-height: 78px;
  }

  .section-shell,
  .header-inner {
    width: min(calc(100% - 48px), var(--content-width));
  }

  .mobile-nav {
    display: none;
  }

  .footer-inner {
    padding-bottom: 36px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .brand-copy strong {
    font-size: 1.35rem;
  }

  .cart-trigger-label {
    display: inline;
  }

  .hero {
    min-height: 650px;
    padding-block: 70px;
  }

  .hero-content {
    padding-inline: 52px 0;
  }

  .hero-art {
    min-height: 500px;
  }

  .hero-cup {
    width: 215px;
    height: 335px;
  }

  .hero-lid {
    left: -16px;
    width: 231px;
  }

  .hero-straw {
    top: -116px;
    right: 36px;
    height: 112px;
  }

  .hero-logo {
    top: 150px;
  }

  .section-heading {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
    align-items: end;
  }

  .section-copy {
    justify-self: end;
  }

  .menu-toolbar {
    grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
    align-items: center;
  }

  .category-strip {
    justify-content: flex-end;
  }

  .menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-visual {
    min-height: 220px;
  }

  .product-visual::before {
    width: 82px;
    height: 126px;
  }

  .product-visual::after {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .product-straw {
    height: 48px;
    margin: -135px -36px 0 0;
  }

  .product-lid {
    width: 92px;
    height: 12px;
    margin-top: -122px;
  }

  .product-pearls {
    width: 62px;
    margin-top: 84px;
  }

  .product-card-content {
    min-height: 194px;
    padding: 18px;
  }

  .product-card h3 {
    font-size: 1.05rem;
  }

  .cart-panel {
    inset: 0 0 0 auto;
    width: min(100%, 430px);
    max-height: none;
    border-radius: 0;
    transform: translateX(105%);
  }

  .cart-panel.is-open {
    transform: translateX(0);
  }

  .panel-handle {
    display: none;
  }

  .cart-header {
    padding-top: 24px;
  }
}

@media (min-width: 1080px) {
  .menu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .hero {
    padding-top: 42px;
  }

  .hero-content {
    padding-inline: 18px;
  }

  .hero-art {
    min-height: 300px;
  }

  .dialog-hero {
    min-height: 170px;
    padding-left: 135px;
  }

  .dialog-drink-visual {
    left: 16px;
    transform: scale(0.86);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}


/* =========================================================
   PHASE 4: CHECKOUT, GOOGLE PLACES, AND ORDER CONFIRMATION
   ========================================================= */

.checkout-dialog,
.order-confirmation-dialog {
  width: min(calc(100% - 18px), 680px);
  max-height: min(94dvh, 920px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--cream-50);
  color: var(--ink-900);
  box-shadow: var(--shadow-md);
}

.checkout-dialog::backdrop,
.order-confirmation-dialog::backdrop {
  background: rgba(27,27,27, 0.54);
  backdrop-filter: blur(4px);
}

.checkout-dialog[open],
.order-confirmation-dialog[open] {
  animation: dialog-enter 210ms ease both;
}

.checkout-dialog form {
  max-height: min(94dvh, 920px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.checkout-dialog-header {
  padding: 19px 20px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255, 0.72);
}

.checkout-dialog-header h2 {
  margin-top: 5px;
  color: var(--green-950);
  font-size: 1.55rem;
  letter-spacing: -0.045em;
}

.checkout-dialog-content {
  min-height: 0;
  padding: 0 20px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.checkout-section {
  padding-block: 22px;
  border-bottom: 1px solid var(--border);
}

.checkout-section:last-child {
  border-bottom: 0;
}

.checkout-section-heading {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkout-step {
  width: 31px;
  height: 31px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--green-800);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 850;
}

.checkout-section-heading h3 {
  color: var(--green-950);
  font-size: 0.96rem;
}

.checkout-section-heading p {
  margin-top: 4px;
  color: var(--ink-700);
  font-size: 0.74rem;
  line-height: 1.45;
}

.order-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.order-type-card {
  position: relative;
  min-width: 0;
}

.order-type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.order-type-card > span:not(.order-type-icon) {
  min-width: 0;
}

.order-type-card {
  min-height: 78px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  transition:
    border-color var(--ease),
    background var(--ease),
    box-shadow var(--ease);
}

.order-type-card:has(input:checked) {
  border-color: var(--green-800);
  background: var(--green-100);
  box-shadow: inset 0 0 0 1px var(--green-800);
}

.order-type-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--cream-100);
  color: var(--green-800);
}

.order-type-card:has(input:checked) .order-type-icon {
  background: var(--green-800);
  color: var(--white);
}

.order-type-icon svg {
  width: 20px;
  height: 20px;
}

.order-type-card strong,
.order-type-card small {
  display: block;
}

.order-type-card strong {
  color: var(--green-950);
  font-size: 0.81rem;
}

.order-type-card small {
  margin-top: 3px;
  color: var(--ink-700);
  font-size: 0.64rem;
  line-height: 1.35;
}

.checkout-field {
  display: grid;
  gap: 7px;
}

.checkout-field + .checkout-field {
  margin-top: 14px;
}

.checkout-field > span {
  color: var(--green-950);
  font-size: 0.76rem;
  font-weight: 750;
}

.checkout-field > span small {
  color: var(--ink-500);
  font-size: 0.64rem;
  font-weight: 600;
}

.checkout-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
  background: var(--white);
  color: var(--ink-900);
  transition:
    border-color var(--ease),
    box-shadow var(--ease);
}

.checkout-field input:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(186,186,186, 0.28);
}

.checkout-field input::placeholder {
  color: var(--ink-500);
}

.pickup-branch-card,
.selected-address-card {
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
}

.pickup-branch-icon,
.selected-address-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--green-800);
  color: var(--white);
  font-weight: 900;
}

.selected-address-icon svg {
  width: 21px;
  height: 21px;
}

.pickup-branch-card > div,
.selected-address-card > div {
  min-width: 0;
  flex: 1;
}

.pickup-branch-card strong,
.pickup-branch-card span,
.selected-address-card strong {
  display: block;
}

.pickup-branch-card strong,
.selected-address-card strong {
  color: var(--green-950);
  font-size: 0.8rem;
}

.pickup-branch-card > div span,
.selected-address-card p {
  margin-top: 3px;
  color: var(--ink-700);
  font-size: 0.69rem;
  line-height: 1.4;
}

.pickup-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.62rem;
  font-weight: 800;
}

.place-autocomplete-shell {
  min-height: 52px;
}

.place-autocomplete-host {
  width: 100%;
}

.place-autocomplete-host gmp-place-autocomplete {
  width: 100%;
  min-height: 50px;
  display: block;
  color-scheme: light;
  font-family: inherit;
}

.maps-status {
  padding: 11px 13px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: rgba(255,255,255, 0.62);
  color: var(--ink-700);
  font-size: 0.7rem;
  line-height: 1.45;
}

.maps-status[hidden] {
  display: none;
}

.maps-status.is-loading {
  border-style: solid;
  background: var(--green-100);
  color: var(--green-700);
}

.maps-status.is-error {
  border-style: solid;
  border-color: rgba(81,81,81, 0.24);
  background: var(--danger-100);
  color: var(--danger-700);
}

.selected-address-card {
  margin-top: 10px;
  border-color: rgba(72,72,72, 0.28);
  background: var(--green-100);
}

.selected-address-card button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  background: var(--white);
  color: var(--green-800);
  font-size: 0.68rem;
  font-weight: 800;
}

.delivery-details .checkout-field {
  margin-top: 14px;
}

.checkout-summary-list {
  display: grid;
  gap: 10px;
}

.checkout-summary-item {
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 14px;
  border-bottom: 1px solid var(--border);
}

.checkout-summary-item:last-child {
  border-bottom: 0;
}

.checkout-summary-item strong {
  color: var(--green-950);
  font-size: 0.78rem;
}

.checkout-summary-item > span {
  color: var(--green-950);
  font-size: 0.76rem;
  font-weight: 800;
}

.checkout-summary-item p {
  grid-column: 1 / -1;
  color: var(--ink-700);
  font-size: 0.66rem;
  line-height: 1.4;
}

.checkout-summary-totals {
  margin-top: 13px;
  padding-top: 13px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.checkout-summary-totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-700);
  font-size: 0.75rem;
}

.checkout-summary-totals dd {
  color: var(--green-950);
  font-weight: 800;
}

.checkout-summary-totals .checkout-summary-total {
  color: var(--green-950);
  font-size: 1rem;
  font-weight: 850;
}

.checkout-dialog-footer {
  padding: 13px 20px calc(17px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--white);
}

.checkout-dialog-footer > p {
  margin-bottom: 10px;
  color: var(--ink-500);
  font-size: 0.65rem;
  line-height: 1.4;
  text-align: center;
}

.checkout-submit-button {
  width: 100%;
  min-height: 53px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 0;
  border-radius: 999px;
  background: var(--green-800);
  color: var(--white);
  font-weight: 850;
  transition:
    background var(--ease),
    transform var(--ease),
    opacity var(--ease);
}

.checkout-submit-button:hover {
  background: var(--green-700);
}

.checkout-submit-button:active {
  transform: scale(0.99);
}

.checkout-submit-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.order-confirmation-dialog {
  width: min(calc(100% - 26px), 480px);
}

.confirmation-content {
  padding: 34px 22px 24px;
  text-align: center;
}

.confirmation-check {
  width: 68px;
  height: 68px;
  margin: 0 auto 19px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--success-100);
  color: var(--success-700);
  font-size: 2rem;
  font-weight: 900;
}

.confirmation-content h2 {
  margin-top: 7px;
  color: var(--green-950);
  font-size: 1.55rem;
  letter-spacing: -0.045em;
}

.confirmation-copy {
  max-width: 42ch;
  margin: 9px auto 0;
  color: var(--ink-700);
  font-size: 0.78rem;
  line-height: 1.55;
}

.confirmation-order-number {
  margin-top: 21px;
  padding: 15px;
  border: 1px dashed rgba(72,72,72, 0.35);
  border-radius: 17px;
  background: var(--green-100);
}

.confirmation-order-number span,
.confirmation-order-number strong {
  display: block;
}

.confirmation-order-number span {
  color: var(--ink-700);
  font-size: 0.67rem;
}

.confirmation-order-number strong {
  margin-top: 4px;
  color: var(--green-950);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}

.confirmation-details {
  margin-top: 15px;
  display: grid;
  gap: 8px;
}

.confirmation-details div {
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-700);
  font-size: 0.74rem;
}

.confirmation-details dd {
  color: var(--green-950);
  font-weight: 800;
  text-transform: capitalize;
}

.confirmation-actions {
  margin-top: 22px;
  display: grid;
  gap: 9px;
}

.confirmation-actions .primary-button,
.confirmation-actions .secondary-button {
  width: 100%;
}

@media (min-width: 600px) {
  .checkout-dialog-header,
  .checkout-dialog-footer {
    padding-inline: 26px;
  }

  .checkout-dialog-content {
    padding-inline: 26px;
  }

  .confirmation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================================================
   PHASE 4 OPENSTREETMAP REPLACEMENT
   ========================================================= */

.delivery-address-grid {
  display: grid;
  gap: 14px;
}

.delivery-address-grid .checkout-field + .checkout-field {
  margin-top: 0;
}

.delivery-map-toolbar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.map-action-button {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: var(--white);
  color: var(--green-800);
  font-size: 0.72rem;
  font-weight: 800;
  transition:
    transform var(--ease),
    border-color var(--ease),
    background var(--ease),
    opacity var(--ease);
}

.map-action-button:hover:not(:disabled) {
  border-color: var(--green-800);
  background: var(--green-100);
}

.map-action-button:active:not(:disabled) {
  transform: scale(0.98);
}

.map-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.map-location-button {
  border-color: var(--green-800);
  background: var(--green-800);
  color: var(--white);
}

.map-location-button:hover:not(:disabled) {
  background: var(--green-700);
  color: var(--white);
}

.map-action-button svg {
  width: 18px;
  height: 18px;
}

.map-status {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.69rem;
  line-height: 1.45;
}

.map-status.is-error {
  border-color: rgba(81,81,81, 0.24);
  background: var(--danger-100);
  color: var(--danger-700);
}

.map-status.is-success {
  border-color: rgba(90,90,90, 0.22);
  background: var(--success-100);
  color: var(--success-700);
}

.delivery-map {
  width: 100%;
  height: 290px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      rgba(239,239,239, 0.92),
      rgba(243,243,243, 0.94)
    );
  isolation: isolate;
}

.delivery-map:focus-within {
  outline: 3px solid rgba(186,186,186, 0.5);
  outline-offset: 3px;
}

.map-instructions {
  margin-top: 9px;
  color: var(--ink-500);
  font-size: 0.66rem;
  line-height: 1.48;
}

.selected-location-card {
  margin-top: 11px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(72,72,72, 0.28);
  border-radius: 15px;
  background: var(--green-100);
}

.selected-location-icon {
  width: 39px;
  height: 39px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--green-800);
  color: var(--white);
}

.selected-location-icon svg {
  width: 20px;
  height: 20px;
}

.selected-location-card > div {
  min-width: 0;
  flex: 1;
}

.selected-location-card strong {
  display: block;
  color: var(--green-950);
  font-size: 0.76rem;
}

.selected-location-card p {
  margin-top: 3px;
  color: var(--ink-700);
  font-size: 0.66rem;
  line-height: 1.4;
  word-break: break-word;
}

.selected-location-card a {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  background: var(--white);
  color: var(--green-800);
  font-size: 0.66rem;
  font-weight: 800;
}

/*
 * Leaflet creates the controls dynamically. These rules keep them aligned
 * with Ssupertea's visual system without hiding OpenStreetMap attribution.
 */
.delivery-map .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.delivery-map .leaflet-control-zoom a {
  color: var(--green-800);
}

.delivery-map .leaflet-control-attribution {
  max-width: calc(100% - 12px);
  padding: 3px 6px;
  background: rgba(255,255,255, 0.88);
  color: var(--ink-700);
  font-size: 0.56rem;
  line-height: 1.25;
}

.delivery-map .leaflet-control-attribution a {
  color: var(--green-700);
  text-decoration: underline;
}

.ssupertea-map-marker-shell {
  border: 0;
  background: transparent;
}

.ssupertea-map-marker {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 4px solid var(--white);
  border-radius: 50% 50% 50% 10px;
  background: var(--green-800);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(60,60,60, 0.3);
  font-size: 0.92rem;
  font-weight: 900;
  transform: rotate(-45deg);
}

.ssupertea-map-marker span {
  transform: rotate(45deg);
}

.ssupertea-map-marker::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime-500);
}

@media (min-width: 600px) {
  .delivery-address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-address-grid .checkout-field:first-child,
  .delivery-address-grid .checkout-field:last-child {
    grid-column: 1 / -1;
  }

  .delivery-map {
    height: 340px;
  }
}


/* =========================================================
   MAP REVEAL + OPENROUTESERVICE ROUTE SUMMARY
   ========================================================= */

.delivery-map-panel {
  margin-top: 12px;
}

.delivery-map-panel[hidden] {
  display: none;
}

.route-summary-card {
  margin-top: 11px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
}

.route-summary-card[hidden] {
  display: none;
}

.route-summary-card.is-loading {
  border-color: rgba(72,72,72, 0.25);
  background: var(--green-100);
}

.route-summary-card.is-error {
  border-color: rgba(81,81,81, 0.24);
  background: var(--danger-100);
}

.route-summary-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.route-summary-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--green-800);
  color: var(--white);
}

.route-summary-icon svg {
  width: 20px;
  height: 20px;
}

.route-summary-heading > div {
  min-width: 0;
}

.route-summary-heading strong {
  color: var(--green-950);
  font-size: 0.78rem;
}

.route-summary-heading p {
  margin-top: 4px;
  color: var(--ink-700);
  font-size: 0.67rem;
  line-height: 1.45;
}

.route-summary-card.is-error .route-summary-heading p {
  color: var(--danger-700);
}

.route-metrics {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.route-metrics div {
  padding: 10px;
  border-radius: 12px;
  background: var(--cream-100);
}

.route-metrics dt {
  color: var(--ink-500);
  font-size: 0.62rem;
}

.route-metrics dd {
  margin-top: 3px;
  color: var(--green-950);
  font-size: 0.83rem;
  font-weight: 850;
}

.ssupertea-shop-marker-shell {
  border: 0;
  background: transparent;
}

.ssupertea-shop-marker {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 4px solid var(--white);
  border-radius: 13px;
  background: var(--lime-500);
  color: var(--green-950);
  box-shadow: 0 8px 20px rgba(60,60,60, 0.25);
  font-size: 0.74rem;
  font-weight: 900;
}

@media (max-width: 430px) {
  .delivery-map-toolbar .map-action-button {
    flex: 1 1 calc(50% - 6px);
  }

  .delivery-map-toolbar #clear-map-pin-button {
    flex-basis: 100%;
  }
}


.route-provider-attribution {
  margin-top: 10px;
  color: var(--ink-500);
  font-size: 0.58rem;
  line-height: 1.4;
  text-align: right;
}

.route-provider-attribution a {
  color: var(--green-700);
  text-decoration: underline;
}


/* =========================================================
   PHASE 5: CART FIX, AUTOFILL, DELIVERY FEE, LIVE TRACKING
   ========================================================= */

[hidden],
.is-hidden {
  display: none !important;
}

.checkout-field input[readonly] {
  background: var(--cream-100);
  color: var(--ink-700);
  cursor: default;
}

.checkout-field-autofill input.is-autofilled {
  border-color: rgba(90,90,90, 0.35);
  background: var(--success-100);
  color: var(--success-700);
  font-weight: 750;
}

.location-address-status {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--cream-100);
  color: var(--ink-700);
  font-size: 0.68rem;
  line-height: 1.45;
}

.location-address-status.is-loading {
  border-color: rgba(72,72,72, 0.25);
  background: var(--green-100);
  color: var(--green-700);
}

.location-address-status.is-success {
  border-color: rgba(90,90,90, 0.25);
  background: var(--success-100);
  color: var(--success-700);
}

.location-address-status.is-error {
  border-color: rgba(81,81,81, 0.24);
  background: var(--danger-100);
  color: var(--danger-700);
}

.route-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-fee-rule {
  margin-top: 9px;
  color: var(--ink-500);
  font-size: 0.6rem;
  line-height: 1.4;
}

.tracking-dialog {
  width: min(calc(100% - 18px), 660px);
  max-height: min(94dvh, 900px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--cream-50);
  color: var(--ink-900);
  box-shadow: var(--shadow-md);
}

.tracking-dialog::backdrop {
  background: rgba(27,27,27, 0.54);
  backdrop-filter: blur(4px);
}

.tracking-dialog[open] {
  animation: dialog-enter 210ms ease both;
}

.tracking-shell {
  max-height: min(94dvh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.tracking-header {
  padding: 19px 20px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255, 0.75);
}

.tracking-header h2 {
  margin-top: 5px;
  color: var(--green-950);
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}

.tracking-content {
  min-height: 0;
  padding: 18px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tracking-connection-row {
  padding: 10px 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--white);
}

.tracking-connection-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warning-700);
  box-shadow: 0 0 0 4px var(--warning-100);
}

.tracking-connection-dot.is-connected {
  background: var(--success-700);
  box-shadow: 0 0 0 4px var(--success-100);
}

.tracking-connection-dot.is-offline,
.tracking-connection-dot.is-error {
  background: var(--danger-700);
  box-shadow: 0 0 0 4px var(--danger-100);
}

.tracking-connection-row p {
  color: var(--ink-700);
  font-size: 0.68rem;
  line-height: 1.4;
}

.tracking-connection-row button {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 0.65rem;
  font-weight: 800;
}

.tracking-status-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 10%, rgba(186,186,186, 0.25), transparent 8rem),
    var(--green-800);
  color: var(--white);
}

.tracking-status-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
}

.tracking-status-card h3 {
  margin-top: 6px;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
  text-transform: capitalize;
}

.tracking-status-card > p:last-child {
  margin-top: 7px;
  font-size: 0.73rem;
  line-height: 1.5;
  opacity: 0.88;
}

.tracking-timeline {
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  list-style: none;
}

.tracking-timeline li {
  position: relative;
  min-height: 72px;
  padding: 0 0 18px 48px;
  color: var(--ink-500);
}

.tracking-timeline li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 15px;
  width: 2px;
  height: calc(100% - 12px);
  background: var(--border-strong);
}

.tracking-step-marker {
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-500);
  font-size: 0.67rem;
  font-weight: 850;
}

.tracking-timeline strong {
  color: inherit;
  font-size: 0.79rem;
}

.tracking-timeline p {
  margin-top: 4px;
  color: inherit;
  font-size: 0.67rem;
  line-height: 1.4;
}

.tracking-timeline li.is-complete,
.tracking-timeline li.is-active {
  color: var(--green-800);
}

.tracking-timeline li.is-complete .tracking-step-marker,
.tracking-timeline li.is-active .tracking-step-marker {
  border-color: var(--green-800);
  background: var(--green-800);
  color: var(--white);
}

.tracking-timeline li.is-complete:not(:last-child)::before {
  background: var(--green-800);
}

.tracking-timeline li.is-active .tracking-step-marker {
  box-shadow: 0 0 0 5px var(--green-100);
}

.tracking-cancelled-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(81,81,81, 0.22);
  border-radius: 15px;
  background: var(--danger-100);
  color: var(--danger-700);
}

.tracking-cancelled-card strong {
  font-size: 0.79rem;
}

.tracking-cancelled-card p {
  margin-top: 4px;
  font-size: 0.68rem;
  line-height: 1.4;
}

.tracking-details-card,
.tracking-delivery-card {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--white);
}

.tracking-details-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tracking-details-heading h3,
.tracking-delivery-card h3 {
  color: var(--green-950);
  font-size: 0.84rem;
}

.tracking-details-heading span {
  color: var(--ink-500);
  font-size: 0.62rem;
}

.tracking-items {
  margin-top: 10px;
  display: grid;
}

.tracking-item {
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  border-bottom: 1px solid var(--border);
}

.tracking-item:last-child {
  border-bottom: 0;
}

.tracking-item strong {
  color: var(--green-950);
  font-size: 0.73rem;
}

.tracking-item > span {
  color: var(--green-950);
  font-size: 0.71rem;
  font-weight: 800;
}

.tracking-item p {
  grid-column: 1 / -1;
  color: var(--ink-700);
  font-size: 0.62rem;
  line-height: 1.4;
}

.tracking-totals {
  margin-top: 10px;
  padding-top: 10px;
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--border);
}

.tracking-totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink-700);
  font-size: 0.7rem;
}

.tracking-totals div:last-child {
  color: var(--green-950);
  font-size: 0.86rem;
  font-weight: 850;
}

.tracking-totals dd {
  color: var(--green-950);
  font-weight: 800;
}

.tracking-delivery-card > p {
  margin-top: 7px;
  color: var(--ink-700);
  font-size: 0.68rem;
  line-height: 1.5;
}

.tracking-route-facts {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tracking-route-facts span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.62rem;
  font-weight: 750;
}

.tracking-delivery-card .secondary-button {
  margin-top: 12px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 520px) {
  .route-metrics {
    grid-template-columns: 1fr;
  }

  .tracking-content,
  .tracking-header {
    padding-inline: 16px;
  }
}
