/*
 * Homepage etalase publik zasha.online — vanilla CSS, tanpa framework/build.
 * Dipakai oleh resources/views/home.blade.php (via public/landing.blade.php).
 *
 * PENTING: halaman ini TIDAK memuat Tailwind. Semua ukuran elemen (termasuk
 * svg heroicon di ikon kategori) dikontrol dari file ini.
 *
 * Warna brand: navy #1F2F65 (primary) + gold #C9A227 (aksen).
 * Font: Plus Jakarta Sans (Google Fonts, di-load di <head> view).
 */

:root {
  --navy: #1f2f65;
  --navy-dark: #172548;
  --navy-darker: #0f1a33;
  --navy-50: #f0f3fa;
  --navy-100: #dde4f3;
  --gold: #c9a227;
  --gold-dark: #a8841f;
  --gold-50: #fdf9ed;
  --bg: #f1f4f9;
  --card: #ffffff;
  --border: #e6eaf2;
  --text: #1e293b;
  --muted: #7a8699;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 26, 51, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 26, 51, 0.10);
}

/* ---------- Reset ringan ---------- */
.home-page,
.home-page * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.home-page {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.home-page a {
  text-decoration: none;
  color: inherit;
}

.home-page img {
  display: block;
  max-width: 100%;
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.home-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  box-shadow: var(--shadow-md);
}

.home-navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-navbar__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.home-navbar__logo img {
  height: 2.25rem;
  width: auto;
}

.home-navbar__search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  min-width: 0;
}

.home-navbar__search svg {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--muted);
  flex-shrink: 0;
}

.home-navbar__search input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: transparent;
}

.home-navbar__search input::placeholder {
  color: var(--muted);
}

.home-navbar__cta {
  display: none;
  flex-shrink: 0;
  background: var(--gold);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  transition: background 0.2s;
}

.home-navbar__cta:hover {
  background: var(--gold-dark);
}

@media (min-width: 640px) {
  .home-navbar__cta {
    display: inline-block;
  }
}

/* =====================================================================
   MAIN SHELL
   ===================================================================== */
.home-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .home-main {
    padding: 1.25rem 1.5rem 2.5rem;
    gap: 1.25rem;
  }
}

/* =====================================================================
   BANNERS
   ===================================================================== */
.home-banners {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .home-banners {
    grid-template-columns: 2fr 1fr;
  }
}

.home-banner--main {
  background:
    radial-gradient(ellipse at 85% 15%, rgba(201, 162, 39, 0.35) 0%, transparent 50%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-darker) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 220px;
}

@media (min-width: 900px) {
  .home-banner--main {
    padding: 2.5rem 2.25rem;
  }
}

.home-banner__badge {
  display: inline-block;
  background: rgba(201, 162, 39, 0.18);
  border: 1px solid rgba(201, 162, 39, 0.45);
  color: #f0c453;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.home-banner--main h1 {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

@media (min-width: 900px) {
  .home-banner--main h1 {
    font-size: 2.4rem;
  }
}

.home-banner--main p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #c5cfe6;
  margin-bottom: 1.25rem;
}

.home-banner__btn {
  background: var(--gold);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
}

.home-banner__btn:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

.home-banner-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .home-banner-side {
    grid-template-columns: 1fr;
  }
}

.home-banner-mini {
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.home-banner-mini__icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.home-banner-mini h3 {
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}

.home-banner-mini p {
  font-size: 0.74rem;
  line-height: 1.45;
  opacity: 0.85;
}

.home-banner--gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.home-banner--white {
  background: var(--card);
  color: var(--navy);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* =====================================================================
   PANEL (section putih ala Shopee)
   ===================================================================== */
.home-panel {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1rem 1.2rem;
}

@media (min-width: 768px) {
  .home-panel {
    padding: 1.35rem 1.5rem 1.5rem;
  }
}

/* Rekomendasi: tanpa panel putih penuh, grid langsung di background */
.home-panel--flat {
  background: transparent;
  border: none;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

.home-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.home-panel__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.home-panel__title--fire::before {
  content: '🔥 ';
}

.home-panel__link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-dark);
  transition: color 0.2s;
}

.home-panel__link:hover {
  color: var(--navy);
}

/* =====================================================================
   FILTER KATEGORI — chip pill kecil, horizontal scroll (scalable
   untuk puluhan kategori), posisinya tepat di atas grid produk
   ===================================================================== */
.home-chip-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 0.9rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.home-chip-row::-webkit-scrollbar {
  height: 5px;
}

.home-chip-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.home-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.home-chip:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.home-chip--active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.home-chip--active:hover {
  color: #fff;
  border-color: var(--navy);
}

/* =====================================================================
   SCROLL ROW (terlaris + toko)
   ===================================================================== */
.home-scroll-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 2px 2px 0.6rem; /* 2px: ruang shadow card */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.home-scroll-row::-webkit-scrollbar {
  height: 6px;
}

.home-scroll-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

/* ---------- Card produk terlaris ---------- */
.home-produk-card {
  flex: 0 0 158px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.home-produk-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.home-produk-card__imgwrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--navy-50);
  overflow: hidden;
}

.home-produk-card__imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-produk-card__body {
  padding: 0.65rem 0.7rem 0.75rem;
}

.home-produk-card__nama {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.1rem;
  margin-bottom: 0.35rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-produk-card__harga {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

.home-produk-card__terjual-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--navy-50);
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.home-produk-card__terjual-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) 0%, #e5c258 100%);
}

.home-produk-card__terjual-label {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Card toko ---------- */
.home-scroll-row--toko {
  gap: 1.1rem;
}

.home-toko-card {
  flex: 0 0 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}

.home-toko-avatar {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 999px;
  object-fit: cover;
  background: var(--navy-50);
  border: 2px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}

.home-toko-card:hover .home-toko-avatar {
  transform: scale(1.06);
  border-color: var(--gold);
}

.home-toko-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.35rem;
}

.home-toko-card__nama {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-toko-card__rating {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--gold-dark);
}

/* =====================================================================
   REKOMENDASI GRID
   ===================================================================== */
.home-rekomendasi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

@media (min-width: 640px) {
  .home-rekomendasi-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
}

@media (min-width: 900px) {
  .home-rekomendasi-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.home-rekomendasi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.home-rekomendasi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.home-rekomendasi-card__imgwrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--navy-50);
  overflow: hidden;
}

.home-rekomendasi-card__imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-rekomendasi-card__body {
  padding: 0.65rem 0.7rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.home-rekomendasi-card__nama {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.1rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-rekomendasi-card__harga {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-dark);
}

.home-rekomendasi-card__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  font-size: 0.68rem;
  color: var(--muted);
}

.home-rekomendasi-card__rating {
  flex-shrink: 0;
  font-weight: 800;
  color: var(--gold-dark);
}

.home-rekomendasi-card__toko {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =====================================================================
   PLACEHOLDER GAMBAR
   ===================================================================== */
.home-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b6c1d6;
}

.home-img-placeholder svg {
  width: 2rem;
  height: 2rem;
}

/* =====================================================================
   EMPTY STATE
   ===================================================================== */
.home-empty {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  padding: 1.75rem 0;
}

.home-empty__link {
  color: var(--gold-dark);
  font-weight: 700;
  text-decoration: underline;
}

/* =====================================================================
   CTA + FOOTER
   ===================================================================== */
.home-cta {
  background:
    radial-gradient(ellipse at 15% 85%, rgba(201, 162, 39, 0.25) 0%, transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-darker) 100%);
  padding: 3rem 1rem;
  text-align: center;
}

.home-cta__inner {
  max-width: 560px;
  margin: 0 auto;
}

.home-cta h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .home-cta h2 {
    font-size: 1.85rem;
  }
}

.home-cta p {
  color: #c5cfe6;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.4rem;
}

.home-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--gold);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.35);
  transition: background 0.2s, transform 0.2s;
}

.home-cta__btn:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}

.home-cta__btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.home-cta__note {
  font-size: 0.7rem !important;
  color: #8d9bbd !important;
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

.home-footer {
  background: var(--navy-darker);
  padding: 1.1rem 1rem;
  text-align: center;
}

.home-footer p {
  color: #8d9bbd;
  font-size: 0.74rem;
}

/* =====================================================================
   MODAL RINCIAN PRODUK
   ===================================================================== */
.home-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .home-modal {
    align-items: center;
    padding: 1.5rem;
  }
}

.home-modal[hidden] {
  display: none;
}

.home-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 51, 0.6);
  backdrop-filter: blur(2px);
}

.home-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 26, 51, 0.25);
}

@media (min-width: 640px) {
  .home-modal__box {
    border-radius: 18px;
  }
}

.home-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.home-modal__imgwrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--navy-50);
  overflow: hidden;
}

.home-modal__imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-modal__body {
  padding: 1rem 1.15rem 1.3rem;
}

.home-modal__harga {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold-dark);
  margin-bottom: 0.3rem;
}

.home-modal__nama {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.home-modal__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  font-size: 0.76rem;
  color: var(--muted);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.home-modal__rating {
  color: var(--gold-dark);
  font-weight: 800;
}

.home-modal__rating:empty {
  display: none;
}

.home-modal__toko {
  font-weight: 600;
  color: var(--navy);
}

.home-modal__deskripsi {
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-line;
  margin-bottom: 1.1rem;
}

.home-modal__beli {
  display: block;
  width: 100%;
  border: none;
  cursor: pointer;
  background: var(--gold);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  transition: background 0.2s;
}

.home-modal__beli:hover {
  background: var(--gold-dark);
}

/* State 2: ajakan download */
.home-modal__download {
  padding: 2.25rem 1.5rem 1.75rem;
  text-align: center;
}

.home-modal__download-icon {
  font-size: 2.6rem;
  margin-bottom: 0.75rem;
}

.home-modal__download h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.home-modal__download p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.35rem;
}

.home-modal__back {
  display: block;
  margin: 0.9rem auto 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
}
