:root {
  --color-primary: #f97316;
  --color-accent: #facc15;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-header-bg: #f97316;
  --color-header-text: #ffffff;
  --color-sticky-cart-bg: #111827;
  --color-sticky-cart-text: #ffffff;
  --color-sticky-cart-badge-bg: #cf323a;
  --color-sticky-cart-badge-text: #ffffff;
  --sticky-cart-glass-opacity: 75%;
  --color-text: #111827;
  --color-muted: #64748b;
  --color-button: #f97316;
  --color-button-text: #ffffff;
  --color-border: #e2e8f0;
  --radius: 12px;
  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-body: "Inter", Arial, sans-serif;
  --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); line-height: 1.55; letter-spacing: 0; }
body.front { min-height: 100vh; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--font-heading); }
button, input, select, textarea { max-width: 100%; }

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: #fff; padding: 10px 14px; border: 1px solid var(--color-border); }
.skip-link:focus { top: 12px; }
.menu-shell { width: min(100%, var(--content)); margin: 0 auto; padding: 0 24px 120px; }

/* Modern Floating Header */
.global-header {
  width: 100%;
  height: 76px;
  display: grid;
  place-items: center;
  background: var(--color-header-bg, #ffffff);
  color: var(--color-header-text, #1e293b);
  border-radius: 0 0 20px 20px;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--color-header-text, #ffffff);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.header-brand:hover {
  transform: translateY(-1px);
}

.header-monogram {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  position: relative;
  border: 2px solid var(--color-header-text, #ffffff);
  color: var(--color-header-text, #ffffff);
  font-size: 13px;
  font-weight: 800;
  border-radius: 10px;
  line-height: 1;
}

.header-wordmark strong {
  max-width: 360px;
  overflow: hidden;
  color: var(--color-header-text, #ffffff);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-wordmark small {
  margin-top: 3px;
  color: var(--color-header-text, rgba(255,255,255,.8));
  opacity: 0.75;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Modern Sticky Tools Bar & Search */
.menu-tools {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-left: -24px;
  margin-right: -24px;
  padding: 16px 24px 12px;
  background: var(--color-bg);
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 60%, transparent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.searchbar {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.searchbar:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--color-primary) 15%, transparent);
  transform: translateY(-1px);
}

.searchbar > i {
  color: var(--color-muted);
  font-size: 17px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.searchbar input,
.dark .searchbar input,
body.front.dark .searchbar input,
body.front[data-theme="dark"] .searchbar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 0 0 6px !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--color-text) !important;
  font-size: 14.5px;
  line-height: 1.4;
}

.searchbar input:focus,
.dark .searchbar input:focus,
body.front.dark .searchbar input:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.searchbar input::placeholder {
  color: var(--color-muted, #94a3b8);
  font-size: 14px;
}

/* Sticky Category Toolbar with Frosted Glass */
.menu-tools {
  position: sticky;
  top: 0;
  z-index: 35;
  background: color-mix(in srgb, var(--color-bg, #fafaf9) 92%, transparent);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  padding: 12px 0 6px;
  margin: 0 0 10px;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.menu-tools.is-stuck {
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Category Pill Chips with Smooth Interactivity */
.chips {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 3px 2px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chips a {
  flex: 0 0 auto;
  padding: 8px 18px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.chips a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.chips a.active,
.chips .active {
  border-color: var(--color-chip-active-bg, var(--color-text));
  background: var(--color-chip-active-bg, var(--color-text));
  color: var(--color-chip-active-text, #ffffff);
  transform: scale(1.03);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--color-chip-active-bg, var(--color-text)) 24%, transparent);
}

/* Smooth Category Section Transitions */
.category-menu-section.is-hidden {
  display: none !important;
}

.category-menu-sections,
.section-heading {
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.category-menu-sections.is-changing,
.section-heading.is-changing {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.category-menu-section.is-visible {
  animation: category-fade-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes category-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Heading */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 20px;
}

.section-heading p {
  margin-bottom: 4px;
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-heading > span {
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-border) 60%, transparent);
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
}

/* Modern Product Card Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.category-menu-sections {
  display: grid;
  gap: 30px;
}

.category-menu-section {
  display: grid;
  gap: 12px;
  scroll-margin-top: 110px;
}

.category-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px;
}

.category-section-heading h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.category-section-heading i {
  color: var(--color-primary);
  font-size: 14px;
}

.category-section-heading span {
  flex: 0 0 auto;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.product-card {
  height: 196px;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 14px);
  background: var(--color-surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.product-photo {
  width: 196px;
  height: 196px;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
}

.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-photo img {
  transform: scale(1.06);
}

.product-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
}

.product-copy h3 {
  margin: 6px 0 6px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.product-copy h3 a {
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.product-copy h3 a:hover {
  color: var(--color-primary);
}

.product-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.product-action, .total-line, .row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price {
  display: grid;
  line-height: 1.2;
}

.price small {
  color: #94a3b8;
  font-size: 11px;
  text-decoration: line-through;
}

.price strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.icon-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: var(--color-button);
  color: var(--color-button-text);
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.icon-btn:active {
  transform: scale(0.94);
  box-shadow: 0 2px 5px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

/* Out of Stock (Stok Habis / Tidak Tersedia) Visuals */
.product-card.is-out-of-stock {
  opacity: 0.88;
  background: color-mix(in srgb, var(--color-surface) 96%, #64748b 4%);
}

.product-card.is-out-of-stock:hover {
  transform: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border-color: var(--color-border);
}

.product-card.is-out-of-stock .product-photo img,
.detail-photo.is-out-of-stock img {
  filter: grayscale(100%) contrast(90%) brightness(88%);
  opacity: 0.65;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

.product-card.is-out-of-stock:hover .product-photo img {
  transform: none;
}

.product-card.is-out-of-stock .product-photo span {
  filter: grayscale(100%);
  opacity: 0.55;
}

.stock-unavailable-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: inherit;
  z-index: 3;
  pointer-events: none;
}

.stock-unavailable-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(220, 38, 38, 0.94);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.22);
  text-align: center;
  line-height: 1.25;
  max-width: 92%;
}

@media (max-width: 480px) {
  .stock-unavailable-overlay span {
    font-size: 9.5px;
    padding: 3px 8px;
    gap: 3px;
  }
}

.soldout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, #ef4444 12%, var(--color-surface, #ffffff));
  color: #dc2626;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid color-mix(in srgb, #ef4444 26%, transparent);
}

.detail-body > p.soldout {
  margin: 18px 0;
  font-size: 13px;
  padding: 8px 16px;
  display: inline-flex;
}

.dark .soldout,
body.front.dark .soldout {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.dark .product-card.is-out-of-stock,
body.front.dark .product-card.is-out-of-stock {
  background: color-mix(in srgb, var(--color-surface) 90%, #000);
}

/* Floating Capsule Sticky Cart Bar (Dynamic theme from admin/settings/theme) */
.sticky-cart {
  width: min(calc(100% - 32px), 520px);
  min-height: 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  position: fixed;
  z-index: 45;
  bottom: 22px;
  left: 50%;
  padding: 8px 20px 8px 10px;
  transform: translateX(-50%);
  border-radius: 9999px;
  background: var(--color-sticky-cart-bg, #111827);
  background: color-mix(in srgb, var(--color-sticky-cart-bg, #111827) var(--sticky-cart-glass-opacity, 75%), transparent);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border: 1px solid color-mix(in srgb, var(--color-sticky-cart-text, #ffffff) 18%, transparent);
  color: var(--color-sticky-cart-text, #ffffff);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 1px color-mix(in srgb, var(--color-sticky-cart-text, #ffffff) 20%, transparent);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, background 0.25s ease;
}

.sticky-cart:hover {
  transform: translateX(-50%) translateY(-2px);
  background: color-mix(in srgb, var(--color-sticky-cart-bg, #111827) calc(var(--sticky-cart-glass-opacity, 75%) + 8%), transparent);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.36), 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 1px 1px color-mix(in srgb, var(--color-sticky-cart-text, #ffffff) 28%, transparent);
  border-color: color-mix(in srgb, var(--color-sticky-cart-text, #ffffff) 28%, transparent);
  color: var(--color-sticky-cart-text, #ffffff);
}

.sticky-cart:active {
  transform: translateX(-50%) translateY(0) scale(0.985);
}

/* Left: Circular Badge */
.sticky-cart .cart-badge-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-sticky-cart-badge-bg, #cf323a);
  color: var(--color-sticky-cart-badge-text, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--color-sticky-cart-badge-bg, #cf323a) 45%, transparent);
  flex-shrink: 0;
}

.sticky-cart .cart-count {
  line-height: 1;
  color: var(--color-sticky-cart-badge-text, #ffffff);
}

/* Center: Two-line Title & Subtitle */
.sticky-cart .cart-center-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}

.sticky-cart .cart-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-sticky-cart-text, #ffffff);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sticky-cart .cart-desc {
  font-size: 12px;
  font-weight: 400;
  color: color-mix(in srgb, var(--color-sticky-cart-text, #ffffff) 68%, transparent);
  line-height: 1.2;
  margin-top: 1px;
}

/* Right: Subtotal & Upward Arrow Indicator */
.sticky-cart .cart-price-action {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.sticky-cart .cart-subtotal {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-sticky-cart-text, #ffffff);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.sticky-cart .cart-arrow-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-sticky-cart-text, #ffffff) 14%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--color-sticky-cart-text, #ffffff);
  transition: all 0.2s ease;
}

.sticky-cart:hover .cart-arrow-icon {
  background: color-mix(in srgb, var(--color-sticky-cart-text, #ffffff) 24%, transparent);
  transform: translateY(-2px);
  color: var(--color-sticky-cart-text, #ffffff);
}

@media (max-width: 480px) {
  .sticky-cart {
    width: calc(100% - 24px);
    bottom: 16px;
    padding: 6px 14px 6px 7px;
    gap: 10px;
    min-height: 52px;
  }
  .sticky-cart .cart-badge-circle {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .sticky-cart .cart-title {
    font-size: 13.5px;
  }
  .sticky-cart .cart-desc {
    font-size: 10.5px;
  }
  .sticky-cart .cart-subtotal {
    font-size: 13.5px;
  }
  .sticky-cart .cart-arrow-icon {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
}

/* Slide-over Cart Drawer */
body.drawer-open { overflow: hidden; }
.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 15, 18, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .3s ease;
}

.cart-backdrop.is-open { opacity: 1; }

.cart-drawer {
  width: min(460px, 100vw);
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  border-radius: 20px 0 0 20px;
  background: var(--color-surface);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.2);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear .32s;
}

.cart-drawer.is-open { transform: translateX(0); visibility: visible; transition-delay: 0s; }

.cart-drawer-head {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
}

.cart-drawer-head span {
  display: block;
  margin-bottom: 2px;
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cart-drawer-head h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
}

.drawer-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-border) 60%, transparent);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-close:hover {
  transform: rotate(90deg);
  background: var(--color-primary);
  color: #ffffff;
}
.cart-drawer-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.drawer-items { display: grid; }
.drawer-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 13px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.drawer-item.is-removing {
  opacity: 0 !important;
  transform: translateX(-24px) scale(0.95) !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-width: 0 !important;
}
.drawer-item.is-updating {
  opacity: 0.6;
}
.drawer-item-photo { width: 82px; height: 82px; position: relative; border-radius: 6px; background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface)); border: 1px solid var(--color-border); }
.drawer-item-photo > img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.drawer-item-photo > i { width: 100%; height: 100%; display: grid; place-items: center; color: var(--color-muted); }
.drawer-item-photo form { position: absolute; top: -7px; left: -7px; }
.drawer-item-photo button {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--color-surface);
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.drawer-item-photo button:hover {
  transform: scale(1.15);
  background: #b91c1c;
}
.drawer-item-photo button:active {
  transform: scale(0.9);
}
.drawer-item-info { min-width: 0; }
.drawer-item-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.drawer-item-top h3 { margin: 0; font-family: var(--font-body); font-size: 14px; line-height: 1.35; }
.drawer-item-top strong { white-space: nowrap; font-size: 13px; }
.drawer-item-info > p { margin: 3px 0 0; color: var(--color-muted); font-size: 10px; line-height: 1.35; }
.drawer-quantity { width: 99px; height: 30px; display: grid; grid-template-columns: 30px 37px 30px; margin-top: 10px; border: 1px solid var(--color-border); border-radius: 4px; overflow: hidden; background: var(--color-surface); }
.drawer-quantity button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--color-border) 40%, var(--color-surface));
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.12s ease, transform 0.1s ease;
}
.drawer-quantity button:hover {
  background: color-mix(in srgb, var(--color-primary) 15%, transparent);
}
.drawer-quantity button:active {
  transform: scale(0.9);
  background: color-mix(in srgb, var(--color-primary) 25%, transparent);
}
.drawer-quantity input { height: 28px; padding: 0; border: 0; border-right: 1px solid var(--color-border); border-left: 1px solid var(--color-border); border-radius: 0; text-align: center; appearance: textfield; font-size: 12px; background: var(--color-surface); color: var(--color-text); }
.drawer-quantity input::-webkit-inner-spin-button { display: none; }
.drawer-empty { min-height: 55vh; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; color: var(--color-muted); }
.drawer-empty > i { font-size: 28px; }
.drawer-empty h3 { margin: 12px 0 3px; color: var(--color-text); font-size: 16px; }
.drawer-empty p { max-width: 260px; margin-bottom: 15px; font-size: 12px; }
.drawer-empty button, .continue-shopping { border: 0; background: transparent; color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cart-drawer-footer { padding: 17px 20px calc(17px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--color-border); background: var(--color-surface); }
.cart-drawer-footer > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.cart-drawer-footer > div span { font-size: 13px; font-weight: 700; }
.cart-drawer-footer > div small { display: block; font-size: 10px; font-weight: 400; }
.cart-drawer-footer > div strong { font-size: 17px; }
.continue-shopping { width: 100%; margin-top: 10px; font-size: 12px; }

.front-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 48px; padding: 26px 0; border-top: 1px solid var(--color-border); color: var(--color-muted); }
.front-footer strong { color: var(--color-text); font-family: var(--font-heading); }
.front-footer p { margin: 3px 0 0; font-size: 12px; }
.front-footer a { color: var(--color-text); }
.footer-identity { display: grid; justify-items: start; }
.social-links { display: flex; align-items: center; gap: 7px; margin-top: 12px; }
.social-links a { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-surface); text-decoration: none; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.social-links a:hover { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }

.flash-stack {
  width: min(calc(100% - 32px), 380px);
  display: grid;
  gap: 8px;
  position: fixed;
  z-index: 80;
  top: 88px;
  right: 24px;
  pointer-events: none;
}

.flash {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  font-size: 12px;
  font-weight: 600;
  animation: toast-in .25s ease-out both;
  pointer-events: auto;
}

.flash.ok { border-color: #86efac; background: #f0fdf4; color: #166534; }
.flash.err { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.flash > i { flex: 0 0 auto; font-size: 14px; }
.flash span { flex: 1; min-width: 0; }
.flash button {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  opacity: .72;
}
.flash button:hover { background: rgba(15, 23, 42, 0.08); opacity: 1; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.empty { padding: 60px 20px; border: 1px dashed var(--color-border); text-align: center; color: var(--color-muted); }
.empty > i { font-size: 24px; }
.empty h2 { margin: 10px 0 4px; color: var(--color-text); font-size: 22px; }
.empty p { margin-bottom: 12px; }

/* Product detail and checkout */
.backlink { display: inline-flex; align-items: center; gap: 8px; margin: 24px 0 18px; color: var(--color-muted); text-decoration: none; font-size: 13px; }
.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 38px; align-items: start; padding-bottom: 90px; }
.detail-photo { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius); background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface)); border: 1px solid var(--color-border); position: relative; }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { padding: 18px 0; }
.detail-body h1 { margin: 8px 0; font-size: 38px; line-height: 1.15; }
.detail-body > p { color: var(--color-muted); }
.detail-body > strong { font-size: 20px; }
.page-heading { margin-bottom: 22px; }
.page-heading > p { margin-bottom: 2px; color: var(--color-primary); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.page-heading h1 { margin-bottom: 3px; font-size: 34px; line-height: 1.2; }
.page-heading > span { color: var(--color-muted); font-size: 13px; }
.order-form { margin-top: 25px; }
.order-form fieldset { margin: 0 0 14px; padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.order-form legend { padding: 0 7px; font-size: 13px; font-weight: 700; }
.choice { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.choice input { accent-color: var(--color-primary); }
label { display: grid; gap: 6px; margin-bottom: 13px; color: var(--color-text); font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 6px; outline: 0; background: #fff; color: var(--color-text); font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 10%, transparent); }
.choice input { width: auto; }
.quantity-control { width: 142px; height: 42px; display: grid; grid-template-columns: 40px 1fr 40px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; }
.quantity-control button { border: 0; background: transparent; cursor: pointer; }
.quantity-control input { height: 40px; padding: 0; border: 0; border-radius: 0; text-align: center; appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button { display: none; }
.primary-btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 17px; border: 0; border-radius: var(--radius); background: var(--color-button); color: var(--color-button-text); text-decoration: none; font-weight: 700; cursor: pointer; }
.primary-btn:hover { background: var(--color-primary); }
.block { width: 100%; }
.note, small { color: var(--color-muted); }
.panel { padding: 22px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.checkout-grid .panel:last-child { position: sticky; top: 20px; }
.checkout-grid .panel > p { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); font-size: 13px; }
.total-line { margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--color-border); font-size: 15px; }

/* Cart */
.cart-list { display: grid; gap: 10px; margin-top: 18px; }
.cart-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 18px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.cart-row h2 { margin-bottom: 5px; font-family: var(--font-body); font-size: 16px; }
.cart-row p { margin: 2px 0; color: var(--color-muted); font-size: 12px; }
.cart-row form { display: flex; align-items: center; gap: 6px; }
.cart-row input[type="number"] { width: 64px; }
.cart-row button { padding: 9px 10px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; cursor: pointer; }
.cart-row .remove-btn { width: 38px; height: 38px; display: grid; place-items: center; color: #dc2626; }

/* Admin */
.admin-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #f8fafc; }
.admin-sidebar { min-height: 100vh; position: sticky; top: 0; padding: 18px; background: #111827; color: #fff; }
.admin-brand { display: block; margin-bottom: 20px; font-weight: 700; text-decoration: none; }
.admin-sidebar nav { display: grid; gap: 4px; }
.admin-sidebar nav a { padding: 9px 10px; border-radius: 6px; color: #f2eee9; text-decoration: none; }
.admin-sidebar nav a:hover { background: #1f2937; }
.admin-main { min-width: 0; padding: 26px; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-grid, .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 15px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.stat span { display: block; color: #766d66; font-size: 13px; }
.stat strong { font-size: 24px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: 10px; border-bottom: 1px solid #ece5dd; text-align: left; }
.toolbar { display: flex; gap: 8px; margin: 12px 0; }
.row-link { padding: 10px 0; border-bottom: 1px solid var(--color-border); text-decoration: none; }
.login-body { min-height: 100vh; display: grid; place-items: center; background: #f8fafc; }
.login-card { width: min(420px, 92vw); padding: 24px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.narrow { max-width: 620px; }
.product-form { display: grid; gap: 0; padding: 0; overflow: hidden; }
.form-section { padding: 24px; border-bottom: 1px solid var(--color-border); }
.form-section-title { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; margin-bottom: 20px; }
.form-section-title > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #ffedd5; color: var(--color-primary); font-size: 10px; font-weight: 700; }
.form-section-title h2 { margin: 0 0 2px; font-family: var(--font-body); font-size: 16px; }
.form-section-title p { margin: 0; color: var(--color-muted); font-size: 12px; }
.span-2 { grid-column: 1 / -1; }
.secondary-btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; color: var(--color-text); font-weight: 600; cursor: pointer; }
.addon-editor { display: grid; gap: 8px; margin-left: 42px; }
.addon-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(140px, .45fr) 40px; gap: 9px; align-items: end; padding: 12px; border: 1px solid var(--color-border); border-radius: 6px; background: #f8fafc; }
.addon-row label { margin: 0; }
.addon-remove { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid #fecaca; border-radius: 6px; background: #fff; color: #dc2626; cursor: pointer; }
.product-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-top: 24px; }
.product-toggles label { margin: 0; }
.form-actions { display: flex; justify-content: flex-end; padding: 18px 24px; background: #f8fafc; }
.delete-form { margin-top: 14px; }
.delete-form button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #dc2626; cursor: pointer; }

@media (max-width: 900px) {
  .product-card { height: 150px; grid-template-columns: 150px minmax(0, 1fr); }
  .product-photo { width: 150px; height: 150px; }
  .detail, .checkout-grid { grid-template-columns: 1fr; }
  .checkout-grid .panel:last-child { position: static; }
}

@media (max-width: 700px) {
  .menu-shell { padding: 0 14px 96px; }
  .flash-stack { width: min(calc(100% - 28px), 360px); top: 72px; right: 14px; }
  .global-header { height: 64px; border-radius: 0 0 12px 12px; }
  .header-brand { gap: 10px; }
  .header-monogram { width: 34px; height: 34px; font-size: 10px; }
  .header-wordmark strong { max-width: 245px; font-size: 12px; }
  .header-wordmark small { font-size: 6px; }
  .menu-tools { margin-left: -14px; margin-right: -14px; padding: 12px 14px 8px; }
  .section-heading { padding-top: 20px; }
  .section-heading h2 { font-size: 23px; }
  .product-grid { grid-template-columns: 1fr; gap: 12px; }
  .category-menu-sections { gap: 24px; }
  .category-menu-section { gap: 10px; scroll-margin-top: 90px; }
  .category-section-heading h3 { font-size: 15px; }
  .category-section-heading span { font-size: 11px; }
  .product-card { min-height: 110px; height: auto; grid-template-columns: 120px minmax(0, 1fr); }
  .product-photo { width: 120px; height: 100%; min-height: 110px; }
  .product-info { gap: 8px; padding: 12px; }
  .product-copy h3 { margin: 2px 0 3px; font-size: 14px; line-height: 1.3; }
  .product-copy p { font-size: 11px; -webkit-line-clamp: 2; }
  .badge { padding: 2px 5px; font-size: 8px; }
  .icon-btn { width: 32px; height: 32px; flex-basis: 32px; }
  .front-footer { align-items: center; flex-direction: column; text-align: center; gap: 16px; }
  .footer-identity { justify-items: center; text-align: center; width: 100%; }
  .social-links { justify-content: center; width: 100%; }
  .detail-body { padding-top: 2px; }
  .detail-body h1 { font-size: 30px; }
  .panel { padding: 16px; }
  .cart-row { grid-template-columns: 1fr; }
  .cart-drawer { width: 100vw; }
  .cart-drawer-head { min-height: 68px; padding: 13px 16px; }
  .drawer-item { padding: 14px 16px; }
  .cart-drawer-footer { padding-right: 16px; padding-left: 16px; }
  .admin-body, .admin-grid, .form-grid { grid-template-columns: 1fr; }
  .admin-sidebar { min-height: auto; position: relative; }
  .admin-main { padding: 16px; }
  .toolbar { display: grid; }
  .form-section { padding: 18px 14px; }
  .form-section-title { grid-template-columns: 30px minmax(0, 1fr); }
  .form-section-title .secondary-btn { grid-column: 1 / -1; margin-left: 42px; }
  .addon-editor { margin-left: 0; }
  .addon-row { grid-template-columns: minmax(0, 1fr) 40px; }
  .addon-row label:nth-child(2) { grid-column: 1; }
  .addon-remove { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .span-2 { grid-column: auto; }
  .product-grid.list .product-card {
    min-height: 98px;
    grid-template-columns: 98px minmax(0, 1fr);
  }
  .product-grid.list .product-photo {
    width: 98px;
    height: 98px;
  }
  .product-grid.list .product-info {
    min-height: 98px;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 11px 12px;
  }
  .product-grid.list .product-copy h3 {
    margin: 2px 0 3px;
    font-size: 14px;
  }
  .product-grid.list .product-copy p {
    font-size: 11px;
    -webkit-line-clamp: 1;
  }
  .product-grid.list .product-action {
    min-width: 0;
    justify-content: space-between;
    gap: 10px;
  }
  .product-grid.list .price {
    justify-items: start;
    text-align: left;
  }
  .product-grid.list .price strong {
    font-size: 13px;
  }
  .product-grid.list .icon-btn {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 9px;
  }
}

@media (max-width: 390px) {
  .product-card { height: 112px; grid-template-columns: 112px minmax(0, 1fr); }
  .product-photo { width: 112px; height: 112px; }
  .product-info { padding: 11px; }
  .product-copy p { -webkit-line-clamp: 1; }
  .product-grid.list .product-card {
    grid-template-columns: 90px minmax(0, 1fr);
  }
  .product-grid.list .product-photo {
    width: 90px;
    height: 100%;
    min-height: 98px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Product View Layout Variants (Synced with Theme Settings) */
.product-grid.list {
  grid-template-columns: 1fr;
  gap: 12px;
}

.product-grid.list .product-card {
  min-height: 112px;
  height: auto;
  grid-template-columns: 112px minmax(0, 1fr);
  overflow: hidden;
  border-color: var(--color-border);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.product-grid.list .product-photo {
  width: 112px;
  height: 112px;
  border-radius: 14px 0 0 14px;
}

.product-grid.list .product-info {
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 16px 16px 18px;
}

.product-grid.list .product-copy {
  min-width: 0;
}

.product-grid.list .product-copy h3 {
  margin: 4px 0 5px;
  font-size: 16px;
  line-height: 1.25;
}

.product-grid.list .product-copy p {
  max-width: 680px;
  font-size: 13px;
  -webkit-line-clamp: 2;
}

.product-grid.list .badge {
  padding: 3px 8px;
  font-size: 9px;
}

.product-grid.list .product-action {
  min-width: 132px;
  justify-content: flex-end;
  gap: 14px;
  align-self: center;
}

.product-grid.list .price {
  justify-items: end;
  text-align: right;
}

.product-grid.list .price strong {
  font-size: 16px;
}

.product-grid.list .icon-btn {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 12px;
}

.product-grid.list .soldout {
  white-space: nowrap;
}

.product-grid.detailed {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-grid.detailed .product-card {
  height: auto;
  grid-template-columns: 1fr;
  display: flex;
  flex-direction: column;
}

.product-grid.detailed .product-photo {
  width: 100%;
  height: 200px;
}

@media (max-width: 700px) {
  .product-grid.list .product-card {
    min-height: 98px;
    grid-template-columns: 98px minmax(0, 1fr);
  }

  .product-grid.list .product-photo {
    width: 98px;
    height: 100%;
    min-height: 98px;
  }

  .product-grid.list .product-info {
    min-height: 98px;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 11px 12px;
  }

  .product-grid.list .product-copy h3 {
    margin: 2px 0 3px;
    font-size: 14px;
  }

  .product-grid.list .product-copy p {
    font-size: 11px;
    -webkit-line-clamp: 1;
  }

  .product-grid.list .product-action {
    min-width: 0;
    justify-content: space-between;
    gap: 10px;
  }

  .product-grid.list .price {
    justify-items: start;
    text-align: left;
  }

  .product-grid.list .price strong {
    font-size: 13px;
  }

  .product-grid.list .icon-btn {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 9px;
  }
}

@media (max-width: 390px) {
  .product-grid.list .product-card {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .product-grid.list .product-photo {
    width: 90px;
  }
}

/* Dark Mode Overrides (Synced with Theme Settings) */
html.dark,
body.front.dark,
body.front[data-theme="dark"] {
  --color-primary: #f97316 !important;
  --color-accent: #fbbf24 !important;
  --color-bg: #0a0e17 !important;
  --color-surface: #141c2b !important;
  --color-header-bg: #0f1420 !important;
  --color-header-text: #f1f5f9 !important;
  --color-sticky-cart-bg: #141c2b !important;
  --color-sticky-cart-text: #f1f5f9 !important;
  --color-sticky-cart-badge-bg: #e11d48 !important;
  --color-sticky-cart-badge-text: #ffffff !important;
  --color-chip-active-bg: #f97316 !important;
  --color-chip-active-text: #ffffff !important;
  --color-text: #f1f5f9 !important;
  --color-muted: #94a3b8 !important;
  --color-border: #1e293b !important;
  --color-button: #ea580c !important;
  --color-button-text: #ffffff !important;
  background-color: #0a0e17 !important;
  color: #f1f5f9 !important;
}

@media (prefers-color-scheme: dark) {
  html.auto,
  body.front.auto,
  body.front[data-theme="auto"] {
    --color-primary: #f97316 !important;
    --color-accent: #fbbf24 !important;
    --color-bg: #0a0e17 !important;
    --color-surface: #141c2b !important;
    --color-header-bg: #0f1420 !important;
    --color-header-text: #f1f5f9 !important;
    --color-sticky-cart-bg: #141c2b !important;
    --color-sticky-cart-text: #f1f5f9 !important;
    --color-sticky-cart-badge-bg: #e11d48 !important;
    --color-sticky-cart-badge-text: #ffffff !important;
    --color-chip-active-bg: #f97316 !important;
    --color-chip-active-text: #ffffff !important;
    --color-text: #f1f5f9 !important;
    --color-muted: #94a3b8 !important;
    --color-border: #1e293b !important;
    --color-button: #ea580c !important;
    --color-button-text: #ffffff !important;
    background-color: #0a0e17 !important;
    color: #f1f5f9 !important;
  }
}

.dark .global-header,
body.front.dark .global-header {
  background: #0f1420 !important;
  border-bottom: 1px solid #1e293b;
}

.dark .menu-tools,
body.front.dark .menu-tools,
body.front[data-theme="dark"] .menu-tools {
  background: color-mix(in srgb, var(--color-bg, #0a0e17) 92%, transparent) !important;
  border-bottom-color: transparent !important;
}

.dark .menu-tools.is-stuck,
body.front.dark .menu-tools.is-stuck,
body.front[data-theme="dark"] .menu-tools.is-stuck {
  border-bottom-color: var(--color-border, #1e293b) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
}

.dark .searchbar,
body.front.dark .searchbar {
  background: #141c2b !important;
  border-color: #1e293b !important;
}

.dark .searchbar input,
body.front.dark .searchbar input {
  color: #f8fafc !important;
}

.dark .searchbar input::placeholder,
body.front.dark .searchbar input::placeholder {
  color: #64748b !important;
}

.dark .chips a,
body.front.dark .chips a {
  background: #141c2b !important;
  border-color: #1e293b !important;
  color: #94a3b8 !important;
}

.dark .chips a.active,
.dark .chips .active,
body.front.dark .chips a.active,
body.front.dark .chips .active {
  background: var(--color-chip-active-bg, #f97316) !important;
  color: var(--color-chip-active-text, #ffffff) !important;
  border-color: var(--color-chip-active-bg, #f97316) !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--color-chip-active-bg, #f97316) 30%, transparent) !important;
}

.dark .product-card,
body.front.dark .product-card {
  background: #141c2b !important;
  border-color: #1e293b !important;
}

.dark .product-photo,
body.front.dark .product-photo {
  background: #182234 !important;
}

.dark .product-photo img[src*="default-product"],
body.front.dark .product-photo img[src*="default-product"],
body.front[data-theme="dark"] .product-photo img[src*="default-product"] {
  filter: brightness(1.7) contrast(1.1);
  opacity: 0.75;
}

.dark .cart-drawer,
body.front.dark .cart-drawer {
  background: #141c2b !important;
  color: #f8fafc !important;
}

.dark .cart-drawer-footer,
body.front.dark .cart-drawer-footer {
  background: #0f1420 !important;
  border-top-color: #1e293b !important;
}

.dark .flash.ok,
body.front.dark .flash.ok {
  border-color: #15803d !important;
  background: #052e16 !important;
  color: #86efac !important;
}

.dark .flash.err,
body.front.dark .flash.err {
  border-color: #991b1b !important;
  background: #450a0a !important;
  color: #fca5a5 !important;
}

.dark .drawer-close,
body.front.dark .drawer-close {
  background: #334155 !important;
  color: #f8fafc !important;
}

/* Quick Add Form */
.quick-add-form {
  margin: 0;
  padding: 0;
  display: inline-flex;
}

.icon-btn {
  border: none;
  cursor: pointer;
}

.icon-btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

.icon-btn.is-loading i {
  display: inline-block;
  animation: iconSpin 0.7s linear infinite;
}

@keyframes iconSpin {
  100% { transform: rotate(360deg); }
}

@keyframes cartBump {
  0% { transform: translateX(-50%) scale(1); }
  40% { transform: translateX(-50%) scale(1.08); }
  100% { transform: translateX(-50%) scale(1); }
}

.sticky-cart.cart-bump {
  animation: cartBump 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   Popup Add-on Modal (Mobile Bottom-Sheet & Desktop Centered)
   ============================================================ */
.addon-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0.25s ease, opacity 0.25s ease;
}

.addon-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.addon-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.addon-modal-sheet {
  position: relative;
  z-index: 2;
  width: min(92vw, 520px);
  max-height: 88vh;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.addon-modal.is-open .addon-modal-sheet {
  transform: translateY(0) scale(1);
}

.addon-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
  color: var(--color-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.addon-modal-close:hover {
  background: color-mix(in srgb, var(--color-text) 16%, transparent);
  transform: scale(1.08);
}

#addon-modal-content-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 88vh;
  overflow: hidden;
}

.addon-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 88vh;
  overflow: hidden;
}

.addon-modal-header {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 20px 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.addon-modal-thumb {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff7ed;
  flex-shrink: 0;
}

.addon-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.addon-modal-thumb .no-img {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--color-muted);
  font-size: 28px;
}

.addon-modal-meta {
  min-width: 0;
  padding-right: 32px;
}

.addon-modal-meta h3 {
  margin: 4px 0 3px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.addon-modal-desc {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.addon-modal-base-price {
  font-size: 13px;
  color: var(--color-muted);
}

.addon-modal-base-price strong {
  font-size: 15px;
  color: var(--color-primary);
  font-weight: 800;
  margin-left: 4px;
}

.addon-modal-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin: 0;
}

.addon-modal-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  overscroll-behavior: contain;
}

.addon-group-fieldset {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-bg) 65%, var(--color-surface));
}

.addon-group-legend {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.group-hint {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-muted);
  margin-top: 1px;
}

.badge-req {
  font-size: 10px;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge-opt {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-muted);
  background: color-mix(in srgb, var(--color-border) 60%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
}

.addon-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.addon-option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 0;
}

.addon-option-item:hover {
  border-color: color-mix(in srgb, var(--color-primary) 50%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 4%, var(--color-surface));
}

.addon-option-item:has(input:checked) {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 7%, var(--color-surface));
  box-shadow: 0 0 0 1px var(--color-primary);
}

.addon-option-item input[type="radio"],
.addon-option-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.addon-option-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.addon-opt-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.addon-opt-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.addon-opt-price.free {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 500;
}

.addon-note-field {
  margin-top: 10px;
}

.addon-note-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.addon-note-field textarea {
  width: 100%;
  border-radius: 10px;
  font-size: 13px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 56px;
}

.addon-modal-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.addon-qty-stepper {
  width: 116px;
  height: 44px;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-surface);
}

.addon-qty-stepper button {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--color-text);
  font-size: 14px;
  transition: background 0.15s;
}

.addon-qty-stepper button:hover {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.addon-qty-stepper input {
  height: 42px;
  border: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  padding: 0;
  appearance: textfield;
  -webkit-appearance: none;
}

.addon-submit-action {
  min-height: 44px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--color-button);
  color: var(--color-button-text);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.addon-submit-action:hover {
  background: var(--color-primary);
  transform: translateY(-1px);
}

.addon-submit-action strong {
  font-size: 14px;
  font-weight: 800;
}

/* Mobile Bottom-Sheet Behavior */
@media (max-width: 640px) {
  .addon-modal {
    align-items: flex-end;
  }
  .addon-modal-sheet {
    width: 100%;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .addon-modal.is-open .addon-modal-sheet {
    transform: translateY(0);
  }
  #addon-modal-content-container,
  .addon-modal-content {
    max-height: 85vh;
  }
}

/* Dark Mode support for modal */
.dark .addon-modal-sheet,
body.front.dark .addon-modal-sheet {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

.dark .addon-modal-header,
body.front.dark .addon-modal-header,
.dark .addon-modal-footer,
body.front.dark .addon-modal-footer {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.dark .addon-modal-close,
body.front.dark .addon-modal-close {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

.dark .addon-group-fieldset,
body.front.dark .addon-group-fieldset {
  background: #0f172a !important;
  border-color: #334155 !important;
}

.dark .addon-option-item,
body.front.dark .addon-option-item {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.dark .addon-option-item:hover,
body.front.dark .addon-option-item:hover {
  border-color: #fb923c !important;
}

.dark .addon-qty-stepper,
body.front.dark .addon-qty-stepper {
  background: #0f172a !important;
  border-color: #334155 !important;
}

.dark .addon-qty-stepper input,
body.front.dark .addon-qty-stepper input {
  background: transparent !important;
  color: #f8fafc !important;
}

.dark .addon-note-field textarea,
body.front.dark .addon-note-field textarea {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   Comprehensive Dark Mode Palette & Contrast Overrides
   ========================================================================== */

/* 1. Universal Form Elements (Inputs, Selects, Textareas, Options) */
.dark input:not(.searchbar input):not(.quantity-control input):not(.addon-qty-stepper input):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.dark select,
.dark textarea,
body.front.dark input:not(.searchbar input):not(.quantity-control input):not(.addon-qty-stepper input):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.front.dark select,
body.front.dark textarea {
  background: #0f1420 !important;
  border-color: var(--color-border, #1e293b) !important;
  color: var(--color-text, #f1f5f9) !important;
}

.dark input::placeholder,
.dark textarea::placeholder,
body.front.dark input::placeholder,
body.front.dark textarea::placeholder {
  color: #64748b !important;
}

.dark select option,
body.front.dark select option {
  background: #141c2b !important;
  color: #f1f5f9 !important;
}

.dark input:focus,
.dark select:focus,
.dark textarea:focus,
body.front.dark input:focus,
body.front.dark select:focus,
body.front.dark textarea:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent) !important;
}

/* 2. Panels and Containers */
.dark .panel,
body.front.dark .panel {
  background: var(--color-surface, #141c2b) !important;
  border-color: var(--color-border, #1e293b) !important;
}

/* 3. Checkout Page Summary Items */
.checkout-summary-item {
  background: #f8fafc;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  padding: 12px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dark .checkout-summary-item,
body.front.dark .checkout-summary-item {
  background: #0f1420 !important;
  border-color: var(--color-border, #1e293b) !important;
}

/* 4. Cart Page (/cart) Rows, Inputs, and Action Buttons */
.dark .cart-row,
body.front.dark .cart-row {
  background: var(--color-surface, #141c2b) !important;
  border-color: var(--color-border, #1e293b) !important;
}

.dark .cart-row input[type="number"],
body.front.dark .cart-row input[type="number"] {
  background: #0f1420 !important;
  border-color: var(--color-border, #1e293b) !important;
  color: var(--color-text, #f1f5f9) !important;
}

.dark .cart-row button,
body.front.dark .cart-row button {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
  transition: all 0.15s ease;
}

.dark .cart-row button:hover,
body.front.dark .cart-row button:hover {
  background: #334155 !important;
  border-color: var(--color-primary) !important;
  color: #ffffff !important;
}

.dark .cart-row .remove-btn,
body.front.dark .cart-row .remove-btn {
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
  color: #f87171 !important;
}

.dark .cart-row .remove-btn:hover,
body.front.dark .cart-row .remove-btn:hover {
  background: rgba(220, 38, 38, 0.3) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

/* 5. Cart Drawer Dark Mode Polish */
.dark .cart-drawer,
body.front.dark .cart-drawer {
  background: var(--color-surface, #141c2b) !important;
}

.dark .drawer-item-photo,
body.front.dark .drawer-item-photo {
  background: #0f1420 !important;
  border-color: var(--color-border, #1e293b) !important;
}

.dark .drawer-item-photo button,
body.front.dark .drawer-item-photo button {
  border-color: #141c2b !important;
}

.dark .drawer-quantity,
body.front.dark .drawer-quantity {
  background: #0f1420 !important;
  border-color: var(--color-border, #1e293b) !important;
}

.dark .drawer-quantity button,
body.front.dark .drawer-quantity button {
  background: #0f1420 !important;
  color: var(--color-text, #f1f5f9) !important;
}

.dark .drawer-quantity button:hover,
body.front.dark .drawer-quantity button:hover {
  background: #1e293b !important;
  color: var(--color-primary) !important;
}

.dark .drawer-quantity input,
body.front.dark .drawer-quantity input {
  background: #141c2b !important;
  border-color: var(--color-border, #1e293b) !important;
  color: var(--color-text, #f1f5f9) !important;
}

.dark .cart-drawer-footer,
body.front.dark .cart-drawer-footer {
  background: var(--color-surface, #141c2b) !important;
  border-top-color: var(--color-border, #1e293b) !important;
}

.dark .continue-shopping,
body.front.dark .continue-shopping {
  color: var(--color-muted, #94a3b8) !important;
}

.dark .continue-shopping:hover,
body.front.dark .continue-shopping:hover {
  color: var(--color-text, #f1f5f9) !important;
}

/* 6. Product Detail Page Stepper & Form */
.dark .quantity-control,
body.front.dark .quantity-control {
  background: #0f1420 !important;
  border-color: var(--color-border, #1e293b) !important;
}

.dark .quantity-control button,
body.front.dark .quantity-control button {
  color: var(--color-text, #f1f5f9) !important;
}

.dark .quantity-control button:hover,
body.front.dark .quantity-control button:hover {
  background: #1e293b !important;
  color: var(--color-primary) !important;
}

.dark .quantity-control input,
body.front.dark .quantity-control input {
  background: transparent !important;
  color: var(--color-text, #f1f5f9) !important;
}

.dark .order-form fieldset,
body.front.dark .order-form fieldset {
  background: rgba(20, 28, 43, 0.5) !important;
  border-color: var(--color-border, #1e293b) !important;
}

.dark .order-form legend,
body.front.dark .order-form legend {
  color: var(--color-text, #f1f5f9) !important;
}

/* 7. Product Photo Containers in Dark Mode */
.dark .product-photo,
body.front.dark .product-photo,
.dark .detail-photo,
body.front.dark .detail-photo {
  background: #0f1420 !important;
  border-color: var(--color-border, #1e293b) !important;
}

.dark .detail-photo img[src*="default-product.png"],
body.front.dark .detail-photo img[src*="default-product.png"],
.dark .product-photo img[src*="default-product.png"],
body.front.dark .product-photo img[src*="default-product.png"] {
  filter: brightness(1.7) contrast(1.1);
}

/* 8. Hide Sticky Cart on Checkout, Place, and Cart pages */
.no-sticky-cart .sticky-cart,
body.page-checkout .sticky-cart,
body.page-cart .sticky-cart,
body.page-checkout-place .sticky-cart,
body:has(.checkout-grid) .sticky-cart,
body:has(.cart-list) .sticky-cart,
body:has(.checkout-summary-item) .sticky-cart {
  display: none !important;
}
