/* =========================================
   CSS statis - TIDAK perlu build/compile apapun.
   Utility class (bg-white, grid, flex, dll) di-generate
   otomatis oleh Tailwind CDN (lihat layouts/app.blade.php).
   File ini hanya berisi komponen custom & animasi.
========================================= */

:root {
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background-color: #ffffff;
  color: #374151;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  letter-spacing: -0.005em;
}

h1, h2, h3 { letter-spacing: -0.02em; }
p { line-height: 1.7; }

::selection { background: #DBEAFE; color: #1D4ED8; }

/* Scrollbar halus untuk seluruh halaman (webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #FEFCF8; }
::-webkit-scrollbar-thumb { background: #E4D9C0; border-radius: 9999px; border: 2px solid #FEFCF8; }
::-webkit-scrollbar-thumb:hover { background: #2563EB; }

.page-fade-in { animation: bodyFadeIn 0.6s ease-out; }
@keyframes bodyFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.animate-float-slow { animation: floatSlow 4s ease-in-out infinite; }

@keyframes pulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.35); }
  70% { box-shadow: 0 0 0 10px rgba(37,99,235,0); }
}
.animate-pulse-soft { animation: pulseSoft 2s infinite; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.7s ease-out both; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in { animation: fadeIn 0.8s ease-in both; }

/* Container krem lembut */
.container-cream {
  background-color: #FBF7F0;
  border: 1px solid rgba(243, 236, 221, 0.6);
  border-radius: 1.1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 8px 20px -12px rgba(37,99,235,0.06);
  padding: 1.25rem;
  transition: box-shadow 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth), border-color 0.4s var(--ease-smooth);
}
@media (min-width: 768px) { .container-cream { padding: 2rem; } }

/* Tombol biru utama */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #2563EB;
  color: #fff;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: 0.85rem;
  box-shadow: 0 4px 12px -2px rgba(37,99,235,0.35);
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-smooth);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.btn-primary:hover {
  background-color: #1D4ED8;
  box-shadow: 0 12px 22px -4px rgba(37,99,235,0.45);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 4px 6px rgba(0,0,0,0.07); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  border: 1.5px solid #2563EB;
  color: #2563EB;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: 0.85rem;
  cursor: pointer;
  transition: all 0.4s var(--ease-smooth);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.btn-outline:hover { background-color: #2563EB; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px -6px rgba(37,99,235,0.35); }

/* Kartu produk */
.card-product {
  background-color: #FEFCF8;
  border: 1px solid rgba(243, 236, 221, 0.5);
  border-radius: 1.1rem;
  overflow: hidden;
  transition: box-shadow 0.45s var(--ease-smooth), transform 0.45s var(--ease-smooth), border-color 0.45s var(--ease-smooth);
}
.card-product:hover {
  box-shadow: 0 24px 32px -16px rgba(37,99,235,0.22);
  transform: translateY(-5px);
  border-color: rgba(37,99,235,0.35);
}

.badge-flash {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: #2563EB;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  box-shadow: 0 4px 10px -2px rgba(37,99,235,0.5);
  z-index: 2;
  letter-spacing: -0.01em;
}

.badge-discount {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 0.55rem;
  box-shadow: 0 4px 10px -2px rgba(239,68,68,0.45);
  z-index: 2;
}
.badge-discount.static { position: static; display: inline-block; }

/* Navbar links */
.nav-link {
  position: relative;
  color: #4b5563;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s var(--ease-smooth);
}
.nav-link:hover { color: #2563EB; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background-color: #2563EB;
  border-radius: 9999px;
  transition: width 0.35s var(--ease-smooth);
}
.nav-link:hover::after { width: 100%; }

/* Navbar shadow halus saat discroll (dipasang lewat JS) */
header.navbar-scrolled {
  box-shadow: 0 4px 20px -8px rgba(0,0,0,0.08);
}

/* Icon bulat */
.icon-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: #FBF7F0;
  border: 1px solid rgba(243, 236, 221, 0.6);
  color: #4b5563;
  text-decoration: none;
  transition: all 0.35s var(--ease-smooth);
  cursor: pointer;
}
.icon-circle:hover { background-color: #2563EB; color: #fff; transform: scale(1.1); box-shadow: 0 8px 16px -4px rgba(37,99,235,0.4); }

.cart-badge {
  position: absolute;
  top: -0.25rem; right: -0.25rem;
  background-color: #2563EB;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 1.25rem; height: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  border: 2px solid #fff;
  transition: transform 0.3s var(--ease-smooth);
}

.stars { display: flex; align-items: center; gap: 2px; color: #fbbf24; }
.stars i { font-size: 0.8rem; }

/* Carousel flash sale */
#flashSaleCarousel .carousel-control-prev,
#flashSaleCarousel .carousel-control-next {
  width: 40px; height: 40px;
  top: 50%; transform: translateY(-50%);
  background-color: #2563EB;
  border-radius: 9999px;
  opacity: 0.9;
  transition: all .3s ease;
}
#flashSaleCarousel .carousel-control-prev:hover,
#flashSaleCarousel .carousel-control-next:hover {
  opacity: 1; transform: translateY(-50%) scale(1.08);
}
#flashSaleCarousel .carousel-control-prev { left: -18px; }
#flashSaleCarousel .carousel-control-next { right: -18px; }

.countdown-box {
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  color: #1D4ED8;
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: 0.55rem;
  padding: 0.2rem 0.55rem;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.15);
  letter-spacing: 0.02em;
}

/* Slider flash sale (horizontal scroll-snap) */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-smooth), transform .7s var(--ease-smooth); }
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }

/* Input dengan icon di sisi kiri (dipakai di form login/register) */
.admin-input-icon-wrap { position: relative; }
.admin-input-icon-wrap i.field-icon {
    position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
    color: #93a3b8; font-size: 0.95rem;
    pointer-events: none;
    z-index: 1;
}
.admin-input-icon-wrap input { padding-left: 2.6rem !important; }

/* Teks gradient untuk judul hero */
.hero-gradient-text {
    background: linear-gradient(90deg, #2563EB, #7C3AED, #2563EB);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientSlideText 6s linear infinite;
}
@keyframes gradientSlideText {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Icon bulat kecil untuk trust badge */
.trust-icon {
    width: 1.9rem; height: 1.9rem;
    border-radius: 9999px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    box-shadow: 0 6px 14px -4px rgba(0,0,0,0.3), 0 0 0 4px rgba(255,255,255,0.7);
    transition: transform 0.35s var(--ease-smooth);
}
.trust-icon:hover { transform: scale(1.12); }

/* Kartu mengambang dekoratif di hero */
.hero-float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(243,236,221,0.9);
    border-radius: 1.1rem;
    padding: 0.7rem 1.05rem;
    box-shadow: 0 16px 30px -14px rgba(37,99,235,0.3);
    z-index: 2;
    animation: floatSlow 5s ease-in-out infinite;
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}
.hero-float-card:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 22px 36px -14px rgba(37,99,235,0.4); }
.hero-float-icon {
    width: 2.25rem; height: 2.25rem;
    border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px -3px rgba(0,0,0,0.3);
}

/* Icon kategori berwarna */
.category-icon-badge {
    width: 3.1rem; height: 3.1rem;
    border-radius: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    margin: 0 auto;
    box-shadow: 0 10px 20px -8px rgba(0,0,0,0.3);
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}
.category-icon-badge:hover { transform: scale(1.12) rotate(-4deg); box-shadow: 0 14px 24px -8px rgba(0,0,0,0.35); }

/* ===== Ulasan Pembeli ===== */
.filter-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.55rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
    background: #fff;
    border: 1px solid rgba(243,236,221,0.9);
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
    flex-shrink: 0;
}
.filter-pill:hover { border-color: #2563EB; color: #2563EB; }
.filter-pill-active {
    background: #2563EB;
    color: #fff;
    border-color: #2563EB;
    box-shadow: 0 6px 14px -4px rgba(37,99,235,0.4);
}

.rating-bar-fill {
    background: linear-gradient(90deg, #2563EB, #60A5FA);
    transition: width 0.6s var(--ease-smooth);
}

.helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid rgba(243,236,221,0.9);
    border-radius: 9999px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: all 0.25s;
}
.helpful-btn:hover { border-color: #2563EB; color: #2563EB; }
.helpful-btn.helpful-active { background: #DBEAFE; color: #2563EB; border-color: #2563EB; }

/* ===== Varian Produk ===== */
.variant-card {
    background: #FEFCF8;
    border: 1.5px solid rgba(243,236,221,0.9);
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.25s var(--ease-smooth);
}
.variant-card:hover { border-color: #93C5FD; box-shadow: 0 8px 16px -8px rgba(37,99,235,0.25); }
.variant-selected {
    border-color: #2563EB !important;
    background: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.variant-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

/* ===== Dot indikator slider artikel ===== */
.article-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(37,99,235,0.25);
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    padding: 0;
}
.article-dot-active {
    width: 22px;
    background: #2563EB;
}

/* ===== FAQ Accordion ===== */
.faq-item { cursor: pointer; transition: box-shadow 0.3s var(--ease-smooth); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-smooth), opacity 0.3s;
    opacity: 0;
}
.faq-open .faq-answer {
    max-height: 300px;
    opacity: 1;
}
.faq-icon { transition: transform 0.3s var(--ease-smooth); }
.faq-open .faq-icon { transform: rotate(135deg); }
.faq-open { box-shadow: 0 12px 24px -12px rgba(37,99,235,0.2); border-color: rgba(37,99,235,0.35); }

/* Panel hero visual di halaman login/register */
.auth-hero-panel {
    background: linear-gradient(135deg, #FBF7F0 0%, #EFF6FF 100%);
    border-left: 1px solid rgba(243,236,221,0.7);
}

/* Blob dekoratif di background hero */
.hero-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}
@keyframes blobMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
.hero-blob-1 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #DBEAFE 0%, transparent 70%);
  top: -80px; right: -60px;
  animation: blobMove 10s ease-in-out infinite;
}
.hero-blob-2 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #FBF7F0 0%, transparent 70%);
  bottom: -60px; left: -40px;
  animation: blobMove 12s ease-in-out infinite reverse;
}

/* Glow lembut di tombol utama saat hover */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::before { left: 130%; }

/* Zoom halus gambar produk saat hover kartu */
.card-product img { transition: transform 0.7s var(--ease-smooth); }
.card-product:hover img { transform: scale(1.06); }

/* Skeleton shimmer sementara gambar loading */
.img-skeleton {
  background: linear-gradient(90deg, #F3ECDD 25%, #FBF7F0 37%, #F3ECDD 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Stagger animasi untuk grid produk (dipasang otomatis lewat JS) */
.stagger-item { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease-smooth), transform .55s var(--ease-smooth); }
.stagger-item.stagger-visible { opacity: 1; transform: translateY(0); }

/* Underline gradient pada judul section */
.section-title-accent {
  display: inline-block;
  position: relative;
}
.section-title-accent::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 48px; height: 4px;
  background: linear-gradient(90deg, #2563EB, #93C5FD);
  border-radius: 9999px;
}
