/* product-filter.css - Sidebar lọc sản phẩm. Dùng biến màu thương hiệu trong style.css (có giá trị dự phòng). */
.pf-sidebar { --pf-primary: var(--primary, #1d1f5c); --pf-accent: var(--primary-second, #e99417); --pf-soft: var(--color2, #d5eaff); }

.pf-sidebar .widget { margin-bottom: 18px;padding:10px; }
.pf-sidebar .pf-title { cursor: pointer; position: relative; user-select: none; }
.pf-sidebar .pf-title::after { content: "\2212"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--pf-accent); }
.pf-sidebar .widget.is-collapsed .pf-title::after { content: "+"; }
.pf-sidebar .widget.is-collapsed .widget-content { display: none; }

.pf-sidebar ul { list-style: none; margin: 0; padding: 0; }
.pf-sidebar .pf-check { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 0; cursor: pointer; font-weight: 400; line-height: 1.35; }
.pf-sidebar .pf-check input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--pf-primary); cursor: pointer; }
.pf-sidebar .pf-label { flex: 1 1 auto; }
.pf-sidebar .pf-check:hover .pf-label { color: var(--pf-accent); }
.pf-sidebar .pf-check input:checked + .pf-label { color: var(--pf-primary); font-weight: 600; }
.pf-sidebar .pf-count { flex: 0 0 auto; font-style: normal; font-size: .78rem; color: #6c757d; background: #f1f3f8; border-radius: 10px; padding: 0 7px; }

/* cây danh mục */
.pf-tree .pf-node { position: relative; }
.pf-tree .pf-children { display: none; margin-left: 24px; border-left: 1px dashed #d5d9e6; padding-left: 10px; }
.pf-tree .pf-node.is-open > .pf-children { display: block; }
.pf-tree .pf-arrow { position: absolute; right: 0; top: 4px; width: 26px; height: 26px; border: 0; background: transparent; cursor: pointer; }
.pf-tree .pf-arrow::before { content: ""; display: block; width: 7px; height: 7px; margin: 8px auto 0; border-right: 2px solid var(--pf-primary); border-bottom: 2px solid var(--pf-primary); transform: rotate(45deg); transition: transform .15s; }
.pf-tree .pf-node.is-open > .pf-arrow::before { transform: rotate(-135deg); margin-top: 11px; }
.pf-tree > .pf-node > label { padding-right: 30px; }
.pf-tree .pf-node .pf-node > label { padding-right: 30px; }

.pf-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.pf-actions .pf-apply { background: var(--pf-primary); border-color: var(--pf-primary); }
.pf-actions .pf-apply:hover { background: var(--pf-accent); border-color: var(--pf-accent); }
.pf-actions .pf-clear { color: var(--red, #e5003f); font-weight: 600; }

/* JS bật thì tự lọc khi bấm chọn -> ẩn nút "Lọc" (vẫn còn cho người tắt JS) */
.pf-js .pf-apply { display: none; }

/* Trạng thái đang xử lý của nút Áp dụng (dùng chung form-busy.js) */
.pf-apply.is-busy { pointer-events: none; opacity: .8; cursor: progress; }
.pf-apply.is-busy::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .5em; vertical-align: -.15em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pf-spin .7s linear infinite; }
#productFilterForm.is-loading { opacity: .7; }
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* Trang nhóm hàng /nhom-hang/{slug} */
.pf-cat-desc { margin: 0 0 12px; color: #555; }
.pf-subcats { list-style: none; margin: 0 0 15px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pf-subcats a { display: inline-block; padding: 5px 12px; border: 1px solid var(--color3, #ace2ee); border-radius: 16px; background: var(--color2, #d5eaff); color: var(--primary, #1d1f5c); font-size: 13px; }
.pf-subcats a:hover { background: var(--primary, #1d1f5c); color: #fff; }
.sl-filter-sort{width:140px;}
.sl-filter-size{width:120px;}
.shop-inner .toolbar{margin-bottom:12px;}
.pf-collection-card { display: block; margin-bottom: 25px; border: 1px solid var(--color3, #ace2ee); border-radius: 6px; background: #fff; text-align: center; overflow: hidden; color: var(--primary, #1d1f5c); text-decoration: none; transition: box-shadow .2s, transform .2s; }
.pf-collection-card:hover { box-shadow: 0 6px 18px rgba(29,31,92,.15); transform: translateY(-2px); color: var(--primary, #1d1f5c); }
.pf-collection-img { display: block; aspect-ratio: 4 / 3; background: var(--color2, #d5eaff); overflow: hidden; }
.pf-collection-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-collection-name { display: block; padding: 12px 10px 2px; font-size: 16px; font-weight: 700; }
.pf-collection-count { display: block; padding: 0 10px 12px; font-size: 13px; color: var(--primary-second, #e99417); }