/* Daftar produk (desktop). Dimuat setelah home-base.css. */

.btn-primary { background-color: var(--accent); color: #fff; padding: 12px 30px; border-radius: 6px; font-weight: 500; display: inline-flex; align-items: center; gap: 10px; transition: var(--transition); border: none; cursor: pointer; font-size: 0.95rem; }

.page-header p { color: #94a3b8; font-size: 1rem; }

/* SEARCH & FILTER */
.search-filter-bar { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 14px 0 12px; position: sticky; top: 72px; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }

/* Row 1: search + count */
.search-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.search-wrap { position: relative; flex: 1; display: flex; align-items: center; }

.search-icon { position: absolute; left: 13px; color: var(--secondary); font-size: 0.85rem; pointer-events: none; z-index: 1; }

.search-input { width: 100%; padding: 10px 38px 10px 36px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 0.9rem; font-family: inherit; color: var(--text-main); outline: none; transition: var(--transition); background: #f8fafc; }

.search-input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(234,88,12,0.08); }

.clear-btn { position: absolute; right: 10px; background: #e2e8f0; border: none; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.7rem; color: var(--secondary); transition: var(--transition); }

.clear-btn:hover { background: var(--accent); color: #fff; }

.result-count { font-size: 0.84rem; color: var(--secondary); white-space: nowrap; flex-shrink: 0; }

.result-count strong { color: var(--primary); }

/* Pilihan tampilan: thumbnail (kotak) atau daftar */
.view-toggle { display: inline-flex; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; flex-shrink: 0; }

.vt-btn { width: 40px; height: 36px; border: 0; background: transparent; color: #94a3b8; font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease; }

.vt-btn:hover { color: var(--accent); }

.vt-btn.active { background: rgba(234,88,12,0.1); color: var(--accent); }

.list-view { grid-template-columns: 1fr !important; gap: 14px !important; }

.list-view .product-card { flex-direction: row; }

.list-view .product-card:hover { transform: translateY(-3px); }

.list-view .product-img-wrapper { width: 190px; flex-shrink: 0; align-self: stretch; aspect-ratio: auto; min-height: 190px; }

.list-view .product-info { padding: 18px 22px; justify-content: center; min-width: 0; }

.list-view .product-desc { -webkit-line-clamp: 3; flex-grow: 0; }

.list-view .product-footer { margin-top: 12px; }

@media (max-width: 560px) { .list-view .product-img-wrapper { width: 120px; min-height: 120px; } .list-view .product-info { padding: 12px 14px; } }

/* Row 2: category pills — always wrap */
.pills-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

.category-pill { padding: 6px 14px; border: 1.5px solid #e2e8f0; background: #fff; color: var(--secondary); border-radius: 30px; font-size: 0.82rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: var(--transition); white-space: nowrap; line-height: 1.4; }

.category-pill:hover { border-color: var(--accent); color: var(--accent); background: #fff9f7; }

.category-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Loading state */
#productGrid { transition: opacity 0.18s ease; }

#productGrid.loading { opacity: 0.35; pointer-events: none; }

.skeleton-card { background: #f1f5f9; border-radius: 12px; height: 300px; animation: shimmer 1.4s infinite; }

@keyframes shimmer { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

/* Active filter chip */
.active-filter-bar { margin-bottom: 18px; padding: 10px 16px; background: #fff8f5; border: 1px solid #fed7c7; border-radius: 8px; font-size: 0.86rem; color: var(--secondary); display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.reset-btn { color: var(--accent); font-weight: 600; background: none; border: none; cursor: pointer; font-family: inherit; font-size: 0.86rem; white-space: nowrap; display: flex; align-items: center; gap: 4px; }

/* MAIN LAYOUT */
.products-section { padding: 40px 0 60px; }

/* PRODUCT GRID */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-bottom: 50px; }

/* PRODUCT CARD */
.product-card { background-color: var(--card-bg); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.05); transition: var(--transition); border: 1px solid #f1f5f9; cursor: pointer; display: flex; flex-direction: column; }

.product-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); border-color: #e2e8f0; }

.product-img-wrapper { position: relative; aspect-ratio: 1 / 1; background-color: #f1f5f9; overflow: hidden; }

.product-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }

.product-card:hover .product-img-wrapper img { transform: scale(1.06); }

.product-badge { position: absolute; top: 12px; left: 12px; background-color: var(--primary); color: #fff; padding: 3px 10px; font-size: 0.72rem; font-weight: 600; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; }

.product-category-tag { position: absolute; top: 12px; right: 12px; background: rgba(234,88,12,0.9); color: #fff; padding: 3px 10px; font-size: 0.72rem; font-weight: 500; border-radius: 20px; }

.product-info { padding: 18px 20px 16px; flex-grow: 1; display: flex; flex-direction: column; }

.product-meta { font-size: 0.73rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }

.product-title { font-size: 1.05rem; color: var(--primary); font-weight: 600; margin-bottom: 8px; line-height: 1.4; }

.product-desc { font-size: 0.83rem; color: var(--secondary); margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }

.product-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1f5f9; padding-top: 13px; }

.product-spec { font-size: 0.75rem; color: var(--secondary); }

.product-spec span { display: block; font-weight: 600; color: var(--primary); font-size: 0.82rem; }

.card-actions { display: flex; gap: 6px; }

.btn-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: var(--transition); font-size: 0.85rem; border: none; cursor: pointer; }

.btn-icon-wa { background: #e8fdf0; color: #25d366; }

.btn-icon-wa:hover { background: #25d366; color: #fff; }

.btn-icon-info { background: #e2e8f0; color: var(--primary); }

.btn-icon-info:hover { background: var(--accent); color: #fff; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 80px 20px; grid-column: 1 / -1; }

.empty-state i { font-size: 4rem; color: #cbd5e1; margin-bottom: 20px; display: block; }

.empty-state h3 { font-size: 1.3rem; color: var(--primary); margin-bottom: 10px; }

.empty-state p { color: var(--secondary); margin-bottom: 25px; }

.empty-state a { color: var(--accent); text-decoration: underline; }

/* PAGINATION */
.pagination-wrapper { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }

.pagination-wrapper a, .pagination-wrapper span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px; font-size: 0.88rem; font-weight: 500; transition: var(--transition); border: 1.5px solid #e2e8f0; color: var(--secondary); background: #fff; text-decoration: none; }

.pagination-wrapper a:hover { border-color: var(--accent); color: var(--accent); background: #fff9f7; }

.pagination-wrapper span.active-page { background: var(--accent); border-color: var(--accent); color: #fff; }

.pagination-wrapper span.dots { border-color: transparent; background: transparent; cursor: default; }

.pagination-wrapper span.disabled { opacity: 0.4; cursor: not-allowed; }

.pagination-info { text-align: center; margin-top: 16px; font-size: 0.85rem; color: var(--secondary); }

footer span { color: var(--accent); }

/* FLOAT WA */
.float-wa { position: fixed; width: 56px; height: 56px; bottom: 28px; right: 28px; background-color: #25d366; color: #FFF; border-radius: 50%; text-align: center; font-size: 26px; box-shadow: 0 4px 15px rgba(37,211,102,0.4); z-index: 1000; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; animation: pulse-wa 2s infinite; }

.float-wa:hover { background-color: #128C7E; transform: scale(1.1); color: #fff; }

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-menu { display: none; }
    .search-filter-bar { top: 72px; }
    .page-header { padding: 36px 0 28px; }
    .page-header h1 { font-size: 1.7rem; }
    .search-row { gap: 8px; }
    .result-count { font-size: 0.8rem; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
    .products-section { padding: 28px 0 48px; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-info { padding: 12px 14px 12px; }
    .product-title { font-size: 0.9rem; }
    .product-desc { -webkit-line-clamp: 2; font-size: 0.78rem; margin-bottom: 10px; }
    .page-header h1 { font-size: 1.4rem; }
    .search-filter-bar { position: static; }
}
