/* =========================================
   LAYOUT & SIDEBAR FILTER
   ========================================= */

.products-main-section {
    max-width: 1200px; /* Atau 1280px disesuaikan dengan lebar navbar */
    margin: 0 auto;    /* Membuat posisi persis di tengah layar */
    padding: 45px 0px 60px 0;
    background-color: #f8fafc;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* Mematikan background, border, dan shadow pada widget khusus di dalam products-sidebar */
.products-sidebar .sidebar-widget {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 24px; /* Berikan jarak antar widget jika diperlukan */
}

/* Mengatur bingkai utama .products-sidebar agar menjadi satu kesatuan */
.products-sidebar {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.sidebar-widget {
    margin-bottom: 25px;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: #dc2626;
}

.search-input-wrapper {
    position: relative;
    display: flex;
}

.form-control-search {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control-search:focus {
    border-color: #dc2626;
}

.btn-search-submit {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 32px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-search-submit:hover {
    background: #b91c1c;
}

.category-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-filter-list li {
    margin-bottom: 6px;
}

.filter-link {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    color: #475569;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-link:hover, .filter-link.active {
    background-color: #fee2e2;
    color: #dc2626;
    font-weight: 700;
}

.form-control-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
}

.btn-reset-filter {
    display: block;
    text-align: center;
    background: #f1f5f9;
    color: #64748b;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.2s;
}

.btn-reset-filter:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* =========================================
   PRODUCT GRID & CARDS
   ========================================= */
.products-header-bar {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #64748b;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08);
}

.product-thumb {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 15px;
}

.product-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.product-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-brand {
    font-size: 0.75rem;
    color: #dc2626;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}

.product-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: #dc2626;
}

.product-desc {
    font-size: 0.825rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;

    /* Trik CSS Truncate Multiline */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Batasi maksimal 2 baris (bisa diubah ke 3 jika ingin lebih panjang) */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis; /* Otomatis memunculkan ... jika teks lebih dari 2 baris */
}

.product-action {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-detail {
    flex-grow: 1;
    text-align: center;
    background: #0f172a;
    color: #ffffff;
    padding: 9px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-detail:hover {
    background: #dc2626;
    cursor: pointer;
}

.btn-wa-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #22c55e;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.btn-wa-quote:hover {
    background: #16a34a;
}

/* Empty State */
.no-products-found {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.icon-empty {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 15px;
}

.btn-back-catalog {
    display: inline-block;
    margin-top: 15px;
    background: #dc2626;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* Responsif Tablet & HP */
@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   BOOTSTRAP 5.3.2 SCOPE (KHUSUS ELEMEN DALAM .bootstrap-scope)
   ============================================================ */

/* Reset & Box-Sizing Khusus Scope */
.bootstrap-scope, 
.bootstrap-scope *, 
.bootstrap-scope *::before, 
.bootstrap-scope *::after {
  box-sizing: border-box !important;
}

/* Modal Overlay & Base */
.bootstrap-scope .modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  z-index: 1040;
  width: 100vw; height: 100vh;
  background-color: #000;
  opacity: 0.5;
}

.bootstrap-scope .modal {
  position: fixed;
  top: 0; left: 0;
  z-index: 1055;
  display: none;
  width: 100%; height: 100%;
  overflow-x: hidden; overflow-y: auto;
  outline: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.bootstrap-scope .modal.show {
  display: block;
}

.bootstrap-scope .modal-dialog {
  position: relative;
  width: auto;
  margin: 1.25rem auto; /* Jarak atas/bawah diperkecil */
  max-width: 650px;     /* Ubah nilai ini jika ingin lebih kecil/besar (misal: 600px - 650px) */
  pointer-events: none;
}

.bootstrap-scope .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.175);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* Header Modal */
.bootstrap-scope .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem; /* Diperketat dari 1rem 1.25rem */
  background-color: #212529;
  color: #fff;
}

.bootstrap-scope .modal-title {
  margin: 0;
  font-size: 1.1rem; /* Ukuran font judul sedikit diperkecil */
  font-weight: 600;
  color: #fff;
}

.bootstrap-scope .btn-close {
  box-sizing: content-box;
  width: 1em; height: 1em;
  padding: 0.25em;
  color: #fff;
  background: transparent url("data:image/svg+xml,%csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  opacity: 0.8;
  cursor: pointer;
}
.bootstrap-scope .btn-close:hover { opacity: 1; }

/* Body Modal */
.bootstrap-scope .modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 0.75rem 1rem; /* Body padding diperkecil */
}

/* Styling Tabel Spesifikasi (Striped Table Bootstrap) */
.bootstrap-scope .table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  vertical-align: top;
  border-collapse: collapse;
}

.bootstrap-scope .table th,
.bootstrap-scope .table td {
  padding: 0.4rem 0.6rem; /* Padding sel tabel diperketat (tinggi baris berkurang) */
  border-bottom: 1px solid #dee2e6;
  text-align: left;
  font-size: 0.875rem;     /* Ukuran teks tabel sedikit diperkecil (14px) */
}

.bootstrap-scope .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

.bootstrap-scope .table-bordered {
  border: 1px solid #dee2e6;
}

/* Footer Modal & Tombol */
.bootstrap-scope .modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;  /* Footer padding diperkecil */
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.bootstrap-scope .btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.bootstrap-scope .btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}
.bootstrap-scope .btn-secondary:hover {
  background-color: #5c636a;
  border-color: #565e64;
}