/* ==========================================================================
   PAGES — Delicio 2026 (Choco-style redesign)
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Home Page — Single scroll with category sections
   -------------------------------------------------------------------------- */

/* Home page — extra padding for header + category cards */
.page--home {
  padding-top: 110px;
}

/* Category image cards — rendered inside .header--home */
/* Category cards — expanded (image + name) & compact (name only) */
.category-cards {
  background: var(--color-bg);
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px var(--page-px);
  border-bottom: 1px solid var(--color-border);
  transition: padding 300ms ease, gap 300ms ease;
}

.category-card {
  flex-shrink: 0;
  width: 100px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-md);
  padding: 6px;
  transition: width 300ms ease, padding 300ms ease, background 200ms ease, box-shadow 200ms ease;
}

.category-card--active {
  background: var(--color-surface-alt);
  box-shadow: inset 0 0 0 1.5px var(--color-primary);
}

.category-card__img {
  width: 88px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0 auto 6px;
  background: var(--color-surface-alt);
  transition: height 300ms ease, margin 300ms ease, opacity 300ms ease;
}

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

.category-card__placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-surface-alt);
}

.category-card__name {
  font-size: 11px;
  font-weight: var(--weight-bold);
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  transition: font-size 300ms ease;
}

.category-card--active .category-card__name {
  color: var(--color-primary);
}

/* Compact mode — text tabs only */
.category-cards--compact {
  padding: 8px var(--page-px);
  gap: 8px;
}

.category-cards--compact .category-card {
  width: auto;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border-dark);
  background: var(--color-bg);
}

.category-cards--compact .category-card--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: none;
}

.category-cards--compact .category-card--active .category-card__name {
  color: #fff;
}

.category-cards--compact .category-card__img {
  height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
}

.category-cards--compact .category-card__name {
  font-size: var(--font-sm);
  -webkit-line-clamp: 1;
  white-space: nowrap;
}

/* Section in home page */
.menu-section {
  margin-bottom: var(--space-6);
  scroll-margin-top: 170px;
}

.menu-section__title {
  font-size: var(--font-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  scroll-margin-top: 170px;
  letter-spacing: -0.3px;
}

/* Product list layout (vertical) */
.product-list {
  display: flex;
  flex-direction: column;
}

/* Product list item (horizontal card) */
.product-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

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

.product-item__img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-surface-alt);
  display: block;
}

.product-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.product-item:active .product-item__img img {
  transform: scale(1.05);
}

.product-item__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.product-item__name {
  font-size: var(--font-base);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-item__desc {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.product-item__price {
  font-size: var(--font-base);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.2px;
}

.product-item__old-price {
  text-decoration: line-through;
  color: var(--color-text-tertiary);
  font-size: var(--font-sm);
  font-weight: var(--weight-normal);
  margin-right: 6px;
}

.product-item__add {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border-dark);
  background: transparent;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
  text-decoration: none;
}

.product-item__add:active {
  transform: scale(0.88);
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.product-item__qty {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}


/* --------------------------------------------------------------------------
   2. Product Detail Page
   -------------------------------------------------------------------------- */

.product-hero {
  margin: calc(-1 * var(--page-px));
  margin-bottom: 0;
}

.product-hero__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.product-detail {
  background: var(--color-bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: -20px;
  position: relative;
  z-index: 1;
  padding: var(--space-6) var(--page-px) var(--space-4);
}

.product-detail__name { font-size: var(--font-xl); font-weight: 800; margin-bottom: 6px; text-decoration: none; letter-spacing: -0.3px; }

.product-detail__tags { display: flex; gap: 6px; margin-bottom: var(--space-2); }
.product-detail__tag {
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.product-detail__desc { font-size: var(--font-sm); color: var(--color-text-secondary); line-height: 1.55; margin-bottom: 6px; letter-spacing: 0.1px; }
.product-detail__weight { font-size: var(--font-sm); color: var(--color-text-tertiary); margin-bottom: var(--space-4); }
.product-detail__divider { height: 1px; background: var(--color-border); margin-bottom: var(--space-4); }

.product-detail__price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.product-detail__price { font-size: var(--font-xl); font-weight: 800; letter-spacing: -0.3px; }
.product-detail__bonus { display: flex; align-items: center; gap: var(--space-1); font-size: var(--font-sm); color: var(--color-warning); }

/* Add to cart controls */
.product-add { display: flex; align-items: center; gap: var(--space-3); }

.product-add-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: #fff;
  padding: 16px 0;
  font-size: var(--font-base);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-lg);
  text-align: center;
  border: none;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.3);
}

.product-add-btn:active {
  transform: scale(0.96);
  background: var(--color-primary-hover);
}

.product-add__qty { display: flex; align-items: center; gap: var(--space-2); }

.product-add__fav {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1.5px solid var(--color-border-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  background: transparent;
  cursor: pointer;
}

.product-add__fav--active { color: #EF4444; border-color: #EF4444; }

/* Related products */
.product-related { margin-top: var(--space-3); padding-bottom: 100px; }

.product-related__list {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.product-related__list::-webkit-scrollbar { display: none; }

/* Horizontal product card (for related) */
.product-card-h {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  width: 140px;
  flex-shrink: 0;
}

.product-card-h__img { width: 140px; height: 100px; overflow: hidden; }
.product-card-h__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-h__info { padding: var(--space-2); }
.product-card-h__name { font-size: var(--font-xs); font-weight: var(--weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card-h__price { font-size: var(--font-xs); font-weight: var(--weight-bold); color: var(--color-text); margin-top: var(--space-1); }


/* --------------------------------------------------------------------------
   3. Profile Page
   -------------------------------------------------------------------------- */

.profile-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--space-6);
  padding-top: var(--space-2);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.profile-avatar__initial { font-size: var(--font-2xl); font-weight: var(--weight-bold); color: #fff; }

.profile-name { font-size: var(--font-lg); font-weight: var(--weight-bold); margin-bottom: 2px; }
.profile-phone { font-size: var(--font-sm); color: var(--color-text-secondary); }

.profile-edit {
  font-size: var(--font-sm);
  color: var(--color-primary);
  font-weight: var(--weight-medium);
  margin-top: 6px;
  cursor: pointer;
  background: none;
  border: none;
}

/* Bonus card */
.profile-bonus {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.profile-bonus__left { display: flex; align-items: center; gap: 10px; }
.profile-bonus__left svg { width: 24px; height: 24px; }
.profile-bonus__label { font-size: var(--font-sm); opacity: 0.9; }
.profile-bonus__right { text-align: right; }
.profile-bonus__amount { font-size: var(--font-2xl); font-weight: var(--weight-bold); }
.profile-bonus__unit, .profile-bonus__subtitle { font-size: var(--font-xs); opacity: 0.8; }

/* Orders */
.profile-orders { margin-bottom: var(--space-6); }

.profile-order {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--color-border);
  margin-bottom: 10px;
  transition: transform 150ms ease, border-color 200ms ease;
}

.profile-order:active {
  transform: scale(0.98);
  border-color: var(--color-primary);
}

.profile-order__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-2); }
.profile-order__id { font-size: var(--font-sm); font-weight: var(--weight-semibold); }
.profile-order__date { font-size: var(--font-xs); color: var(--color-text-tertiary); }
.profile-order__items { font-size: var(--font-sm); color: var(--color-text-secondary); margin-bottom: var(--space-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-order__footer { display: flex; justify-content: space-between; align-items: center; }
.profile-order__total { font-size: var(--font-base); font-weight: var(--weight-bold); }
.profile-order__status { font-size: var(--font-xs); font-weight: var(--weight-semibold); padding: 3px 10px; border-radius: var(--radius-full); background: rgba(34, 197, 94, 0.1); color: var(--color-success); }

/* Settings */
.profile-settings {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
}

.profile-settings__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 200ms ease, transform 150ms ease;
}

.profile-settings__item:last-child { border-bottom: none; }
.profile-settings__item:active {
  background: var(--color-surface-alt);
  transform: scale(0.98);
}

.profile-settings__item svg:last-child,
.profile-settings__chevron {
  transition: transform 200ms ease;
}

.profile-settings__item:active svg:last-child,
.profile-settings__item:active .profile-settings__chevron {
  transform: translateX(3px);
}
.profile-settings__item svg:first-child, .profile-settings__icon { width: 20px; height: 20px; color: var(--color-text-secondary); flex-shrink: 0; }
.profile-settings__item span, .profile-settings__label { flex: 1; font-size: var(--font-sm); font-weight: var(--weight-medium); }
.profile-settings__item svg:last-child, .profile-settings__chevron { width: 16px; height: 16px; color: var(--color-text-tertiary); }

/* Logout */
.profile-logout {
  text-align: center;
  color: var(--color-error);
  font-size: var(--font-base);
  font-weight: var(--weight-medium);
  padding: var(--space-4) 0;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
}

.profile-logout:active { opacity: 0.7; }


/* --------------------------------------------------------------------------
   4. Category description
   -------------------------------------------------------------------------- */

.category-description {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}


/* --------------------------------------------------------------------------
   5. Home Page — Promo Banner spacing
   -------------------------------------------------------------------------- */

.home-content {
  padding: var(--space-4) var(--page-px) var(--page-px);
}


/* --------------------------------------------------------------------------
   6. Profile User Info (additional class mappings)
   -------------------------------------------------------------------------- */

.profile-user__name {
  font-size: var(--font-lg);
  font-weight: var(--weight-bold);
  margin-bottom: 2px;
}

.profile-user__phone {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
}

.profile-user__edit {
  font-size: var(--font-sm);
  color: var(--color-primary);
  font-weight: var(--weight-medium);
  margin-top: 6px;
  cursor: pointer;
  text-decoration: none;
}

.profile-user__edit:active {
  opacity: 0.7;
}


/* --------------------------------------------------------------------------
   7. QR Menu — Language switcher in header
   -------------------------------------------------------------------------- */

.header__lang {
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  min-width: 40px;
  text-align: center;
  letter-spacing: 0.3px;
  transition: transform var(--ease-fast), background var(--ease-fast);
}

.header__lang:active {
  transform: scale(0.9);
  background: rgba(var(--color-primary-rgb), 0.15);
}


/* --------------------------------------------------------------------------
   8. QR Menu — Modifier groups on product page
   -------------------------------------------------------------------------- */

.product-detail__modifiers {
  margin: var(--space-4) 0;
}

.product-detail__modifiers .checkout-section__label {
  font-weight: var(--weight-semibold);
  font-size: var(--font-base);
  margin-bottom: var(--space-2);
}

.product-detail__modifiers .checkout-radios {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.product-detail__modifiers .checkout-radio {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border: 1.5px solid var(--color-border-dark);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 250ms ease, background 250ms ease;
}

.product-detail__modifiers .checkout-radio--active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}


/* --------------------------------------------------------------------------
   9. QR Menu — Old price strikethrough
   -------------------------------------------------------------------------- */

.product-card__old-price {
  text-decoration: line-through;
  color: var(--color-text-tertiary);
  font-size: var(--font-xs);
  margin-right: 4px;
}


/* --------------------------------------------------------------------------
   10. Restaurant Closed Overlay
   -------------------------------------------------------------------------- */

#closed-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  animation: closedFadeIn 0.3s ease;
}

@keyframes closedFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.closed-banner {
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: closedSlideUp 0.35s ease;
}

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

.closed-banner__icon {
  margin-bottom: var(--space-4);
}

.closed-banner__title {
  font-size: var(--font-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.closed-banner__subtitle {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-5);
}

.closed-schedule {
  text-align: left;
  background: var(--color-surface-alt, #f8fafc);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
}

.closed-schedule__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-sm);
}

.closed-schedule__row:last-child {
  border-bottom: none;
}

.closed-schedule__day {
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.closed-schedule__time {
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.closed-schedule__row--off .closed-schedule__day {
  color: var(--color-text-tertiary);
}

.closed-schedule__row--off .closed-schedule__time {
  color: var(--color-error, #ef4444);
  font-weight: var(--weight-medium);
}

.closed-banner__btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-size: var(--font-base);
  font-weight: var(--weight-semibold);
  border: none;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease;
}

.closed-banner__btn:active {
  transform: scale(0.96);
  background: var(--color-primary-hover);
}


/* --------------------------------------------------------------------------
   AI Recommendations Page
   -------------------------------------------------------------------------- */

.ai-page {
  padding-bottom: 100px;
}

.ai-header {
  text-align: center;
  padding: var(--space-6) var(--page-px) var(--space-4);
}

.ai-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: #fff;
  margin-bottom: var(--space-3);
  box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.3);
}

.ai-header__icon svg {
  width: 28px;
  height: 28px;
}

.ai-header__title {
  font-size: var(--font-xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.3px;
}

.ai-header__sub {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

.ai-section {
  padding: 0 var(--page-px);
  margin-bottom: var(--space-6);
}

.ai-section__title {
  font-size: var(--font-lg);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 var(--space-1) 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

.ai-section__icon {
  font-size: 20px;
  line-height: 1;
}

.ai-section__sub {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-4) 0;
}

/* Top products horizontal scroll */
.ai-top-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 calc(-1 * var(--page-px));
  padding-left: var(--page-px);
  padding-right: var(--page-px);
  scroll-snap-type: x proximity;
}

.ai-top-scroll::-webkit-scrollbar {
  display: none;
}

.ai-top-card {
  flex-shrink: 0;
  width: 150px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
  scroll-snap-align: start;
}

.ai-top-card:active {
  transform: scale(0.97);
}

/* Rank badges */
.ai-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-text);
  color: #fff;
  font-size: 12px;
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.ai-rank--1 { background: linear-gradient(135deg, #FFD700, #FFA000); color: #fff; }
.ai-rank--2 { background: linear-gradient(135deg, #E0E0E0, #9E9E9E); color: #fff; }
.ai-rank--3 { background: linear-gradient(135deg, #CD7F32, #A0522D); color: #fff; }

.ai-top-card__img {
  width: 150px;
  height: 120px;
  overflow: hidden;
  background: var(--color-surface-alt, #f5f5f5);
}

.ai-top-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-top-card__no-img {
  width: 100%;
  height: 100%;
  background: var(--color-surface-alt, #f5f5f5);
}

.ai-top-card__body {
  padding: 8px 12px 12px;
}

.ai-top-card__name {
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: 34px;
  color: var(--color-text);
}

.ai-top-card__meta {
  margin-top: 2px;
}

.ai-top-card__orders {
  font-size: var(--font-xs);
  color: var(--color-text-secondary);
}

.ai-top-card__price {
  display: block;
  font-size: var(--font-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-top: 4px;
}

.ai-top-card__add {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 0;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  text-align: center;
  transition: transform 150ms ease, background 150ms ease;
}

.ai-top-card__add:active {
  transform: scale(0.94);
  background: var(--color-primary-hover);
}

/* Combo cards */
.ai-combos {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ai-combo {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}

.ai-combo__header {
  margin-bottom: 12px;
}

.ai-combo__badge {
  display: inline-block;
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 3px 12px;
  border-radius: 999px;
}

.ai-combo__products {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-combo__product {
  flex: 1;
  text-align: center;
  cursor: pointer;
  min-width: 0;
}

.ai-combo__img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  display: block;
  margin: 0 auto 8px;
  border: 1px solid var(--color-border);
}

.ai-combo__img--empty {
  background: var(--color-surface-alt, #f5f5f5);
}

.ai-combo__name {
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  color: var(--color-text);
}

.ai-combo__price {
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
  color: var(--color-text-secondary);
  display: block;
  margin-top: 2px;
}

.ai-combo__plus {
  font-size: 24px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  flex-shrink: 0;
  line-height: 1;
}

.ai-combo__total {
  text-align: center;
  font-size: var(--font-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.ai-combo__add-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.25);
  letter-spacing: 0.2px;
}

.ai-combo__add-btn:active {
  transform: scale(0.96);
  background: var(--color-primary-hover);
}

/* Empty state */
.ai-empty {
  text-align: center;
  padding: 80px var(--page-px) 40px;
  color: var(--color-text-secondary);
}

.ai-empty__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: var(--color-text-tertiary, #ccc);
}

.ai-empty__icon svg {
  width: 64px;
  height: 64px;
}

.ai-empty h2 {
  font-size: var(--font-lg);
  color: var(--color-text);
  margin: 0 0 8px 0;
}

.ai-empty p {
  font-size: var(--font-sm);
  margin: 0;
}

/* Footer */
.ai-footer {
  text-align: center;
  padding: var(--space-6) var(--page-px);
}

.ai-footer__text {
  font-size: var(--font-xs);
  color: var(--color-text-tertiary, #999);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-footer__text svg {
  width: 14px;
  height: 14px;
}


/* --------------------------------------------------------------------------
   AI Page — Guest Favorites section (stars instead of rank)
   -------------------------------------------------------------------------- */
.ai-fav-card__rating {
  display: flex; align-items: center; gap: 2px;
  font-size: var(--font-xs); color: var(--color-warning, #f59e0b);
  font-weight: var(--weight-bold);
  position: absolute; top: 8px; left: 8px;
  background: rgba(255,255,255,0.95); border-radius: var(--radius-full);
  padding: 2px 8px; backdrop-filter: blur(8px);
}

/* --------------------------------------------------------------------------
   AI Page — Worth Trying section (NEW/PROMO badges)
   -------------------------------------------------------------------------- */
.ai-try-badge {
  display: inline-block; padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: var(--weight-bold);
  text-transform: uppercase; letter-spacing: 0.5px;
  position: absolute; top: 8px; left: 8px;
}
.ai-try-badge--new { background: #10b981; color: #fff; }
.ai-try-badge--promo { background: var(--color-primary); color: #fff; }

/* --------------------------------------------------------------------------
   AI Page — Recently Ordered section
   -------------------------------------------------------------------------- */
.ai-recent-list { display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--page-px); }
.ai-recent-card {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border-radius: var(--radius-lg);
  background: var(--color-surface, #f9fafb); border: 1px solid var(--color-border);
}
.ai-recent-card__img {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  object-fit: cover; flex-shrink: 0;
}
.ai-recent-card__info { flex: 1; min-width: 0; }
.ai-recent-card__name {
  font-size: var(--font-sm); font-weight: var(--weight-semibold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-recent-card__meta {
  display: flex; align-items: center; gap: var(--space-2); margin-top: 2px;
}
.ai-recent-card__price {
  font-size: var(--font-sm); font-weight: var(--weight-bold);
  color: var(--color-primary);
}
.ai-recent-card__time {
  font-size: var(--font-xs); color: var(--color-text-tertiary, #9ca3af);
}
.ai-recent-card__add {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  border: none; background: var(--color-primary); color: #fff;
  font-size: 18px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}


/* --------------------------------------------------------------------------
   Favorites Page
   -------------------------------------------------------------------------- */

.favorites-page {
  padding: var(--space-4) var(--page-px) 100px;
}

.fav-list {
  display: flex;
  flex-direction: column;
}

.fav-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  transition: opacity 250ms ease, transform 250ms ease;
}

.fav-card:last-child {
  border-bottom: none;
}

.fav-card__img {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-surface-alt);
  display: block;
}

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

.fav-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fav-card__name {
  font-size: var(--font-base);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fav-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.fav-card__price {
  font-size: var(--font-base);
  font-weight: 800;
  color: var(--color-text);
}

.fav-card__old-price {
  text-decoration: line-through;
  color: var(--color-text-tertiary);
  font-size: var(--font-sm);
  font-weight: var(--weight-normal);
  margin-right: 6px;
}

.fav-card__remove {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: #EF4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: transform 200ms ease, background 200ms ease;
}

.fav-card__remove:active {
  transform: scale(0.85);
  background: rgba(239, 68, 68, 0.1);
}

.fav-card__remove svg {
  width: 22px;
  height: 22px;
}

/* Favorites badge in bottom nav */
.bottom-nav__badge--fav {
  background: #EF4444;
}
