/* ============================================
   WarkopMA - Main Stylesheet
   Theme: Warm, Modern, Food Delivery
   ============================================ */

:root {
  --primary:       #FF4500;
  --primary-dark:  #CC3700;
  --primary-light: #FF6B35;
  --secondary:     #FFA500;
  --accent:        #FFD700;
  --success:       #22C55E;
  --danger:        #EF4444;
  --bg:            #FFFBF7;
  --bg-card:       #FFFFFF;
  --bg-subtle:     #FFF4EE;
  --text:          #1A1A1A;
  --text-muted:    #6B6B6B;
  --text-light:    #A0A0A0;
  --border:        #F0E8E0;
  --shadow-sm:     0 2px 8px rgba(255,69,0,.08);
  --shadow-md:     0 8px 24px rgba(255,69,0,.12);
  --shadow-lg:     0 16px 48px rgba(255,69,0,.16);
  --radius-sm:     8px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --radius-xl:     32px;
  --font-body:     'Plus Jakarta Sans', sans-serif;
  --font-display:  'Fraunces', serif;
  --header-h:      64px;
  --bnav-h:        70px;
  --transition:    0.25s cubic-bezier(.4,0,.2,1);
}

/* Dark Mode */
body.dark {
  --bg:        #111111;
  --bg-card:   #1E1E1E;
  --bg-subtle: #1A1A1A;
  --text:      #F5F5F5;
  --text-muted:#A0A0A0;
  --border:    #2A2A2A;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,.4);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--bnav-h) + 16px);
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: height var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  height: 56px;
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  max-width: 600px;
  margin: 0 auto;
  transition: height var(--transition);
}
.site-header.scrolled .header-inner { height: 56px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  transition: width var(--transition), height var(--transition);
}
.site-header.scrolled .brand-logo { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  transition: font-size var(--transition);
}
.site-header.scrolled .brand-name { font-size: 17px; }
.brand-tag {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text);
  background: var(--bg-subtle);
  transition: background var(--transition), color var(--transition), transform var(--transition);
  position: relative;
}
.icon-btn:hover { background: var(--primary); color: #fff; transform: scale(1.08); }
.cart-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: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-card);
  opacity: 0;
  transform: scale(0);
  transition: opacity var(--transition), transform var(--transition);
}
.cart-badge.show { opacity: 1; transform: scale(1); }

/* ============ SEARCH BAR ============ */
.search-bar-wrap {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition), opacity var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-md);
}
.search-bar-wrap.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.search-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  transition: border-color var(--transition);
}
.search-bar-inner:focus-within { border-color: var(--primary); }
.search-bar-inner i { color: var(--text-muted); font-size: 15px; }
.search-bar-inner input {
  flex: 1;
  border: none;
  background: none;
  font-size: 15px;
  color: var(--text);
  outline: none;
}
.search-bar-inner input::placeholder { color: var(--text-light); }
.search-close {
  color: var(--text-muted);
  font-size: 16px;
  transition: color var(--transition);
}
.search-close:hover { color: var(--primary); }

.search-results {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.search-result-item:hover { background: var(--bg-subtle); }
.search-result-item img {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.search-result-info strong { display: block; font-size: 14px; }
.search-result-info span { font-size: 12px; color: var(--primary); font-weight: 600; }

/* ============ STORE CLOSED BANNER ============ */
.store-closed-banner {
  background: linear-gradient(135deg, #FFF1F0, #FFE4E1);
  border: 1.5px solid #FFCCC7;
  color: #CF1322;
  padding: 14px 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 0;
}
.store-closed-banner i { font-size: 18px; margin-top: 1px; flex-shrink: 0; }

/* ============ HERO SECTION ============ */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #FF4500 0%, #FF6B35 40%, #FFA500 100%);
  padding: 32px 20px 40px;
  margin-bottom: 8px;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='30'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,.3);
  letter-spacing: .3px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero-title em { font-style: italic; opacity: .9; }
.hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,.85);
  margin-bottom: 20px;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(255,255,255,.5);
  backdrop-filter: blur(8px);
  transition: background var(--transition);
}
.btn-hero-outline:hover { background: rgba(255,255,255,.25); }

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.2);
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 20px; color: #fff; font-weight: 800; }
.hero-stat span { font-size: 11px; color: rgba(255,255,255,.75); letter-spacing: .5px; text-transform: uppercase; }

/* ============ PROMO BANNER SLIDER ============ */
.promo-slider-section {
  padding: 16px 0 8px;
  overflow: hidden;
}
.promo-slider-track {
  display: flex;
  gap: 12px;
  padding: 0 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.promo-slider-track::-webkit-scrollbar { display: none; }
.promo-card {
  flex: 0 0 280px;
  height: 120px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  background: linear-gradient(135deg, #FF4500, #FFA500);
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
}
.promo-card:nth-child(2) { background: linear-gradient(135deg, #6366F1, #8B5CF6); }
.promo-card:nth-child(3) { background: linear-gradient(135deg, #059669, #10B981); }
.promo-card-emoji { font-size: 48px; flex-shrink: 0; }
.promo-card-text strong {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.promo-card-text span {
  color: rgba(255,255,255,.85);
  font-size: 12px;
  line-height: 1.4;
}

/* ============ SECTION COMMON ============ */
.section {
  padding: 24px 0 8px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.section-title span { color: var(--primary); }
.section-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============ CATEGORY PILLS ============ */
.category-section {
  padding: 16px 0;
}
.category-scroll {
  display: flex;
  gap: 10px;
  padding: 4px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-width: 68px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.cat-pill .cat-icon { font-size: 22px; }
.cat-pill:hover,
.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ============ PRODUCT GRID ============ */
.product-scroll {
  display: flex;
  gap: 12px;
  padding: 4px 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.product-scroll::-webkit-scrollbar { display: none; }
.product-scroll .product-card { flex: 0 0 160px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 4px 16px 16px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.product-card.unavailable { opacity: .55; pointer-events: none; }

.product-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-subtle);
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.07); }

/* Skeleton loader */
.product-img-wrap.skeleton-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--border) 50%, var(--bg-subtle) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.product-badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.badge-best   { background: var(--primary); color: #fff; }
.badge-new    { background: var(--success); color: #fff; }
.badge-promo  { background: var(--accent); color: #1A1A1A; }
.badge-habis  { background: #6B6B6B; color: #fff; }

.product-fav-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-light);
  transition: color var(--transition), transform var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.product-fav-btn.active { color: var(--primary); }
.product-fav-btn:hover { transform: scale(1.15); color: var(--primary); }

.product-info {
  padding: 12px;
}
.product-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-cat {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}
.product-price-old {
  font-size: 11px;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 4px;
  font-weight: 500;
}
.btn-add-cart {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,69,0,.3);
}
.btn-add-cart:hover {
  transform: scale(1.15);
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(255,69,0,.4);
}
.btn-add-cart:active { transform: scale(.95); }

/* ============ BESTSELLER - HORIZONTAL CARD ============ */
.product-hcard {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.product-hcard:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.product-hcard-img {
  width: 80px; height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.product-hcard-info { flex: 1; min-width: 0; }
.product-hcard-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-hcard-cat {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.product-hcard-rank {
  font-size: 11px;
  color: var(--secondary);
  font-weight: 600;
}
.product-hcard-rank i { margin-right: 3px; }
.product-hcard-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

/* Horizontal list */
.product-vlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 16px 16px;
}

/* ============ CART DRAWER ============ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-height: 85vh;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1101;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
}
.cart-drawer.open { transform: translateY(0); }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.cart-drawer-header h3 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}
.cart-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: background var(--transition);
}
.cart-close:hover { background: var(--border); }

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 10px;
}
.cart-empty img { width: 100px; opacity: .4; }
.cart-empty p { font-size: 16px; font-weight: 700; color: var(--text-muted); }
.cart-empty span { font-size: 13px; color: var(--text-light); }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img {
  width: 60px; height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-item-price { font-size: 13px; color: var(--primary); font-weight: 600; }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text);
  transition: all var(--transition);
}
.qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.qty-btn.remove-btn { border-color: var(--danger); color: var(--danger); }
.qty-btn.remove-btn:hover { background: var(--danger); color: #fff; }
.qty-num { font-size: 15px; font-weight: 700; min-width: 20px; text-align: center; }

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.cart-notes label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-notes textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-subtle);
  resize: none;
  height: 64px;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: 14px;
}
.cart-notes textarea:focus { border-color: var(--primary); }
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  margin-bottom: 14px;
}
.cart-total-row span { color: var(--text-muted); }
.cart-total-row strong { font-size: 20px; color: var(--primary); font-weight: 800; }

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px;
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(255,69,0,.35);
}
.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,69,0,.45);
}
.btn-checkout:active { transform: scale(.98); }

/* ============ BOTTOM NAVIGATION ============ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bnav-h);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 900;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: color var(--transition);
  letter-spacing: .3px;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
}
.bnav-item i { font-size: 20px; }
.bnav-item.active { color: var(--primary); }
.bnav-item.active i { animation: bounce-icon .4s ease; }
@keyframes bounce-icon {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.bnav-cart { position: relative; }
.bnav-cart-icon { position: relative; display: inline-block; }
.cart-badge-bottom {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--bg-card);
}

/* ============ PRODUCT DETAIL PAGE ============ */
.product-detail-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-subtle);
}
.product-detail-body {
  padding: 20px 16px;
}
.product-detail-badges { margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.product-detail-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 6px;
}
.product-detail-cat {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.product-detail-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}
.product-detail-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.product-detail-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}
.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.detail-meta-item i { color: var(--primary); font-size: 16px; }
.detail-meta-item strong { color: var(--text); font-weight: 700; }

.qty-control-large {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.qty-btn-large {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  transition: all var(--transition);
}
.qty-btn-large:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.qty-num-large { font-size: 22px; font-weight: 800; min-width: 36px; text-align: center; }

.btn-add-cart-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(255,69,0,.35);
}
.btn-add-cart-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,69,0,.45);
}
.btn-add-cart-large:active { transform: scale(.98); }
.btn-add-cart-large:disabled {
  background: var(--border);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #25D366;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  margin-top: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(37,211,102,.3);
}
.btn-share:hover { transform: translateY(-2px); }

/* ============ CHECKOUT PAGE ============ */
.checkout-section {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-card);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255,69,0,.1);
}
.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}
.payment-option:hover { border-color: var(--primary); }
.payment-option.selected {
  border-color: var(--primary);
  background: rgba(255,69,0,.05);
}
.payment-option input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; }
.payment-option label {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.order-summary-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-muted);
}
.summary-item:last-child { border-bottom: none; }
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 800;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid var(--border);
  color: var(--text);
}
.summary-total strong { color: var(--primary); font-size: 20px; }

/* ============ PAGE HEADER ============ */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 24px 16px 20px;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 140px; height: 140px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  position: relative;
}
.page-header p {
  font-size: 13px;
  color: rgba(255,255,255,.8);
  margin-top: 4px;
  position: relative;
}

/* ============ BACK BUTTON ============ */
.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.back-btn i { color: var(--primary); }

/* ============ BREADCRUMB ============ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb i { font-size: 10px; }

/* ============ TOAST ============ */
.toast-wrap {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 400px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1A1A1A;
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: toast-in .3s ease forwards;
  pointer-events: all;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast i { font-size: 16px; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-12px) scale(.95); }
}

/* ============ EMPTY STATE ============ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 8px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text); }
.empty-state p { font-size: 14px; color: var(--text-muted); }

/* ============ FILTER BAR ============ */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.filter-chip:hover,
.filter-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255,69,0,.06);
}

/* ============ RELATED PRODUCTS ============ */
.related-section {
  background: var(--bg-subtle);
  padding: 20px 0;
  margin-top: 8px;
}

/* ============ ANIMATIONS ============ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fade-up .5s ease forwards;
}
.animate-delay-1 { animation-delay: .1s; }
.animate-delay-2 { animation-delay: .2s; }
.animate-delay-3 { animation-delay: .3s; }

/* ============ MEDIA QUERIES ============ */
@media (min-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 600px) {
  .hero-title { font-size: 38px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 360px) {
  .product-scroll .product-card { flex: 0 0 140px; }
}

/* ====== SHAKE ANIMATION (stok penuh) ====== */
@keyframes shake-btn {
  0%,100% { transform: translateX(0) scale(1); }
  20%     { transform: translateX(-5px) scale(1.1); }
  40%     { transform: translateX(5px) scale(1.1); }
  60%     { transform: translateX(-4px) scale(1.05); }
  80%     { transform: translateX(4px) scale(1.05); }
}

/* ====== CART ITEM - VARIAN (nama panjang tidak terpotong) ====== */
.cart-item-name {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}
/* Badge varian kecil di dalam nama keranjang */
.cart-varian-badge {
  display: inline-block;
  font-size: 10px;
  background: rgba(255,69,0,.1);
  color: var(--primary);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  font-weight: 700;
  vertical-align: middle;
}

/* ====== VARIAN TOGGLE - DISABLED STATE ====== */
.toggle-btn.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  position: relative;
}
.badge-habis-mini {
  display: inline-block;
  font-size: 9px;
  background: var(--danger);
  color: #fff;
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: 4px;
  font-weight: 700;
  vertical-align: middle;
  line-height: 1.4;
}
/* Tombol (+) produk varian di listing — tampil sebagai icon "lihat detail" */
.btn-go-detail {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-go-detail:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

/* ====== TOMBOL + DI KERANJANG SAAT MAKS STOK ====== */
.qty-btn-max {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--border) !important;
}


/* =========================
   QUOTE SLIDER
========================= */

.quote-slider-wrap{
    width:100%;
    overflow:hidden;
    position:relative;
    margin-top:12px;
}

.quote-slider{
    display:flex;
    flex-wrap:nowrap;
    align-items:flex-start;
    transition:transform .7s ease-in-out;
    will-change: transform;
}

.quote-item{
    min-width:100%;
    flex:0 0 100%;
    text-align:center;
    box-sizing:border-box;
    padding:0 10px;
}

/* penting */
.quote-item .hero-title{
    margin:0;
    min-height:120px; /* samakan tinggi semua slide */
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
}

.quote-author{
    display:block;
    margin-top:12px;
    font-size:16px;
    font-style:normal;
    opacity:.8;
}