/* ============================================================
   QUMART – KATALOG PRODUK MINIMARKET
   style.css
   ============================================================ */

/* ---- RESET & BASE ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* ── Brand Palette ── */
  --primary: #EE4D2D;
  --primary-dark: #C93A1C;
  --primary-light: #FF7A55;
  --secondary: #FF9500;
  --accent: #FFD133;
  --accent-green: #06d6a0;
  /* Gradient CTA */
  --shopee-grad: linear-gradient(135deg, #FF6B4A 0%, #EE4D2D 100%);
  --shopee-grad-h: linear-gradient(135deg, #FF8060 0%, #F55020 100%);

  /* ── Dark Background (clean neutral) ── */
  --bg: #0d0d12;
  --bg2: #141419;
  --bg3: #1a1a22;
  --surface: #21212c;
  --surface2: #2a2a38;
  --surface3: #323244;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(238, 77, 45, 0.35);
  --text: #f0f0f8;
  --text-muted: #9090b0;
  --text-dim: #555570;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 8px 32px rgba(238, 77, 45, 0.25);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
}

::-webkit-scrollbar-thumb {
  background: var(--surface2);
  border-radius: 4px;
}

/* ---- COMING SOON BADGE ---- */
.coming-soon-badge {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6b2b, #ff9500);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 50px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(255, 107, 43, 0.5);
  animation: badge-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes badge-pulse {

  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }

  50% {
    transform: translateX(-50%) scale(1.06);
    opacity: 0.85;
  }
}


/* ---- CONTAINER ---- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 13, 18, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(238, 77, 45, 0.08), 0 4px 24px rgba(0, 0, 0, 0.3);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(13, 13, 18, 0.96);
  box-shadow: 0 2px 32px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Image logo – navbar */
.logo-img {
  height: 64px;
  width: 64px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(238, 77, 45, 0.6);
  box-shadow: 0 0 0 6px rgba(238, 77, 45, 0.1), 0 4px 20px rgba(238, 77, 45, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}

.logo-img:hover {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 0 0 8px rgba(238, 77, 45, 0.2), 0 8px 32px rgba(238, 77, 45, 0.55);
}

/* Image logo – footer */
.logo-img-footer {
  height: 72px;
  width: 72px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid rgba(255, 107, 43, 0.35);
  box-shadow: 0 0 16px rgba(255, 107, 43, 0.25);
}

/* Keep text logo fallback just in case */
.logo-icon {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.logo-qu {
  background: var(--shopee-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-mart {
  color: var(--text);
}

/* Search */
.search-bar-wrap {
  flex: 1;
  max-width: 540px;
  margin: 0 auto;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0 16px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary);
  background: var(--surface2);
  box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.12), 0 4px 16px rgba(238, 77, 45, 0.1);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

#searchInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 10px;
}

#searchInput::placeholder {
  color: var(--text-dim);
}

.search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
}

.search-clear:hover {
  background: var(--surface2);
}

/* Admin Button */
.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.admin-nav-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--primary);
}

/* Admin nav compact (mobile) */
.admin-nav-btn-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.admin-nav-btn-icon:hover {
  background: var(--surface2);
  border-color: var(--primary);
}

/* Cart */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cart-btn {
  position: relative;
  background: var(--shopee-grad);
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(238, 77, 45, 0.45);
}

.cart-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(238, 77, 45, 0.65);
  background: var(--shopee-grad-h);
}

.cart-btn:active {
  transform: scale(0.95);
}

.cart-btn svg {
  width: 20px;
  height: 20px;
  color: white;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--secondary);
  color: #111;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}

/* ============================================================
   SHOPEE STYLE TOP SECTION
   ============================================================ */
.shopee-top-section {
  padding-top: 86px;
  /* offset navbar */
  padding-bottom: 24px;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

/* Shopee-style Carousel Slider */
.shopee-carousel {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .shopee-carousel {
    height: 240px;
  }
}

.shopee-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.shopee-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 28px;
  color: #fff;
  overflow: hidden;
}

.shopee-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.25) 0%, transparent 60%);
  pointer-events: none;
}

.shopee-slide.active {
  opacity: 1;
  visibility: visible;
}

.slide-badge {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 50px;
  width: fit-content;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slide-title {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 6px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .slide-title {
    font-size: 2rem;
  }
}

.slide-subtitle {
  font-size: 0.82rem;
  opacity: 0.88;
  max-width: 70%;
  line-height: 1.4;
  margin-bottom: 14px;
}

.slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  width: fit-content;
}

.slide-cta:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateX(3px);
}

.slide-visual {
  position: absolute;
  right: 24px;
  bottom: 10px;
  font-size: 4rem;
  opacity: 0.9;
  animation: floatEmoji 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatEmoji {

  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }

  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

@media (min-width: 768px) {
  .slide-visual {
    font-size: 6rem;
    bottom: 20px;
  }
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dots .dot.active {
  background: #fff;
  width: 20px;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* PPOB Container */
.ppob-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.ppob-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

@media (min-width: 768px) {
  .ppob-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

.ppob-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.ppob-item:hover {
  transform: translateY(-2px);
}

.ppob-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ppob-icon-wrap svg {
  width: 20px;
  height: 20px;
}

/* PPOB Gradient Themes */
.ppob-blue {
  background: linear-gradient(135deg, #2196F3, #1976D2);
}

.ppob-purple {
  background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.ppob-yellow {
  background: linear-gradient(135deg, #FFEB3B, #FBC02D);
  color: #333 !important;
}

.ppob-cyan {
  background: linear-gradient(135deg, #00BCD4, #0097A7);
}

.ppob-green {
  background: linear-gradient(135deg, #4CAF50, #388E3C);
}

.ppob-red {
  background: linear-gradient(135deg, #F44336, #D32F2F);
}

.ppob-gold {
  background: linear-gradient(135deg, #FF9800, #F57C00);
}

.ppob-pink {
  background: linear-gradient(135deg, #E91E63, #C2185B);
}

.ppob-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.25;
}

/* PPOB Modal Form Elements */
.ppob-form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ppob-form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.ppob-form-group input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
}

.ppob-form-group input:focus {
  border-color: var(--primary);
}

.ppob-nom-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.ppob-nom-card {
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ppob-nom-card:hover {
  background: var(--surface2);
}

.ppob-nom-card.selected {
  border-color: var(--primary);
  background: rgba(238, 77, 45, 0.08);
}

.ppob-card-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.ppob-card-price {
  font-size: 0.78rem;
  color: var(--primary-light);
  font-weight: 700;
}

.ppob-pay-btn {
  width: 100%;
  background: var(--shopee-grad);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}

.ppob-pay-btn:hover {
  background: var(--shopee-grad-h);
}


/* ============================================================
   PROMO RIBBON
   ============================================================ */
.promo-ribbon {
  /* Shopee header gradient, horizontal */
  background: linear-gradient(270deg, #f63, #f53d2d);
  overflow: hidden;
  padding: 0;
}

.ribbon-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  height: 40px;
}

.ribbon-label {
  flex-shrink: 0;
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  color: #fff;
  background: #D73B1E;
  /* Shopee primary-dark — solid anchor */
  position: relative;
  z-index: 2;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  padding-right: 28px;
  letter-spacing: 0.2px;
}

/* Scrolling track — takes remaining width, clips overflow */
.ribbon-track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  /* Fade out edges so text doesn't hard-cut */
  mask-image: linear-gradient(to right, transparent 0%, black 32px, black calc(100% - 32px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 32px, black calc(100% - 32px), transparent 100%);
}

.ribbon-items {
  display: flex;
  gap: 20px;
  animation: ribbonScroll 25s linear infinite;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
  font-weight: 500;
  /* Ensure it starts from the right edge of the track */
  will-change: transform;
}

@keyframes ribbonScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ---- Mobile: stack label atas, ticker bawah ---- */
@media (max-width: 600px) {
  .promo-ribbon {
    padding: 0;
  }

  .ribbon-inner {
    flex-direction: column;
    height: auto;
    gap: 0;
  }

  .ribbon-label {
    width: 100%;
    height: 32px;
    justify-content: center;
    clip-path: none;
    padding: 0 16px;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .ribbon-track {
    width: 100%;
    height: 36px;
    mask-image: linear-gradient(to right, transparent 0%, black 16px, black calc(100% - 16px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 16px, black calc(100% - 16px), transparent 100%);
  }

  .ribbon-items {
    font-size: 0.82rem;
    gap: 16px;
  }
}

/* ============================================================
   CATEGORIES
   ============================================================ */
.categories-section {
  padding: 72px 0 40px;
}

.section-header {
  text-align: center;
  margin-bottom: 44px;
  position: relative;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 900;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #f0f0f8 30%, #FF7A55 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 12px 20px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
  min-width: fit-content;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--shopee-grad);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}

.cat-card:hover {
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(238, 77, 45, 0.2);
}

.cat-card.active {
  background: var(--shopee-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(238, 77, 45, 0.45);
  transform: translateY(-2px);
}

.cat-icon {
  font-size: 1.4rem;
  line-height: 1;
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.products-section {
  padding: 20px 0 80px;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

#sortSelect {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 0.88rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

#sortSelect:focus {
  border-color: var(--primary);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: stretch;
}

/* Desktop: 4-kolom saat lebar */
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
  }
}

/* Product Card */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: fadeInUp 0.45s ease both;
  position: relative;
  will-change: transform;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(238, 77, 45, 0.15), 0 2px 8px rgba(0, 0, 0, 0.3);
  border-color: rgba(238, 77, 45, 0.4);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}

/* ── Shopee-style Image Wrapper ── */
.pimg-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Gambar asli — mulai invisible, fade-in setelah loaded */
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.4s ease;
}

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

.product-card:hover .product-img.img-loaded {
  transform: scale(1.06);
  /* Shopee zoom tipis saat hover */
}

/* Emoji fallback — muncul jika gambar gagal load */
.img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: var(--surface2);
}

/* ── Skeleton Shimmer (Shopee-style) ── */
.img-shimmer {
  background: linear-gradient(90deg,
      var(--surface2) 25%,
      rgba(255, 255, 255, 0.04) 37%,
      var(--surface2) 63%);
  background-size: 400% 100%;
  animation: shopeeShimmer 1.4s ease infinite;
}

@keyframes shopeeShimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}



.product-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary-light);
  margin-bottom: 5px;
  opacity: 0.8;
}

.product-name {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.35;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
  flex-shrink: 0;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.product-price {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary-light);
  white-space: nowrap;
  line-height: 1;
}

.product-original-price {
  font-size: 0.58rem;
  color: var(--text-dim);
  text-decoration: line-through;
  white-space: nowrap;
  line-height: 1;
}

.product-discount-badge {
  background: linear-gradient(135deg, rgba(238, 77, 45, 0.2), rgba(238, 77, 45, 0.1));
  color: #FF7A55;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0 3px;
  border-radius: 3px;
  border: 1px solid rgba(238, 77, 45, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 50px;
  z-index: 1;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge-promo {
  background: linear-gradient(135deg, rgba(238, 77, 45, 0.9), rgba(200, 58, 28, 0.9));
  color: white;
  box-shadow: 0 2px 6px rgba(238, 77, 45, 0.4);
}

.badge-baru {
  background: linear-gradient(135deg, rgba(255, 209, 51, 0.92), rgba(255, 149, 0, 0.92));
  color: #1a0a00;
  box-shadow: 0 2px 6px rgba(255, 149, 0, 0.35);
}

.badge-habis {
  background: rgba(60, 60, 80, 0.85);
  color: var(--text-muted);
}

.btn-add-cart {
  width: 100%;
  background: var(--shopee-grad);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(238, 77, 45, 0.25);
  position: relative;
  overflow: hidden;
  margin-top: auto;
}

.btn-add-cart::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.15s;
  border-radius: inherit;
}

.btn-add-cart:hover {
  background: var(--shopee-grad-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(238, 77, 45, 0.5);
}

.btn-add-cart:active::after {
  background: rgba(255, 255, 255, 0.15);
}

.btn-add-cart.added {
  background: linear-gradient(135deg, #1db954, #17a34a) !important;
  color: white !important;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(29, 185, 84, 0.4);
}

.btn-add-cart:disabled {
  background: var(--surface2);
  color: var(--text-dim);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
}

/* ============================================================
   CART SIDEBAR
   ============================================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 95vw;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

.cart-sidebar.open {
  transform: translateX(0);
}

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

.cart-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.cart-close {
  background: var(--surface);
  border: none;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  transition: background 0.2s;
}

.cart-close:hover {
  background: var(--surface2);
  color: var(--text);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-empty {
  text-align: center;
  padding: 60px 24px;
}

.empty-cart-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.cart-empty p {
  font-weight: 600;
  margin-bottom: 6px;
}

.cart-empty small {
  color: var(--text-muted);
}

.cart-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeInUp 0.3s ease;
}

.cart-item-emoji {
  font-size: 2rem;
  flex-shrink: 0;
}

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

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.82rem;
  color: var(--primary-light);
  font-weight: 700;
}

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

.qty-btn {
  background: var(--surface2);
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
  transition: background 0.2s;
}

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

.qty-num {
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg3);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 600;
}

.cart-total-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-light);
}

.btn-order {
  width: 100%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.35);
}

.btn-order:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
}

/* ============================================================
   PRODUCT MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(6px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.product-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 1400;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.product-modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--surface);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  z-index: 10;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--surface2);
  color: var(--text);
}

.modal-product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  border-radius: 12px;
  margin-bottom: 12px;
}

.modal-body {
  padding: 16px;
}

.modal-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-light);
  margin-bottom: 4px;
}

.modal-name {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.3;
}

.modal-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.modal-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-light);
}

.modal-original {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.modal-discount {
  background: var(--shopee-grad);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

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

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.modal-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.modal-info-row span:last-child {
  font-weight: 600;
  color: var(--text);
}

.modal-qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-qty-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-qty-ctrl .qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.modal-qty-num {
  font-size: 1.05rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

.modal-add-btn {
  width: 100%;
  background: var(--shopee-grad);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 6px 24px rgba(238, 77, 45, 0.4);
}

.modal-add-btn:hover {
  background: var(--shopee-grad-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(238, 77, 45, 0.55);
}

.modal-add-btn.added {
  background: linear-gradient(135deg, #1db954, #17a34a) !important;
  color: white !important;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(29, 185, 84, 0.4);
}

.modal-add-btn:disabled {
  background: var(--surface2);
  color: var(--text-dim);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ── Modal Action Row (2 tombol berdampingan) ── */
.modal-action-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.modal-action-row .modal-add-btn {
  flex: 1;
  width: auto;
}

.modal-buy-btn {
  flex: 1;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.35);
  white-space: nowrap;
}

.modal-buy-btn:hover {
  background: linear-gradient(135deg, #1ebd56, #0d6e56);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 36px 0 0;
}

/* Single centered column */
.footer-brand--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding-bottom: 24px;
}

.footer-brand--center p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.2s, opacity 0.2s;
}

.social-btn:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.wa-btn {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.ig-btn {
  background: rgba(225, 48, 108, 0.15);
  color: #e1306c;
  border: 1px solid rgba(225, 48, 108, 0.3);
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--primary-light);
}

.hours-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.hour-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hour-val {
  color: var(--text);
  font-weight: 600;
}

.footer-address {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-address svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--primary-light);
}

.address-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.address-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  background: rgba(33, 33, 44, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Staggered delay untuk product cards */
.product-card:nth-child(1) {
  animation-delay: 0.00s;
}

.product-card:nth-child(2) {
  animation-delay: 0.05s;
}

.product-card:nth-child(3) {
  animation-delay: 0.10s;
}

.product-card:nth-child(4) {
  animation-delay: 0.15s;
}

.product-card:nth-child(5) {
  animation-delay: 0.20s;
}

.product-card:nth-child(6) {
  animation-delay: 0.05s;
}

.product-card:nth-child(7) {
  animation-delay: 0.10s;
}

.product-card:nth-child(8) {
  animation-delay: 0.15s;
}

.product-card:nth-child(9) {
  animation-delay: 0.00s;
}

.product-card:nth-child(10) {
  animation-delay: 0.05s;
}

/* ============================================================
   RESPONSIVE – ANDROID & MOBILE OPTIMIZED
   ============================================================ */

/* ---- Tablet / Small Desktop ---- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .hero {
    flex-direction: column;
    padding: 100px 24px 60px;
    min-height: auto;
  }

  /* Sembunyikan hero visual (floating cards) di tablet ke bawah */
  .hero-visual {
    display: none;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-badge {
    justify-content: center;
  }
}

/* ---- Mobile (768px ke bawah) ---- */
@media (max-width: 768px) {

  /* Prevent any horizontal overflow */
  body {
    overflow-x: hidden;
  }

  /* Navbar */
  .nav-container {
    height: 50px;
    gap: 8px;
    padding: 0 14px;
  }

  .logo-img {
    height: 36px;
    width: 36px;
  }

  /* Ganti admin btn teks → ikon bulat kecil */
  .admin-nav-btn {
    display: none;
  }

  .admin-nav-btn-icon {
    display: flex;
  }

  .search-bar-wrap {
    flex: 1;
    max-width: 100%;
    min-width: 0;
  }

  #searchInput {
    font-size: 0.88rem;
    padding: 10px 8px;
  }

  /* Hero – pastikan tidak ada overflow */
  .hero {
    padding: 80px 16px 48px;
    gap: 24px;
    overflow: hidden;
  }

  /* Semua floating card & hero visual sudah disembunyikan di 1024px */
  .floating-card {
    display: none;
  }

  .hero-visual {
    display: none;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-stats {
    gap: 12px;
  }

  .stat-num {
    font-size: 1.3rem;
  }

  .hero-cta {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 22px;
    font-size: 0.9rem;
  }

  /* Promo ribbon – handled by the dedicated @media (max-width:600px) block above */

  /* Categories – wrap normal di 768px */
  .categories-section {
    padding: 56px 0 32px;
  }

  .category-grid {
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
  }

  .cat-card {
    padding: 12px 14px;
    min-width: 72px;
    font-size: 0.78rem;
  }

  .cat-icon {
    font-size: 1.5rem;
  }

  /* Products */
  .products-section {
    padding: 16px 0 64px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(155px, 45%), 1fr));
    gap: 12px;
  }

  .product-card-img {
    height: 130px;
    font-size: 3rem;
  }

  .product-card-body {
    padding: 12px;
  }

  .product-name {
    font-size: 0.85rem;
  }

  .product-price {
    font-size: 0.95rem;
  }

  .btn-add-cart {
    font-size: 0.8rem;
    padding: 9px 12px;
  }

  /* Products header */
  .products-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .section-title {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  /* Cart Sidebar */
  .cart-sidebar {
    width: 100%;
    max-width: 100%;
  }

  /* Footer */
  .footer {
    padding: 28px 0 0;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  /* Toast */
  .toast {
    bottom: 80px;
    max-width: 90vw;
    white-space: normal;
    text-align: center;
    font-size: 0.82rem;
    padding: 10px 18px;
  }

  /* Container padding */
  .container {
    padding: 0 14px;
  }
}

/* ---- Kecil / HP 480px ke bawah ---- */
@media (max-width: 480px) {

  /* Navbar layout */
  .nav-container {
    height: 46px;
    padding: 0 12px;
    gap: 8px;
  }

  .logo-img {
    height: 32px;
    width: 32px;
  }

  .cart-btn {
    width: 40px;
    height: 40px;
  }

  .cart-btn svg {
    width: 18px;
    height: 18px;
  }

  .admin-nav-btn-icon {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  /* Search */
  .search-bar {
    padding: 0 10px;
  }

  #searchInput {
    padding: 9px 6px;
    font-size: 0.85rem;
  }

  /* Hero */
  .hero {
    padding: 70px 14px 40px;
    overflow: hidden;
  }

  .hero-title {
    font-size: clamp(1.6rem, 8vw, 2rem);
  }

  .hero-subtitle {
    font-size: 0.88rem;
    margin-bottom: 24px;
  }

  .hero-badge {
    font-size: 0.78rem;
    padding: 6px 14px;
    margin-bottom: 16px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
    width: 100%;
  }

  .hero-stats {
    gap: 10px;
    flex-wrap: nowrap;
  }

  .stat-num {
    font-size: 1.1rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  /* Categories – horizontal scroll di layar sangat kecil */
  .category-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Extend to edge for scroll feel */
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .category-grid::-webkit-scrollbar {
    display: none;
  }

  .cat-card {
    flex-shrink: 0;
    padding: 10px 12px;
    min-width: 64px;
  }

  .cat-icon {
    font-size: 1.3rem;
  }

  /* Products – 2 kolom tetap */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-card-img {
    height: 110px;
    font-size: 2.5rem;
  }

  .product-card-body {
    padding: 10px;
  }

  .product-name {
    font-size: 0.8rem;
    line-clamp: 2;
    -webkit-line-clamp: 2;
  }

  .btn-add-cart {
    font-size: 0.75rem;
    padding: 8px 10px;
  }

  .product-badge {
    font-size: 0.62rem;
    padding: 3px 8px;
    top: 8px;
    left: 8px;
  }

  /* Modal */
  .product-modal {
    width: 95%;
    border-radius: 20px;
    max-height: 95vh;
  }

  .modal-body {
    padding: 20px 18px;
  }

  .modal-product-img {
    height: 160px;
    font-size: 4.5rem;
    margin-bottom: 16px;
  }

  .modal-name {
    font-size: 1.15rem;
  }

  .modal-price {
    font-size: 1.3rem;
  }

  .modal-desc {
    font-size: 0.85rem;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }

  /* Cart */
  .cart-header {
    padding: 18px 16px;
  }

  .cart-items {
    padding: 12px;
  }

  .cart-footer {
    padding: 16px;
  }

  .cart-total-price {
    font-size: 1.15rem;
  }

  .btn-order {
    font-size: 0.92rem;
    padding: 13px;
  }

  /* Footer */
  .footer {
    padding: 36px 0 0;
  }

  .footer-logo {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }

  .logo-img-footer {
    height: 56px;
    width: 56px;
  }

  .footer-social {
    gap: 8px;
  }

  .social-btn {
    font-size: 0.78rem;
    padding: 7px 12px;
  }

  /* Section header */
  .section-header {
    margin-bottom: 28px;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .section-subtitle {
    font-size: 0.88rem;
  }

  /* Sort */
  .sort-wrap {
    width: 100%;
  }

  #sortSelect {
    width: 100%;
  }
}

/* ---- Very small (360px dan di bawah) ---- */
@media (max-width: 360px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .product-card-img {
    height: 95px;
    font-size: 2rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .cat-card {
    min-width: 58px;
    padding: 8px 10px;
  }

  .cat-icon {
    font-size: 1.2rem;
  }
}

/* ============================================================
   SHOPEE QUICK MENU & PPOB DASHBOARD STYLES
   ============================================================ */
.shopee-menu-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 10px;
  box-shadow: var(--shadow);
  margin-top: 4px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.menu-item:hover {
  transform: translateY(-2.5px);
}

.menu-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  /* Shopee style squircle */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.menu-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.menu-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.25;
}

/* PPOB Dashboard Modal Layout */
.ppob-dash-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.ppob-dash-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ppob-dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 10px;
}

.ppob-dash-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.ppob-dash-item:hover {
  transform: translateY(-2px);
}

.ppob-dash-item .ppob-icon-wrap {
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
}

.ppob-dash-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

/* ShopeePay-style Wallet Bar (QuMartPay) */
.shopeepay-bar {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.sp-left {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  flex: 1;
}

.sp-logo {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.sp-balance {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-light);
}

.sp-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 14px;
}

.sp-actions {
  display: flex;
  gap: 16px;
}

.sp-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 4px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.sp-action-btn:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.sp-icon {
  width: 18px;
  height: 18px;
  color: var(--primary-light);
}

.sp-action-btn span {
  font-size: 0.62rem;
  font-weight: 700;
}

/* Top-Up Modal payment methods list */
.ppob-pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.ppob-method-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.ppob-method-card:hover {
  background: var(--surface2);
}

.ppob-method-card.selected {
  border-color: var(--primary);
  background: rgba(238, 77, 45, 0.08);
}

.ppob-method-icon {
  font-size: 1.3rem;
}

.ppob-method-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.ppob-method-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.ppob-method-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================================
   REDMI NOTE 12 – MOBILE OPTIMIZATION (393×851 viewport)
   Targets ~360px–420px CSS viewport widths
   ============================================================ */

/* ---- Safe area support for notch/punch-hole displays ---- */
@supports (padding-top: env(safe-area-inset-top)) {
  .navbar {
    padding-top: env(safe-area-inset-top);
  }

  .cart-sidebar {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ---- Redmi Note 12 Specific (393px viewport) ---- */
@media (max-width: 420px) and (min-width: 361px) {

  /* ── Global touch optimization ── */
  * {
    -webkit-tap-highlight-color: rgba(238, 77, 45, 0.12);
  }

  /* ── Navbar — compact but touch-friendly ── */
  .nav-container {
    height: 46px;
    padding: 0 10px;
    gap: 6px;
  }

  .logo-img {
    height: 30px;
    width: 30px;
    border-width: 1.5px;
  }

  .search-bar {
    padding: 0 10px;
    border-radius: 40px;
  }

  #searchInput {
    font-size: 0.83rem;
    padding: 7px 5px;
  }

  .search-icon {
    width: 15px;
    height: 15px;
  }

  .admin-nav-btn {
    display: none;
  }

  .admin-nav-btn-icon {
    display: flex;
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .cart-btn {
    width: 36px;
    height: 36px;
    box-shadow: 0 2px 10px rgba(238, 77, 45, 0.3);
  }

  .cart-btn svg {
    width: 16px;
    height: 16px;
  }

  .cart-count {
    min-width: 15px;
    height: 15px;
    font-size: 0.55rem;
    top: -3px;
    right: -3px;
  }

  /* ── Top Section — reduced spacing ── */
  .shopee-top-section {
    padding-top: 58px;
    padding-bottom: 10px;
  }

  /* ── Carousel — proper sizing ── */
  .shopee-carousel {
    height: 110px;
    border-radius: 10px;
    margin-bottom: 10px;
  }

  .shopee-slide {
    padding: 12px 14px;
  }

  .slide-badge {
    font-size: 0.58rem;
    padding: 2px 6px;
    margin-bottom: 3px;
  }

  .slide-title {
    font-size: 0.95rem;
    margin-bottom: 3px;
  }

  .slide-subtitle {
    font-size: 0.68rem;
    max-width: 68%;
    line-height: 1.2;
  }

  .slide-visual {
    font-size: 2.2rem;
    opacity: 0.65;
  }

  /* ── QuMartPay wallet bar — optimized layout ── */
  .shopeepay-bar {
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .sp-logo {
    font-size: 0.6rem;
  }

  .sp-balance {
    font-size: 0.95rem;
  }

  .sp-divider {
    margin: 0 10px;
    height: 24px;
  }

  .sp-actions {
    gap: 14px;
  }

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

  .sp-action-btn span {
    font-size: 0.58rem;
  }

  /* ── Quick Menu Row ── */
  .shopee-menu-row {
    padding: 8px 6px;
    gap: 6px;
    border-radius: 10px;
    margin-top: 2px;
  }

  .menu-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .menu-icon-wrap svg {
    width: 18px;
    height: 18px;
  }

  .menu-label {
    font-size: 0.68rem;
  }

  /* ── Promo Ribbon ── */
  .ribbon-label {
    font-size: 0.72rem;
    height: 26px;
    padding: 0 12px;
  }

  .ribbon-items {
    font-size: 0.72rem;
  }

  /* ── Categories — smooth horizontal scroll ── */
  .categories-section {
    padding: 28px 0 16px;
  }

  .section-header {
    margin-bottom: 14px;
  }

  .section-title {
    font-size: 1.15rem;
    margin-bottom: 4px;
  }

  .section-subtitle {
    font-size: 0.78rem;
  }

  .category-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    gap: 8px;
    padding-bottom: 8px;
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .category-grid::-webkit-scrollbar {
    display: none;
  }

  .cat-card {
    flex-shrink: 0;
    padding: 10px 14px;
    min-width: 70px;
    border-radius: 12px;
    scroll-snap-align: start;
    font-size: 0.75rem;
    gap: 5px;
  }

  .cat-icon {
    font-size: 1.4rem;
  }

  /* ── Products — 2-column grid, optimized cards ── */
  .products-section {
    padding: 12px 0 60px;
  }

  .products-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
  }

  .sort-wrap {
    width: 100%;
    font-size: 0.82rem;
  }

  #sortSelect {
    flex: 1;
    font-size: 0.82rem;
    padding: 8px 12px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-card {
    border-radius: 12px;
  }

  .product-card:hover {
    transform: translateY(-3px);
  }

  .product-card-img {
    height: 120px;
  }

  .product-card-body {
    padding: 10px;
  }

  .product-category-tag {
    font-size: 0.65rem;
    margin-bottom: 3px;
  }

  .product-name {
    font-size: 0.78rem;
    margin-bottom: 6px;
    line-height: 1.35;
  }

  .product-badge {
    font-size: 0.6rem;
    padding: 3px 7px;
    top: 8px;
    left: 8px;
  }

  .btn-add-cart {
    font-size: 0.75rem;
    padding: 8px 8px;
    border-radius: 6px;
    gap: 4px;
    /* Ensure minimum 44px touch target */
    min-height: 36px;
  }

  /* ── Cart Sidebar — full screen on Redmi ── */
  .cart-sidebar {
    width: 100%;
    max-width: 100vw;
    border-radius: 0;
  }

  .cart-header {
    padding: 16px 14px;
  }

  .cart-header h3 {
    font-size: 1.05rem;
  }

  .cart-close {
    width: 36px;
    height: 36px;
  }

  .cart-items {
    padding: 12px;
  }

  .cart-item {
    gap: 10px;
    padding: 12px 0;
  }

  .cart-item-emoji {
    font-size: 1.8rem;
  }

  .cart-item-name {
    font-size: 0.82rem;
  }

  .cart-item-price {
    font-size: 0.78rem;
  }

  .qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .cart-footer {
    padding: 14px;
  }

  .cart-total-price {
    font-size: 1.15rem;
  }

  .btn-order {
    font-size: 0.9rem;
    padding: 13px;
    border-radius: 8px;
    /* Touch-friendly */
    min-height: 48px;
  }

  /* ── Modal — near full-screen ── */
  .product-modal {
    width: 96%;
    max-height: 92vh;
    border-radius: 18px;
  }

  .modal-body {
    padding: 20px 16px;
  }

  .modal-product-img {
    height: 150px;
    font-size: 4rem;
    margin-bottom: 14px;
  }

  .modal-name {
    font-size: 1.12rem;
  }

  .modal-price {
    font-size: 1.25rem;
  }

  .modal-original {
    font-size: 0.88rem;
  }

  .modal-desc {
    font-size: 0.82rem;
    line-height: 1.6;
    margin-bottom: 18px;
  }

  .modal-info-row {
    font-size: 0.82rem;
    padding: 8px 0;
  }

  .modal-qty-row {
    margin-bottom: 14px;
  }

  .modal-qty-ctrl .qty-btn {
    width: 36px;
    height: 36px;
  }

  .modal-add-btn {
    font-size: 0.92rem;
    padding: 14px;
    border-radius: 8px;
    min-height: 48px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  /* ── PPOB Modal (pulsa/tagihan) ── */
  .ppob-dash-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 8px;
  }

  .ppob-dash-item .ppob-icon-wrap {
    width: 40px;
    height: 40px;
  }

  .ppob-dash-label {
    font-size: 0.68rem;
  }

  .ppob-nom-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .ppob-nom-card {
    padding: 10px;
  }

  .ppob-card-val {
    font-size: 0.88rem;
  }

  .ppob-card-price {
    font-size: 0.72rem;
  }

  .ppob-pay-btn {
    padding: 12px;
    font-size: 0.88rem;
    min-height: 48px;
  }

  .ppob-form-group input {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  /* ── Footer — compact ── */
  .footer {
    padding: 28px 0 0;
  }

  .footer-brand--center {
    gap: 10px;
    padding-bottom: 18px;
  }

  .footer-brand--center p {
    font-size: 0.82rem;
    max-width: 320px;
  }

  .logo-img-footer {
    height: 52px;
    width: 52px;
  }

  .footer-address {
    font-size: 0.78rem;
  }

  .footer-social {
    gap: 8px;
  }

  .social-btn {
    font-size: 0.75rem;
    padding: 7px 12px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 4px;
    padding: 14px 0;
    font-size: 0.75rem;
  }

  /* ── Toast ── */
  .toast {
    bottom: 70px;
    max-width: 88vw;
    font-size: 0.8rem;
    padding: 10px 16px;
    border-radius: 40px;
  }

  /* ── Container ── */
  .container {
    padding: 0 12px;
  }

  /* ── Empty state ── */
  .empty-state {
    padding: 50px 20px;
  }

  .empty-icon {
    font-size: 3rem;
    margin-bottom: 14px;
  }

  .empty-state h3 {
    font-size: 1.1rem;
  }

  .empty-state p {
    font-size: 0.85rem;
  }

  /* ── Smooth momentum scrolling for all scrollable areas ── */
  .cart-items,
  .product-modal,
  .category-grid {
    -webkit-overflow-scrolling: touch;
  }

  /* ── Disable hover transform effects on touch (performance) ── */
  @media (hover: none) {
    .product-card:hover {
      transform: none;
      box-shadow: none;
    }

    .cat-card:hover {
      transform: none;
    }

    .menu-item:hover {
      transform: none;
    }

    .ppob-item:hover,
    .ppob-dash-item:hover {
      transform: none;
    }

    .product-card:hover .product-img.img-loaded {
      transform: none;
    }
  }
}

/* ---- Active/pressed states for touch (Redmi) ---- */
@media (hover: none) and (pointer: coarse) {
  .product-card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }

  .cat-card:active {
    transform: scale(0.95);
    transition: transform 0.1s;
  }

  .btn-add-cart:active {
    opacity: 0.8;
    transform: scale(0.97);
  }

  .menu-item:active {
    transform: scale(0.95);
    transition: transform 0.1s;
  }

  .sp-action-btn:active {
    transform: scale(0.9);
    transition: transform 0.1s;
  }

  .cart-btn:active {
    transform: scale(0.92);
  }

  .social-btn:active {
    transform: scale(0.95);
  }
}

/* ============================================================
   ANDROID BOTTOM NAVIGATION BAR
   ============================================================ */
.bottom-nav {
  display: none;
}

@media (max-width: 480px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(20, 14, 12, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
  }

  .bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    text-decoration: none;
    color: #606080;
    font-size: 0.6rem;
    font-weight: 700;
    font-family: var(--font);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.18s;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.2px;
    position: relative;
  }

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

  .bnav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2.5px;
    background: var(--shopee-grad);
    border-radius: 0 0 4px 4px;
  }

  .bnav-item:active {
    transform: scale(0.88);
    transition: transform 0.08s;
  }

  .bnav-icon {
    position: relative;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .bnav-icon svg {
    width: 22px;
    height: 22px;
    transition: stroke 0.18s, transform 0.18s;
  }

  .bnav-item.active .bnav-icon svg {
    stroke: var(--primary);
    transform: scale(1.1);
  }

  .bnav-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.52rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--bg);
    animation: badgePop 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  }

  @keyframes badgePop {
    from {
      transform: scale(0);
    }

    60% {
      transform: scale(1.3);
    }

    to {
      transform: scale(1);
    }
  }

  /* Push content above bottom nav */
  .products-section {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .footer {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  .toast {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ============================================================
   ACCOUNT PANEL & AUTH SYSTEM (Shopee-Style)
   ============================================================ */

/* Account Nav Button in Header */
.account-nav-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  flex-shrink: 0;
  padding: 0;
}

.account-nav-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--primary);
  transform: scale(1.05);
}

.account-nav-btn svg {
  width: 22px;
  height: 22px;
}

.nav-avatar-badge {
  background: var(--shopee-grad);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
}

/* Overlay */
.account-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

/* Slide-Up Panel */
.account-panel {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  /* Shopee mobile layout width */
  background: var(--bg2);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  z-index: 2001;
  transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.account-panel.open {
  bottom: 0;
}

/* Pull Handle (Gaya Shopee/iOS) */
.account-panel-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0 auto;
}

/* Header */
.account-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.account-panel-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.account-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.account-panel-close:hover {
  color: var(--text);
}

/* Body */
.account-panel-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Welcome Page (State: Belum Login) */
.acc-welcome {
  text-align: center;
  margin-bottom: 30px;
  padding: 10px 0;
}

.acc-welcome-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: floatWelcome 3s ease-in-out infinite;
}

@keyframes floatWelcome {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.acc-welcome h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.acc-welcome p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.acc-auth-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-acc-login,
.btn-acc-register,
.btn-acc-guest,
.btn-acc-submit {
  width: 100%;
  padding: 14px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-acc-login {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-acc-login:hover {
  border-color: var(--primary);
  background: var(--surface);
}

.btn-acc-register {
  background: var(--shopee-grad);
  color: white;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.25);
}

.btn-acc-register:hover {
  background: var(--shopee-grad-h);
  transform: translateY(-1px);
}

.acc-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  margin: 20px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.acc-divider::before,
.acc-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.acc-divider span {
  padding: 0 10px;
}

.btn-acc-guest {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.btn-acc-guest:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Profile View (State: Sudah Login) */
.acc-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.acc-avatar {
  background: var(--shopee-grad);
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.3);
}

.acc-info {
  flex: 1;
}

.acc-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.acc-hp {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.acc-since {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.acc-menu-list {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}

.acc-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text);
  transition: background 0.2s;
}

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

.acc-menu-item:hover {
  background: var(--surface2);
}

.seller-menu-item:hover {
  background: rgba(238, 77, 45, 0.08) !important;
}

.acc-menu-icon {
  font-size: 1.15rem;
}

.acc-menu-arrow {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 1.2rem;
}

.btn-acc-logout {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #ff453a;
  border-radius: 50px;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-acc-logout:hover {
  background: rgba(255, 69, 58, 0.1);
  border-color: #ff453a;
}

/* Auth Forms */
.acc-form-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.acc-back-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.acc-back-btn:hover {
  background: rgba(238, 77, 45, 0.08);
}

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

.acc-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.acc-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acc-form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.acc-form-group input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.acc-form-group input:focus {
  border-color: var(--primary);
}

.acc-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.acc-pass-wrap input {
  width: 100%;
  padding-right: 48px;
}

.acc-toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

.acc-error {
  background: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.2);
  color: #ff453a;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-acc-submit {
  background: var(--shopee-grad);
  color: white;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.25);
}

.btn-acc-submit:hover {
  background: var(--shopee-grad-h);
  transform: translateY(-1px);
}

.acc-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.acc-switch button {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 2px;
}

.acc-switch button:hover {
  text-decoration: underline;
}

/* ── Account Settings Styles ── */
.acc-settings-list {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 8px;
}

.acc-settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

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

.acc-settings-item:hover {
  background: var(--surface2);
}

.acc-settings-danger:hover {
  background: rgba(255, 69, 58, 0.06) !important;
}

.acc-settings-icon {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border-radius: 10px;
  flex-shrink: 0;
}

.acc-settings-danger .acc-settings-icon {
  background: rgba(255, 69, 58, 0.1);
}

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

.acc-settings-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.acc-settings-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Success Message */
.acc-success {
  background: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.2);
  color: #34c759;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Edit Profile Avatar */
.acc-edit-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0 16px 0;
}

.acc-edit-avatar {
  background: var(--shopee-grad);
  color: white;
  font-size: 2rem;
  font-weight: 800;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(238, 77, 45, 0.35);
  transition: all 0.3s ease;
}

.acc-edit-avatar-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Delete Account Warning */
.acc-delete-warning {
  text-align: center;
}

.acc-delete-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: pulseDelete 2s ease-in-out infinite;
}

@keyframes pulseDelete {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

.acc-delete-warning h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ff453a;
  margin-bottom: 12px;
}

.acc-delete-warning>p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.acc-delete-warning ul {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.acc-delete-warning ul li {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-delete-warning ul li::before {
  content: '•';
  color: #ff453a;
  font-weight: 700;
  font-size: 1.2rem;
}

.acc-delete-warning ul li:last-child {
  border-bottom: none;
}

.acc-delete-confirm-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(255, 69, 58, 0.06);
  border-radius: 10px;
  border: 1px dashed rgba(255, 69, 58, 0.2);
}

.acc-delete-confirm-text strong {
  color: #ff453a;
  font-weight: 800;
  letter-spacing: 1px;
}

#deleteConfirmInput {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
  box-sizing: border-box;
}

#deleteConfirmInput:focus {
  border-color: #ff453a;
}

.acc-delete-btns {
  display: flex;
  gap: 10px;
}

.acc-delete-btns .btn-acc-login {
  flex: 1;
  background: var(--surface);
  color: var(--text);
}

.btn-acc-delete {
  flex: 1;
  padding: 14px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: #ff453a;
  color: white;
}

.btn-acc-delete:hover:not(:disabled) {
  background: #e0352b;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 69, 58, 0.4);
}

.btn-acc-delete:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Adjust bottom nav badge and positioning for mobile */
@media (max-width: 480px) {
  .account-panel {
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 100%;
    bottom: -100%;
  }

  /* ── ADDRESS FORM: stack vertically on Android ── */
  .addr-row-duo {
    flex-direction: column;
    gap: 0;
  }

  .addr-row-duo .acc-form-group {
    flex: none !important;
    width: 100%;
    margin-bottom: 12px;
  }

  /* Kode Pos — full-width dan selaras tinggi dengan combobox */
  #addrKodePos {
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    font-family: var(--font) !important;
    text-align: left !important;
  }

  /* Pastikan combobox input mengambil lebar penuh */
  .cb-wrap,
  .cb-input {
    width: 100%;
  }

  /* Compact form */
  .acc-form.addr-shopee-form {
    padding: 12px 8px;
  }

  .addr-section-title {
    margin-bottom: 8px;
    margin-top: 12px;
  }

  /* Label chips — wrap on small width */
  .addr-label-chips {
    flex-wrap: wrap;
    gap: 6px;
  }

  .addr-chip {
    font-size: 0.8rem;
    padding: 8px 14px;
  }
}

.bnav-label {
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

/* ---- FLY TO CART ANIMATION ---- */
.fly-to-cart-x {
  position: fixed;
  z-index: 9999;
  width: 40px;
  height: 40px;
  pointer-events: none;
  transition: transform 0.7s linear;
}

.fly-to-cart-y {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.4);
  transition: transform 0.7s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.7s ease-in;
}

/* ── EMPTY STATE ── */
.acc-empty-state {
  text-align: center;
  padding: 30px 20px;
}

.acc-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.acc-empty-state h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.acc-empty-state p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── ORDER HISTORY ── */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

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

.order-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.order-total {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-light);
}

.order-items {
  margin-bottom: 8px;
}

.order-item-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text);
  padding: 4px 0;
}

.order-footer {
  font-size: 0.72rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

/* ── ADDRESS LIST ── */
.address-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.address-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.address-main {
  flex: 1;
  min-width: 0;
}

.address-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.address-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.address-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.addr-action-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.addr-action-btn:hover {
  background: var(--surface3);
}

.addr-action-btn.addr-del:hover {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}

.addr-action-btn.addr-del {
  color: #ff6b6b;
}

/* ── FORGOT PASSWORD ── */
.acc-forgot-link {
  text-align: center;
  font-size: 0.82rem;
  color: var(--primary-light);
  cursor: pointer;
  margin-top: 12px;
  margin-bottom: 4px;
  transition: color 0.2s;
  font-weight: 600;
}

.acc-forgot-link:hover {
  color: #ff9500;
  text-decoration: underline;
}

.acc-forgot-confirm {
  text-align: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 16px;
}

.acc-forgot-avatar {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.acc-forgot-confirm p {
  margin: 4px 0;
  font-size: 0.9rem;
}

/* ── ADDRESS: Primary Badge ── */
.addr-primary-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff9500, #ff6600);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-right: 4px;
  vertical-align: middle;
}

.address-card-primary {
  border-color: rgba(255, 149, 0, 0.4) !important;
  box-shadow: 0 0 12px rgba(255, 149, 0, 0.1);
}

.addr-maps-link {
  display: inline-block;
  font-size: 0.76rem;
  color: #4a90d9;
  margin-top: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.addr-maps-link:hover {
  color: #6ab0ff;
}

/* ── ADDRESS: Maps Picker (Leaflet) ── */
.addr-leaflet-wrap {
  position: relative;
}

#addrPickMap .leaflet-control-zoom {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#addrPickMap .leaflet-control-zoom a {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  line-height: 32px;
  font-size: 1.1rem;
}

#addrPickMap .leaflet-control-zoom a:hover {
  background: var(--surface3);
}

.addr-mini-map .leaflet-control-attribution {
  display: none !important;
}

/* ── ADDRESS: Shopee-Style Form ── */
.addr-shopee-form {
  gap: 6px !important;
}

.addr-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 14px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.addr-row-duo {
  display: flex;
  gap: 10px;
}

.addr-row-duo .acc-form-group {
  margin-bottom: 6px;
}

/* ── ADDRESS: Select Dropdown ── */
.addr-select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.addr-select:focus {
  border-color: var(--primary);
}

.addr-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--bg2);
}

/* ── ADDRESS: Label Chips ── */
.addr-label-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.addr-chip {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.addr-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.addr-chip-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 164, 225, 0.3);
}

/* ── ADDRESS: Coord Row ── */
.addr-coord-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.addr-coord-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
}

.addr-coord-item span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  font-family: monospace;
}

.addr-coord-item input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.75rem;
  font-family: monospace;
  text-align: right;
  outline: none;
  min-width: 0;
}

/* ── ADDRESS: Contact Row ── */
.addr-contact-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.addr-contact-row span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.addr-note {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
  background: var(--bg3);
  padding: 6px 10px;
  border-radius: 8px;
}

/* ═══════════════════════════════════════════
   COMBOBOX AUTOCOMPLETE (Ketik & Pilih)
   ═══════════════════════════════════════════ */
.cb-wrap {
  position: relative;
  width: 100%;
  z-index: 1;
}

.cb-wrap.open {
  z-index: 1000;
}

.cb-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cb-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 36px 12px 16px;
  border-radius: 12px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.cb-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.1);
}

.cb-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg2);
}

.cb-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-dim);
  font-size: 0.7rem;
  transition: transform var(--transition);
}

.cb-wrap.open .cb-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.cb-clear-btn {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 6px;
  display: none;
  line-height: 1;
  border-radius: 50%;
  transition: color var(--transition), background var(--transition);
}

.cb-clear-btn:hover {
  color: var(--text);
  background: var(--surface3);
}

.cb-wrap.has-value .cb-clear-btn {
  display: block;
}

.cb-wrap.has-value .cb-arrow {
  display: none;
}

.cb-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 9999;
  display: none;
  padding: 4px;
  margin-top: 2px;
}

.cb-wrap.open .cb-dropdown {
  display: block;
}

.cb-option {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--text);
  transition: background var(--transition);
  white-space: nowrap;
}

.cb-option:hover,
.cb-option-active {
  background: var(--surface3);
}

.cb-option-highlight {
  color: var(--primary);
  font-weight: 600;
}

.cb-no-result {
  padding: 12px;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.85rem;
  font-style: italic;
}

/* Scrollbar mini */
.cb-dropdown::-webkit-scrollbar {
  width: 4px;
}

.cb-dropdown::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}