@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
  --primary: #ff4757;
  --primary-dark: #e82c42;
  --primary-light: #fff0f1;
  --primary-gradient: linear-gradient(135deg, #ff5e3a 0%, #ff2a54 100%);
  --primary-glow: rgba(255, 71, 87, 0.35);
  
  --secondary: #1e293b;
  --secondary-light: #334155;
  
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --surface-dark: #0f172a;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #94a3b8;
  
  --border: #e2e8f0;
  --border-focus: #ff4757;
  
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #3b82f6;
  --info-bg: #eff6ff;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 28px -6px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 35px -8px rgba(255, 71, 87, 0.22);
  --shadow-glow: 0 0 25px var(--primary-glow);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1140px;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* -------------------------------------------------------------
   Header & Navbar
------------------------------------------------------------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  padding: 12px max(16px, calc((100% - var(--container-max)) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px var(--primary-glow);
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  transform: rotate(-3deg);
  transition: var(--transition);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-wrapper:hover .brand-icon {
  transform: rotate(0deg) scale(1.05);
}

.brand-text {
  min-width: 0;
}

.brand-marquee-container {
  overflow: hidden;
  max-width: 100%;
  position: relative;
  display: block;
}

.brand-marquee-content {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: linear-gradient(135deg, #0f172a 0%, #ff4757 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-marquee-text {
  display: inline-block;
  white-space: nowrap;
  padding-right: 28px;
}

.brand-marquee-clone {
  display: none;
}

.brand-text small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  margin-top: -1px;
  white-space: nowrap;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-dark);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  white-space: nowrap;
  flex-shrink: 0;
}

.table-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.25); }
}

/* -------------------------------------------------------------
   Container & Page Wrapper
------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px 16px 120px;
}

/* -------------------------------------------------------------
   Hero Banner
------------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #31102e 100%);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 36px);
  margin-bottom: 22px;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 94, 58, 0.35) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-top-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-body {
  position: relative;
  z-index: 2;
  flex: 1;
}

.hero-image-box {
  position: relative;
  z-index: 2;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 3px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: block;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffb86c;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.hero h1 span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: #cbd5e1;
  font-size: clamp(13px, 1.6vw, 15px);
  max-width: 520px;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* Hero Social Media Pills */
.hero-social-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-social-btn.btn-ig {
  background: rgba(225, 48, 108, 0.2);
  color: #ffffff;
  border-color: rgba(225, 48, 108, 0.4);
}

.hero-social-btn.btn-ig:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 39, 67, 0.4);
}

.hero-social-btn.btn-tiktok {
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.hero-social-btn.btn-tiktok:hover {
  background: #000000;
  border-color: #25F4EE;
  box-shadow: -2px -2px 10px rgba(37, 244, 238, 0.4), 2px 2px 10px rgba(254, 44, 85, 0.4);
  transform: translateY(-2px);
}

.hero-social-btn.btn-wa {
  background: rgba(37, 211, 102, 0.2);
  color: #ffffff;
  border-color: rgba(37, 211, 102, 0.4);
}

.hero-social-btn.btn-wa:hover {
  background: #25d366;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.hero-social-btn.btn-creator {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.18);
}

.creator-logo-img {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.hero-social-btn.btn-creator span.creator-highlight {
  color: #60a5fa;
  font-weight: 800;
}

.hero-social-btn.btn-creator:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* -------------------------------------------------------------
   Search & Filter Bar
------------------------------------------------------------- */
.search-filter-wrapper {
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  margin-bottom: 14px;
}

.search-box input {
  width: 100%;
  padding: 13px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.chip:hover {
  border-color: #cbd5e1;
  color: var(--text-main);
}

.chip.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px var(--primary-glow);
}

/* -------------------------------------------------------------
   Menu Grid & Responsive Product Cards
------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 360px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.card.product {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-xs);
}

.card.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.food-badge-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  background-image: linear-gradient(90deg, #f1f5f9 0px, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite linear;
  display: grid;
  place-items: center;
  overflow: hidden;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.food-badge-wrap.is-loaded {
  animation: none;
  background: #f8fafc;
}

.food-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease-out, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.food-img.loaded {
  opacity: 1;
}

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

.food-emoji {
  font-size: clamp(48px, 8vw, 68px);
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.1));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card.product:hover .food-emoji {
  transform: scale(1.15) rotate(4deg);
}

.food-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  padding: 12px;
}

.category-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-dark);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-xs);
}

.badge-terlaris {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
  animation: pulseBadge 2.5s infinite ease-in-out;
}

@keyframes pulseBadge {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
  }
  50% {
    box-shadow: 0 4px 18px rgba(220, 38, 38, 0.7);
  }
}

/* Stock: low stock badge */
.badge-stok-low {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
  animation: pulseStok 2s infinite ease-in-out;
}

@keyframes pulseStok {
  0%, 100% { box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3); }
  50% { box-shadow: 0 4px 18px rgba(217, 119, 6, 0.65); }
}

/* Stock: sold-out overlay */
.food-sold-out-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  border-radius: inherit;
}

.food-sold-out-overlay span {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* Stock pills inside card-body */
.stock-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.3;
}

.stock-pill-empty {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.stock-pill-low {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  font-weight: 800;
}

.stock-pill-ready {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.stock-pill-unlimited {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Dim card when out of stock */
.card.is-habis .card-body {
  opacity: 0.55;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  font-family: var(--font-heading);
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.3;
}

.card-body p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.price-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.price-label {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-sub);
}

.price-val {
  font-family: var(--font-heading);
  font-size: clamp(14px, 1.8vw, 17px);
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
}

/* -------------------------------------------------------------
   Buttons
------------------------------------------------------------- */
.btn {
  border: 0;
  background: #f1f5f9;
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  min-height: 40px;
}

.btn:hover {
  background: #e2e8f0;
}

.btn.primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn.primary:hover {
  filter: brightness(1.06);
}

.btn.add-btn {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 71, 87, 0.15);
  min-height: 36px;
  white-space: nowrap;
}

.btn.add-btn:hover {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn.outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn.outline:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

/* -------------------------------------------------------------
   Floating Cart Bar
------------------------------------------------------------- */
.cartbar {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 520px);
  border: 0;
  background: var(--surface-dark);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  z-index: 40;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  font-family: inherit;
}

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

.cartbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cartbar-icon-box {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px var(--primary-glow);
  position: relative;
  flex-shrink: 0;
  overflow: visible;
}

.cartbar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

.cartbar-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cartbar-info span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.cartbar-info b {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.cartbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cartbar:hover .cartbar-right {
  background: var(--primary-gradient);
}

/* -------------------------------------------------------------
   Modal & Cart Drawer Sheet
------------------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.sheet {
  background: var(--surface);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  max-height: 85dvh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  position: relative;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 999px;
  margin: 0 auto 12px;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.sheet-head h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-head .close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.sheet-head .close-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.cart-items-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.cartitem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  gap: 12px;
}

.cartitem-details {
  min-width: 0;
}

.cartitem-details b {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cartitem-details small {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 12px;
}

.cart-qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 6px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.cart-qty-ctrl button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: #f1f5f9;
  color: var(--text-main);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.cart-qty-ctrl button:hover {
  background: var(--primary);
  color: #fff;
}

.cart-qty-ctrl span {
  font-weight: 700;
  font-size: 13px;
  min-width: 16px;
  text-align: center;
}

.empty-cart-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.empty-cart-state .empty-icon {
  font-size: 48px;
  margin-bottom: 8px;
  display: block;
}

.empty-cart-state h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

/* -------------------------------------------------------------
   Checkout Form in Drawer
------------------------------------------------------------- */
.checkout-section {
  background: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border);
}

.checkout-section h3 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
}

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--text-main);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
  resize: vertical;
  min-height: 56px;
}

.cart-summary-box {
  margin: 14px 0 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

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

.summary-row.total span:last-child {
  color: var(--primary-dark);
}

/* -------------------------------------------------------------
   Payment & Status Pages
------------------------------------------------------------- */
.payment-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px 14px;
  background: radial-gradient(circle at 50% 0%, #fff1f2 0%, #f8fafc 60%);
}

.paybox-card {
  background: var(--surface);
  width: 100%;
  max-width: 460px;
  padding: clamp(24px, 5vw, 36px) clamp(16px, 4vw, 28px);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.paybox-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--primary-gradient);
}

.pay-brand-badge {
  width: 52px;
  height: 52px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #fff;
  margin: 0 auto 12px;
  box-shadow: 0 8px 16px var(--primary-glow);
}

.paybox-card h1 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3.5vw, 24px);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.pay-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  word-break: break-all;
}

.amount-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin: 16px 0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

.amount-card span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.amount-card b {
  font-family: var(--font-heading);
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #fca5a5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.qris-display-box {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  margin: 16px 0;
  position: relative;
  box-shadow: var(--shadow-xs);
}

.qris-header-logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  font-weight: 800;
  font-size: 14px;
  color: #c90000;
}

.qris-qr-container {
  display: grid;
  place-items: center;
  padding: 8px;
}

.qris-qr-container canvas,
.qris-qr-container img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--radius-sm);
}

.qris-footer-help {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.4;
}

.notice-banner {
  background: var(--warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  margin-bottom: 16px;
  text-align: left;
  line-height: 1.4;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* -------------------------------------------------------------
   Status Progress Stepper & High-End Animations
------------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  margin: 12px 0 16px;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.status-pill.waiting_payment { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.status-pill.new { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-pill.cooking { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.status-pill.ready { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-pill.completed { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
.status-pill.cancelled { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Status Hero Stage Graphic */
.status-hero-box {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
}

.status-hero-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: grid;
  place-items: center;
  font-size: 38px;
  color: #fff;
  z-index: 3;
  box-shadow: 0 10px 25px var(--primary-glow);
  position: relative;
  animation: heroFloat 3s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.03); }
}

.status-radar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0.6;
  animation: radarExpand 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

.status-radar-ring.delay-1 {
  animation-delay: 0.7s;
}

.status-radar-ring.delay-2 {
  animation-delay: 1.4s;
}

@keyframes radarExpand {
  0% { transform: scale(0.65); opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Steam particles for cooking */
.steam-wrap {
  position: absolute;
  top: -12px;
  display: flex;
  gap: 6px;
  z-index: 4;
}

.steam-particle {
  font-size: 14px;
  animation: steamRise 1.8s infinite ease-out;
  opacity: 0;
}

.steam-particle:nth-child(2) { animation-delay: 0.5s; }
.steam-particle:nth-child(3) { animation-delay: 1s; }

@keyframes steamRise {
  0% { transform: translateY(0) scale(0.8); opacity: 0.8; }
  100% { transform: translateY(-24px) scale(1.3); opacity: 0; }
}

/* Stepper Container */
.stepper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin: 18px 0 22px;
  padding: 16px;
  background: #f8fafc;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  position: relative;
}

.step-card {
  display: flex;
  gap: 14px;
  position: relative;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  background: transparent;
}

.step-card:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 28px;
  top: 44px;
  bottom: -14px;
  width: 2.5px;
  background: #e2e8f0;
  z-index: 1;
}

.step-card.completed:not(:last-child)::after {
  background: #10b981;
}

.step-card.active:not(:last-child)::after {
  background: linear-gradient(180deg, #10b981 0%, #ff4757 60%, #cbd5e1 100%);
  background-size: 100% 200%;
  animation: streamLight 2s linear infinite;
}

@keyframes streamLight {
  0% { background-position: 0% 0%; }
  100% { background-position: 0% 200%; }
}

/* Active Highlight Card */
.step-card.active {
  background: #ffffff;
  border: 1px solid rgba(255, 71, 87, 0.25);
  box-shadow: 0 8px 24px -4px rgba(255, 71, 87, 0.15), 0 2px 6px rgba(0,0,0,0.03);
  transform: scale(1.01);
}

.step-icon-wrap {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  border: 2px solid #e2e8f0;
  transition: var(--transition);
}

.step-card.completed .step-icon {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.step-card.active .step-icon {
  background: var(--primary-gradient);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 4px var(--primary-light), 0 6px 16px var(--primary-glow);
  animation: activePulse 2s infinite ease-in-out;
}

@keyframes activePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.step-card.active .step-icon::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.2;
  animation: radarExpand 2s infinite ease-out;
  z-index: -1;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.step-content h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.step-card.completed h4 {
  color: #334155;
}

.step-content p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

.step-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.step-badge-live .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
  animation: pulsePrimary 1.5s infinite;
}

.step-badge-done {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ecfdf5;
  color: #059669;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.live-beacon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.live-beacon .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseGreen 1.8s infinite;
}

/* -------------------------------------------------------------
   Admin Dashboard & Tables
------------------------------------------------------------- */
.admin-header {
  background: #0f172a;
  color: #fff;
  border-bottom: 1px solid #1e293b;
  flex-wrap: wrap;
}

.admin-header .brand-text b {
  background: linear-gradient(135deg, #ffffff 0%, #ff4757 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-header .brand-text small {
  color: #94a3b8;
}

.admin-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-nav-links a,
.admin-nav-links button {
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.admin-nav-links .nav-link {
  color: #cbd5e1;
}

.admin-nav-links .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-nav-links .logout-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-nav-links .logout-btn:hover {
  background: #ef4444;
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-info small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-info b {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.stat-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.stat-card.stat-1 .stat-icon { background: #eff6ff; color: #3b82f6; }
.stat-card.stat-2 .stat-icon { background: #ecfdf5; color: #10b981; }
.stat-card.stat-3 .stat-icon { background: #fff7ed; color: #f97316; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(16px, 3vw, 22px);
  box-shadow: var(--shadow-xs);
}

.panelhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.panelhead h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
}

.order-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 14px;
  align-items: center;
  background: #ffffff;
  transition: var(--transition);
}

.order-row:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-xs);
}

@media (max-width: 768px) {
  .order-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.order-meta b {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.order-meta small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  word-break: break-word;
}

.order-price {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.paid { background: #dcfce7; color: #15803d; }
.status-badge.pending { background: #fef3c7; color: #b45309; }

.status-form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.status-form select {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  flex: 1;
  min-width: 140px;
}

.status-form .btn {
  padding: 7px 12px;
  font-size: 12px;
  min-height: 34px;
}

/* -------------------------------------------------------------
   QR Tables Printable Card
------------------------------------------------------------- */
.qr-card-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.qr-card-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.qr-card-item h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.qr-box-inner {
  margin: 12px auto;
  width: 150px;
  height: 150px;
  max-width: 100%;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  padding: 8px;
}

.qr-box-inner canvas,
.qr-box-inner img {
  max-width: 100% !important;
  height: auto !important;
}

.qr-card-item code {
  display: block;
  background: #f1f5f9;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  word-break: break-all;
  color: var(--text-muted);
  margin: 8px 0;
}

/* -------------------------------------------------------------
   Toast Message
------------------------------------------------------------- */
.toast-msg {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  font-size: 13px;
  font-weight: 700;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* -------------------------------------------------------------
   Branch Selector & Payment Method Cards (QRIS & Cash)
------------------------------------------------------------- */
.branch-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid rgba(255, 71, 87, 0.2);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}
.branch-top-badge:hover {
  background: #ffe4e6;
  transform: translateY(-1px);
}
.branch-top-badge .dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.checkout-subhead {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.selection-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .selection-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------
   Branch Dropdown Styles
------------------------------------------------------------- */
.branch-dropdown-wrapper {
  position: relative;
  width: 100%;
}

.branch-select-input {
  width: 100%;
  padding: 12px 38px 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: var(--shadow-xs);
}

.branch-select-input:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.branch-select-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.branch-dropdown-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.branch-dropdown-wrapper:focus-within .branch-dropdown-arrow {
  color: var(--primary);
  transform: translateY(-50%) rotate(180deg);
}

.branch-address-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
  padding: 2px 2px;
  line-height: 1.4;
}

.dot-branch-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
  flex-shrink: 0;
}

.selectable-card {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.selectable-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.selectable-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 4px 14px rgba(255, 71, 87, 0.15);
}

.selectable-card input[type="radio"] {
  display: none;
}

.selectable-card .radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
  margin-top: 2px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.selectable-card.active .radio-indicator {
  border-color: var(--primary);
  background: var(--primary);
}

.selectable-card.active .radio-indicator::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

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

.selectable-info b {
  font-size: 13px;
  color: var(--text-main);
}

.selectable-card.active .selectable-info b {
  color: var(--primary-dark);
}

.selectable-info small {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.badge-tag-mini {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-bottom: 2px;
  align-self: flex-start;
}
.badge-tag-qris {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.badge-tag-cash {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* Cash notice box in payment.php */
.cash-instruction-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 18px 0;
  text-align: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}

.cash-big-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

/* -------------------------------------------------------------
   Order History Modal & Buttons (Customer Self-Order)
------------------------------------------------------------- */
.history-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
  font-family: inherit;
}

.history-top-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff7ed;
}

.history-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.btn-history-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: var(--shadow-xs);
  margin-top: 4px;
}

.btn-history-v2:hover {
  border-color: var(--primary);
  background: #fff7ed;
  color: var(--primary);
}

.history-sheet {
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.history-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 12px 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.history-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.history-refresh-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-main);
}

.history-refresh-btn.spinning svg {
  animation: historySpin 0.7s linear infinite;
}

@keyframes historySpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.history-items-container {
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.history-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.history-card.is-current {
  border-color: #fdba74;
  background: #fffaf5;
}

.history-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.history-inv-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.history-meta-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.history-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.history-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.history-items-summary {
  font-size: 12.5px;
  color: #334155;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #f1f5f9;
  line-height: 1.4;
}

.history-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.history-total-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

.history-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.history-view-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(255, 71, 87, 0.25);
}

.history-current-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.history-empty-state {
  text-align: center;
  padding: 40px 16px;
  color: #64748b;
}

.history-empty-state h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.history-empty-state p {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

/* -------------------------------------------------------------
   Store Closed Screen (Customer Facing)
------------------------------------------------------------- */
.store-closed-card {
  background: #ffffff;
  border-radius: var(--radius-xl, 24px);
  border: 1.5px solid var(--border, #e2e8f0);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 48px 24px;
  text-align: center;
  max-width: 520px;
  margin: 32px auto 48px;
  animation: fadeIn 0.3s ease;
}
.store-closed-icon-wrap {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fef2f2;
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.15);
}
.store-closed-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 6px 16px;
  border-radius: 9999px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.store-closed-badge .dot-closed {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-dot 1.8s infinite;
}
.store-closed-title {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
  line-height: 1.3;
}
.store-closed-message {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 24px;
}
.store-closed-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  text-align: left;
  margin-bottom: 24px;
}
.store-closed-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.store-closed-info-row:last-child {
  margin-bottom: 0;
}
.store-closed-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-wa-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  transition: all 0.2s;
}
.btn-wa-contact:hover {
  background: #22bf5b;
  color: #ffffff;
  transform: translateY(-1px);
}

/* -------------------------------------------------------------
   Comprehensive Responsiveness Enhancements (HP, Tablet, Laptop)
------------------------------------------------------------- */

/* Laptop & Desktop Large Screens (min-width: 1025px) */
@media (min-width: 1025px) {
  .container {
    padding: 24px 20px 140px;
  }
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .card.product .card-body h3 {
    font-size: 16px;
  }
}

/* Tablet Screen (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .top {
    padding: 12px 20px;
  }
  .container {
    padding: 18px 18px 130px;
  }
  .hero {
    padding: 28px 24px;
    gap: 20px;
  }
  .hero {
    padding: 24px 20px;
    gap: 16px;
  }
  .hero-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .hero-image-box {
    width: 72px;
    height: 72px;
  }
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .cartbar {
    width: min(88%, 560px);
  }
}

/* Mobile & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
  .top {
    padding: 10px 14px;
    gap: 8px;
  }
  .brand-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  .brand-wrapper {
    max-width: 160px;
    flex-shrink: 1;
  }
  .brand-text {
    overflow: hidden;
    max-width: 110px;
  }
  .brand-marquee-container {
    width: 100%;
    max-width: 110px;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 6%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 90%, transparent 100%);
  }
  .brand-marquee-content {
    font-size: 14.5px;
    display: inline-flex;
    width: max-content;
    animation: brandMarquee 9s linear infinite;
  }
  .brand-marquee-clone {
    display: inline-block;
  }
  .brand-text small {
    font-size: 10px;
  }
  .history-top-btn {
    padding: 5px 9px;
    font-size: 11.5px;
    gap: 4px;
  }
  .branch-top-badge {
    padding: 5px 9px;
    font-size: 11px;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .table-badge {
    padding: 5px 10px;
    font-size: 11px;
  }
  .container {
    padding: 14px 12px 120px;
  }
  .hero {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 16px;
    border-radius: 20px;
    gap: 12px;
    text-align: left;
  }
  .hero-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .hero-image-box {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }
  .hero-tag {
    margin-bottom: 0;
    font-size: 11px;
    padding: 6px 14px;
  }
  .hero h1 {
    font-size: 22px;
    line-height: 1.25;
  }
  .hero p {
    font-size: 12.5px;
    margin-bottom: 14px;
  }
  .hero-social-wrap {
    gap: 8px;
  }
  .hero-social-btn {
    padding: 5px 11px;
    font-size: 11px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card.product {
    border-radius: 14px;
  }
  .card-body {
    padding: 10px;
  }
  .card-body h3 {
    font-size: 13.5px;
    margin-bottom: 2px;
  }
  .card-body p {
    font-size: 11px;
    margin-bottom: 8px;
    line-height: 1.35;
  }
  .price-val {
    font-size: 13.5px;
  }
  .btn.add-btn {
    padding: 6px 10px;
    font-size: 11px;
    min-height: 32px;
  }
  .category-tag, .badge-terlaris, .badge-stok-low {
    font-size: 8.5px;
    padding: 2px 7px;
  }
  .cartbar {
    width: calc(100% - 24px);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 10px 14px;
    border-radius: 16px;
  }
  .cartbar-icon-box {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
  .cartbar-info b {
    font-size: 14px;
  }
  .cartbar-right {
    padding: 6px 12px;
    font-size: 11.5px;
  }
  .sheet {
    max-height: 90vh;
    max-height: 90dvh;
    padding: 16px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .checkout-section {
    padding: 12px;
  }
  .branch-select-input {
    font-size: 12.5px;
    padding: 10px 32px 10px 10px;
  }
}

@keyframes brandMarquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Small Smartphone Screen (max-width: 380px) */
@media (max-width: 380px) {
  .brand-wrapper {
    max-width: 135px;
  }
  .brand-text {
    max-width: 88px;
  }
  .brand-marquee-container {
    max-width: 88px;
  }
  .brand-marquee-content {
    font-size: 13px;
    animation-duration: 7s;
  }
  .brand-text small {
    display: none;
  }
  .branch-top-badge span:not(.dot-live) {
    max-width: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .card-body {
    padding: 8px;
  }
  .price-val {
    font-size: 12.5px;
  }
  .btn.add-btn {
    padding: 5px 8px;
    font-size: 10.5px;
  }
}



