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

:root {
  --primary: #4b89d8;
  --primary-dark: #3979c2;
  --primary-light: #8cccf3;
  --secondary: #a9def8;
  --accent-orange: #ea580c;
  --whatsapp: #25D366;
  --whatsapp-dark: #128C7E;
  --surface: #ffffff;
  --bg-page: #edf9ff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

* {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
}

/* Responsive, seamless store promotion ticker */
.promo-marquee {
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 1.5%, #000 98.5%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 1.5%, #000 98.5%, transparent);
}

.promo-marquee-track {
  display: flex;
  width: max-content;
  animation: promo-marquee-scroll 36s linear infinite;
  will-change: transform;
}

.promo-marquee-group {
  flex: none;
  padding-right: 2.5rem;
}

.promo-marquee:hover .promo-marquee-track,
.promo-marquee:focus-within .promo-marquee-track {
  animation-play-state: paused;
}

@keyframes promo-marquee-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .promo-marquee { white-space: normal; }
  .promo-marquee-track { animation: none; display: block; width: auto; }
  .promo-marquee-group { display: block; padding: 0; }
  .promo-marquee-group[aria-hidden="true"] { display: none; }
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Brand Gradient */
.bg-brand-gradient {
  background: linear-gradient(135deg, #4b89d8 0%, #a9def8 58%, #ffffff 100%);
}

.text-brand-gradient {
  background: linear-gradient(135deg, #4b89d8 0%, #8cccf3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero Banner Glow & Seamless Blend */
.hero-banner-shadow {
  box-shadow: 0 20px 35px -10px rgba(75, 137, 216, 0.25);
}

/* Seamless Continuous Mask Blend (Zero harsh breaks / seams) */
.hero-smooth-blend {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 28%,
    rgba(0, 0, 0, 0.02) 34%,
    rgba(0, 0, 0, 0.08) 40%,
    rgba(0, 0, 0, 0.20) 48%,
    rgba(0, 0, 0, 0.45) 58%,
    rgba(0, 0, 0, 0.72) 68%,
    rgba(0, 0, 0, 0.90) 80%,
    #000000 90%,
    #000000 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    transparent 28%,
    rgba(0, 0, 0, 0.02) 34%,
    rgba(0, 0, 0, 0.08) 40%,
    rgba(0, 0, 0, 0.20) 48%,
    rgba(0, 0, 0, 0.45) 58%,
    rgba(0, 0, 0, 0.72) 68%,
    rgba(0, 0, 0, 0.90) 80%,
    #000000 90%,
    #000000 100%
  );
}

@media (max-width: 1023px) {
  .hero-smooth-blend {
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      transparent 20%,
      rgba(0, 0, 0, 0.08) 35%,
      rgba(0, 0, 0, 0.30) 55%,
      rgba(0, 0, 0, 0.70) 75%,
      #000000 100%
    );
    mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      transparent 20%,
      rgba(0, 0, 0, 0.08) 35%,
      rgba(0, 0, 0, 0.30) 55%,
      rgba(0, 0, 0, 0.70) 75%,
      #000000 100%
    );
    opacity: 0.4 !important;
  }
}

/* Card Hover Elevation */
.product-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px -8px rgba(75, 137, 216, 0.15);
  border-color: #93c5fd;
}

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

.product-img {
  transition: transform 0.3s ease;
}

/* Category Quick Card */
.category-card {
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: #4b89d8;
  box-shadow: 0 10px 20px -5px rgba(75, 137, 216, 0.12);
}

.category-card.active {
  background-color: #4b89d8;
  color: #ffffff;
  border-color: #4b89d8;
}

.category-card.active p, .category-card.active span {
  color: #ffffff !important;
}

/* Floating WhatsApp Pulse */
@keyframes pulse-wa {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.wa-pulse {
  animation: pulse-wa 2s infinite;
}

/* Cart Badge Bounce */
@keyframes cart-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.cart-bump {
  animation: cart-bounce 0.3s ease-in-out;
}

/* Drawer Backdrop */
.drawer-backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

/* Modal Overlay */
.modal-overlay {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

/* Line Clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Badges */
.badge-terlaris {
  background-color: #ea580c;
  color: #ffffff;
}

.badge-promo {
  background-color: #dc2626;
  color: #ffffff;
}

.badge-sni {
  background-color: #4b89d8;
  color: #ffffff;
}

/* Stealth Secret Admin Trigger - Terlihat dan terasa 100% seperti teks biasa tanpa efek klik/timbul */
#secret-admin-trigger {
  cursor: default !important;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
}

#secret-admin-trigger:hover,
#secret-admin-trigger:focus,
#secret-admin-trigger:active {
  cursor: default !important;
  color: #64748b !important;
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
  outline: none !important;
}

@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
  }
  body {
    padding-bottom: 76px; /* Offset for mobile bottom app bar */
  }
}

.mobile-bottom-bar {
  box-shadow: 0 -4px 20px -2px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
