/* Kopi Bambang Design System */
:root {
  --bg-app: #090706; /* ultra deep charcoal */
  --bg-card: #15110f; /* warm coffee bean dark */
  --bg-input: #231c19; /* dark warm input background */
  --bg-nav: rgba(21, 17, 15, 0.85); /* glass nav */
  
  --accent-gold: #f59e0b; /* vibrant amber gold */
  --accent-gold-glow: rgba(245, 158, 11, 0.4);
  --accent-gold-subtle: rgba(245, 158, 11, 0.1);
  --accent-gold-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  
  --text-main: #fafaf9; /* soft warm white */
  --text-muted: #a8a29e; /* warm gray */
  --text-dark: #0c0a09;
  
  --border-subtle: rgba(120, 113, 108, 0.15);
  --border-gold: rgba(245, 158, 11, 0.25);
  
  --shadow-premium: 0 12px 40px rgba(0, 0, 0, 0.7);
  --shadow-gold: 0 4px 20px rgba(245, 158, 11, 0.15);
  --glass-bg: rgba(21, 17, 15, 0.75);
  --glass-border: rgba(245, 158, 11, 0.18);
  
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

/* Reset & Basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #030202;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* App Shell (Mobile Simulator Container) */
.app-container {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  overflow: hidden;
}

/* Header */
.app-header {
  background-color: var(--bg-app);
  padding: 20px 24px 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  box-shadow: var(--shadow-gold);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.notification-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-badge:hover {
  background: var(--accent-gold-subtle);
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold-glow);
}

.icon-bell {
  width: 20px;
  height: 20px;
  color: var(--text-main);
}

/* Content Area */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px 100px 24px; /* extra bottom padding for floating nav */
  scroll-behavior: smooth;
}

.app-content::-webkit-scrollbar {
  display: none;
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: tabFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ================= TAB 1: MENU (HOME) ================= */
.hero-card-ambiance {
  height: 190px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border-subtle);
}

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-card-ambiance:hover .hero-bg-img {
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(9, 7, 6, 0.95) 20%, rgba(9, 7, 6, 0.4) 60%, transparent 100%);
}

.hero-text-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-badge {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  font-weight: 700;
}

.hero-text-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
}

.hero-text-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Table Selector */
.table-selection-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.table-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-map-pin {
  width: 24px;
  height: 24px;
  color: var(--accent-gold);
}

.table-info-left span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-info-left strong {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 600;
}

.form-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.form-select:focus {
  border-color: var(--accent-gold);
}

/* Categories horizontal bar */
.categories-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.category-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  white-space: nowrap;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-btn.active {
  background: var(--accent-gold-gradient);
  color: var(--text-dark);
  border-color: transparent;
  box-shadow: var(--shadow-gold);
}

/* Menu Grid List */
.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-item-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  overflow: hidden;
  height: 128px;
  transition: all 0.3s ease;
}

.menu-item-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-premium);
}

.menu-item-img-wrapper {
  width: 128px;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}

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

.menu-item-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-gold-gradient);
  color: var(--text-dark);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.menu-item-info {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-item-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.menu-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.btn-add-item {
  width: 32px;
  height: 32px;
  background: var(--accent-gold-gradient);
  color: var(--text-dark);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-gold);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-add-item:hover {
  transform: scale(1.15);
}

.icon-plus {
  width: 16px;
  height: 16px;
}

/* ================= TAB 2: PESANAN ================= */
.status-header {
  text-align: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.status-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.status-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.no-order-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 50px 20px;
  text-align: center;
  color: var(--text-muted);
}

.icon-coffee-cup {
  width: 56px;
  height: 56px;
  color: var(--accent-gold-subtle);
  stroke-width: 1.25;
}

/* Active Order Tracking Styling */
.active-order-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-premium);
}

.active-order-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  font-size: 0.85rem;
}

.tracking-stepper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  padding-left: 28px;
}

.tracking-stepper::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background-color: var(--bg-input);
}

.step-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-input);
  border: 3px solid var(--bg-card);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-item.active::before {
  background-color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold);
}

.step-item.completed::before {
  background-color: var(--accent-gold);
}

.step-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.step-item.active .step-title {
  color: var(--accent-gold);
}

.step-item.completed .step-title {
  color: var(--text-main);
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* History List */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s ease;
}

.history-card:hover {
  border-color: var(--border-subtle);
}

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

.history-info strong {
  font-size: 0.9rem;
  font-weight: 700;
}

.history-info span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.history-status {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.badge-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.history-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ================= TAB 3: PROMO & UPDATE ================= */
.promo-banner-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-premium);
  aspect-ratio: 16 / 9;
}

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

/* NOBAR FEATURE CARD */
.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.score-game-card {
  border: 1.5px solid var(--border-gold);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.03) 100%);
}

.badge-live {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-main);
}

.game-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}

.score-input-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.team-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-input);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.flag {
  font-size: 1.6rem;
}

.score-input {
  width: 44px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
}

.score-input:focus {
  outline: none;
}

.vs-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* Vouchers Grid */
.vouchers-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.voucher-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.voucher-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.voucher-details p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-redeem {
  background-color: var(--bg-input);
  color: var(--accent-gold);
  border: 1.5px solid var(--border-gold);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-redeem:hover {
  background: var(--accent-gold-gradient);
  color: var(--text-dark);
  border-color: transparent;
  box-shadow: var(--shadow-gold);
}

/* ================= TAB 4: PROFIL ================= */
.user-profile-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 20px;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  background: var(--accent-gold-subtle);
  color: var(--accent-gold);
  border: 1.5px solid var(--accent-gold);
  width: 52px;
  height: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-gold);
}

.user-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.tier-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 30px;
  display: inline-block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gold-tier {
  background-color: var(--accent-gold-subtle);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
}

.profile-right {
  text-align: right;
}

.points-val {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.2;
}

.points-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* MEMBERSHIP CARD (Glassmorphism) */
.member-card {
  height: 190px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.member-card:hover {
  transform: translateY(-4px) scale(1.02);
}

.card-bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(21, 17, 15, 0.95) 60%, rgba(245, 158, 11, 0.08) 100%);
  backdrop-filter: blur(16px);
  z-index: 1;
}

.card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 0.75rem;
  letter-spacing: 2.5px;
  font-weight: 700;
  color: var(--accent-gold);
}

.card-emblem {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-code {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(to right, #ffffff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-holder {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.icon-scan {
  width: 20px;
  height: 20px;
}

/* Progress bar container */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-bar-track {
  height: 10px;
  background-color: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-gold-gradient);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Account Details Row List */
.profile-options-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background-color: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.profile-option-row {
  background-color: var(--bg-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 0.85rem;
}

.profile-option-row span {
  color: var(--text-muted);
}

.profile-option-row strong {
  font-weight: 600;
  color: var(--text-main);
}

/* ================= FLOATING BOTTOM NAVIGATION BAR ================= */
.app-nav-floating {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 20px;
  right: 20px;
  height: 68px;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: var(--shadow-premium);
  padding: 0 10px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  width: 22%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-btn.active {
  color: var(--accent-gold);
}

.nav-btn.active .nav-icon {
  transform: translateY(-2px) scale(1.1);
  filter: drop-shadow(0 2px 8px var(--accent-gold-glow));
}

.nav-icon {
  width: 22px;
  height: 22px;
  color: currentColor;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-btn span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav-icon-wrapper {
  position: relative;
}

.nav-status-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 1.5px solid var(--bg-card);
}

.nav-status-badge.hidden {
  display: none;
}

/* FLOATING CART BAR */
.floating-cart-bar {
  position: absolute;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px)); /* offset above floating navbar */
  left: 20px;
  right: 20px;
  background: var(--accent-gold-gradient);
  color: var(--text-dark);
  padding: 14px 20px;
  border-radius: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-premium), 0 0 15px rgba(245, 158, 11, 0.2);
  z-index: 95;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
}

.floating-cart-bar.hidden {
  transform: translateY(120px);
  opacity: 0;
  pointer-events: none;
}

.cart-badge-count {
  background-color: var(--text-dark);
  color: var(--accent-gold);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.cart-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
}

.cart-total-price {
  font-size: 1.05rem;
  font-weight: 800;
}

.cart-right {
  font-size: 0.85rem;
  font-weight: 800;
}

/* ================= MODERN MODAL DIALOGS ================= */
.modal-dialog {
  margin: auto;
  border: 1px solid var(--glass-border);
  background-color: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-main);
  border-radius: var(--radius-lg);
  width: calc(100% - 32px);
  max-width: 390px;
  max-height: 85vh;
  box-shadow: var(--shadow-premium);
  overflow-y: auto;
  outline: none;
}

/* Hide modal default backdrop to customize */
.modal-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0);
  transition:
    display 0.4s allow-discrete,
    overlay 0.4s allow-discrete,
    background-color 0.4s ease-out;
}

.modal-dialog[open]::backdrop {
  background-color: rgba(0, 0, 0, 0.8);

  @starting-style {
    background-color: rgba(0, 0, 0, 0);
  }
}

/* Transitions for Modal Container using starting-style */
.modal-dialog {
  opacity: 0;
  transform: scale(0.92) translateY(10px);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.4s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

.modal-dialog[open] {
  opacity: 1;
  transform: scale(1) translateY(0);

  @starting-style {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-detail-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.modal-item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.customize-section {
  margin-bottom: 20px;
}

.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.radio-group {
  display: flex;
  gap: 12px;
}

.radio-label {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.radio-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-label span {
  display: block;
  text-align: center;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.radio-label input:checked + span {
  background-color: var(--accent-gold-subtle);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.form-input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: var(--accent-gold);
}

.quantity-control-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 18px;
  background-color: var(--bg-input);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  width: 28px;
  height: 28px;
}

#qty-val {
  font-size: 1rem;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-subtle);
}

/* BUTTONS BUTTON */
.btn-primary {
  background: var(--accent-gold-gradient);
  color: var(--text-dark);
  font-weight: 700;
  border: none;
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--border-subtle);
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* QR Code Container specifics */
.qr-container {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.qr-code-box {
  background-color: white;
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.qr-pixel-row {
  display: flex;
  gap: 3px;
}

.qr-pixel-row span {
  width: 20px;
  height: 20px;
}

.qr-pixel-row span.black {
  background-color: #0c0a09;
}

.qr-pixel-row span.white {
  background-color: white;
}

.qr-instructions {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  padding: 0 10px;
}

/* Section Title wrappers */
.section-title-wrapper {
  margin-top: 6px;
  border-bottom: 1.5px solid var(--border-subtle);
  padding-bottom: 10px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Cart Items & Details inside Modal */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  max-height: 260px;
  overflow-y: auto;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-input);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.cart-item-details h5 {
  font-size: 0.9rem;
  font-weight: 700;
}

.cart-item-opts {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.cart-item-price-qty {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-item-qty {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cart-item-row-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.btn-remove-cart {
  color: #ef4444;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-remove-cart:hover {
  transform: scale(1.15);
}

.cart-summary-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.summary-row.total-row {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.text-success {
  color: #22c55e !important;
}

.payment-method-selector {
  display: flex;
  gap: 12px;
}

.payment-option {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.payment-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-box {
  display: block;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  text-align: center;
  transition: all 0.25s ease;
}

.payment-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.payment-option input:checked + .payment-box {
  border-color: var(--accent-gold);
  background-color: var(--accent-gold-subtle);
  color: var(--accent-gold);
}

/* Voucher Option in Cart */
.cart-voucher-section {
  margin-bottom: 20px;
}

/* ================= NATIVE POPOVER STYLING ================= */
[popover] {
  border: 1px solid var(--glass-border);
  background-color: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-main);
  padding: 18px;
  border-radius: var(--radius-md);
  width: 290px;
  box-shadow: var(--shadow-premium);
  position: absolute;
  top: 76px;
  right: 24px;
  margin: 0;
  outline: none;
}

[popover]:is(:popover-open, .\:popover-open) {
  display: block;
}

[popover] {
  opacity: 0;
  transform: translateY(-12px);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

[popover]:popover-open {
  opacity: 1;
  transform: translateY(0);

  @starting-style {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.popover-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.popover-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.notif-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(120, 113, 108, 0.1);
}

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

.notif-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-main);
}

.notif-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: block;
  margin-top: 6px;
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .modal-dialog, [popover] {
    transform: none !important;
    transition-duration: 0.1s !important;
  }
  @starting-style {
    .modal-dialog[open], [popover]:popover-open {
      transform: none !important;
    }
  }
}
