/* File: assets/css/style.css */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css");
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
  --bg-color: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.05);
  --primary: #f97316;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.03);
  --shadow-hover: 0 15px 30px rgba(249, 115, 22, 0.12);
}

[data-bs-theme="dark"] {
  --bg-color: #0f172a;
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --card-bg: #1e293b;
  --card-border: #334155;
  --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* KONTROL KONTRAS TEKS & FORMULIR DARK MODE */
[data-bs-theme="dark"] .form-control {
  background-color: #1e293b !important;
  color: #ffffff !important;
  border: 1px solid #475569 !important;
}
[data-bs-theme="dark"] .form-control::placeholder {
  color: #94a3b8 !important;
}
[data-bs-theme="dark"] .text-dark {
  color: #ffffff !important;
}
[data-bs-theme="dark"] .text-muted {
  color: #94a3b8 !important;
}
[data-bs-theme="dark"] .bg-light {
  background-color: #1e293b !important;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all 0.4s ease;
  overflow-x: hidden;
}

/* NAVBAR & LOGO AUTO CROP MEMANJANG */
.navbar-custom {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--card-border);
  padding: 10px 0;
}
#logo-container img, #logo-container video {
  height: 40px;
  width: 140px; 
  object-fit: cover; 
  border-radius: 6px;
}

/* CAROUSEL SLIDER */
.carousel-item-custom {
  aspect-ratio: 16/9;
  width: 100%;
  background-size: cover;
  background-position: center;
}
@media (min-width: 768px) { .carousel-item-custom { aspect-ratio: 21/9; } }

/* KATEGORI SCROLL */
.kategori-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none;
}
.kategori-scroll::-webkit-scrollbar { display: none; }
.btn-kategori {
  background-color: var(--card-bg); color: var(--text-main); border: 1px solid var(--card-border);
  border-radius: 50rem; padding: 8px 20px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; transition: 0.2s;
}
.btn-kategori:hover, .btn-kategori.active { background-color: var(--primary); border-color: var(--primary); color: #fff; }

/* GRID 3 MOBILE, 4 DESTOP */
.grid-produk {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (min-width: 768px) { .grid-produk { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* KARTU PRODUK DENGAN GAMBAR FULL */
.card-produk {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.card-produk:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.card-img-container {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background-color: rgba(128,128,128,0.05);
  border-bottom: 1px solid var(--card-border);
}
.img-produk {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card-produk:hover .img-produk { transform: scale(1.08); }

.info-produk {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: left;
}
.title-produk {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.harga-produk { font-size: 0.9rem; font-weight: 800; color: var(--primary); margin-bottom: 10px; }

.btn-card-action {
  width: 100%; padding: 6px; font-size: 0.75rem; font-weight: 700; border-radius: 8px;
  border: 1px solid var(--primary); background: transparent; color: var(--primary);
  transition: all 0.2s ease; margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 4px;
}
.card-produk:hover .btn-card-action { background: var(--primary); color: #ffffff; }

/* ANIMASI BINTANG LATAR BLAKANG */
.star { position: absolute; width: 2px; height: 2px; background: var(--text-muted); border-radius: 50%; animation: twinkle linear infinite; z-index: -1; opacity: 0; }
@keyframes twinkle { 0% { transform: scale(1); opacity: 0; } 50% { transform: scale(1.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 0; } }

.modal-content { background-color: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); border-radius: 20px; }
