/* ============================================================
   TEMPLATE01 — Category / Listing Page Styles (modern clean, rounded)
   ============================================================ */

/* NOTE: --ink/--paper/--fog/--mute/--accent/--line datang dari main.css
   (dimuat lebih dulu — lihat web.php $pageCssMap). Jangan redeclare :root
   di sini supaya palet tidak tertimpa. */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; }
body { font-family: 'Lato', sans-serif; background: var(--fog); color: var(--ink); overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: 'Lato', sans-serif; font-weight: 800; letter-spacing: -.01em; }
img, video, iframe { max-width: 100%; }

/* PAGE HEADER */
.cat-hero { background: #fff; padding: 2rem 0; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.cat-hero h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: .3rem; text-transform: none; }
.cat-hero p { font-family: 'Lato', sans-serif; font-size: .85rem; color: var(--mute); letter-spacing: 0; }
.cat-hero .cat-desc { max-width: 720px; color: var(--mute); font-size: .92rem; line-height: 1.8; }
.cat-hero .cat-desc p { color: inherit; font-size: inherit; letter-spacing: 0; margin-bottom: .75rem; }
.cat-hero .cat-desc p:last-child { margin-bottom: 0; }
.bc a { font-size: .78rem; color: var(--mute); text-decoration: none; }
.bc a:hover { color: var(--accent); }
.bc span { color: #ccc; margin: 0 .4rem; font-size: .75rem; }
.bc em { font-size: .78rem; color: var(--ink); font-weight: 600; }

/* TOOLBAR */
.toolbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; flex-wrap: wrap; gap: .8rem; }
.result-count { font-family: 'Lato', sans-serif; font-size: .82rem; color: var(--mute); letter-spacing: 0; }
.toolbar-right { display: flex; align-items: center; gap: .6rem; }
.sort-sel { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .5rem 2rem .5rem 1rem; font-size: .8rem; font-family: 'Lato', sans-serif; font-weight: 600; color: var(--ink); outline: none; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23757575' fill='none' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; }
.view-btn { background: #fff; border: 1px solid var(--line); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; color: var(--mute); transition: background .15s,color .15s; line-height: 1; }
.view-btn.active, .view-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-toggle-btn { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1.1rem; font-size: .8rem; letter-spacing: 0; text-transform: none; font-weight: 600; cursor: pointer; font-family: 'Lato', sans-serif; color: var(--ink); display: flex; align-items: center; gap: .4rem; transition: background .15s,color .15s; }
.filter-toggle-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }

/* ACTIVE FILTERS */
.active-filters { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .7rem 0; }
.active-filters.empty { display: none; }
.af-label { font-family: 'Lato', sans-serif; font-size: .72rem; letter-spacing: 0; text-transform: none; color: var(--mute); }
.af-tag { background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: .3rem .8rem; font-size: .75rem; font-weight: 700; display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.af-tag:hover { opacity: .75; }
.af-clear { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .75rem; font-weight: 600; color: var(--mute); cursor: pointer; letter-spacing: 0; transition: background .15s,color .15s; }
.af-clear:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* SIDEBAR FILTERS */
.sidebar { width: 240px; flex-shrink: 0; background: #fff; border-radius: 18px; padding: 1.3rem; box-shadow: 0 2px 12px rgba(33,33,33,.05); height: fit-content; }
.sidebar.collapsed { display: none; }
.filter-group { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.filter-group:last-child { border-bottom: none; }
.fg-title { font-size: .82rem; letter-spacing: 0; text-transform: none; font-weight: 700; margin-bottom: .9rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.fg-title i { font-size: .7rem; transition: transform .2s; color: var(--mute); }
.fg-title.collapsed i { transform: rotate(-90deg); }
.fg-body { display: block; }
.fg-body.collapsed { display: none; }

/* FILTER ITEMS */
.fcheck { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; cursor: pointer; }
.fcheck input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.fcheck label { font-size: .84rem; color: var(--ink); cursor: pointer; flex: 1; }
.fcheck .fcount { font-size: .72rem; color: var(--mute); margin-left: auto; }
.fcheck:hover label { color: var(--accent); }

/* COLOR FILTER */
.color-filter { display: flex; gap: .5rem; flex-wrap: wrap; }
.cf-dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; transition: all .15s; position: relative; }
.cf-dot:hover, .cf-dot.active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.cf-dot.active::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .6rem; color: #fff; }

/* PRICE RANGE */
.price-range { margin-top: .5rem; }
.price-range input[type=range] { width: 100%; accent-color: var(--accent); cursor: pointer; }
.price-labels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--mute); margin-top: .4rem; }

/* RATING FILTER */
.rating-opt { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; cursor: pointer; }
.rating-opt span { font-size: .78rem; color: var(--mute); }
.rating-opt .stars { color: #ffa41c; letter-spacing: 1px; font-size: .82rem; }
.rating-opt:hover .stars { opacity: .7; }

/* PRODUCT GRID (selaras dengan main.css .pc-*) */
.prod-area { flex: 1; min-width: 0; }

/* LIST VIEW */
.list-pc { display: flex; gap: 1.2rem; padding: 1.2rem; background: #fff; border-radius: 16px; margin-bottom: .8rem; box-shadow: 0 2px 10px rgba(33,33,33,.05); }
.list-pc-img { width: 140px; min-width: 140px; height: 175px; overflow: hidden; background: var(--fog); border-radius: 12px; position: relative; flex-shrink: 0; }
.list-pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.list-pc:hover .list-pc-img img { transform: scale(1.05); }
.list-pc-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.list-pc-name { font-family: 'Lato', sans-serif; font-size: 1rem; font-weight: 700; text-transform: none; margin-bottom: .3rem; }
.list-pc-meta { font-size: .8rem; color: var(--mute); margin-bottom: .5rem; }
.list-pc-price { font-size: 1.05rem; font-weight: 800; color: var(--accent); }
.list-pc-old { text-decoration: line-through; color: var(--mute); font-size: .82rem; margin-right: .4rem; font-weight: 400; }
.list-add-btn { background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: .55rem 1.3rem; font-size: .78rem; letter-spacing: 0; text-transform: none; font-weight: 700; cursor: pointer; font-family: 'Lato', sans-serif; transition: background .15s; margin-top: .6rem; display: inline-block; }
.list-add-btn:hover { background: var(--accent-dark); }

/* PAGINATION */
.pagination-wrap { display: flex; justify-content: center; align-items: center; gap: .4rem; padding: 2rem 0 1rem; flex-wrap: wrap; }
.pg-btn { min-width: 38px; height: 38px; padding: 0 .6rem; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-size: .82rem; font-weight: 700; font-family: 'Lato', sans-serif; color: var(--mute); transition: background .15s,color .15s; }
.pg-btn:hover, .pg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-btn.dots { cursor: default; border: 0; background: transparent; }
.pg-btn.dots:hover { background: transparent; color: var(--mute); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state i { font-size: 3rem; color: var(--accent); display: block; margin-bottom: 1rem; }
.empty-state h4 { font-size: 1.3rem; font-weight: 700; margin-bottom: .5rem; text-transform: none; }
.empty-state p { font-size: .85rem; color: var(--mute); }

/* FOOTER MINI */
.foot-mini { background: var(--ink); color: rgba(255,255,255,.7); padding: 1.5rem; text-align: center; font-size: .8rem; margin-top: 2rem; border-radius: 22px 22px 0 0; }
.foot-mini .fb { font-family: 'Lato', sans-serif; font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: 0; }

/* MOBILE FILTER DRAWER */
.filter-overlay { display: none; position: fixed; inset: 0; background: rgba(33,33,33,.4); z-index: 2000; }
.filter-overlay.open { display: block; }
.filter-drawer { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; background: #fff; z-index: 2001; overflow-y: auto; padding: 1.5rem; transform: translateX(-100%); transition: transform .25s; border-radius: 0 20px 20px 0; }
.filter-overlay.open .filter-drawer { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.drawer-head h5 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.drawer-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--mute); }

@media (max-width: 768px) {
  .sidebar { display: none !important; }
  .list-pc-img { width: 100px; min-width: 100px; height: 125px; }
}
