/* ============================================================
   PilihCerdas — style.css (Redesign — Solid & Bold)
   Clean · Solid · Bold Typography · No Backdrop-filters
   ============================================================ */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --bg:              #F4F5F7;
  --bg-2:            #E8E9ED;
  --surface:         #FFFFFF;
  --surface-2:       #FFFFFF;
  --surface-hover:   #F0F1F3;
  --text:            #0d0f17;
  --text-dim:        #64748b;
  --text-faint:      #94a3b8;
  --accent:          #ff3b5c;
  --accent-dim:      rgba(255, 59, 92, 0.12);
  --accent-glow:     rgba(255, 59, 92, 0.28);
  --gold:            #d97706;
  --gold-dim:        rgba(217, 119, 6, 0.13);
  --emerald:         #059669;
  --emerald-dim:     rgba(5, 150, 105, 0.12);
  --violet:          #7c3aed;
  --violet-dim:      rgba(124, 58, 237, 0.12);
  --shopee-orange:   #ee4d2d;
  --border:          rgba(0, 0, 0, 0.08);
  --border-2:        rgba(0, 0, 0, 0.11);
  --shadow:          0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg:       0 12px 40px rgba(0, 0, 0, 0.09);
  --radius:          18px;
  --radius-sm:       12px;
  --radius-xs:       8px;
  --ease:            cubic-bezier(0.25, 0.8, 0.25, 1);
  --spring:          cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h:           60px;
  --danger:          #ef4444;
  --danger-dim:      rgba(239, 68, 68, 0.14);
  --anim-fast:       180ms;
  --anim-base:       280ms;
  --anim-slow:       420ms;
}

[data-theme="dark"] {
  --bg:              #0B0C10;
  --bg-2:            #131419;
  --surface:         #141519;
  --surface-2:       #1A1B22;
  --surface-hover:   #1F2028;
  --text:            #edf0f7;
  --text-dim:        #94a3b8;
  --text-faint:      #64748b;
  --border:          rgba(255, 255, 255, 0.06);
  --border-2:        rgba(255, 255, 255, 0.10);
  --shadow:          0 2px 8px rgba(0, 0, 0, 0.40);
  --shadow-lg:       0 12px 40px rgba(0, 0, 0, 0.55);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.65;
  transition: background 0.4s ease, color 0.3s ease;
}

/* ── Navigation ──────────────────────────────────────────── */
.glass-nav {
  position: fixed; top: 0; width: 100%;
  z-index: 200;
  background: rgba(244, 245, 247, 0.95);
  border-bottom: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
  height: var(--nav-h);
}

[data-theme="dark"] .glass-nav {
  background: rgba(11, 12, 16, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-nav.nav-hidden {
  transform: translateY(-100%);
}

.glass-nav.nav-scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.nav-content {
  max-width: 1280px; margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex; justify-content: space-between; align-items: center;
}

.logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.22rem; font-weight: 900;
  letter-spacing: -1px;
}
.logo span { color: var(--accent); }

.nav-actions { display: flex; gap: 8px; }

.nav-btn {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.nav-btn:hover { background: var(--surface-hover); transform: scale(1.08); }
.nav-btn:active { transform: scale(0.93); }

.wishlist-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #fff;
  font-size: 0.6rem; font-weight: 800;
  min-width: 17px; height: 17px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  animation: popIn 0.3s var(--spring);
  font-family: 'Inter', sans-serif;
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: calc(var(--nav-h) + 56px) 24px 48px;
  text-align: center;
}

.hero-inner { max-width: 640px; margin: 0 auto; }

.badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border-radius: 50px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 0.80rem; font-weight: 600; color: var(--text-dim);
  margin-bottom: 24px;
}
.badge-pill svg { color: var(--gold); flex-shrink: 0; }

.hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -3px;
  margin-bottom: 20px;
}

.gradient-text {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.hero p {
  color: var(--text-dim);
  font-size: 1.05rem; line-height: 1.7;
  margin-bottom: 36px;
}
.hero p em { color: var(--accent); font-style: normal; font-weight: 600; }

.hero-chips {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  margin-top: 22px;
}

.hero-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: 50px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 600; color: var(--text-dim);
  box-shadow: var(--shadow);
}
.hero-chip svg { flex-shrink: 0; color: var(--accent); }

.hero-chip--green { color: var(--emerald); }
.hero-chip--green svg { color: var(--emerald); }

/* ── App Container ───────────────────────────────────────── */
.app-container { max-width: 1280px; margin: 0 auto; padding: 40px 24px 100px; }

/* ── Toolbar ─────────────────────────────────────────────── */
.glass-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 24px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow);
}

[data-theme="dark"] .glass-panel {
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="light"] .glass-panel {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-icon { color: var(--text-faint); flex-shrink: 0; }

.search-box input {
  flex: 1; background: none; border: none;
  color: var(--text); font-size: 0.92rem;
  font-family: inherit; outline: none;
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-faint); }

.clear-search {
  background: none; border: none;
  color: var(--text-faint); cursor: pointer;
  padding: 3px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.clear-search:hover { color: var(--text); background: var(--border); }

.toolbar-row2 {
  display: flex; align-items: center; gap: 10px;
}

/* Filter pills */
.filters-scroll {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.filters-scroll::-webkit-scrollbar { display: none; }

.pills-container {
  display: flex; gap: 6px;
  padding-bottom: 2px;
}

.pill {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  color: var(--text-dim);
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
  transition: all 0.2s var(--ease);
}
.pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.pill.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}

/* Sort select */
.sort-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  flex-shrink: 0;
}

.sort-icon { color: var(--text-faint); flex-shrink: 0; }

.sort-box select {
  padding: 9px 0 9px 0;
  background: none;
  color: var(--text);
  border: none;
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  outline: none; cursor: pointer; appearance: none;
  -webkit-appearance: none;
}

.sort-box select option {
  background: var(--bg-2);
  color: var(--text);
}

/* Results info */
.results-info {
  font-size: 0.85rem; color: var(--text-dim); font-weight: 500;
  margin-bottom: 16px; min-height: 18px;
}

/* ── Skeleton Loading & Grid ─────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.sk-img { aspect-ratio: 4/3; }
.sk-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }

.sk-line {
  height: 11px; border-radius: 6px;
  background: var(--border-2);
}
.sk-line-sm  { height: 9px; }
.sk-line-lg  { height: 15px; }
.sk-w40 { width: 40%; }
.sk-w60 { width: 60%; }
.sk-w80 { width: 80%; }
.sk-w30 { width: 30%; }

.shimmer-wrap .sk-img,
.shimmer-wrap .sk-line {
  position: relative; overflow: hidden;
  background: var(--border-2);
}

.shimmer-wrap .sk-img::after,
.shimmer-wrap .sk-line::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    90deg,
    transparent   0%,
    rgba(255,255,255,0.07) 50%,
    transparent  100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.7s ease-in-out infinite;
}

[data-theme="light"] .shimmer-wrap .sk-img::after,
[data-theme="light"] .shimmer-wrap .sk-line::after {
  background: linear-gradient(
    90deg,
    transparent   0%,
    rgba(255,255,255,0.55) 50%,
    transparent  100%
  );
  background-size: 200% 100%;
}

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

/* ── Product Card ─────────────────────────────────────────── */
.product-card {
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: cardReveal 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

[data-theme="light"] .product-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

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

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .product-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.15);
}

.card-clickable-area {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  cursor: pointer;
}

/* Image wrapper */
.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #FFFFFF;
}

[data-theme="light"] .card-img-wrap {
  background: #F8F8F8;
}

/* Absolute Badges */
.card-badge-left {
  position: absolute;
  top: 0; left: 0; z-index: 2;
}
.card-badge-center {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.card-badge-right {
  position: absolute;
  top: 0; right: 0; z-index: 2;
}

.code-badge {
  background: #1C1C1E;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 0 0 8px 0;
  display: inline-block;
  letter-spacing: 0.5px;
}

.card-badge-center .badge {
  background: rgba(244, 245, 247, 0.95);
  border-radius: 0 0 6px 6px;
  padding: 4px 12px;
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 900;
  border: none;
}

/* Force specific colors for center badge */
.card-badge-center .badge-diskon   { color: #ff3b5c; }
.card-badge-center .badge-viral    { color: #d97706; }
.card-badge-center .badge-terbatas { color: #ff3b5c; }
.card-badge-center .badge-must     { color: #7c3aed; }
.card-badge-center .badge-new-item { color: #059669; }
.card-badge-center .badge-worth    { color: #475569; }

.card-rating-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #1C1C1E;
  border-radius: 0 0 0 8px;
  padding: 4px 10px;
}

.card-rating-pill svg {
  flex-shrink: 0;
}

.card-rating-value {
  font-size: 0.65rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.card-img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  background: #FFFFFF;
  transition: transform 0.5s ease, opacity 0.4s ease;
  opacity: 0;
  padding: 0;
}
[data-theme="light"] .card-img { background: #F8F8F8; }
.card-img.loaded { opacity: 1; }
.product-card:hover .card-img { transform: scale(1.05); }

/* Info section below image */
.card-info {
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
}

.card-category {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  margin-bottom: 8px;
}

.product-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 20px; /* Push price down */
}

.product-price {
  font-size: 1.4rem;
  font-weight: 900;
  color: #059669;
  letter-spacing: -0.5px;
  margin-top: auto;
}

/* Button wrapper */
.card-btn-wrap {
  padding: 0 16px 16px;
  border-top: none;
}

[data-theme="light"] .card-btn-wrap {
  border-top: none;
}

/* Shopee Button */
.btn-shopee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: none;
  background: #FF4500;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.btn-shopee:hover { opacity: 0.9; transform: scale(0.98); }
.btn-shopee:active { transform: scale(0.95); }

/* Wishlist button (Modal use) */
.card-wishlist-btn {
  background: rgba(9, 10, 15, 0.60);
  border: none; border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
  z-index: 3;
  color: rgba(255,255,255,0.85);
  pointer-events: auto;
}
.card-wishlist-btn:hover { transform: scale(1.22); }
.card-wishlist-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ── Badge System ─────────────────────────────────────────── */
.badge {
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 3px 8px; border-radius: 4px;
  display: inline-block;
}

.badge-diskon   { background: var(--accent-dim); color: var(--accent); }
.badge-viral    { background: var(--gold-dim); color: var(--gold); }
.badge-terbatas { background: var(--accent-dim); color: var(--accent); }
.badge-must     { background: var(--violet-dim); color: var(--violet); }
.badge-new-item { background: var(--emerald-dim); color: var(--emerald); }
.badge-worth    { background: var(--border-2); color: var(--text-dim); }

/* Rating */
.card-rating {
  font-size: 0.78rem; font-weight: 700;
  color: var(--gold);
  display: flex; align-items: center; gap: 3px;
}

.btn {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none; font-family: inherit;
  font-weight: 700; font-size: 0.81rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: center; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  gap: 6px; white-space: nowrap;
}

.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { background: #e82040; transform: translateY(-1px); box-shadow: 0 8px 22px var(--accent-glow); }
.btn-primary:active { transform: scale(0.96); }

.btn-icon {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  color: var(--text-dim);
  width: 40px; height: 40px; padding: 0;
}
.btn-icon:hover { color: var(--text); background: var(--surface-hover); border-color: var(--border-2); transform: scale(1.07); }
.btn-icon:active { transform: scale(0.93); }

/* ── Load More ────────────────────────────────────────────── */
.load-more-wrap {
  display: flex; justify-content: center;
  margin-top: 40px;
}

.btn-load-more {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit; font-size: 0.92rem; font-weight: 700;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  box-shadow: var(--shadow);
}
.btn-load-more:hover {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 6px 24px var(--accent-glow);
  transform: translateY(-2px);
}
.btn-load-more:active { transform: scale(0.97); }

.load-more-count {
  background: var(--accent-dim); color: var(--accent);
  font-size: 0.72rem; font-weight: 800;
  padding: 2px 10px; border-radius: 50px;
}

/* ── Detail Modal ─────────────────────────────────────────── */
.detail-modal {
  position: fixed; inset: 0; z-index: 550;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}
.detail-modal.open { opacity: 1; pointer-events: all; }

.detail-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.detail-modal-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 580px;
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  display: flex; flex-direction: column;
  transform: translateY(40px) scale(0.95);
  transition: transform 0.4s var(--spring);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 90vh;
}

[data-theme="light"] .detail-modal-container {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.09);
}

.detail-modal.open .detail-modal-container { transform: translateY(0) scale(1); }

.detail-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(0,0,0,0.4); border: none;
  border-radius: 50%; width: 34px; height: 34px;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s var(--spring), background 0.2s;
  z-index: 10;
}
.detail-modal-close:hover { transform: scale(1.1); background: var(--accent); }

.detail-modal-content {
  overflow-y: auto; display: flex; flex-direction: column;
}

.dm-image-wrap {
  position: relative; width: 100%; aspect-ratio: 1 / 1; background: var(--bg-2);
}
.dm-image { width: 100%; height: 100%; object-fit: cover; display: block; }

.dm-zoom-btn {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(0,0,0,0.5);
  border: none; border-radius: 50%; width: 38px; height: 38px;
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.2s var(--spring), background 0.2s;
  z-index: 5;
}
.dm-zoom-btn:hover { transform: scale(1.15); background: rgba(0,0,0,0.8); }

.dm-wishlist-btn { position: absolute; bottom: 14px; right: 14px; top: auto; }

.dm-info { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.dm-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dm-title { font-family: 'Inter', sans-serif; font-size: 1.4rem; font-weight: 900; line-height: 1.35; color: var(--text); margin-top: 4px; }
.dm-desc { font-size: 0.9rem; color: var(--text-faint); line-height: 1.6; margin-bottom: 8px; }

/* ── Testimonial Card ─────────────────────────────────────── */
.testimonial-card {
  position: relative;
  background-color: #1A1B22;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 4px 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .testimonial-card {
  background-color: #F0F1F3;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.testi-content {
  display: flex; align-items: flex-start; gap: 16px;
}
.testi-left {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.quote-icon {
  color: #ff3366; opacity: 0.9; flex-shrink: 0;
}
.testi-avatar {
  background: rgba(255, 51, 102, 0.2); color: #ff3366;
  border-radius: 50%; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.testi-right {
  flex: 1;
}
.testi-text {
  color: var(--text); font-size: 0.95rem; line-height: 1.6;
  font-weight: 500;
  margin: 0;
}

.dm-price-action-wrap {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border);
}
.dm-price { font-size: 1.45rem; color: var(--accent); }
.dm-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dm-actions .btn-primary { flex: 1; min-width: 140px; }

/* ── Image Lightbox ───────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox-overlay {
  position: absolute; inset: 0;
  background: rgba(4, 5, 10, 0.92);
  cursor: pointer;
}

.lightbox-container {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
  max-width: min(90vw, 820px);
  transform: scale(0.84);
  transition: transform 0.35s var(--spring);
}
.lightbox.open .lightbox-container { transform: scale(1); }

.lightbox-close {
  position: absolute; top: -16px; right: -16px;
  background: var(--accent); border: none;
  border-radius: 50%; width: 38px; height: 38px;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.22s var(--spring);
  z-index: 2;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.lightbox-close:hover { transform: scale(1.15) rotate(90deg); }

.lightbox-image {
  max-width: 90vw; max-height: 80vh;
  object-fit: contain; border-radius: 14px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.5);
  display: block;
}

.lightbox-caption {
  color: rgba(255,255,255,0.85);
  font-weight: 600; font-size: 0.9rem;
  text-align: center; padding: 0 24px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  max-width: 600px;
}

/* ── Wishlist Drawer ──────────────────────────────────────── */
.wishlist-panel {
  position: fixed; inset: 0; z-index: 500;
  display: flex; justify-content: flex-end;
  pointer-events: none;
}
.wishlist-panel.open { pointer-events: all; }

.wishlist-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.3s ease;
  cursor: pointer;
}
.wishlist-panel.open .wishlist-overlay { opacity: 1; }

.wishlist-drawer {
  position: relative; z-index: 1;
  width: min(380px, 100vw); height: 100%;
  background: var(--surface-2);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s var(--ease);
  box-shadow: -20px 0 56px rgba(0,0,0,0.20);
}
.wishlist-panel.open .wishlist-drawer { transform: translateX(0); }

.wishlist-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.wishlist-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  color: var(--accent);
}
.wishlist-header button {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; padding: 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: color 0.2s, background 0.2s;
}
.wishlist-header button:hover { color: var(--text); background: var(--border); }

.wishlist-items {
  flex: 1; overflow-y: auto; padding: 18px 22px;
  display: flex; flex-direction: column; gap: 12px;
}

.wishlist-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px;
  animation: cardReveal 0.3s ease both;
}

.wishlist-item img {
  width: 58px; height: 58px;
  object-fit: cover; border-radius: var(--radius-xs); flex-shrink: 0;
}

.wishlist-item-info { flex: 1; min-width: 0; }
.wishlist-item-name {
  font-size: 0.81rem; font-weight: 700;
  line-height: 1.3; color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wishlist-item-price { font-size: 0.77rem; color: var(--accent); font-weight: 700; }

.wishlist-item-remove {
  background: none; border: none; color: var(--text-faint);
  font-size: 0.75rem; cursor: pointer; padding: 4px 5px;
  border-radius: 4px; flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
}
.wishlist-item-remove:hover { color: var(--accent); background: var(--accent-dim); }

.wishlist-empty {
  text-align: center; padding: 60px 20px; color: var(--text-dim);
}
.wishlist-empty span { font-size: 2.8rem; display: block; margin-bottom: 14px; opacity: 0.5; }
.wishlist-empty p { font-size: 0.88rem; line-height: 1.65; }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: 72px 24px;
  color: var(--text-dim);
}
.empty-state span { font-size: 3rem; display: block; margin-bottom: 14px; opacity: 0.5; }
.empty-state p { font-size: 1rem; font-weight: 500; }

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: -100px; left: 50%;
  transform: translateX(-50%);
  background: #0f1117; color: #fff;
  padding: 11px 20px; border-radius: 8px;
  font-weight: 600; font-size: 0.84rem;
  box-shadow: 0 10px 36px rgba(0,0,0,0.28);
  transition: bottom 0.4s var(--spring);
  z-index: 900; pointer-events: none;
  white-space: nowrap;
}
.toast.show { bottom: 28px; }
.toast.toast-success { background: #064e3b; }
.toast.toast-heart   { background: #7f1d1d; }
.toast.toast-info    { background: #1e3a5f; }

/* ── Back to Top ──────────────────────────────────────────── */
.back-to-top {
  position: fixed; bottom: 80px; right: 22px; z-index: 300;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.3s ease, transform 0.3s var(--spring), bottom 0.3s ease;
}
.back-to-top:hover { transform: translateY(-3px) scale(1.08); }
.back-to-top.visible { opacity: 1 !important; pointer-events: all !important; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px 32px;
}

.footer-inner {
  max-width: 680px; margin: 0 auto;
  text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}

.footer-logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem; font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.footer-logo span { color: var(--accent); }

footer p { color: var(--text-dim); font-size: 0.84rem; }
.footer-disclaimer { font-size: 0.75rem; color: var(--text-faint); }
.footer-copy { font-size: 0.75rem; color: var(--text-faint); margin-top: 6px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .trust-hide { display: none; }
}

@media (max-width: 768px) {
  .hero { padding: calc(var(--nav-h) + 48px) 20px 40px; }
  .hero h1 { font-size: 2.4rem; letter-spacing: -1.5px; }
  .hero p  { font-size: 0.96rem; }

  .bento-grid  { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }

  /* Smaller card content on mobile */
  .card-info { padding: 10px 12px 8px; gap: 6px; }
  .product-title { font-size: 0.82rem; }
  .product-price { font-size: 1.05rem; }
  .btn-shopee { padding: 11px 12px; font-size: 0.85rem; }
  .card-btn-wrap { padding: 0 10px 10px; }
  .card-overlay-row { top: 8px; left: 8px; right: 8px; }

  .wishlist-drawer { width: 100vw; }

  /* ── PERFORMANCE: disable hover effects on touch devices ── */
  .product-card:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  [data-theme="light"] .product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  }
  .product-card:hover .card-img { transform: none; }
}

@media (max-width: 480px) {
  .nav-content    { padding: 0 14px; }
  .app-container  { padding: 28px 14px 90px; }
  .lightbox-close { top: 8px; right: 8px; }
  .trust-inner    { padding: 14px 16px; }
  .trust-item     { padding: 6px 12px; }
  .trust-item span { display: none; }

  /* pill compacter on very small screens */
  .pill { padding: 7px 12px; font-size: 0.78rem; }

  .detail-modal-container {
    height: auto; max-height: calc(100vh - 40px);
    border-radius: 14px 14px 0 0;
    margin-top: auto;
    transform: translateY(100%) scale(1);
    border-bottom: none;
  }
  .detail-modal { padding: 40px 0 0 0; align-items: flex-end; }
  .detail-modal.open .detail-modal-container { transform: translateY(0) scale(1); }
}

/* ── Product Code Badge ───────────────────────────────────── */
.code-badge {
  background: #2C2C2D;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 0 0 8px 0;
  border: none;
  display: inline-block;
}

/* --- UX upgrades 2026 --- */
button, a, input, select { touch-action: manipulation; }
.glass-nav, .product-card, .back-to-top { will-change: transform, opacity; }

.view-tabs {
  display: inline-flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  margin-bottom: 16px;
}

.view-tab {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
  transition: transform .24s var(--ease), background .24s ease, color .24s ease;
}

.view-tab.active {
  background: var(--accent);
  color: #fff;
}

#product-grid {
  transition: opacity 180ms ease, transform 180ms ease;
}

#product-grid.is-transitioning {
  opacity: .2;
  transform: translateY(6px);
}

.card-fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
}

.btn-view {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-hover);
  color: var(--text);
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 220ms var(--ease), box-shadow 220ms ease;
}

.btn-view:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow);
}

.btn-view .ripple {
  position: absolute;
  inset: auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 59, 92, 0.45);
  transform: scale(1);
  opacity: 0;
}

.btn-view:active .ripple {
  left: 50%;
  top: 50%;
  animation: ripple .6s ease-out;
}

@keyframes ripple {
  from { transform: translate(-50%, -50%) scale(1); opacity: .85; }
  to { transform: translate(-50%, -50%) scale(22); opacity: 0; }
}
