/* ============================================================
   Tokopedia Inspired Theme Styles (LiteShop)
   Optimized for mobile-first rural commerce & sub-500ms paint
   ============================================================ */

:root {
  --primary: #00aa5b;
  --primary-hover: #008f4c;
  --primary-container: #00aa5b;
  --on-primary: #ffffff;
  --secondary: #006e04;
  --surface: #f9f9ff;
  --surface-canvas: #ffffff;
  --surface-subtle: #f5f6f8;
  --surface-border: #e4e7eb;
  --text-primary: #212121;
  --text-secondary: #6d7588;
  --badge-discount: #fee8e8;
  --badge-discount-text: #e02954;
  --rating-star: #ffc400;
}

/* Base resets & typography */
html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--surface);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  overscroll-behavior-y: none;
}

/* Safe areas */
.pt-safe {
  padding-top: env(safe-area-inset-top, 0px);
}
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Hide scrollbars cleanly */
.no-scrollbar::-webkit-scrollbar,
::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Minimum 44px tap targets for mobile usability (Anti-Slop rule R-03) */
button, a.btn-tap, .tap-target {
  min-height: 44px;
}

/* Toast Notification */
#toast-container {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
  transition: all 0.3s ease;
}

.toast-item {
  pointer-events: auto;
  background: rgba(33, 33, 33, 0.95);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  margin-bottom: 8px;
  animation: slideDown 0.25s ease-out;
}

.toast-item.success {
  background: #00aa5b;
}

.toast-item.error {
  background: #ba1a1a;
}

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

/* Camera Live Viewfinder & Canvas Preview */
#camera-preview-container {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: var(--surface-subtle);
  border: 2px dashed var(--surface-border);
}

#camera-preview-container img,
#camera-preview-container canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pulse animation for Bot sync */
@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-pulse {
  animation: softPulse 2s infinite ease-in-out;
}
