/* Basic responsive grid and modal styles for katalog produk */

:root{
  --bg:#f7f7f9;
  --card:#ffffff;
  --muted:#6b6b6b;
  --accent:#0b84ff;
  --shadow: 0 6px 18px rgba(20,20,30,0.08);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:#111;
  -webkit-font-smoothing:antialiased;
}

.site-header{
  padding:2rem 1rem;
  text-align:center;
  background:linear-gradient(90deg,#fff,#f4faff);
  border-bottom:1px solid #eee;
}
.site-header h1{margin:.2rem 0;font-size:1.6rem}
.site-header .lead{margin:0;color:var(--muted)}

.catalog-container{
  max-width:1200px;
  margin:2rem auto;
  padding:0 1rem 4rem;
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:1rem;
}

/* Card */
.card{
  background:var(--card);
  border-radius:10px;
  box-shadow:var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .12s ease, box-shadow .12s ease;
}
.card:focus-within, .card:hover{ transform:translateY(-6px); box-shadow:0 12px 30px rgba(20,20,30,0.12); }

.media-btn{
  border:0;
  padding:0;
  background:transparent;
  cursor:pointer;
  display:block;
  width:100%;
  line-height:0;
}
.card-media{
  display:block;
  width:100%;
  height:180px;
  object-fit:cover;
  background:#ddd;
}

/* small video badge */
.video-badge{
  position:absolute;
  margin:10px;
  background:rgba(0,0,0,0.6);
  color:#fff;
  padding:.2rem .5rem;
  border-radius:4px;
  font-size:.75rem;
}

/* body */
.card-body{
  padding:1rem;
  display:flex;
  flex-direction:column;
  gap:.5rem;
}
.card-title{margin:0;font-size:1.05rem}
.card-excerpt{margin:0;color:var(--muted);font-size:.95rem}
.card-actions{margin-top:auto;display:flex;gap:.5rem}
.view-btn{
  padding:.45rem .75rem;
  border-radius:6px;
  border:0;
  background:var(--accent);
  color:#fff;
  cursor:pointer;
}

/* Modal */
.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(10,10,10,0.45);
  z-index:1200;
  padding:1rem;
}
.modal[aria-hidden="false"]{ display:flex; }
.modal-dialog{
  background:#fff;
  width:100%;
  max-width:900px;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 30px 80px rgba(10,10,20,0.4);
  position:relative;
}
.modal-close{
  position:absolute;
  right:10px;
  top:8px;
  border:0;
  background:transparent;
  font-size:2rem;
  line-height:1;
  cursor:pointer;
  color:#333;
}
/* Update pada bagian Modal Media Wrap */
.modal-media-wrap {
  /* Ganti background hitam menjadi putih atau abu sangat muda agar clean */
  background: #ffffff; 
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  /* Tambahkan border bottom tipis agar terpisah dengan teks */
  border-bottom: 1px solid #eee; 
}

.modal-media-wrap img,
.modal-media-wrap video {
  width: 100%;
  height: 100%;
  /* UBAH DARI contain KE cover AGAR FULL KE SAMPING */
  object-fit: cover; 
  /* Berikan batas tinggi yang proporsional */
  max-height: 70vh; 
  /* Hapus background hitam di sini juga */
  background: #ffffff; 
}

.modal-info{ padding:1rem 1.25rem 2rem; }
.modal-info h3{ margin:.25rem 0; }
.modal-info p{ margin:0;color:var(--muted) }

/* small screens */
@media (max-width:600px){
  .card-media{ height:140px }
  .modal-dialog{ max-width:100% }
}