/* =================================================
   RESET & GLOBAL
================================================= */
.kjb-reviews-wrapper {
  font-family: inherit;
  max-width: 100%;
  margin: 0 auto;
  color: #333;
  box-sizing: border-box;
}

.kjb-reviews-wrapper *,
.kjb-reviews-wrapper *::before,
.kjb-reviews-wrapper *::after {
  box-sizing: border-box;
}


.avg-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 15px;
    margin-top:10px;
}
.avg-rating svg{
    color: #ff8c10;
}
.avg-rating-score {
    background: #80001836;
    border-radius: 5px;
    font-size: 14px;
    padding: 0 5px;
}
.avg-rating-count {
    color: #444;
    text-decoration: underline;
    margin-left: 6px;
}
/* =================================================
   1. SUMMARY SECTION (Skor & Grafik)
================================================= */
.kjb-section-summary {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #f0f0f0;
}

.kjb-summary-score {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.kjb-score-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9c0425; /* Warna Utama */
  line-height: 1;
}

.kjb-score-star { font-size: 32px; }
.kjb-score-val { font-size: 48px; font-weight: 800; letter-spacing: -1px; }

.kjb-score-sub {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
}

/* Grafik Batang */
.kjb-summary-bars {
  display: flex;
  flex-direction: column;
  padding-top: 5px;
}

.kjb-bar-row {
  display: grid;
  grid-template-columns: auto 1fr 30px;
  align-items: center;
  font-size: 14px;
}

.kjb-bar-star {
    display: flex;    
    align-items: center;
    gap: 1px;          
    min-width: 80px;      
    color: #9c0425;       
}
.kjb-bar-star svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;     
}

.kjb-bar-track {
  height: 8px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.kjb-bar-fill {
  height: 100%;
  width: 0;
  background: #9c0425; /* Warna Utama */
  border-radius: 10px;
  transition: width 1s ease;
}

.kjb-bar-count { text-align: left; color: #666; margin-left:6px; }

/* =================================================
   2. SNAPSHOTS GALLERY (FIX SLIDER)
================================================= */
.kjb-section-snapshots {
  margin-bottom: 40px;
  width: 100%; /* Pastikan container full width */
  overflow: hidden; /* Mencegah scrollbar vertikal tidak sengaja */
}

.kjb-section-snapshots h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #333;
}

/* Container Scroll */
.kjb-snapshots-scroll {
  display: flex;             /* Wajib Flexbox */
  flex-wrap: nowrap;         /* PENTING: Jangan turun ke baris baru */
  gap: 6px;                 /* Jarak antar foto */
  overflow-x: auto;          /* Aktifkan scroll horizontal */
  overflow-y: hidden;        /* Matikan scroll vertikal */
  padding-bottom: 15px;      /* Ruang untuk scrollbar */
  -webkit-overflow-scrolling: touch; /* Smooth scroll untuk iOS/Android */
  
  /* Scrollbar Styling (Opsional) */
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

/* Custom Scrollbar Webkit (Chrome/Safari) */
.kjb-snapshots-scroll::-webkit-scrollbar {
  height: 6px;
}
.kjb-snapshots-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.kjb-snapshots-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* Item Link (Kotak Foto) */
.kjb-snapshot-item {
  flex: 0 0 auto;  /* PENTING: Item TIDAK boleh mengecil (shrink) */
  width: auto;    /* Lebar tetap agar seragam */
  height: 140px;   /* Tinggi tetap */
  overflow: hidden;
  border-radius: 15px;
  position: relative;
  display: block;
}

/* Gambar di dalam kotak */
.kjb-snapshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* KUNCI: Memotong gambar agar pas kotak tanpa gepeng */
  display: block;
  transition: transform 0.3s ease;
}

.kjb-snapshot-item:hover img {
  transform: scale(1.1); /* Efek zoom saat hover */
}

/* =================================================
   3. FILTERS (Pill Shape)
================================================= */
.kjb-section-filters { margin-bottom: 30px; }
.kjb-section-filters h3 { font-size: 18px; font-weight: 700; margin-bottom: 15px; }

.kjb-filter-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kjb-filter-chips button {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.kjb-filter-chips button:hover {
  border-color: #9c0425;
  color: #9c0425;
  background: #fff5f7;
}

.kjb-filter-chips button.active {
  background: #9c0425;
  border-color: #9c0425;
  color: #fff;
  box-shadow: 0 4px 10px rgba(156, 4, 37, 0.2);
}

/* =================================================
   4. REVIEW LIST ITEMS
================================================= */
.kjb-review-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}
.kjb-review-list p
 {
    margin: 0 0 10px 0;
}

.kjb-review-item {
  border-bottom: 1px solid #f5f5f5;
  padding-bottom: 25px;
  animation: fadeIn 0.5s ease;
}
.kjb-review-item:last-child { border-bottom: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.kjb-item-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.kjb-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #9c0425;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.kjb-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.kjb-user-info strong { display: block; font-size: 16px; color: #222; margin-bottom: 2px; }
.kjb-item-stars {
    display: flex; 
    align-items: center;
    gap: 1px; 
    color: #9c0425;
    margin: 10px 0;
}
.kjb-item-stars svg {
    width: 14px;
    height: 14px;
    display: block;
}

.kjb-review-title { font-size: 16px; font-weight: 700; margin: 0 0 8px 0; color: #333; }
.kjb-review-body { font-size: 15px; line-height: 1.6; color: #555; margin-bottom: 8px; }
.kjb-review-date { font-size: 12px; color: #999; }

/* Load More Button */
.kjb-btn-outline {
  display: block;
  margin: 0 auto 50px;
  padding: 12px 30px;
  border-radius: 30px;
  border: 2px solid #9c0425;
  background: #fff;
  color: #9c0425;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.kjb-btn-outline:hover { background: #9c0425; color: #fff; }




/* =================================================
   REVIEW LIST GALLERY (FOTO DALAM KOMENTAR)
================================================= */
.kjb-review-gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.kjb-gallery-thumb {
  display: block;
  width: auto;
  height: 85px;
  overflow: hidden;
  transition: transform 0.2s;
}

.kjb-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kjb-gallery-thumb:hover {
  transform: scale(1.05);
  border-color: #9c0425;
}


/* =================================================
   READ MORE / TRUNCATE TEXT
================================================= */

/* Container Text Body */
.kjb-review-body {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 8px;
  position: relative;
  transition: all 0.3s ease;
}

/* Class untuk kondisi tertutup (hanya 4 baris) */
.kjb-line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Batas 4 baris */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tombol Read More */
.kjb-read-more-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: 5px;
  color: #333;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  display: none; /* Default sembunyi, JS akan memunculkan jika teks panjang */
}

.kjb-read-more-btn:hover {
  color: #9c0425; /* Warna Utama */
}


/* =================================================
   5. FORM SECTION
================================================= */
.kjb-section-form {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.kjb-form-heading { margin: 0 0 25px 0; font-size: 20px; font-weight: 700; color: #333; }

/* Grid Nama & Email */
.kjb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.kjb-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.kjb-input-group.full-width { margin-bottom: 20px; }

.kjb-input-group label { font-weight: 600; font-size: 14px; color: #333; }

.kjb-input-group input,
.kjb-input-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fafafa;
  transition: all 0.2s;
}

.kjb-input-group input:focus,
.kjb-input-group textarea:focus {
  outline: none;
  border-color: #9c0425;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(156, 4, 37, 0.1);
}

.kjb-input-group textarea { min-height: 120px; resize: vertical; }

/* --- UPLOAD PHOTO STYLES --- */
.kjb-upload-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.kjb-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px dashed #9c0425;
  border-radius: 6px;
  background: #fff5f7;
  color: #9c0425;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.kjb-upload-btn:hover { background: #9c0425; color: #fff; }

.kjb-file-count { font-size: 13px; color: #666; }

/* Preview Grid & Remove Button */
.kjb-preview-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.kjb-preview-item {
  position: relative; /* Wajib untuk posisi tombol X */
  width: auto;
  height: 100px;
  background: #fff;
}
.kjb-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Tombol Hapus (X) */
.kjb-remove-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: #ff3b30;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 19px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 10;
  transition: transform 0.2s;
}
.kjb-remove-btn:hover { background: #d32f2f; transform: scale(1.1); }


/* Rating Stars */
.kjb-rating-group label { display: block; font-weight: 600; margin-bottom: 10px; }

.kjb-stars-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
}
.kjb-stars-input input { display: none; }
.kjb-stars-input label {
  color: #e0e0e0;
  cursor: pointer;
  transition: color 0.2s;
}


.kjb-stars-input input:checked ~ label,
.kjb-stars-input label:hover,
.kjb-stars-input label:hover ~ label {
  color: #9c0425;
}

.rating input {
    position: absolute;
    opacity: 0;      /* Invisible */
    width: 0;
    height: 0;
    margin: 0;
    z-index: -1;     /* Place it behind the stars */
}

/* Submit Button */
.kjb-btn-primary {
  background-color: #9c0425;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(156, 4, 37, 0.3);
}
.kjb-btn-primary:hover { background-color: #7a031d; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(156, 4, 37, 0.4); }
.kjb-btn-primary:disabled { background-color: #ccc; cursor: not-allowed; transform: none; box-shadow: none;}

#kjb-form-msg { margin-top: 15px; font-weight: 600; font-size: 14px; }

/* Responsive */
@media (max-width: 768px) {
  .kjb-section-summary { grid-template-columns: 1fr; text-align: center; }
  .kjb-form-row { grid-template-columns: 1fr; gap: 0; }
  .kjb-input-group { margin-bottom: 15px; }
  .kjb-btn-primary { width: 100%; }
}