/* Listara Custom Modern Stylesheet */
/* Designed for Personal Shopping Guide & Katalog Rekomendasi Produk (Mobile-First Optimized) */

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
  background-color: #334155;
}

/* Hide scrollbar for horizontal pill scrolls on mobile */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Accessible Focus Indicator (antislop R-32, WCAG 2.4.7) */
:focus-visible {
  outline: 2px solid #0f766e !important;
  outline-offset: 2px !important;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0f766e !important;
  outline-offset: 1px !important;
  border-color: #0f766e !important;
}

.dark :focus-visible {
  outline: 2px solid #2dd4bf !important;
  outline-offset: 2px !important;
}

.dark input:focus-visible,
.dark select:focus-visible,
.dark textarea:focus-visible {
  outline: 2px solid #2dd4bf !important;
  outline-offset: 1px !important;
  border-color: #2dd4bf !important;
}

/* Accessible High Contrast Muted Text (WCAG AA 4.5:1 ratio) */
.text-slate-400 {
  color: #64748b; /* slate-500: passes 4.5:1 on white (#ffffff) and light surfaces */
}

.dark .text-slate-400 {
  color: #94a3b8; /* slate-400: passes 6.96:1 on dark (#0f172a) surfaces */
}

/* Glassmorphism Navigation */
.glass-nav {
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark .glass-nav {
  background-color: rgba(15, 23, 42, 0.94);
}

/* Card Smooth Hover Animation */
.card-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

@media (min-width: 768px) {
  .card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.08), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
  }
  .dark .card-hover:hover {
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.4);
    border-color: #334155;
  }
}

/* Consistent Product Image Aspect Ratio */
.aspect-product {
  aspect-ratio: 1 / 1;
}

.aspect-4\/3 {
  aspect-ratio: 4 / 3;
}

@media (min-width: 640px) {
  .aspect-product {
    aspect-ratio: 4 / 3;
  }
}

/* Mobile-First 2-Column Product Grid Optimization */
@media (max-width: 639px) {
  #featured-products-grid,
  #latest-home-grid,
  #recently-viewed-grid,
  #catalog-grid,
  #categories-grid,
  #selected-cat-products,
  #subcat-products-grid,
  #search-grid,
  #related-products-grid,
  #latest-grid,
  #popular-grid,
  #featured-grid,
  #komisi-xtra-grid,
  #wishlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }
}

/* Safe area padding for mobile bottom bar */
.safe-bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Shimmer Loading State Animation */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.dark .animate-shimmer {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Details/Summary Accordion Reset */
details summary::-webkit-details-marker {
  display: none;
}

details[open] summary svg.accordion-icon {
  transform: rotate(180deg);
}

