/* =============================================
   PHIEXE MARKETPLACE - DESIGN SYSTEM
   Orange Theme | Foodpanda/Shopee Style
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #FF5A00;
  --primary-dark: #D94E00;
  --primary-light: #FF7A2F;
  --primary-50: #FFF5EE;
  --primary-100: #FFE0CC;
  --secondary: #FF8C42;
  --bg: #F4F4F6;
  --card: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #6B6B80;
  --text-light: #9999AA;
  --border: #EBEBF0;
  --success: #2ECC71;
  --warning: #F39C12;
  --danger: #E74C3C;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
  --shadow-orange: 0 4px 20px rgba(255,90,0,0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --nav-height: 68px;
  --header-height: 60px;
  --font-body: 'Nunito', sans-serif;
  --font-head: 'Poppins', sans-serif;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + 12px);
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); outline: none; border: none; }
img { display: block; }
ul { list-style: none; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 0; height: 0; }

/* ─── PAGE WRAPPER ─── */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ─── TOP HEADER ─── */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo-mark span { color: var(--text-primary); }

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 50px;
  padding: 9px 14px;
  gap: 8px;
  border: 1.5px solid transparent;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--primary-100);
}

.search-bar input {
  flex: 1;
  background: none;
  font-size: 14px;
  color: var(--text-primary);
}

.search-bar input::placeholder { color: var(--text-light); }
.search-bar .icon { color: var(--text-secondary); font-size: 15px; }

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  transition: var(--transition);
  position: relative;
}

.icon-btn:hover { background: var(--primary-100); color: var(--primary); }

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
  font-family: var(--font-head);
}

/* ─── BOTTOM NAV ─── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--text-light);
  font-size: 10px;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.nav-item.active { color: var(--primary); }

.nav-item .nav-icon {
  font-size: 22px;
  transition: var(--transition);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 32px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

/* Center cart button */
.nav-item.nav-center {
  position: relative;
}

.nav-center-btn {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: var(--shadow-orange);
  transition: var(--transition);
  margin-bottom: 8px;
}

.nav-center-btn:hover { transform: scale(1.08); }
.nav-item.nav-center.active .nav-center-btn { background: var(--primary-dark); }

/* ─── SECTION HEADERS ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 10px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* ─── BANNER SLIDER ─── */
.banner-slider-wrap {
  padding: 0 16px;
  position: relative;
}

.banner-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.banner-track:active { cursor: grabbing; }

.banner-slide {
  flex: 0 0 calc(100% - 0px);
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1080/480;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

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

.banner-slide .banner-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  color: #fff;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 6px;
}

.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50px;
  background: var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.banner-dot.active {
  width: 20px;
  background: var(--primary);
}

/* ─── CATEGORY LIST ─── */
.category-scroll {
  padding: 0 16px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.category-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  transition: var(--transition);
  border: 2px solid transparent;
}

.category-chip.active .category-icon-wrap,
.category-chip:hover .category-icon-wrap {
  background: var(--primary-100);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.category-chip span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
}

.category-chip.active span { color: var(--primary); }

/* ─── MERCHANT CARDS ─── */
.merchants-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.merchant-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.merchant-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.merchant-card:active { transform: scale(0.99); }

.merchant-cover {
  width: 100%;
  aspect-ratio: 1080/500;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
}

.merchant-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
}

.merchant-logo {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
  margin-top: -30px;
  box-shadow: var(--shadow-sm);
}

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

.merchant-name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merchant-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.merchant-meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.merchant-meta-item .star { color: #F5A623; }
.merchant-meta-item .dot { color: var(--border); font-size: 8px; }

.merchant-tags {
  display: flex;
  gap: 6px;
  padding: 0 12px 12px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  background: var(--primary-50);
  color: var(--primary);
}

.tag.promo { background: #FFF5E5; color: #E67E22; }
.tag.new { background: #E8F8F0; color: var(--success); }
.tag.closed { background: #F5F5F5; color: var(--text-light); }

/* ─── PRODUCT GRID ─── */
.products-grid {
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-card:active { transform: scale(0.98); }

.product-img-wrap {
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 50px;
  font-family: var(--font-head);
}

.product-badge.sale { background: var(--danger); }
.product-badge.new-badge { background: var(--success); }

.product-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.product-fav:hover { transform: scale(1.1); }
.product-fav.active { background: #FFF0F0; }

.product-info { padding: 10px; }

.product-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.product-shop {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 6px;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-block {}

.price-main {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.price-old {
  font-size: 11px;
  color: var(--text-light);
  text-decoration: line-through;
}

.add-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: var(--shadow-orange);
}

.add-btn:hover { background: var(--primary-dark); transform: scale(1.1); }
.add-btn:active { transform: scale(0.95); }

/* ─── RATING STARS ─── */
.stars {
  display: inline-flex;
  gap: 1px;
  font-size: 12px;
  color: #F5A623;
}

/* ─── BTN COMPONENTS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 50px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 24px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-orange);
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover { background: var(--primary-50); }

.btn-block { width: 100%; }

.btn-sm {
  font-size: 13px;
  padding: 9px 18px;
}

/* ─── FLOATING CART BAR ─── */
.floating-cart {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--primary);
  border-radius: var(--radius-xl);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-orange);
  cursor: pointer;
  transition: var(--transition);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.floating-cart.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.floating-cart:hover { transform: translateX(-50%) translateY(-2px); }

.fc-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 50px;
  font-family: var(--font-head);
}

.fc-label {
  flex: 1;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-head);
}

.fc-price {
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  font-family: var(--font-head);
}

/* ─── PAGE-SPECIFIC: SHOP PAGE ─── */
.shop-cover-wrap {
  position: relative;
}

.shop-cover-img {
  width: 100%;
  aspect-ratio: 1080/500;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.shop-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,0.5));
}

.shop-logo-wrap {
  position: absolute;
  bottom: -28px;
  left: 16px;
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  border: 3px solid #fff;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.shop-info-card {
  background: var(--card);
  padding: 40px 16px 16px;
  margin-bottom: 12px;
}

.shop-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.shop-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.shop-stats {
  display: flex;
  gap: 20px;
}

.shop-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.shop-stat-val {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.shop-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.product-filter-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 50;
}

.filter-tab {
  flex: 0 0 auto;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 2.5px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.filter-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ─── PRODUCT DETAIL PAGE ─── */
.product-detail-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: var(--bg);
}

.product-detail-body {
  background: var(--card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: -20px;
  position: relative;
  padding: 20px 16px;
}

.detail-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.detail-price {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
}

.detail-old-price {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 6px;
}

.detail-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.detail-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  transition: var(--transition);
  cursor: pointer;
}

.qty-btn:hover { background: var(--primary-100); }
.qty-btn:active { transform: scale(0.9); }

.qty-num {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  min-width: 30px;
  text-align: center;
}

.sticky-add-to-cart {
  position: sticky;
  bottom: calc(var(--nav-height) + 12px);
  left: 0;
  right: 0;
  background: var(--card);
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  z-index: 100;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ─── CART PAGE ─── */
.cart-list { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }

.cart-item-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}

.cart-item-details { flex: 1; min-width: 0; }

.cart-item-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--text-primary);
}

.cart-item-shop {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 8px;
}

.cart-item-price {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-remove {
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}
.cart-remove:hover { color: var(--danger); }

.cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 50px;
  padding: 4px 10px;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.cart-qty-btn:hover { border-color: var(--primary); color: var(--primary); }

.cart-qty-num { font-weight: 800; font-size: 14px; min-width: 20px; text-align: center; }

.cart-summary-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 16px;
  box-shadow: var(--shadow-sm);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.summary-row:not(:last-child) { border-bottom: 1px solid var(--border); }

.summary-row.total {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.summary-row.total .val { color: var(--primary); }

/* ─── CHECKOUT PAGE ─── */
.checkout-section {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 12px 16px;
  box-shadow: var(--shadow-sm);
}

.checkout-section-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-section-title .icon { color: var(--primary); }

.form-group { margin-bottom: 12px; }

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text-primary);
  border: 1.5px solid transparent;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--primary-100);
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.payment-option:hover { border-color: var(--primary-100); }

.payment-option.selected {
  border-color: var(--primary);
  background: var(--primary-50);
}

.payment-icon { font-size: 24px; }
.payment-label { font-weight: 700; font-size: 14px; }
.payment-sublabel { font-size: 12px; color: var(--text-secondary); }

.payment-radio {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.payment-option.selected .payment-radio {
  border-color: var(--primary);
  background: var(--primary);
}

.payment-option.selected .payment-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* ─── ORDER HISTORY PAGE ─── */
.order-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 0 16px 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}

.order-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.order-id {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.order-status {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 50px;
}

.status-delivered { background: #E8F8F0; color: var(--success); }
.status-processing { background: #FFF5E5; color: var(--warning); }
.status-cancelled { background: #FCECED; color: var(--danger); }
.status-pending { background: var(--primary-50); color: var(--primary); }

.order-items-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.order-item-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg);
}

.order-item-info { flex: 1; }
.order-item-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.order-item-qty { font-size: 12px; color: var(--text-secondary); }

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.order-date { font-size: 12px; color: var(--text-light); font-weight: 600; }
.order-total { font-family: var(--font-head); font-size: 15px; font-weight: 800; color: var(--primary); }

/* ─── PROFILE PAGE ─── */
.profile-hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 30px 16px 50px;
  position: relative;
}

.profile-avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.5);
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
}

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

.profile-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.profile-email { font-size: 13px; color: rgba(255,255,255,0.75); font-weight: 600; }

.profile-stats-row {
  display: flex;
  background: var(--card);
  border-radius: var(--radius-lg);
  margin: -30px 16px 0;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.profile-stat {
  flex: 1;
  padding: 16px 8px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.profile-stat:last-child { border-right: none; }
.profile-stat-val { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--primary); }
.profile-stat-label { font-size: 11px; color: var(--text-secondary); font-weight: 600; }

.menu-section { margin: 20px 16px 0; }
.menu-section-title { font-size: 12px; font-weight: 800; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; }

.menu-list {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--primary-50); }
.menu-item:active { background: var(--primary-100); }

.menu-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.menu-item-label { flex: 1; font-weight: 700; font-size: 14px; }
.menu-item-arrow { color: var(--text-light); font-size: 16px; }

/* ─── EMPTY STATE ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
}

.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-title { font-family: var(--font-head); font-size: 18px; font-weight: 800; margin-bottom: 8px; color: var(--text-primary); }
.empty-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }

/* ─── PROMO BADGE ─── */
.promo-banner {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  margin: 0 16px;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-orange);
  cursor: pointer;
  transition: var(--transition);
}

.promo-banner:hover { transform: translateY(-1px); }
.promo-icon { font-size: 28px; }
.promo-text { flex: 1; }
.promo-title { font-family: var(--font-head); font-size: 14px; font-weight: 800; color: #fff; }
.promo-sub { font-size: 12px; color: rgba(255,255,255,0.8); font-weight: 600; }
.promo-cta { font-size: 12px; font-weight: 800; color: #fff; background: rgba(255,255,255,0.2); padding: 5px 12px; border-radius: 50px; white-space: nowrap; }

/* ─── SUCCESS ANIMATION ─── */
@keyframes checkmark {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  70% { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.success-icon { animation: checkmark 0.5s ease forwards; }

/* ─── LOADING SKELETON ─── */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ─── TOAST ─── */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 448px;
  pointer-events: none;
}

.toast {
  background: var(--text-primary);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease;
  pointer-events: auto;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── OVERLAY / MODAL ─── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(2px);
}

.overlay.active { opacity: 1; pointer-events: auto; }

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 400;
  padding: 24px 16px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 80vh;
  overflow-y: auto;
}

.bottom-sheet.active { transform: translateX(-50%) translateY(0); }

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 20px;
}

/* ─── SCROLL AREA ─── */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-x::-webkit-scrollbar { display: none; }

/* ─── UTILITIES ─── */
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16 { padding: 16px; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-secondary); }
.text-primary-color { color: var(--primary); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }

/* ─── RESPONSIVE DESKTOP FRAME ─── */
@media (min-width: 480px) {
  body {
    box-shadow: var(--shadow-lg);
    min-height: 100vh;
  }
}
