/* ==========================================================
   LYNK.ID AESTHETIC STOREFRONT - FAIHAATS STORE (CSS)
   Ultra Premium Glassmorphism & Modern E-Commerce UI
   ========================================================== */

/* 1. CSS VARIABLES & THEMES */
:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* DEFAULT THEME: SOFT PINK PASTEL */
  --bg-color: #FFF5F7;
  --bg-gradient: linear-gradient(180deg, #FFEBF0 0%, #FFF5F7 40%, #FFF8FA 100%);
  --card-bg: #FFFFFF;
  --card-border: rgba(255, 182, 193, 0.45);
  
  /* 3D ELEVATION SHADOWS */
  --card-shadow: 0 12px 30px -6px rgba(244, 63, 94, 0.12), 0 4px 10px rgba(0, 0, 0, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --card-hover-shadow: 0 18px 40px -6px rgba(244, 63, 94, 0.22), 0 6px 16px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);

  --primary-color: #F43F5E;
  --primary-hover: #E11D48;
  --primary-light: #FFF0F3;
  --primary-glow: rgba(244, 63, 94, 0.35);

  --accent-color: #FB7185;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;

  --badge-discount-bg: linear-gradient(135deg, #FF1744 0%, #FF9100 100%);
  --badge-discount-color: #FFFFFF;

  --wa-color: #25D366;
  --wa-hover: #20BA5A;
  --bca-color: #005EAD;
  --shopee-color: #EE4D2D;
  --gopay-color: #00AED6;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* THEME: WARM CREAM */
body[data-theme="cream"] {
  --bg-color: #FDFBF7;
  --bg-gradient: linear-gradient(180deg, #F7F2E8 0%, #FDFBF7 40%, #FAF6EE 100%);
  --card-bg: #FFFFFF;
  --card-border: rgba(212, 163, 115, 0.3);
  --card-shadow: 0 12px 30px -6px rgba(185, 137, 86, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --card-hover-shadow: 0 18px 40px -6px rgba(185, 137, 86, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --primary-color: #B27B42;
  --primary-hover: #96632D;
  --primary-light: #F7EFE4;
  --primary-glow: rgba(178, 123, 66, 0.3);
  --accent-color: #D4A373;
}

/* THEME: SAGE GREEN */
body[data-theme="sage"] {
  --bg-color: #F4F7F4;
  --bg-gradient: linear-gradient(180deg, #E8EFE8 0%, #F4F7F4 40%, #EDF2ED 100%);
  --card-bg: #FFFFFF;
  --card-border: rgba(82, 121, 111, 0.25);
  --card-shadow: 0 12px 30px -6px rgba(82, 121, 111, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --card-hover-shadow: 0 18px 40px -6px rgba(82, 121, 111, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --primary-color: #43695E;
  --primary-hover: #325148;
  --primary-light: #EBF1EE;
  --primary-glow: rgba(67, 105, 94, 0.3);
  --accent-color: #6C9487;
}

/* THEME: SKY BLUE */
body[data-theme="sky"] {
  --bg-color: #F0F7FF;
  --bg-gradient: linear-gradient(180deg, #E0EFFF 0%, #F0F7FF 40%, #E8F3FF 100%);
  --card-bg: #FFFFFF;
  --card-border: rgba(59, 130, 246, 0.25);
  --card-shadow: 0 12px 30px -6px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --card-hover-shadow: 0 18px 40px -6px rgba(37, 99, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --primary-color: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-glow: rgba(37, 99, 235, 0.3);
  --accent-color: #60A5FA;
}

/* THEME: LILAC */
body[data-theme="lilac"] {
  --bg-color: #F8F5FF;
  --bg-gradient: linear-gradient(180deg, #EFE8FF 0%, #F8F5FF 40%, #F4ECFF 100%);
  --card-bg: #FFFFFF;
  --card-border: rgba(147, 51, 234, 0.25);
  --card-shadow: 0 12px 30px -6px rgba(147, 51, 234, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --card-hover-shadow: 0 18px 40px -6px rgba(147, 51, 234, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --primary-color: #9333EA;
  --primary-hover: #7E22CE;
  --primary-light: #F5EEFF;
  --primary-glow: rgba(147, 51, 234, 0.3);
  --accent-color: #C084FC;
}

/* THEME: DARK MODE */
body[data-theme="dark"] {
  --bg-color: #0F172A;
  --bg-gradient: linear-gradient(180deg, #090D16 0%, #0F172A 40%, #131D33 100%);
  --card-bg: #1E293B;
  --card-border: rgba(244, 63, 94, 0.3);
  --card-shadow: 0 14px 35px -6px rgba(0, 0, 0, 0.5);
  --card-hover-shadow: 0 20px 45px -6px rgba(244, 63, 94, 0.3);
  --primary-color: #FB7185;
  --primary-hover: #F43F5E;
  --primary-light: #33212C;
  --primary-glow: rgba(251, 113, 133, 0.4);
  --accent-color: #FDA4AF;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
}

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

html {
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-color);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: var(--bg-gradient);
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* DECORATIVE BACKGROUND SHAPES */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
.shape-1 {
  top: -100px;
  right: -50px;
  width: 320px;
  height: 320px;
  background: var(--primary-glow);
}
.shape-2 {
  bottom: 10%;
  left: -80px;
  width: 280px;
  height: 280px;
  background: rgba(255, 182, 193, 0.3);
}

/* 3. LYNK.ID MAIN CONTAINER (RESPONSIVE: MOBILE & DESKTOP EXPANDED) */
.store-container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background: var(--bg-color);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: max-width var(--transition-smooth);
}

@media (min-width: 768px) and (max-width: 1023px) {
  .store-container {
    max-width: 860px;
    width: 95%;
    margin: 20px auto 40px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: calc(100vh - 60px);
    border: 1px solid var(--card-border);
  }
}

@media (min-width: 1024px) {
  .store-container {
    max-width: 1220px;
    width: 95%;
    margin: 24px auto 50px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: calc(100vh - 60px);
    border: 1px solid var(--card-border);
  }
}

/* 4. STORE HEADER (BANNER & OVERLAPPING AVATAR) */
.store-header {
  position: relative;
  text-align: center;
}

.banner-wrapper {
  position: relative;
  width: 100%;
  height: 240px; /* Real proportional banner on mobile */
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  box-shadow: inset 0 -10px 25px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  .banner-wrapper {
    height: 320px; /* Real banner on tablet */
  }
}

@media (min-width: 1024px) {
  .banner-wrapper {
    height: 380px; /* Real majestic banner on desktop (~1200 x 380 px) */
  }
}

.store-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-smooth);
}

.banner-wrapper:hover .store-banner {
  transform: scale(1.02);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.42) 100%);
}

.avatar-container {
  position: relative;
  margin-top: -65px;
  display: inline-block;
  z-index: 2;
}

.avatar-ring {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: var(--card-bg);
  padding: 5px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: transform var(--transition-smooth);
}

.avatar-ring:hover {
  transform: scale(1.06) rotate(3deg);
}

.store-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* STORE INFO */
.store-info {
  padding: 6px 20px 8px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-color);
  background: var(--primary-light);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.verified-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-color);
  animation: pulseDot 2s infinite;
}

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

.store-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.store-tagline {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 6px;
}

.store-bio {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto 10px;
}

/* SOCIAL MEDIA CHIPS */
.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.social-chip:hover {
  transform: translateY(-2px);
  color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.social-chip.wa-chip {
  color: #128C7E;
  background: #E8F8F0;
  border-color: rgba(37, 211, 102, 0.3);
}
.social-chip.wa-chip:hover {
  background: #25D366;
  color: #FFFFFF;
}

/* 5. CATALOG SECTION & CATEGORIES */
.catalog-section {
  padding: 4px 16px 28px;
  flex: 1;
}

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

/* SORT / FILTER ENGINE SELECTOR */
.sort-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1;
  min-width: 170px;
}

.sort-select-wrapper .sort-icon {
  position: absolute;
  left: 12px;
  color: var(--primary-color);
  font-size: 0.82rem;
  pointer-events: none;
}

.sort-select {
  width: 100%;
  appearance: none;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 24px 7px 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.sort-select:hover, .sort-select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* MOBILE LAYOUT SWITCHER CHIPS */
.mobile-layout-toggle {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--card-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-layout-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-family);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-layout-chip:hover {
  color: var(--primary-color);
}

.btn-layout-chip.active {
  background: var(--primary-color);
  color: #FFFFFF;
  box-shadow: 0 2px 8px var(--primary-glow);
}

@media (min-width: 1024px) {
  .mobile-layout-toggle {
    display: none;
  }
}

/* CATEGORY SCROLL BAR */
.category-filter-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
}
.category-filter-scroll::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  border: 1.5px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.03);
  transition: all var(--transition-fast);
}

.cat-chip:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.cat-chip.active {
  background: var(--primary-color);
  color: #FFFFFF;
  border-color: var(--primary-color);
  box-shadow: 0 6px 16px var(--primary-glow);
  transform: translateY(-2px);
}

/* PRODUCTS GRID (MOBILE: GRID 2 COLS VS LARGE 1 COL | DESKTOP: 4 COLS) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  transition: all var(--transition-smooth);
}

/* Tipe Grid Ponsel: 2 Katalog per Baris */
.products-grid.view-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}

/* Tipe Large Ponsel: 1 Katalog per Baris */
.products-grid.view-large {
  grid-template-columns: 1fr !important;
  gap: 18px !important;
}

/* Tablet: 3 Katalog per Baris */
@media (min-width: 768px) and (max-width: 1023px) {
  .products-grid,
  .products-grid.view-grid,
  .products-grid.view-large {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
  }
}

/* Desktop / Laptop: Tepat 4 Katalog per Baris */
@media (min-width: 1024px) {
  .products-grid,
  .products-grid.view-grid,
  .products-grid.view-large {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
  }
}

/* 6. PRODUCT CATALOG CARD (3D AESTHETICS & ELEVATION) */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--card-border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--primary-color);
}

/* 3D HIGHLIGHT CARD (PRODUK UNGGULAN GLOW BORDER & PITA EMAS) */
.product-card.is-highlight {
  border: 2px solid #F59E0B !important;
  box-shadow: 0 14px 35px -6px rgba(245, 158, 11, 0.3), 0 0 18px rgba(245, 158, 11, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.card-highlight-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.4);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* PLAYFUL WOBBLE / GOYANG ANIMATION (GLOBAL & PER-PRODUK) */
body.wobble-active .product-card.can-wobble:hover,
body.wobble-active .product-card:not(.wobble-disabled):hover {
  animation: wobbleEffect 0.7s ease-in-out;
  box-shadow: var(--card-hover-shadow);
  border-color: var(--primary-color);
}

@keyframes wobbleEffect {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.02) rotate(-1.5deg); }
  40% { transform: scale(1.02) rotate(1.5deg); }
  60% { transform: scale(1.01) rotate(-1deg); }
  80% { transform: scale(1.01) rotate(0.8deg); }
  100% { transform: scale(1.02) rotate(0deg); }
}

.product-card:active {
  transform: scale(0.98);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f1f5f9;
}

.card-image-wrap.ratio-1-1 { aspect-ratio: 1 / 1; }
.card-image-wrap.ratio-4-5 { aspect-ratio: 4 / 5; }

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

/* EYE-CATCHING DISCOUNT BADGE (Pojok Kanan Atas) */
.discount-badge-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--badge-discount-bg);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(255, 23, 68, 0.45);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.card-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  z-index: 2;
}

.multi-img-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #FFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* CARD CONTENT */
.card-content {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price-container {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.card-original-price {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-decoration: line-through;
}

.card-promo-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.02em;
}

.card-click-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-color);
  padding-top: 8px;
  border-top: 1px dashed rgba(244, 63, 94, 0.2);
  margin-top: 4px;
}

/* 7. FLOATING WHATSAPP BUTTON (POJOK KANAN BAWAH) */
.floating-wa {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-pulse {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: waPulseRing 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes waPulseRing {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

.floating-wa-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
  position: relative;
  z-index: 2;
  transition: transform var(--transition-fast);
}

.floating-wa:hover .floating-wa-icon {
  transform: scale(1.1) rotate(6deg);
}

.floating-tooltip {
  position: absolute;
  right: 70px;
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  border: 1px solid var(--card-border);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--transition-fast);
}

.floating-wa:hover .floating-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* 8. MODAL SHEET DETAIL PRODUK */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity var(--transition-smooth);
}

.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.modal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  background: var(--card-bg);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  box-shadow: 0 -12px 45px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform var(--transition-smooth);
}

.modal-backdrop.hidden .modal-sheet {
  transform: translateY(100%);
}

.sheet-drag-handle {
  width: 44px;
  height: 5px;
  background: #CBD5E1;
  border-radius: 4px;
  margin: 12px auto 6px;
}

.btn-close-modal {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
}

.btn-close-modal:hover {
  background: var(--primary-color);
  color: #FFFFFF;
}

/* CAROUSEL */
.carousel-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #000;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  border: none;
  color: #1E293B;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  z-index: 5;
  transition: transform var(--transition-fast);
}

.carousel-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  background: #FFF;
}
.prev-arrow { left: 12px; }
.next-arrow { right: 12px; }

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

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-dot.active {
  width: 24px;
  border-radius: 6px;
  background: var(--primary-color);
}

/* VIDEO DEMO */
.video-demo-container {
  margin: 14px 18px 0;
  background: var(--primary-light);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px;
}
.video-demo-container.hidden { display: none; }

.video-demo-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}

.video-frame-wrapper iframe,
.video-frame-wrapper video {
  width: 100%;
  height: 100%;
  border: none;
}

/* SHEET DETAILS */
.sheet-details {
  padding: 18px 20px 24px;
}

.sheet-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.sheet-cat-badge {
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.sheet-discount-badge {
  background: var(--badge-discount-bg);
  color: #FFF;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.sheet-stock-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.sheet-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 8px;
}

.sheet-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.sheet-original-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-decoration: line-through;
}

.sheet-promo-price {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary-color);
}

.sheet-desc-box {
  background: var(--primary-light);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.desc-heading {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.desc-body {
  font-size: 0.86rem;
  color: var(--text-main);
  line-height: 1.65;
  white-space: pre-line;
}

.btn-buy-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  border: none;
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 8px 24px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-fast);
}

.btn-buy-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--primary-glow);
}

/* 9. CHECKOUT MODAL WITH 3 PAYMENT TABS */
.modal-card {
  width: 92%;
  max-width: 480px;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  margin: auto;
  position: relative;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 22px;
}

.checkout-header {
  text-align: center;
  margin-bottom: 18px;
}

.checkout-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.checkout-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

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

.checkout-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--primary-light);
  border: 1px solid var(--card-border);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.co-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.co-info { flex: 1; }

.co-title {
  font-size: 0.88rem;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.co-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.co-price {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary-color);
}

.co-qty {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.form-group label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group input {
  font-family: var(--font-family);
  font-size: 0.92rem;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* PAYMENT METHOD TABS (BCA, QRIS Shopee, QRIS GoPay) */
.payment-method-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-tab {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--card-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--card-bg);
}

.payment-tab input { display: none; }

.payment-tab.active {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.tab-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.tab-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tab-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-tab.active .tab-radio-circle {
  border-color: var(--primary-color);
  background: var(--primary-color);
}
.payment-tab.active .tab-radio-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFF;
}

/* PAYMENT BOX DETAILS */
.payment-details-box { margin-top: 4px; }
.payment-details-box.hidden { display: none; }

.bank-card {
  background: #F0F7FF;
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 14px;
}

.bank-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bank-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1E40AF;
}

.verified-tag {
  font-size: 0.68rem;
  font-weight: 800;
  background: #DBEAFE;
  color: #1E40AF;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.bank-card-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.bank-card-number strong {
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  color: #1E3A8A;
}

.btn-copy {
  background: var(--primary-color);
  color: #FFF;
  border: none;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bank-card-holder {
  font-size: 0.8rem;
  color: #3B82F6;
}

.pay-instruction {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.qris-card {
  text-align: center;
  background: #FFF;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.qris-badge-top {
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.qris-image-wrapper {
  max-width: 240px;
  margin: 0 auto 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.qris-image-wrapper img {
  width: 100%;
  display: block;
}

.btn-download-qris {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  border: 1.5px solid var(--primary-glow);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-download-qris:hover {
  background: var(--primary-color);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.qris-note {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.btn-submit-order {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: #FFF;
  border: none;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 800;
  padding: 15px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 8px 24px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit-order:hover {
  transform: translateY(-2px);
}

/* 10. SUCCESS & DRIVE DELIVERY */
.success-card { text-align: center; }

.success-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E8F8F0;
  color: #25D366;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.success-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.success-invoice {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.order-status-banner {
  padding: 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  text-align: left;
}

.order-status-banner.pending {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #92400E;
}

.order-status-banner.verified {
  background: #D1FAE5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseDot 1.5s infinite;
}

.status-sub {
  font-size: 0.78rem;
  opacity: 0.9;
}

.drive-access-box {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  text-align: left;
}
.drive-access-box.hidden { display: none; }

.drive-box-header {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1E40AF;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drive-box-desc {
  font-size: 0.82rem;
  color: #3B82F6;
  margin-bottom: 12px;
  line-height: 1.45;
}

.btn-drive-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #2563EB;
  color: #FFF;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 13px;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  margin-bottom: 10px;
}

.btn-drive-open:hover { background: #1D4ED8; }

.copy-drive-row {
  display: flex;
  gap: 6px;
}

.copy-drive-row input {
  flex: 1;
  font-size: 0.75rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #CBD5E1;
  background: #FFF;
}

.btn-copy-link {
  background: #E2E8F0;
  border: none;
  color: #1E293B;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-wa-confirm {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFF;
  border: none;
  font-family: var(--font-family);
  font-size: 0.98rem;
  font-weight: 800;
  padding: 15px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.wa-action-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-back-store {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px;
  cursor: pointer;
}

.btn-back-store:hover { color: var(--primary-color); }

/* FOOTER */
.store-footer {
  text-align: center;
  padding: 24px 18px 20px;
  border-top: 1px solid var(--card-border);
  margin-top: auto;
}

.footer-guarantee {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.footer-copyright {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

/* TOASTS */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1E293B;
  color: #FFF;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ========================================================== */
/* 5-STAR RATING & SOLD COUNT ON CATALOG CARDS & MODAL       */
/* ========================================================== */
.card-rating-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 0.74rem;
}

.card-stars {
  color: #F59E0B;
  display: inline-flex;
  gap: 1.5px;
  font-size: 0.72rem;
}

.card-rating-score {
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.75rem;
}

.card-sold-badge {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

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

.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #F59E0B;
  font-size: 0.85rem;
}

.rating-score {
  font-weight: 800;
  color: var(--text-main);
  margin-left: 4px;
  font-size: 0.85rem;
}

.rating-sold-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #E11D48;
  background: #FFE4E6;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* ========================================================== */
/* YOUTUBE / ACCOUNT VARIATIONS CONTAINER IN DETAIL MODAL     */
/* ========================================================== */
.sheet-variations-wrap {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--primary-light);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  text-align: left;
}

.variations-section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.variations-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.variation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.variation-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.variation-card.selected {
  border-color: var(--primary-color);
  background: #FFF5F7;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.variation-card.sold-out {
  opacity: 0.6;
  cursor: not-allowed;
  background: #F8FAFC;
  border-color: #E2E8F0;
}

.variation-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.variation-radio {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.variation-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.variation-name {
  font-weight: 800;
  font-size: 0.84rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.variation-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.badge-subs {
  font-size: 0.68rem;
  font-weight: 800;
  color: #DC2626;
  background: #FEE2E2;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.btn-check-channel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #DC2626;
  text-decoration: none;
  background: #FFF1F2;
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.btn-check-channel:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.variation-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.variation-price {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--primary-color);
}

.variation-stock-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.variation-stock-badge.ready {
  color: #059669;
  background: #D1FAE5;
}

.variation-stock-badge.empty {
  color: #DC2626;
  background: #FEE2E2;
}
