/* ==========================================================
   🌟 COMPAREHARGA FRONT & CATEGORY STYLE
   ========================================================== */

/* === HOME WRAPPER === */
.ch-home-wrapper,
.compareharga-home {
  background-color: #faf6ef;
  padding: 60px 20px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* === TITLE === */
.ch-title-home,
.compareharga-home h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: #222;
  margin-bottom: 50px;
}

.ch-title-home span {
  color: #d49a2b;
}

/* === GRID === */
.ch-grid,
.compareharga-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 28px;
  justify-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* === CARD === */
.ch-card,
.compareharga-card {
  background: #fffdfa;
  border-radius: 14px;
  border: 1px solid #f0e8db;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.ch-card:hover,
.compareharga-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  background: #fffdf6;
}

/* === IMAGE === */
.ch-thumb img,
.compareharga-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f3f3f3;
  border-bottom: 1px solid #f0e8db;
}

/* === CONTENT === */
.ch-card-body,
.compareharga-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

/* === TITLE & TEXT === */
.ch-card-title a,
.compareharga-card h3 a {
  color: #222;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.ch-card-title a:hover,
.compareharga-card h3 a:hover {
  color: #0077b6;
}

.ch-excerpt,
.compareharga-card p {
  font-size: 0.9rem;
  color: #555;
  margin: 10px 0 18px;
  line-height: 1.5;
}

/* === CTA BUTTON === */
.ch-cta,
.compareharga-card .lihat-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  background: #0077b6;
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
}

.ch-cta:hover,
.compareharga-card .lihat-detail:hover {
  background: #005f8e;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* ==========================================================
   📱 RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
  .ch-home-wrapper,
  .compareharga-home {
    padding: 40px 16px 60px;
  }

  .ch-title-home,
  .compareharga-home h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }

  .ch-grid,
  .compareharga-home-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ch-card,
  .compareharga-card {
    max-width: 100%;
  }

  .ch-card-title a,
  .compareharga-card h3 a {
    font-size: 1rem;
  }

  .ch-excerpt,
  .compareharga-card p {
    font-size: 0.85rem;
  }
}

/* ==========================================================
   🛍️ BADGE MARKETPLACE (logo di pojok gambar)
   ========================================================== */
.badge-marketplace {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.badge-marketplace img {
  width: 28px;
  height: auto;
  display: block;
}


/* ==========================================================
   🧱 FIX LEBAR CARD PRODUK AGAR SEJAJAR DENGAN MENU
   ========================================================== */

/* Bungkus utama section produk */
.ch-section-wrapper {
  width: 100%;
  max-width: 1200px; /* sama dengan ast-container bawaan Astra */
  margin: 0 auto;
  padding: 0 20px; /* beri ruang kanan kiri */
  box-sizing: border-box;
}

/* Grid produk agar tidak terlalu mepet */
.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  justify-items: stretch;
  width: 100%;
}

/* Card produk */
.ch-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 100%; /* biar ikut lebar kolom */
}

/* Untuk memastikan di layar besar tetap sejajar tengah */
@media (min-width: 1400px) {
  .ch-section-wrapper {
    max-width: 1280px;
  }
}

/* Responsif untuk mobile */
@media (max-width: 768px) {
  .ch-section-wrapper {
    padding: 0 15px;
  }

  .ch-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
/* ==========================================================
   🔧 FIX LEBAR CARD PRODUK AGAR SEJAJAR DENGAN MENU UTAMA
   ========================================================== */

body.page-template-products-template .ch-section-wrapper.ast-container {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  box-sizing: border-box;
}

body.page-template-products-template .ch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

body.page-template-products-template .ch-card {
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}


/* Opsional - agar sejajar di monitor lebar */
@media (min-width: 1400px) {
  body.page-template-products-template .site-main .ast-container.ch-section-wrapper {
    max-width: 1320px !important;
  }
}

/* Responsive untuk mobile */
@media (max-width: 768px) {
  body.page-template-products-template .site-main .ast-container.ch-section-wrapper {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* === Layout sejajar container Astra === */
body.page-template-products-template .ch-section-wrapper {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box;
}

/* === Card sejajar penuh dan rapi === */
body.page-template-products-template .ch-card {
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* === Grid tetap 1 kolom di desktop === */
body.page-template-products-template .ch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

/* === Gambar responsif penuh === */
body.page-template-products-template .ch-thumb img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* === Jarak dari navbar === */
body.page-template-products-template main.site-main {
  margin-top: 25px;
}

/* =====================================================
   🧩 FIX: Card CompareHarga sejajar penuh dengan navbar
   ===================================================== */

/* Hilangkan batas max-width Astra di halaman template produk */
body.page-template-products-template #content > .ast-container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Buat wrapper CompareHarga mengikuti layout utama */
body.page-template-products-template .ch-section-wrapper {
  max-width: 1240px !important; /* sejajar navbar */
  margin: 0 auto !important;
  padding: 0 20px !important;
  box-sizing: border-box;
}

/* Pastikan grid dan card mengikuti lebar container */
body.page-template-products-template .ch-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 28px !important;
  justify-items: stretch !important;
}

body.page-template-products-template .ch-card {
  width: 100% !important;
  margin: 0 auto !important;
  background: #fff !important;
  border-radius: 14px !important;
  border: 1px solid #eee !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* Gambar produk */
body.page-template-products-template .ch-thumb img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  body.page-template-products-template .ch-section-wrapper {
    padding: 0 12px !important;
  }

  body.page-template-products-template .ch-thumb img {
    height: 200px;
  }
}




