/* =============================================================
   produk.css — Halaman Daftar Produk | TOKO MADURA
   Simpan di: assets/css/produk.css
   ============================================================= */

/* ===== PAGE HEADER ===== */
.page-header {
    position: relative;
    min-height: 130px;
    display: flex;
    align-items: center;
    overflow: hidden;

    /* Fallback gradient kalau gambar belum diset */
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 60%, #A5D6A7 100%);
}

/* Pasang background image via inline style di HTML,
   atau uncomment baris ini dan ganti URL-nya:
.page-header {
    background-image: url('/uploads/banners/header-produk.jpg');
    background-size: cover;
    background-position: center;
} */

/* Overlay gelap supaya teks tetap terbaca di atas foto */
.page-header-overlay {
    position: absolute;
    inset: 0;
    /* Gradient hijau brand, selaras dengan homepage */
    background: linear-gradient(
        90deg,
        rgba(27, 94, 32, 0.75) 0%,
        rgba(27, 94, 32, 0.42) 55%,
        rgba(27, 94, 32, 0.10) 100%
    );
    z-index: 1;
}

/* Konten di atas overlay */
.page-header-content {
    position: relative;
    z-index: 2;
    padding: 22px 0 20px;
    width: 100%;
}

/* Teks putih saat ada gambar */
.page-header.has-bg .page-header-content h1 { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.18); }
.page-header.has-bg .breadcrumb-item a      { color: rgba(255,255,255,.85); }
.page-header.has-bg .breadcrumb-item.active { color: rgba(255,255,255,.65); }
.page-header.has-bg .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
.page-header.has-bg .header-sub             { color: rgba(255,255,255,.80); }

/* Dekorasi lingkaran blur di background */
.page-header-deco {
    position: absolute;
    border-radius: 50%;
    opacity: .18;
    z-index: 1;
    pointer-events: none;
}
.deco-1 {
    width: 200px; height: 200px;
    background: #fff;
    right: 8%; top: -80px;
}
.deco-2 {
    width: 110px; height: 110px;
    background: #fff;
    right: 20%; bottom: -50px;
}

.page-header h1 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 25px;
    color: var(--text-dark);
    margin-bottom: 4px;
}
.header-sub {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}
.breadcrumb-item a { color: var(--primary); text-decoration: none; font-size: 13px; }
.breadcrumb-item.active { font-size: 13px; color: #888; }
.breadcrumb-item + .breadcrumb-item::before { color: #bbb; }

/* ===== LAYOUT ===== */
.produk-layout { padding: 28px 0 48px; }

/* ===== SIDEBAR ===== */
.sidebar-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 16px;
}
.sidebar-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.category-filter-list { list-style: none; padding: 0; margin: 0; }
.category-filter-list li { margin-bottom: 2px; }
.category-filter-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    color: #555;
    transition: background .15s, color .15s;
}
.category-filter-list a:hover,
.category-filter-list a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* ===== SEARCH BAR ===== */
.produk-search { position: relative; margin-bottom: 16px; }
.produk-search input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 10px 44px 10px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.produk-search input:focus { border-color: var(--primary); }
.produk-search button {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    border-radius: 50px;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; cursor: pointer;
}

/* ===== TOOLBAR ===== */
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.toolbar-info { font-size: 13px; color: #888; }
.toolbar-info strong { color: var(--text-dark); }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.sort-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--text-dark);
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color .2s;
}
.sort-select:focus { border-color: var(--primary); }

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    text-decoration: none;
    transition: background .15s;
}
.filter-chip:hover { background: #c8e6c9; color: var(--primary); }

/* ===== PRODUCT CARD ===== */
.product-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.product-card:hover {
    box-shadow: 0 8px 28px rgba(27,94,32,.13);
    transform: translateY(-3px);
}
.product-card .img-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9f9f9;
}
.product-card .img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.product-card:hover .img-wrap img { transform: scale(1.04); }
.product-card .card-body { padding: 12px 12px 14px; }
.product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}
.product-price {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: var(--primary);
}
.price-original {
    font-size: 11px;
    color: #aaa;
    text-decoration: line-through;
    line-height: 1.2;
}
.badge-promo {
    display: inline-block;
    background: #E8F5E9;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 50px;
    margin-top: 2px;
}
.badge-new {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
}

/* Badge status di kanan atas kartu (promo / pilihan).
   Dipakai bergantian — hanya satu yang tampil per kartu. */
.badge-card {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
    color: #fff;
    line-height: 1.4;
}
.badge-card-promo   { background: var(--primary); }   /* hijau brand */
.badge-card-pilihan { background: var(--accent);  }   /* oranye brand */
.btn-cart {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    flex-shrink: 0;
}
.btn-cart:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ===== PAGINATION ===== */
.pager-wrap { margin-top: 32px; display: flex; justify-content: center; }
.pager-wrap .pagination { gap: 4px; }
.pager-wrap .page-link {
    border-radius: 8px !important;
    border: 1.5px solid var(--border);
    color: var(--text-dark);
    font-size: 13px; font-weight: 600;
    padding: 7px 13px;
    transition: background .15s, color .15s;
}
.pager-wrap .page-link:hover  { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.pager-wrap .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-wrap .page-item.disabled .page-link { opacity: .45; }