/* ==========================================================
   JUICE LAB & BURGER DINO — TEMPLATE 3 STYLESHEET
   100% Faithful to Reference Image (iOS Modern App Flow)
   ========================================================== */

:root {
  /* Backgrounds — wired to the restaurant's canonical tenant variables */
  --bg-studio: var(--color-surface, #f0f2f5);
  --bg-screen: var(--color-bg, #ffffff);
  --bg-card: var(--color-card, #ffffff);
  --bg-light-gray: var(--color-surface, #f6f7f9);
  --bg-dark: #141416;

  /* Typography */
  --text-main: var(--color-text, #141416);
  --text-muted: var(--color-text-secondary, #777e90);
  --text-light: var(--color-text-secondary, #9ea3ae);

  /* Brand Accents */
  /* Typography bridge — admin fonts (tenant-theme) → t3 stacks */
  --font-heading: var(--font-family-heading, 'Plus Jakarta Sans'), sans-serif;
  --font-body: var(--font-family, 'Plus Jakarta Sans'), sans-serif;

  --coral: var(--color-primary, #ff5722);
  --coral-light: var(--color-primary-hover, #ff7043);
  --coral-grad: linear-gradient(135deg, var(--color-primary-hover, #ff7043) 0%, rgba(var(--color-primary-rgb, 234,96,69), 0.87) 100%);
  --coral-shadow: rgba(var(--color-primary-rgb, 234,96,69), 0.35);

  --gold-star: var(--color-secondary, #ffb703);
  --green-badge: #22c55e;

  /* Geometry & Curves */
  --phone-w: 390px;
  --phone-h: 844px;
  --phone-radius: 44px;
  --screen-radius: 38px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-view: 0.55s var(--ease-soft);

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Border-radius scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadow scale */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.09);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Typography scale */
  --fs-xs: 0.6875rem;
  --fs-sm: 0.75rem;
  --fs-base: 0.8125rem;
  --fs-md: 0.875rem;
  --fs-lg: 0.9375rem;
  --fs-xl: 1rem;
  --fs-2xl: 1.15rem;
  --fs-3xl: 1.35rem;
  --fs-4xl: 1.65rem;
}

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

html, body {
  height: 100%;
  font-family: var(--font-body, 'Plus Jakarta Sans'), -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-screen);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================
   APP STAGE & APP CONTAINER (Web + Mobile)
   ========================================================== */
.app-stage {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.phone-container {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  background: var(--bg-screen);
  border: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==========================================================
   VIEW SYSTEM (Smooth Slide Transitions)
   ========================================================== */
.view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-screen);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(50px) scale(0.97);
  transition:
    opacity var(--transition-view),
    transform var(--transition-view),
    visibility 0s linear 0.55s;
  z-index: 1;
}

.view.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  z-index: 10;
  transition-delay: 0s;
}

.view.leaving-left {
  transform: translateX(-50px) scale(0.97);
  opacity: 0;
  pointer-events: none;
}

/* Utility Circle Buttons */
.circle-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.circle-icon-btn:hover,
.circle-icon-btn:focus-visible {
  transform: scale(1.08);
  background: #fafafa;
  box-shadow: var(--shadow-md);
}

.circle-icon-btn:active {
  transform: scale(0.96);
}

.circle-icon-btn:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.circle-icon-btn.heart-btn {
  color: var(--color-favorites-active, #ff3b30);
}

/* ==========================================================
   VIEW 1: DISCOVERY & POPULAR ITEMS (HOME)
   ========================================================== */
.feed-header {
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  min-height: 56px;
}

/* Centered logo + brand name layout (production header) */
.feed-header .feed-logo-center {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  overflow: hidden;
}

.feed-header .feed-logo-center .feed-logo,
.feed-header .feed-logo-center .feed-logo-fallback {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  padding: var(--space-1);
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feed-header .feed-logo-center .feed-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: var(--fs-lg);
  background: var(--coral);
  padding: 0;
}

.feed-header .feed-logo-center .feed-brand-name {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
  letter-spacing: -0.01em;
}

.feed-header .feed-logo-center .feed-address-text {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.feed-header .feed-logo-center .header-social {
  display: flex;
  gap: var(--space-1);
  margin-left: auto;
  flex-shrink: 0;
}

.feed-header .feed-logo-center .header-social a {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.feed-header .feed-logo-center .header-social a:hover {
  color: var(--coral);
  background: rgba(var(--color-primary-rgb, 234,96,69), 0.08);
  transform: scale(1.05);
}

.feed-header .feed-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  padding: var(--space-1);
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feed-header .feed-logo-fallback {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-weight: 800;
  font-size: var(--fs-xl);
}

.feed-address-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feed-address-label {
  font-size: var(--fs-base);
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-address-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.feed-address-text {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.address-chevron {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.feed-map-card {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light-gray, #f4f5f8);
  color: var(--coral);
  font-size: var(--fs-lg);
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.feed-map-card:hover,
.feed-map-card:focus-visible {
  transform: scale(1.05);
  background: rgba(var(--color-primary-rgb, 234,96,69), 0.08);
}

.map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-no-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-pulse-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb, 234,96,69), 0.2);
}

.feed-header .header-social {
  display: flex;
  gap: var(--space-1);
}

.feed-header .header-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--fs-base);
  text-decoration: none;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.feed-header .header-social a:hover {
  color: var(--coral);
  background: rgba(var(--color-primary-rgb, 234,96,69), 0.08);
  transform: scale(1.05);
}

/* Search Bar */
.feed-search-wrap {
  padding: 0 var(--space-4) var(--space-3);
  flex-shrink: 0;
}

/* ===== Promo Banner ===== */
.t3-promo-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 18px 12px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--coral, #ea6045), var(--coral-dark, #d14e36));
  color: #fff;
  box-shadow: 0 8px 24px rgba(234, 96, 69, 0.25);
  flex-shrink: 0;
  overflow: hidden;
}
.t3-promo-img-wrap {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.15);
}
.t3-promo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t3-promo-content {
  flex: 1;
  min-width: 0;
}
.t3-promo-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t3-promo-desc {
  font-size: 13px;
  margin: 0 0 8px;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.t3-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: var(--coral, #ea6045);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s;
}
.t3-promo-btn:hover {
  transform: scale(1.05);
}
@media (max-width: 520px) {
  .t3-promo-banner { padding: 12px; gap: 10px; }
  .t3-promo-img-wrap { width: 52px; height: 52px; }
  .t3-promo-title { font-size: 15px; }
  .t3-promo-desc { font-size: 12px; }
}

.feed-search-box {
  background: var(--bg-light-gray, #f4f5f8);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.feed-search-box:focus-within {
  border-color: rgba(var(--color-primary-rgb, 234,96,69), 0.25);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 234,96,69), 0.08);
  background: #fff;
}

.search-icon {
  font-size: var(--fs-md);
  color: var(--text-light);
}

.search-input-field {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--text-main);
  width: 100%;
  min-height: 20px;
}

.search-input-field::placeholder {
  color: var(--text-light);
}

/* Categories Carousel */
.feed-categories-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.feed-categories-bar::-webkit-scrollbar { display: none; }

.cat-chip-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  width: 64px;
  padding: 2px 0;
}
.cat-chip-name {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.cat-chip-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-light-gray, #f7f8fa);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease-spring), border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.cat-chip-card:hover .cat-chip-circle,
.cat-chip-card:focus-visible .cat-chip-circle {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.cat-chip-card.active .cat-chip-circle {
  background: #ffffff;
  border-color: var(--color-category-active, var(--coral, #ea6045));
  box-shadow: 0 4px 14px rgba(var(--color-primary-rgb, 234,96,69), 0.22);
  transform: translateY(-2px);
}

.cat-chip-card.active .cat-chip-name {
  color: var(--color-category-active, var(--coral, var(--text-main)));
  font-weight: 800;
}

/* Popular Grid Scroll Body */
.feed-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--space-4);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.feed-scroll-body::-webkit-scrollbar { display: none; }

.feed-section-title {
  margin-bottom: var(--space-3);
}

.feed-section-title h3 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.popular-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.popular-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  animation: cardEnter 0.55s var(--ease-spring) forwards;
  opacity: 0;
  gap: var(--space-3);
}

.popular-card:hover,
.popular-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.popular-card:active {
  transform: translateY(-1px) scale(0.985);
}

.card-rating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  z-index: 2;
}

.star-icon {
  color: var(--gold-star);
  font-size: var(--fs-xs);
}

.card-img-wrap {
  flex: 0 0 38%;
  max-width: 140px;
  min-width: 90px;
  height: auto;
  min-height: 96px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.02));
}

.card-dish-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s var(--ease-spring);
}

.popular-card:hover .card-dish-img {
  transform: scale(1.05);
}

.card-title {
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.popular-card:hover .card-title {
  text-decoration-color: var(--coral, #ea6045);
}

.card-subtitle {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0;
}

.card-price-action {
  margin-top: auto;
  padding-top: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.price-stack {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.card-current-price {
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--text-main);
}

.card-old-price {
  font-size: var(--fs-xs);
  color: var(--text-light);
  text-decoration: line-through;
}

.card-add-pill {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.72);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: var(--fs-xs);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, border-color 0.2s;
  min-width: 40px;
  min-height: 40px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.card-add-pill:hover,
.card-add-pill:focus-visible {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.88);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
  box-shadow: 0 4px 14px var(--coral-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.card-add-pill:active {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.95);
  transform: scale(0.96);
}

.dock-spacer {
  height: 84px;
}

/* ==========================================================
   PRODUCT ATTRIBUTES (Feed Cards)
   ========================================================== */

/* Tags row on feed cards */
.card-tags-row {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  z-index: 2;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.card-tag i { font-size: var(--fs-xs); }

.card-tag.tag-popular  { background: rgba(var(--color-primary-rgb, 234,96,69), 0.12); color: var(--coral); }
.card-tag.tag-new      { background: rgba(34, 197, 94, 0.14); color: #1a9d52; }
.card-tag.tag-featured { background: rgba(255, 183, 3, 0.18); color: #a9741f; }
.card-tag.tag-veg      { background: rgba(67, 160, 71, 0.14); color: #2e8b46; }
.card-tag.tag-spicy    { background: rgba(229, 57, 53, 0.12); color: #c62828; }
.card-tag.tag-chef     { background: rgba(20, 20, 22, 0.08); color: var(--text-main); }

/* Meta row on feed cards (calories, time, veg) */
.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
}

.card-meta-item i {
  font-size: var(--fs-sm);
  color: var(--coral);
}

/* ==========================================================
   PRODUCT ATTRIBUTES (Detail View)
   ========================================================== */

.detail-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.detail-tag i { font-size: 0.64rem; }

.detail-tag.tag-popular  { background: rgba(255, 87, 34, 0.16); color: var(--coral); }
.detail-tag.tag-new      { background: rgba(34, 197, 94, 0.18); color: #1a9d52; }
.detail-tag.tag-featured { background: rgba(255, 183, 3, 0.2); color: #a9741f; }
.detail-tag.tag-veg      { background: rgba(67, 160, 71, 0.18); color: #2e8b46; }
.detail-tag.tag-spicy    { background: rgba(229, 57, 53, 0.16); color: #c62828; }
.detail-tag.tag-chef     { background: rgba(20, 20, 22, 0.12); color: var(--text-main); }

/* Meta pills on detail (calories, time, veg) */
.detail-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.detail-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f4f5f8;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-main);
}

.detail-meta-pill i {
  font-size: 0.7rem;
  color: var(--coral);
}

/* Allergens block on detail */
.detail-allergens-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding: 10px 12px;
  background: #fff8f0;
  border: 1px solid rgba(255, 183, 3, 0.25);
  border-radius: 14px;
}

.detail-allergens-label {
  font-size: 0.6rem;
  font-weight: 800;
  color: #a9741f;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.detail-allergens-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.detail-allergen-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  background: #ffffff;
  color: #8a6f3b;
  font-size: 0.6rem;
  font-weight: 700;
  border: 1px solid rgba(138, 111, 59, 0.2);
}

.detail-allergen-chip i { font-size: 0.64rem; }

/* Staggered card entrance animation */
@keyframes cardEnter {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* iOS Bottom Dock */
.ios-dock {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  height: 56px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 var(--space-3);
  gap: var(--space-1);
  z-index: 50;
}

.dock-item {
  color: var(--text-light);
  font-size: 1.1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.2s, background 0.2s;
  position: relative;
  flex-shrink: 0;
}

.dock-item:hover,
.dock-item:focus-visible {
  background: rgba(var(--color-primary-rgb, 234,96,69), 0.08);
}

.dock-item:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.dock-item.active {
  color: var(--coral);
  transform: scale(1.12);
  background: rgba(var(--color-primary-rgb, 234,96,69), 0.08);
}

/* Cart dock item uses its own granular color */
.dock-item.dock-cart.active {
  color: var(--color-cart-badge, var(--coral));
}

/* Favorites dock item uses its own granular color */
.dock-item.dock-fav.active {
  color: var(--color-favorites-active, var(--coral));
}

.dock-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--color-cart-badge, var(--coral));
  color: #ffffff;
  font-size: var(--fs-xs);
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px var(--coral-shadow);
}

/* ==========================================================
   VIEW 2: PRODUCT DETAIL (CENTER SCREEN)
   ========================================================== */
.detail-header {
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 56px;
}

.detail-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.detail-scroll-body::-webkit-scrollbar { display: none; }

.detail-hero-wrap {
  width: 180px;
  height: 180px;
  margin: 2px auto 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.16));
  animation: heroFloat 6s ease-in-out infinite alternate;
}

@keyframes heroFloat {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-4px) rotate(2deg); }
}

/* Toppings Bar — Linear horizontal row with per-item scroll snap */
.detail-toppings-bar {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: wrap;
}

.detail-toppings-bar::-webkit-scrollbar {
  display: none;
}

.topping-bubble {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.5s var(--ease-spring), opacity 0.4s var(--ease), filter 0.35s var(--ease);
  opacity: 0;
  animation: toppingEnter 0.5s var(--ease-spring) forwards;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

/* Staggered entrance for each bubble */
.topping-bubble:nth-child(1) { animation-delay: 0.05s; }
.topping-bubble:nth-child(2) { animation-delay: 0.10s; }
.topping-bubble:nth-child(3) { animation-delay: 0.15s; }
.topping-bubble:nth-child(4) { animation-delay: 0.20s; }
.topping-bubble:nth-child(5) { animation-delay: 0.25s; }
.topping-bubble:nth-child(6) { animation-delay: 0.30s; }
.topping-bubble:nth-child(7) { animation-delay: 0.35s; }
.topping-bubble:nth-child(8) { animation-delay: 0.40s; }
.topping-bubble:nth-child(9) { animation-delay: 0.45s; }
.topping-bubble:nth-child(10) { animation-delay: 0.50s; }

@keyframes toppingEnter {
  0%   { opacity: 0; transform: translateY(8px) scale(0.4); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.topping-img-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s var(--ease-spring), border-color 0.3s, box-shadow 0.3s;
}

.topping-img-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.topping-title {
  font-size: 0.56rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: color 0.3s, font-weight 0.3s;
}

.topping-bubble.active .topping-img-circle {
  border-color: var(--coral);
  box-shadow: 0 4px 14px rgba(var(--color-primary-rgb, 234,96,69), 0.32);
  transform: scale(1.12);
}

.topping-bubble:not(.active) {
  filter: grayscale(0.55) opacity(0.7);
}

.topping-bubble:not(.active) .topping-img-circle {
  transform: scale(0.92);
}

.topping-bubble.active .topping-title {
  color: var(--text-main);
  font-weight: 800;
}

.topping-bubble:hover .topping-img-circle {
  transform: scale(1.15);
  border-color: var(--coral-light);
}

/* Size Chips & Qty Bar */
.detail-size-qty-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4) var(--space-3);
  gap: var(--space-3);
}

.size-chips-pill {
  display: flex;
  background: var(--bg-light-gray, #f4f5f8);
  padding: 3px;
  border-radius: var(--radius-full);
  gap: 4px;
}

.size-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  min-width: 36px;
  min-height: 36px;
}

.size-btn:hover,
.size-btn:focus-visible {
  color: var(--text-main);
}

.size-btn.active,
.size-btn.active:hover,
.size-btn.active:focus-visible {
  background: #141416;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.qty-counter-pill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-light-gray, #f4f5f8);
  padding: 3px;
  border-radius: var(--radius-full);
}

.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-main);
  font-size: var(--fs-md);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.2s;
  min-width: 36px;
  min-height: 36px;
}

.qty-btn:hover,
.qty-btn:focus-visible {
  background: rgba(0, 0, 0, 0.04);
}

.qty-btn.plus-coral {
  background: var(--coral-grad);
  color: #ffffff;
  box-shadow: 0 3px 10px var(--coral-shadow);
}

.qty-btn.plus-coral:hover,
.qty-btn.plus-coral:focus-visible {
  background: var(--coral);
  transform: scale(1.05);
}

.qty-val {
  font-size: var(--fs-md);
  font-weight: 800;
  min-width: 24px;
  text-align: center;
}

/* Detail Info */
.detail-info-block {
  padding: 0 var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.detail-title-price-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.detail-product-title {
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.detail-product-price {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--text-main);
  flex-shrink: 0;
}

.detail-product-desc {
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: 1.55;
}

.detail-meta-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 2px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-light-gray, #f4f5f8);
  padding: 5px 10px;
  border-radius: var(--radius-full);
}

.meta-tag i {
  font-size: var(--fs-sm);
}

.rating-pill i {
  color: var(--gold-star);
}

/* Recomms Block — Horizontal scrollable cards */
.detail-recomms-block {
  padding: var(--space-3) var(--space-4) var(--space-5);
}

.recomms-title {
  font-size: var(--fs-md);
  font-weight: 800;
  margin-bottom: var(--space-2);
  color: var(--text-main);
}

.recomms-row {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.recomms-row::-webkit-scrollbar { display: none; }

.recomm-box {
  flex-shrink: 0;
  width: 150px;
  background: var(--bg-card, #ffffff);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
  animation: recommEnter 0.5s var(--ease-spring) forwards;
  opacity: 0;
}

.recomm-box:nth-child(1) { animation-delay: 0.1s; }
.recomm-box:nth-child(2) { animation-delay: 0.2s; }
.recomm-box:nth-child(3) { animation-delay: 0.3s; }

@keyframes recommEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.recomm-box:hover,
.recomm-box:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.recomm-box:hover .recomm-img {
  transform: scale(1.08) rotate(-2deg);
}

.recomm-star {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: var(--shadow-xs);
  z-index: 2;
}

.recomm-star i {
  color: var(--gold-star);
  font-size: var(--fs-xs);
}

.recomm-img-wrap {
  width: 100%;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.02));
}

.recomm-img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.35s var(--ease-spring);
}

.recomm-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recomm-name {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recomm-price {
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--coral);
}

.bottom-action-spacer {
  height: 90px;
}

/* Sticky Bottom Order Bar */
.detail-sticky-bar {
  position: absolute;
  bottom: 14px;
  left: var(--space-4);
  right: var(--space-4);
  z-index: 50;
}

.btn-detail-order {
  width: 100%;
  min-height: 52px;
  border-radius: var(--radius-full);
  background: #141416;
  color: #ffffff;
  font-size: var(--fs-base);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(20, 20, 22, 0.28);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  overflow: hidden;
  padding: 0 var(--space-4);
  border: none;
}

.btn-detail-order span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-detail-order:hover,
.btn-detail-order:focus-visible {
  background: #242428;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(20, 20, 22, 0.32);
}

.btn-detail-order:active {
  transform: translateY(0) scale(0.98);
}

.btn-detail-order strong {
  color: var(--coral);
  font-weight: 800;
}

/* ==========================================================
   VIEW 3: ORDER TRACKING ("PREPARING YOUR ORDER")
   ========================================================== */
.tracking-header {
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 56px;
}

.tracking-header-title {
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--text-main);
}

.tracking-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--space-4) var(--space-5);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.tracking-scroll-body::-webkit-scrollbar { display: none; }

/* 3D Oven Visual Stage */
.oven-stage {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 6px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oven-glow-background {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb, 234,96,69), 0.16) 0%, transparent 70%);
  animation: glowPulse 2.8s infinite alternate;
}

@keyframes glowPulse {
  0% { transform: scale(0.92); opacity: 0.6; }
  100% { transform: scale(1.18); opacity: 1; }
}

.oven-arc-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.arc-base {
  fill: none;
  stroke: #f1f2f5;
  stroke-width: 6;
}

.arc-running {
  fill: none;
  stroke: var(--coral);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 120;
  animation: arcAnimation 3.5s ease-in-out infinite alternate;
}

@keyframes arcAnimation {
  0% { stroke-dashoffset: 240; }
  100% { stroke-dashoffset: 70; }
}

.oven-illustration-wrap {
  width: 100px;
  height: 100px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oven-illustration {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(var(--color-primary-rgb, 234,96,69), 0.28));
}

.oven-countdown-pill {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #141416;
  color: #ffffff;
  font-size: var(--fs-sm);
  font-weight: 800;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

/* Stepper */
.tracking-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 6px 20px;
  position: relative;
}

.tracking-stepper::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 36px;
  right: 36px;
  height: 2px;
  background: var(--bg-light-gray, #eaecf0);
  z-index: 1;
}

.stepper-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 70px;
}

.node-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-light-gray, #f1f2f5);
  color: var(--text-light);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-xs);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.node-text {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-light);
  text-align: center;
  line-height: 1.2;
}

.stepper-node.completed .node-circle {
  background: var(--coral);
  color: #ffffff;
}

.stepper-node.completed .node-text {
  color: var(--coral);
}

.stepper-node.active .node-circle {
  background: #141416;
  color: #ffffff;
}

.stepper-node.active .node-circle.pulse {
  animation: nodePulse 1.5s infinite;
}

@keyframes nodePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(20, 20, 22, 0.4); }
  70% { transform: scale(1.12); box-shadow: 0 0 0 7px rgba(20, 20, 22, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(20, 20, 22, 0); }
}

.stepper-node.active .node-text {
  color: var(--text-main);
  font-weight: 800;
}

/* Glassmorphic Order Summary Card */
.tracking-glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.card-summary-heading {
  font-size: var(--fs-md);
  font-weight: 800;
}

.summary-product-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.summary-thumb-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--bg-light-gray, #f8f9fa);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

.summary-thumb-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.summary-details-box {
  flex: 1;
  min-width: 0;
}

.summary-name {
  font-size: var(--fs-base);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.summary-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.summary-price {
  font-size: var(--fs-base);
  font-weight: 800;
}

.summary-pop-badge {
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--coral);
  background: rgba(var(--color-primary-rgb, 234,96,69), 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.summary-info-table {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  gap: var(--space-2);
}

.info-label {
  color: var(--text-muted);
}

.info-value {
  color: var(--text-main);
  font-weight: 700;
  text-align: right;
}

.craving-banner-row {
  background: var(--bg-light-gray, #f5f6f9);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.craving-banner-row:hover,
.craving-banner-row:focus-visible {
  background: #ebeef4;
  transform: translateY(-1px);
}

.craving-flame-icon {
  color: var(--coral);
  font-size: var(--fs-md);
}

.craving-arrow {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.tracking-whatsapp-action {
  margin-top: var(--space-3);
}

.btn-whatsapp-track {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: #25d366;
  color: #fff;
  font-size: var(--fs-base);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
}

.btn-whatsapp-track:hover,
.btn-whatsapp-track:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  background: #20bd59;
}

.btn-whatsapp-track:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================
   CART MODAL / DRAWER
   ========================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-slide-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: var(--bg-card, #ffffff);
  z-index: 2001;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-spring);
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.cart-slide-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}

.drawer-top-bar {
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.drawer-title-wrap i {
  color: var(--coral);
  font-size: var(--fs-2xl);
}

.drawer-title-wrap h3 {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text-main);
}

.drawer-close-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-light-gray, #f4f5f8);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  transition: background 0.2s, transform 0.15s;
  border: none;
}

.drawer-close-icon:hover,
.drawer-close-icon:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  transform: scale(1.05);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.empty-cart-state {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.empty-cart-state i {
  font-size: 3rem;
  color: #d1d5db;
}

.empty-cart-state p {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.empty-cart-state span {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 220px;
}

.drawer-cart-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.item-thumb-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-light-gray, #f4f5f8);
  flex-shrink: 0;
}

.item-text-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-name-h4 {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-price-span {
  font-size: var(--fs-sm);
  color: var(--coral);
  font-weight: 800;
}

.item-qty-pill {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--bg-light-gray, #f4f5f8);
  padding: 3px 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.qty-pill-btn {
  font-size: var(--fs-md);
  font-weight: 800;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, transform 0.15s;
  min-width: 28px;
  min-height: 28px;
}

.qty-pill-btn:hover,
.qty-pill-btn:focus-visible {
  background: rgba(0, 0, 0, 0.05);
}

.qty-pill-btn:active {
  transform: scale(0.92);
}

.qty-pill-number {
  font-size: var(--fs-sm);
  font-weight: 800;
  min-width: 20px;
  text-align: center;
}

.drawer-bottom-bar {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-light-gray, #faf8f5);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.drawer-price-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--fs-lg);
  font-weight: 800;
}

.drawer-price-line strong {
  color: var(--coral);
  font-size: var(--fs-3xl);
}

.drawer-actions-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.btn-trash-cart {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-light-gray, #f4f5f8);
  color: #8b92a0;
  font-size: var(--fs-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  border: none;
  flex-shrink: 0;
}

.btn-trash-cart:hover,
.btn-trash-cart:focus-visible {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.btn-trash-cart:active {
  transform: scale(0.96);
}

.btn-whatsapp-order {
  flex: 1;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: #25d366;
  color: #fff;
  font-size: var(--fs-base);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
  text-decoration: none;
}

.btn-whatsapp-order:hover,
.btn-whatsapp-order:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  background: #20bd59;
}

.btn-whatsapp-order:active {
  transform: translateY(0) scale(0.98);
}

/* Toast */
.toast-popup {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translate(-50%, 30px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  color: var(--text-main, #1a1a2e);
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-spring);
  min-width: 240px;
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-popup.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.toast-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon i {
  color: #25d366;
  font-size: 1.1rem;
}

.toast-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toast-title {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--text-main, #1a1a2e);
  line-height: 1.2;
}

.toast-subtitle {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted, #888);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-action {
  flex-shrink: 0;
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.12);
  color: var(--coral, #ea6045);
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.toast-action:hover {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.22);
  transform: scale(1.04);
}

.toast-action:active {
  transform: scale(0.97);
}

/* ==========================================================
   MOBILE NATIVE APP ADAPTATION
   ========================================================== */
@media (max-width: 600px) {
  body { background: var(--bg-screen, #ffffff); }

  .detail-hero-wrap { width: 160px; height: 160px; }

  .detail-toppings-bar {
    width: 200px;
    height: 200px;
    margin: -20px auto 4px;
  }

  .card-tags-row {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 60%;
  }

  .card-tag { font-size: var(--fs-xs); padding: 2px 6px; }
  .card-meta-item { font-size: var(--fs-xs); }
  .detail-tag { font-size: var(--fs-xs); }
  .detail-allergen-chip { font-size: var(--fs-xs); }
}

/* Very small screens */
@media (max-width: 359px) {
  .popular-grid { gap: 8px; }
  .popular-card { padding: 10px; border-radius: var(--radius-md); gap: 10px; }
  .card-img-wrap { flex-basis: 36%; min-width: 80px; max-width: 110px; min-height: 84px; }
  .card-title { font-size: 13px; }
  .card-subtitle { font-size: 11px; -webkit-line-clamp: 2; line-clamp: 2; }
  .card-current-price { font-size: 13px; }
  .card-add-pill { font-size: 11px; padding: 8px 12px; min-width: 36px; min-height: 36px; }
  .feed-header .feed-logo,
  .feed-header .feed-logo-fallback { width: 44px; height: 44px; }
  .feed-address-label { font-size: var(--fs-md); }
  .feed-address-text { display: none; }
}

/* Small phones */
@media (min-width: 360px) and (max-width: 430px) {
  .feed-header .feed-logo,
  .feed-header .feed-logo-fallback { width: 48px; height: 48px; }
  .card-title { font-size: 14px; }
  .card-subtitle { font-size: 12px; min-height: 34px; -webkit-line-clamp: 2; line-clamp: 2; }
  .card-current-price { font-size: 14px; }
  .card-add-pill { font-size: 12px; min-width: 40px; min-height: 40px; }
}

/* Large desktops */
@media (min-width: 1366px) {
  .feed-header,
  .feed-search-wrap,
  .feed-categories-bar,
  .feed-scroll-body,
  .detail-header,
  .detail-scroll-body,
  .tracking-header,
  .tracking-scroll-body {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.15s !important;
  }
  .detail-hero-img { animation: none; }
  .oven-glow-background { animation: none; }
  .arc-running { animation: none; }
}

/* ==========================================================
   TABLET ADAPTATION (768px - 1023px)
   Keeps mobile app feel, uses more screen space
   ========================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  .popular-grid { max-width: 640px; }
  .feed-header .feed-logo,
  .feed-header .feed-logo-fallback { width: 56px; height: 56px; }
  .cat-chip-circle { width: 64px; height: 64px; font-size: 1.8rem; }
  .cat-chip-name { font-size: var(--fs-sm); }
  .card-img-wrap { height: 130px; }
  .ios-dock {
    max-width: 460px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: 20px;
  }
}

/* ==========================================================
   DESKTOP ADAPTATION (≥1024px)
   Full web layout — uses wider screen real estate
   ========================================================== */
@media (min-width: 1024px) {

  /* ---- Global typography scale-up ---- */
  .feed-section-title h3 { font-size: var(--fs-3xl); }
  .feed-address-label { font-size: var(--fs-sm); }
  .feed-address-text { font-size: var(--fs-lg); }

  /* ---- Feed header ---- */
  .feed-header {
    max-width: 1240px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
  }
  .feed-header .feed-logo,
  .feed-header .feed-logo-fallback { width: 64px; height: 64px; border-radius: var(--radius-lg); }
  .feed-search-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--space-6) var(--space-3);
  }
  .feed-search-box {
    padding: var(--space-3) var(--space-5);
  }
  .search-input-field { font-size: var(--fs-md); }

  /* ---- Categories bar: centered, wider ---- */
  .feed-categories-bar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--space-6) var(--space-3);
    gap: var(--space-3);
  }
  .cat-chip-circle { width: 64px; height: 64px; font-size: 1.8rem; }
  .cat-chip-name { font-size: var(--fs-sm); }

  /* ---- Feed scroll body: centered with max-width ---- */
  .feed-scroll-body {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--space-6);
  }

  /* ---- Popular grid ---- */
  .popular-grid {
    gap: var(--space-3);
    max-width: 640px;
  }

  /* ---- Popular cards ---- */
  .popular-card {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }
  .card-img-wrap { flex-basis: 32%; max-width: 160px; min-height: 110px; }
  .card-title { font-size: var(--fs-lg); }
  .card-subtitle { font-size: var(--fs-sm); min-height: 36px; }
  .card-current-price { font-size: var(--fs-md); }
  .card-old-price { font-size: var(--fs-sm); }
  .card-add-pill { font-size: var(--fs-sm); padding: 8px 16px; min-height: 36px; }
  .card-rating-badge { font-size: var(--fs-sm); padding: 3px 9px; }
  .card-tag { font-size: var(--fs-xs); padding: 3px 8px; }
  .card-meta-item { font-size: var(--fs-xs); }
  .card-meta-item i { font-size: var(--fs-sm); }
  .card-fav-btn { width: 36px; height: 36px; top: 12px; right: 12px; font-size: var(--fs-md); }

  /* ---- iOS Dock ---- */
  .ios-dock {
    max-width: 460px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: 20px;
    height: 60px;
    border-radius: var(--radius-full);
  }
  .dock-item { font-size: 1.25rem; width: 48px; height: 48px; }
  .dock-badge { width: 18px; height: 18px; font-size: var(--fs-xs); }
  .dock-spacer { height: 90px; }

  /* ---- Detail view ---- */
  .detail-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
  }
  .detail-scroll-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: var(--space-8);
    align-items: start;
    padding-top: var(--space-2);
  }

  .detail-left-col {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    position: sticky;
    top: var(--space-2);
  }
  .detail-hero-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: 360px;
    margin: 0;
  }
  .detail-hero-img { width: 100%; height: 100%; }
  .detail-toppings-bar {
    width: 100%;
    max-width: 380px;
    margin: 0;
    justify-content: center;
    flex-wrap: wrap;
  }
  .topping-img-circle { width: 44px; height: 44px; }
  .topping-title { font-size: var(--fs-xs); }
  .detail-size-qty-bar {
    max-width: 380px;
    margin: 0;
    padding: 0;
  }

  .detail-right-col {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }
  .detail-info-block { padding: var(--space-2) 0 0; }
  .detail-product-title { font-size: var(--fs-4xl); }
  .detail-product-price { font-size: var(--fs-4xl); }
  .detail-product-desc { font-size: var(--fs-md); line-height: 1.6; }
  .detail-tag { font-size: var(--fs-sm); padding: 5px 12px; }

  /* Recomms */
  .recomms-title { font-size: var(--fs-lg); }
  .recomms-row { gap: var(--space-4); }
  .recomm-box { width: 180px; padding: var(--space-3); }
  .recomm-img-wrap { height: 96px; }
  .recomm-name { font-size: var(--fs-base); }
  .recomm-price { font-size: var(--fs-md); }
  .recomm-star { font-size: var(--fs-xs); padding: 3px 9px; }

  /* Sticky order bar */
  .detail-sticky-bar {
    max-width: 520px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: 24px;
  }
  .btn-detail-order { min-height: 58px; font-size: var(--fs-md); }
  .bottom-action-spacer { height: 90px; }

  /* ---- Cart drawer ---- */
  .cart-slide-drawer {
    top: 50%;
    right: 50%;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: min(580px, 90vw);
    max-height: 85vh;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transition: transform 0.35s var(--ease-spring), opacity 0.3s var(--ease);
    opacity: 0;
    pointer-events: none;
  }
  .cart-slide-drawer.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .drawer-top-bar { padding: var(--space-4) var(--space-6); }
  .drawer-title-wrap h3 { font-size: var(--fs-2xl); }
  .drawer-body { padding: var(--space-4) var(--space-6); }
  .drawer-cart-item { padding: var(--space-3) 0; }
  .item-thumb-img { width: 64px; height: 64px; }
  .item-name-h4 { font-size: var(--fs-md); }
  .item-price-span { font-size: var(--fs-base); }
  .item-qty-pill { padding: 5px 12px; gap: var(--space-2); }
  .qty-pill-btn { width: 30px; height: 30px; font-size: var(--fs-md); }
  .qty-pill-number { font-size: var(--fs-md); }
  .drawer-bottom-bar { padding: var(--space-4) var(--space-6); }
  .drawer-price-line { font-size: var(--fs-xl); }
  .drawer-price-line strong { font-size: var(--fs-3xl); }
  .btn-whatsapp-order { min-height: 54px; font-size: var(--fs-md); }
  .btn-trash-cart { width: 54px; height: 54px; }

  /* ---- Tracking view ---- */
  .tracking-header {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
  }
  .tracking-header-title { font-size: var(--fs-xl); }
  .tracking-scroll-body {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 var(--space-6) var(--space-6);
  }
  .oven-stage { width: 240px; height: 240px; margin: var(--space-2) auto var(--space-5); }
  .oven-illustration-wrap { width: 140px; height: 140px; }
  .tracking-stepper { max-width: 540px; margin: 0 auto var(--space-5); }
  .node-circle { width: 32px; height: 32px; font-size: var(--fs-sm); }
  .node-text { font-size: var(--fs-sm); }
  .tracking-glass-card { padding: var(--space-5); border-radius: var(--radius-xl); max-width: 680px; margin: 0 auto; }
  .card-summary-heading { font-size: var(--fs-lg); }
  .summary-name { font-size: var(--fs-md); }
  .summary-price { font-size: var(--fs-md); }
  .info-row { font-size: var(--fs-sm); padding: var(--space-1) 0; }
  .summary-thumb-box { width: 64px; height: 64px; }
  .craving-banner-row { padding: var(--space-3) var(--space-4); }
  .craving-text { font-size: var(--fs-sm); }
  .btn-whatsapp-track { min-height: 54px; font-size: var(--fs-md); max-width: 680px; margin: var(--space-4) auto 0; }
}

@media (min-width: 1100px) {
  .popular-grid { max-width: 720px; }
}

@media (min-width: 1440px) {
  .feed-header,
  .feed-search-wrap,
  .feed-categories-bar,
  .feed-scroll-body,
  .detail-header,
  .detail-scroll-body,
  .tracking-header,
  .tracking-scroll-body {
    max-width: 1320px;
  }
}

/* ==========================================================
   CABU MENU DYNAMIC ADDITIONS
   ========================================================== */

/* Favorite button on cards */
.card-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.15s, background 0.2s, color 0.2s;
  font-size: var(--fs-sm);
  color: var(--text-light);
  min-width: 32px;
  min-height: 32px;
}

.card-fav-btn:hover,
.card-fav-btn:focus-visible {
  transform: scale(1.12);
  background: #fff;
}

.card-fav-btn.fav-active,
.card-fav-btn.fav-active i {
  color: var(--coral);
}

/* Add badge on card-add-pill */
.card-add-badge {
  background: #fff;
  color: var(--coral);
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: 0 4px;
  transition: transform 0.2s var(--ease-spring);
}

/* No-image card variant — no placeholder, no empty container */
.popular-card.no-img-card .card-img-wrap {
  display: none;
}

.popular-card.no-img-card {
  padding-top: 24px;
}

/* Dark mode */
body.dark-mode {
  background-color: var(--bg-dark);
  color: #e0e0e0;
}

body.dark-mode .app-stage {
  background-color: var(--bg-dark);
}

body.dark-mode .phone-container {
  background-color: #1a1a1e;
}

body.dark-mode .view-feed,
body.dark-mode .view-detail,
body.dark-mode .view-tracking {
  background-color: #1a1a1e;
}

body.dark-mode .feed-header {
  background: #1a1a1e;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .feed-address-label,
body.dark-mode .feed-section-title h3 {
  color: #e0e0e0;
}

body.dark-mode .feed-address-text {
  color: #aaa;
}

body.dark-mode .feed-search-box {
  background: #2a2a2e;
}

body.dark-mode .feed-search-box .search-input-field {
  color: #e0e0e0;
}

body.dark-mode .feed-search-box .search-input-field::placeholder {
  color: #666;
}

body.dark-mode .cat-chip-card {
  background: transparent;
}

body.dark-mode .cat-chip-circle {
  background: rgba(40, 40, 40, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body.dark-mode .cat-chip-name {
  color: #999;
}

body.dark-mode .cat-chip-card.active {
  background: transparent;
}

body.dark-mode .cat-chip-card.active .cat-chip-circle {
  background: rgba(255, 87, 34, 0.12);
  border-color: rgba(255, 87, 34, 0.4);
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.18);
}

body.dark-mode .cat-chip-card.active .cat-chip-name {
  color: #fff;
}

body.dark-mode .popular-card {
  background: rgba(42, 42, 46, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .card-title {
  color: #e0e0e0;
}

body.dark-mode .card-subtitle {
  color: #aaa;
}

body.dark-mode .card-current-price {
  color: #6ee7b7;
}

body.dark-mode .card-rating-badge {
  background: rgba(40, 40, 40, 0.92);
  color: #e0e0e0;
}

body.dark-mode .card-fav-btn {
  background: rgba(40, 40, 40, 0.92);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .card-fav-btn.fav-active,
body.dark-mode .card-fav-btn.fav-active i {
  color: var(--coral);
}

body.dark-mode .card-add-pill {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.78);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

body.dark-mode .ios-dock {
  background: rgba(26, 26, 30, 0.95);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .dock-item {
  color: #999;
}

body.dark-mode .dock-item.active {
  color: #6ee7b7;
}

body.dark-mode .cart-slide-drawer {
  background: #1a1a1e;
}

body.dark-mode .drawer-top-bar {
  background: #1a1a1e;
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .drawer-top-bar h3,
body.dark-mode .item-name-h4 {
  color: #e0e0e0;
}

body.dark-mode .item-price-span {
  color: var(--coral-light);
}

body.dark-mode .drawer-bottom-bar {
  background: #1a1a1e;
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .qty-pill-btn {
  background: #2a2a2e;
  color: #e0e0e0;
}

body.dark-mode .empty-cart-state p,
body.dark-mode .empty-cart-state span {
  color: #888;
}

body.dark-mode .circle-icon-btn {
  background: #2a2a2e;
  color: #e0e0e0;
}

body.dark-mode .toast-popup {
  background: rgba(26, 26, 30, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

body.dark-mode .toast-title {
  color: #e0e0e0;
}

body.dark-mode .toast-subtitle {
  color: #999;
}

body.dark-mode .toast-action {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.2);
  color: #6ee7b7;
}

body.dark-mode .toast-action:hover {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.3);
}

/* Line clamp standard property */
.card-subtitle {
  line-clamp: 2;
}

/* Responsive: ensure cards work on very small screens */
@media (max-width: 359px) {
  .popular-grid {
    max-width: 100%;
  }
  .card-title { font-size: 13px; }
  .card-subtitle { font-size: 11px; }
  .card-current-price { font-size: 13px; }
  .card-add-pill { font-size: 11px; padding: 8px 12px; min-width: 36px; min-height: 36px; }
}

/* ==========================================================
   TEMPLATE 3 — DYNAMIC ADD-ONS, OBSERVATIONS, TRACKING
   ========================================================== */

/* Detail observations block */
.detail-obs-block {
  margin-top: 16px;
}

.detail-obs-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-obs-input {
  width: 100%;
  border: 1.5px solid #e8e8ea;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-light-gray);
  resize: none;
  transition: border-color 0.2s, background 0.2s;
}

.detail-obs-input:focus {
  outline: none;
  border-color: var(--coral);
  background: #fff;
}

/* Dynamic topping bubble (from product add-ons) */
.topping-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.topping-bubble:hover {
  transform: translateY(-2px);
}

.topping-bubble .topping-img-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e8e8ea;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.topping-bubble.active .topping-img-circle {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-shadow);
}

.topping-bubble .topping-img-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topping-bubble .topping-img-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-light-gray);
  border: 2px solid #e8e8ea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-light);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.topping-bubble.active .topping-img-placeholder {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-shadow);
}

.topping-bubble .topping-title {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topping-bubble .topping-price {
  font-size: 0.55rem;
  color: var(--coral);
  font-weight: 700;
}

/* No toppings message */
.no-toppings-msg {
  font-size: 0.75rem;
  color: var(--text-light);
  padding: 8px 0;
}

/* Dark mode for detail observations */
body.dark-mode .detail-obs-input {
  background: #2a2a2e;
  border-color: #3a3a3e;
  color: #e0e0e0;
}

body.dark-mode .detail-obs-input:focus {
  background: #2a2a2e;
}

body.dark-mode .detail-obs-label {
  color: #888;
}

body.dark-mode .topping-bubble .topping-img-circle,
body.dark-mode .topping-bubble .topping-img-placeholder {
  background: #2a2a2e;
  border-color: #3a3a3e;
}

body.dark-mode .topping-bubble .topping-title {
  color: #aaa;
}

/* ==========================================================
   PRODUCT CUSTOMIZATION SECTIONS (Template3)
   ========================================================== */

.detail-customization {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.detail-section {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-3) calc(var(--space-3) + 2px);
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-section-title i {
  color: var(--coral, #ea6045);
  font-size: 0.85em;
}

.detail-section-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}

/* Size options (single choice) */
.size-options-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-option-btn {
  flex: 1 1 0;
  min-width: 80px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  padding: 8px 10px;
}

.size-option-btn:hover {
  border-color: var(--coral-light, #ff7043);
  transform: translateY(-1px);
}

.size-option-btn.active {
  border-color: var(--coral, #ea6045);
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.1);
  box-shadow: 0 2px 10px rgba(var(--color-primary-rgb, 234, 96, 69), 0.18);
}

.size-option-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-main);
}

.size-option-btn.active .size-option-label {
  color: var(--coral, #ea6045);
}

.size-option-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 8px;
  border-radius: var(--radius-full);
}

.size-option-btn.active .size-option-tag {
  background: var(--coral, #ea6045);
  color: #fff;
}

/* Addons list (multiple choice) */
.detail-toppings-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  scroll-behavior: auto;
  padding: 0;
  margin: 0;
}

.addon-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  min-height: 48px;
}

.addon-item:hover {
  border-color: var(--coral-light, #ff7043);
  background: rgba(255, 255, 255, 0.95);
}

.addon-item.active {
  border-color: var(--coral, #ea6045);
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.08);
  box-shadow: 0 2px 10px rgba(var(--color-primary-rgb, 234, 96, 69), 0.12);
}

.addon-check {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.04);
}

.addon-img-wrap {
  width: 100%;
  height: 100%;
}

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

.addon-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.addon-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.addon-name {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.addon-price {
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--coral, #ea6045);
}

.addon-checkmark {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.7rem;
  transition: all 0.2s var(--ease);
}

.addon-item.active .addon-checkmark {
  background: var(--coral, #ea6045);
  border-color: var(--coral, #ea6045);
  color: #fff;
  transform: scale(1.1);
}

/* Quantity section */
.detail-section .qty-counter-pill {
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.detail-section .qty-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: all 0.2s var(--ease);
  min-height: 44px;
}

.detail-section .qty-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: scale(1.05);
}

.detail-section .qty-btn.plus-coral {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.72);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb, 234, 96, 69), 0.3);
}

.detail-section .qty-val {
  min-width: 40px;
  text-align: center;
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--text-main);
}

/* Dark mode for customization sections */
body.dark-mode .detail-section {
  background: rgba(42, 42, 46, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .detail-section-title {
  color: #e0e0e0;
}

body.dark-mode .detail-section-hint {
  color: #999;
}

body.dark-mode .size-option-btn {
  background: rgba(40, 40, 40, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .size-option-btn.active {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.18);
  border-color: var(--coral, #ea6045);
}

body.dark-mode .size-option-label {
  color: #ddd;
}

body.dark-mode .size-option-tag {
  background: rgba(255, 255, 255, 0.08);
  color: #aaa;
}

body.dark-mode .size-option-btn.active .size-option-tag {
  background: var(--coral, #ea6045);
  color: #fff;
}

body.dark-mode .addon-item {
  background: rgba(40, 40, 40, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .addon-item:hover {
  background: rgba(50, 50, 54, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .addon-item.active {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.15);
  border-color: var(--coral, #ea6045);
}

body.dark-mode .addon-check {
  background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .addon-name {
  color: #ddd;
}

body.dark-mode .addon-price {
  color: #6ee7b7;
}

body.dark-mode .addon-checkmark {
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .detail-section .qty-counter-pill {
  background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .detail-section .qty-btn {
  background: rgba(60, 60, 64, 0.9);
  color: #e0e0e0;
}

body.dark-mode .detail-section .qty-btn:hover {
  background: rgba(80, 80, 84, 0.95);
}

body.dark-mode .detail-section .qty-val {
  color: #e0e0e0;
}

body.dark-mode .detail-obs-input {
  background: rgba(40, 40, 40, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

body.dark-mode .detail-obs-input:focus {
  border-color: var(--coral, #ea6045);
  background: rgba(50, 50, 54, 0.95);
}

/* Predefined observation options */
.detail-obs-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.obs-option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  min-height: 44px;
}

.obs-option-item:hover {
  border-color: var(--coral-light, #ff7043);
  background: rgba(255, 255, 255, 0.95);
}

.obs-option-item:has(input:checked) {
  border-color: var(--coral, #ea6045);
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.08);
}

.obs-option-cb {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.obs-option-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.7rem;
  transition: all 0.2s var(--ease);
}

.obs-option-item:has(input:checked) .obs-option-check {
  background: var(--coral, #ea6045);
  border-color: var(--coral, #ea6045);
  color: #fff;
}

.obs-option-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-main);
}

/* Dark mode for observation options */
body.dark-mode .obs-option-item {
  background: rgba(40, 40, 40, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .obs-option-item:hover {
  background: rgba(50, 50, 54, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .obs-option-item:has(input:checked) {
  background: rgba(var(--color-primary-rgb, 234, 96, 69), 0.15);
  border-color: var(--coral, #ea6045);
}

body.dark-mode .obs-option-check {
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .obs-option-label {
  color: #ddd;
}

/* Dark mode for tracking view */
body.dark-mode .tracking-glass-card {
  background: rgba(26, 26, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
}

body.dark-mode .card-summary-heading,
body.dark-mode .summary-name {
  color: #e0e0e0;
}

body.dark-mode .summary-meta,
body.dark-mode .info-label {
  color: #888;
}

body.dark-mode .info-value {
  color: #e0e0e0;
}

body.dark-mode .summary-price {
  color: var(--coral-light);
}

body.dark-mode .craving-banner-row {
  background: rgba(255, 87, 34, 0.12);
  border-color: rgba(255, 87, 34, 0.2);
}

body.dark-mode .craving-text {
  color: #e0e0e0;
}

body.dark-mode .tracking-header {
  background: #1a1a1e;
}

body.dark-mode .tracking-header-title {
  color: #e0e0e0;
}

body.dark-mode .oven-glow-background {
  opacity: 0.4;
}

body.dark-mode .stepper-node .node-text {
  color: #888;
}

body.dark-mode .stepper-node.completed .node-text,
body.dark-mode .stepper-node.active .node-text {
  color: #e0e0e0;
}

body.dark-mode .stepper-node .node-circle {
  background: #2a2a2e;
  color: #666;
}

body.dark-mode .stepper-node.completed .node-circle {
  background: var(--green-badge);
  color: #fff;
}

body.dark-mode .stepper-node.active .node-circle {
  background: var(--coral);
  color: #fff;
}

body.dark-mode .btn-whatsapp-track {
  background: #2a2a2e;
  color: #e0e0e0;
}

/* Tracking view — missing dark mode overrides */
body.dark-mode .tracking-stepper::before {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .arc-base {
  stroke: rgba(255, 255, 255, 0.08);
}

body.dark-mode .summary-product-line {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .summary-thumb-box {
  background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .summary-pop-badge {
  background: rgba(255, 87, 34, 0.18);
  color: var(--coral-light);
}

body.dark-mode .craving-banner-row:hover {
  background: rgba(255, 87, 34, 0.18);
}

body.dark-mode .craving-arrow {
  color: #888;
}

body.dark-mode .oven-countdown-pill {
  background: #2a2a2e;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

body.dark-mode .btn-detail-order {
  background: var(--coral);
}

body.dark-mode .detail-product-title {
  color: #e0e0e0;
}

body.dark-mode .detail-product-desc {
  color: #888;
}

body.dark-mode .detail-product-price {
  color: var(--coral-light);
}

body.dark-mode .meta-tag {
  background: #2a2a2e;
  color: #ccc;
}

body.dark-mode .recomm-box {
  background: #2a2a2e;
}

body.dark-mode .recomm-name {
  color: #e0e0e0;
}

body.dark-mode .recomm-price {
  color: var(--coral-light);
}

body.dark-mode .recomms-title {
  color: #e0e0e0;
}

body.dark-mode .size-btn {
  background: #2a2a2e;
  color: #888;
}

body.dark-mode .size-btn.active,
body.dark-mode .size-btn.active:hover,
body.dark-mode .size-btn.active:focus-visible {
  background: var(--coral);
  color: #fff;
}

body.dark-mode .qty-counter-pill {
  background: #2a2a2e;
}

body.dark-mode .qty-btn {
  background: #3a3a3e;
  color: #e0e0e0;
}

body.dark-mode .qty-val {
  color: #e0e0e0;
}

/* Heart button active state */
.heart-btn.active {
  color: var(--color-favorites-active, var(--coral));
}

.heart-btn.active i {
  font-weight: 900;
}

/* Consolidated tracking node + arc styles are in the main VIEW 3 section */

/* ==========================================================
   DARK MODE COMPATIBILITY — html[data-theme="dark"] + html.dark-mode
   Ensures pages using data-theme attribute also get body.dark-mode styles.
   ========================================================== */
/*
   Dark mode compatibility: the app sets body.dark-mode and html[data-theme="dark"]
   in parallel. All component-level dark styles are already handled by the
   body.dark-mode block above, so only the root/page-level defaults need to be
   mirrored here for pages that read the html attribute before body exists.
*/
html[data-theme="dark"] body,
html.dark-mode body,
body.dark-mode {
  background-color: #1a1a1e;
  color: #e0e0e0;
}

/* ==========================================================
   ADMIN CUSTOMIZER — COLOR OVERRIDES (template3)
   Theme-aware: text/icons switch with dark/light mode.
   Uses --coral (admin primary/accent) for green elements.
   ========================================================== */

/* Theme-aware variables for template3 */
body.tpl-template3 {
  --t3-text: #1e1d1b;
  --t3-text-muted: #75716b;
  --t3-icon: #000000;
}
body.dark-mode.tpl-template3 {
  --t3-text: #ffffff;
  --t3-text-muted: #aaa;
  --t3-icon: #ffffff;
}

/* "Recomendaciones de Hoy" title — theme-aware */
body.tpl-template3 .t3-recs-title {
  color: var(--t3-text) !important;
}

body.tpl-template3 .t3-recs-icon {
  color: var(--t3-icon) !important;
}

/* "También te puede gustar" title — theme-aware */
body.tpl-template3 .recomms-title {
  color: var(--t3-text) !important;
}

/* Product detail name — theme-aware */
body.tpl-template3 .detail-product-title {
  color: var(--t3-text) !important;
}

/* Menu page: product names (card-title) — theme-aware */
body.tpl-template3 .card-title {
  color: var(--t3-text) !important;
}

/* Menu page: product descriptions (card-subtitle) — theme-aware */
body.tpl-template3 .card-subtitle {
  color: var(--t3-text-muted) !important;
}

/* Menu page: product prices (card-current-price) — theme-aware */
body.tpl-template3 .card-current-price {
  color: var(--t3-text) !important;
}

/* Menu page: restaurant name (user-location) — theme-aware */
body.tpl-template3 .user-location,
body.tpl-template3 #user-current-location {
  color: var(--t3-text) !important;
}

/* Menu page: greeting text — theme-aware */
body.tpl-template3 .greeting-sub {
  color: var(--t3-text-muted) !important;
}

/* Menu page: "Todos los productos" section title — theme-aware */
body.tpl-template3 .feed-section-title h3 {
  color: var(--t3-text) !important;
}

/* Size buttons S/M/L — theme-aware letters */
body.tpl-template3 .size-btn {
  color: var(--t3-text) !important;
}

/* Size button active — coral background, white text on active */
body.tpl-template3 .size-btn.active {
  background: var(--coral, #006142) !important;
  color: #ffffff !important;
}

/* Product buttons — coral (uses admin --coral = #006142 for MOMO) */
body.tpl-template3 .card-add-pill,
body.tpl-template3 .t3-rec-card-cta,
body.tpl-template3 .t3-rec-product-cta {
  background: var(--coral, #006142) !important;
}

body.tpl-template3 .card-add-pill:hover,
body.tpl-template3 .card-add-pill:focus-visible {
  background: var(--coral-light, var(--coral, #006142)) !important;
}

/* S M L size buttons — coral when active */
body.tpl-template3 .size-btn.active {
  background: var(--coral, #006142) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.tpl-template3 .size-btn:hover,
body.tpl-template3 .size-btn:focus-visible {
  color: var(--coral, #006142) !important;
}

/* Sticky :hover/:focus on touch devices — keep the active letter visible */
body.tpl-template3 .size-btn.active,
body.tpl-template3 .size-btn.active:hover,
body.tpl-template3 .size-btn.active:focus-visible {
  background: var(--coral, #006142) !important;
  color: #ffffff !important;
}

/* Icons — theme-aware (dark in light mode, white in dark mode) */
body.tpl-template3 .circle-icon-btn,
body.tpl-template3 .icon-btn,
body.tpl-template3 .dock-item i,
body.tpl-template3 .card-fav-btn i,
body.tpl-template3 .detail-meta-tags .meta-tag i,
body.tpl-template3 .detail-section-title i,
body.tpl-template3 .cat-chip-circle i {
  color: var(--t3-icon, #000000);
}

/* Category chip labels — theme-aware (dark in light mode, white in dark mode) */
body.tpl-template3 .cat-chip-name,
body.tpl-template3 .cat-chip-card.active .cat-chip-name {
  color: var(--t3-text, #1e1d1b);
}

/* Add-on (agregaciones) section — clean order & aesthetic */
body.tpl-template3 .addon-item {
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-md);
}

body.tpl-template3 .addon-item.active {
  border-color: var(--coral, #006142);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

body.tpl-template3 .addon-item.active .addon-checkmark {
  background: var(--coral, #006142);
  border-color: var(--coral, #006142);
}

body.tpl-template3 .addon-price {
  color: var(--coral, #006142);
}

body.tpl-template3 .addon-name {
  color: var(--t3-text, #000000);
}

/* ==========================================================
   VISUAL POLISH — template3
   Mejora estética sin cambiar la plantilla ni la lógica.
   Usa variables CSS existentes. Aplica para todos los restaurantes.
   ========================================================== */

/* ===== FEED CARDS — mejor jerarquía y respiración ===== */
body.tpl-template3 .popular-card {
  padding: 14px;
  gap: 14px;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.tpl-template3 .card-img-wrap {
  flex: 0 0 96px;
  max-width: 96px;
  min-width: 96px;
  border-radius: 14px;
  overflow: hidden;
}

body.tpl-template3 .card-dish-img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.10));
}

body.tpl-template3 .card-title {
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

body.tpl-template3 .card-subtitle {
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 2px;
}

body.tpl-template3 .card-current-price {
  font-size: 15px;
  letter-spacing: -0.01em;
}

body.tpl-template3 .card-add-pill {
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: 0 3px 10px var(--coral-shadow, rgba(0, 0, 0, 0.18));
}

/* ===== SPA DETAIL — imagen con mayor protagonismo ===== */
body.tpl-template3 .detail-hero-wrap {
  padding: 8px 0 4px;
}

body.tpl-template3 .detail-hero-img,
body.tpl-template3 #detailDishImg {
  width: 280px;
  height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.15));
}

body.tpl-template3 .detail-product-title {
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

body.tpl-template3 .detail-product-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-top: 8px;
}

/* ===== SPA DETAIL — size chips más táctiles ===== */
body.tpl-template3 .size-chips-pill {
  padding: 4px;
  gap: 6px;
}

body.tpl-template3 .size-btn {
  width: 42px;
  height: 42px;
  font-size: 0.95rem;
  min-width: 42px;
  min-height: 42px;
  transition: all 0.2s var(--ease);
}

/* ===== SPA DETAIL — order button usa coral (verde para MOMO) ===== */
body.tpl-template3 .btn-detail-order {
  background: var(--coral, #006142) !important;
  box-shadow: 0 4px 16px var(--coral-shadow, rgba(0, 0, 0, 0.2));
}

body.tpl-template3 .btn-detail-order:hover {
  background: var(--coral-light, var(--coral, #006142)) !important;
}

/* ===== SPA DETAIL — addons tipo tarjetas seleccionables ===== */
body.tpl-template3 .addon-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.2s var(--ease);
  min-height: 56px;
}

body.tpl-template3 .addon-item:hover {
  border-color: var(--coral, #006142);
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.tpl-template3 .addon-item.active {
  border-color: var(--coral, #006142);
  border-width: 2px;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body.tpl-template3 .addon-check {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

body.tpl-template3 .addon-name {
  font-size: 0.9rem;
  font-weight: 700;
}

body.tpl-template3 .addon-price {
  font-size: 0.85rem;
  font-weight: 800;
}

body.tpl-template3 .addon-item.active .addon-checkmark {
  background: var(--coral, #006142);
  border-color: var(--coral, #006142);
  color: #ffffff;
}

/* ===== SPA DETAIL — observaciones mejorado ===== */
body.tpl-template3 .detail-obs-block {
  margin-top: 8px;
}

body.tpl-template3 .detail-obs-label {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

body.tpl-template3 .detail-obs-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.95);
  box-sizing: border-box;
  resize: vertical;
  min-height: 72px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.tpl-template3 .detail-obs-input:focus {
  outline: none;
  border-color: var(--coral, #006142);
  box-shadow: 0 0 0 3px var(--coral-shadow, rgba(0, 0, 0, 0.08));
}

/* ===== SPA DETAIL — back (volver) and favorites (favoritos) icons separated ===== */
body.tpl-template3 .detail-header {
  justify-content: space-between;
  gap: 16px;
}
body.tpl-template3 .detail-header .heart-btn {
  margin-left: auto;
}

/* ===== SPA DETAIL — sticky bar con mejor jerarquía ===== */
body.tpl-template3 .detail-sticky-bar {
  padding: 12px 16px 16px;
}

body.tpl-template3 .btn-detail-order {
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: transform 0.15s, box-shadow 0.2s;
}

body.tpl-template3 .btn-detail-order:active {
  transform: scale(0.98);
}

/* ===== SPA DETAIL — "También te puede gustar" mejorado ===== */
body.tpl-template3 .detail-recomms-block {
  padding: 20px 16px 24px;
}

body.tpl-template3 .recomms-title {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

/* ===== FEED SECTION TITLE — mejor separación ===== */
body.tpl-template3 .feed-section-title {
  margin-top: 8px;
  margin-bottom: 16px;
}

/* ===== RESPONSIVE POLISH ===== */
@media (max-width: 374px) {
  body.tpl-template3 .popular-card {
    padding: 12px;
    gap: 12px;
    border-radius: 16px;
  }
  body.tpl-template3 .card-img-wrap {
    flex: 0 0 84px;
    max-width: 84px;
    min-width: 84px;
  }
  body.tpl-template3 .card-title { font-size: 14px; }
  body.tpl-template3 .detail-hero-img,
  body.tpl-template3 #detailDishImg {
    width: 240px;
    height: 240px;
  }
}

@media (min-width: 414px) {
  body.tpl-template3 .popular-card {
    padding: 16px;
    gap: 16px;
  }
  body.tpl-template3 .card-img-wrap {
    flex: 0 0 104px;
    max-width: 104px;
    min-width: 104px;
  }
  body.tpl-template3 .card-title { font-size: 16px; }
  body.tpl-template3 .card-current-price { font-size: 16px; }
}

/* ==========================================================
   SPA DETAIL — Addons section (después de la descripción)
   ========================================================== */
.detail-addons-section {
  margin-top: 20px;
  margin-bottom: 20px;
}
.detail-addons-title {
  font-size: .85rem;
  font-weight: 800;
  color: var(--text-main, #000);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body.dark-mode .detail-addons-title { color: #e8e8e8; }

/* Addon items as grid of cards in SPA detail */
.detail-addons-section .detail-toppings-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: visible;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}
@media (max-width: 359px) {
  .detail-addons-section .detail-toppings-bar { grid-template-columns: 1fr; }
}

.detail-addons-section .addon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #f7f7f8;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 68px;
  margin: 0;
}
body.dark-mode .detail-addons-section .addon-item {
  background: #242428;
  border-color: #2e2e2e;
}
.detail-addons-section .addon-item:hover {
  border-color: var(--coral, #006142);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
body.dark-mode .detail-addons-section .addon-item:hover { background: #2a2a2e; }
.detail-addons-section .addon-item.active {
  border-color: var(--coral, #006142);
  border-width: 2px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
body.dark-mode .detail-addons-section .addon-item.active { background: #2a2a2e; }

.detail-addons-section .addon-check {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ece9e4;
}
body.dark-mode .detail-addons-section .addon-check { background: #3a3a3e; }
.detail-addons-section .addon-img-wrap { width: 100%; height: 100%; }
.detail-addons-section .addon-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.detail-addons-section .addon-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--coral, #006142); font-size: .9rem;
}
body.dark-mode .detail-addons-section .addon-img-placeholder { color: #e0e0e0; }

.detail-addons-section .addon-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.detail-addons-section .addon-name {
  font-size: .88rem; font-weight: 700;
  color: var(--t3-text, #000); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
body.dark-mode .detail-addons-section .addon-name { color: #e8e8e8; }
.detail-addons-section .addon-item.active .addon-name::before {
  content: '✓ '; color: var(--coral, #006142); font-weight: 800;
}
.detail-addons-section .addon-price {
  font-size: .82rem; font-weight: 800;
  color: var(--coral, #006142);
}

/* Hide checkmark circle in SPA addon items (using ✓ prefix instead) */
.detail-addons-section .addon-checkmark { display: none; }

/* Desktop: addons section in right column */
@media (min-width: 768px) {
  .detail-addons-section .detail-toppings-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================
   SPA DETAIL — Textos en blanco (precio, desc, obs, agregaciones, brand, address)
   ========================================================== */
body.tpl-template3 .detail-product-price,
body.tpl-template3 .detail-product-desc,
body.tpl-template3 .detail-obs-label,
body.tpl-template3 .detail-addons-title,
body.tpl-template3 .feed-brand-name,
body.tpl-template3 .feed-address-text {
  color: var(--t3-text, #ffffff) !important;
}
