/**
 * Shop / archive (category, brand, search results) — grid, sidebar filters,
 * sorting, pagination, mobile filter/sort bottom sheets.
 */

.apc-shop { max-width: var(--apc-container-max); margin: 0 auto; padding: 24px 20px 70px; }
.apc-shop__head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.apc-shop__title { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.apc-shop__count { font-size: 13.5px; color: var(--apc-color-text-muted); margin: 0; }
.apc-shop__sort select {
	border: 1px solid var(--apc-color-border-strong); border-radius: 9px; padding: 10px 14px; font-size: 13px;
	font-weight: 600; outline: none; background: #fff;
}
.apc-shop__layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }

.apc-filters { border: 1px solid var(--apc-color-border); border-radius: 14px; padding: 20px; }
.apc-filters__title { font-weight: 800; font-size: 14px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.apc-filters__clear { font-size: 12px; font-weight: 600; color: var(--apc-color-primary); background: none; border: none; cursor: pointer; }
.apc-filter-group { margin-bottom: 18px; }
.apc-filter-group:last-child { margin-bottom: 0; }
.apc-filter-group__label { font-size: 12.5px; font-weight: 700; color: var(--apc-color-text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.apc-filter-checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; margin-bottom: 6px; min-height: 24px; }
.apc-filter-checkbox input { width: 16px; height: 16px; accent-color: var(--apc-color-primary); }
.apc-filter-price-value { font-size: 12.5px; font-weight: 700; color: var(--apc-color-text-muted); margin-bottom: 8px; }
.apc-filter-price-value strong { color: var(--apc-color-text); }
input[type="range"].apc-range { width: 100%; accent-color: var(--apc-color-primary); }

/* WooCommerce's own widgets (layered nav / rating filter) placed in the
   Shop Sidebar widget area inherit this look so store owners can add
   attribute filters without any template work. */
.apc-filters .widget { margin-bottom: 22px; }
.apc-filters .widget:last-child { margin-bottom: 0; }
.apc-filters .widget-title,
.apc-filters .widgettitle { font-size: 12.5px; font-weight: 700; color: var(--apc-color-text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.apc-filters .widget ul { list-style: none; margin: 0; padding: 0; }
.apc-filters .widget ul li { margin-bottom: 6px; font-size: 13px; }
.apc-filters .widget ul li a { color: var(--apc-color-text-soft); }
.apc-filters .star-rating { color: var(--apc-color-rating); }

.apc-shop__skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.apc-shop__skeleton-card { border: 1px solid var(--apc-color-border); border-radius: 14px; overflow: hidden; }
.apc-shop__skeleton-img { height: 150px; }
.apc-shop__skeleton-body { padding: 14px; }
.apc-shop__skeleton-line { height: 10px; border-radius: 4px; margin-bottom: 8px; }
.apc-shop__skeleton-line--sm { width: 40%; }
.apc-shop__skeleton-line--lg { width: 70%; }

/* Mobile filter/sort bar + bottom sheet */
.apc-mobile-filter-bar { display: none; gap: 10px; margin-bottom: 16px; }
.apc-mobile-filter-bar button {
	flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
	border: 1px solid var(--apc-color-border-strong); border-radius: 10px; padding: 12px; background: #fff;
	font-weight: 700; font-size: 13px; color: var(--apc-color-text);
}
.apc-bottom-sheet { position: fixed; inset: 0; z-index: 900; display: none; }
.apc-bottom-sheet.is-open { display: block; }
.apc-bottom-sheet__backdrop { position: absolute; inset: 0; background: rgba(10,25,22,0.4); }
.apc-bottom-sheet__panel {
	position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 20px 20px 0 0;
	max-height: 82vh; overflow-y: auto; padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
	animation: apc-fade-up 0.22s ease;
}
.apc-bottom-sheet__handle { width: 40px; height: 4px; background: var(--apc-color-border-strong); border-radius: 999px; margin: 0 auto 16px; }
.apc-bottom-sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.apc-bottom-sheet__apply { position: sticky; bottom: 0; background: #fff; padding-top: 12px; }

/* Pagination */
.apc-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.apc-pagination a, .apc-pagination span {
	min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
	border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--apc-color-text-soft);
	border: 1px solid var(--apc-color-border-strong); text-decoration: none; padding: 0 8px;
}
.apc-pagination .current { background: var(--apc-color-primary); color: #fff; border-color: var(--apc-color-primary); }
.apc-pagination a:hover { border-color: var(--apc-color-primary); color: var(--apc-color-primary); text-decoration: none; }

/* Brand archive */
.apc-brand-header { display: flex; gap: 20px; align-items: center; margin-bottom: 30px; flex-wrap: wrap; }
.apc-brand-header__logo { width: 84px; height: 84px; border-radius: 16px; border: 1px solid var(--apc-color-border); object-fit: contain; background: #fff; padding: 10px; }
.apc-brand-header__name { font-size: 24px; margin: 0 0 6px; }
.apc-brand-header__desc { font-size: 13.5px; color: var(--apc-color-text-muted); max-width: 640px; margin: 0; }
.apc-brands-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
