/* ===================================================================
   ASTYLIO Catalog — Step 3
   Catalog grid, toolbar, filters, breadcrumbs, search, empty state.
   All tokens from ASTYLIO Design System (Step 1). No new primitives.
   =================================================================== */

/* ----------------------------------------------------------------
   Container / Layout
   ----------------------------------------------------------------

   Storefront's .col-full limits max-width to ~1064px and uses
   box-sizing:content-box, which constrains the catalog grid.
   Override on catalog pages so the sidebar + product grid fill
   the available viewport width properly. */
.woocommerce-shop .col-full,
.tax-product_cat .col-full,
.post-type-archive-product .col-full {
	max-width: 100%;
	box-sizing: border-box;
}

/* Widen the content-area on catalog pages. The body has
   .right-sidebar which sets .content-area to 74% / .widget-area to 22%.
   We override the content-area to use flexbox instead. */
.woocommerce-shop .site-content .col-full,
.tax-product_cat .site-content .col-full,
.post-type-archive-product .site-content .col-full {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	align-items: start;
}
.woocommerce-shop .content-area,
.tax-product_cat .content-area,
.post-type-archive-product .content-area {
	width: 100%;
	float: none;
	margin: 0;
}
.woocommerce-shop .widget-area,
.tax-product_cat .widget-area,
.post-type-archive-product .widget-area {
	display: none; /* hide old sidebar widgets; our aksh-catalog-sidebar handles filtering */
}

.aksh-catalog {
	width: 100%;
	padding: var(--astylio-space-7) 0 var(--astylio-space-12);
}

.aksh-catalog-header {
	margin-bottom: var(--astylio-space-6);
	text-align: center;
}

.aksh-catalog-title {
	font-family: var(--astylio-font-display, 'Playfair Display', serif);
	font-size: clamp(3.2rem, 5vw, 4rem);
	font-weight: 600;
	color: var(--color-text-primary);
	line-height: 1.15;
	margin: 0 0 0.35em;
	text-transform: capitalize;
}

.aksh-catalog-description {
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-md);
	color: var(--color-text-secondary);
	line-height: 1.6;
	margin: 0 auto;
	max-width: 560px;
}

/* ── Catalog Layout ────────────────────────────────────────────── */
.aksh-catalog-layout {
	display: grid;
	grid-template-columns: 1fr;
	align-items: start;
}

/* ── Override global button:focus outline on mouse click for catalog buttons ── */
.aksh-filter-toggle:focus:not(:focus-visible),
.aksh-filter-panel__apply:focus:not(:focus-visible),
.aksh-filter-panel__clear:focus:not(:focus-visible),
.aksh-filter-panel__close:focus:not(:focus-visible),
.aksh-filter-drawer-close:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

/* ── Sidebar: hidden by default, slides in when toggled ──────── */
.aksh-catalog-sidebar {
	display: none;
	width: 0;
	overflow: hidden;
}
.aksh-catalog-sidebar.is-open {
	display: block;
	width: 260px;
}
/* When sidebar is open, use two-column grid */
.aksh-catalog-layout.has-filter .aksh-catalog-sidebar.is-open {
	display: block;
}
.aksh-catalog-layout.has-filter {
	grid-template-columns: 260px 1fr;
	gap: var(--astylio-space-7);
}

.aksh-catalog-main {
	min-width: 0; /* Prevent grid blowout. */
}

/* Center pagination within the product content area */
.aksh-catalog-main .woocommerce-pagination {
	width: 100%;
	text-align: center;
	padding-top: var(--astylio-space-6, 24px);
	padding-bottom: var(--astylio-space-8, 32px);
	margin-bottom: var(--astylio-space-7, 28px);
}

.aksh-catalog-main .woocommerce-pagination .page-numbers {
	display: inline-flex;
	gap: 4px;
}

/* ── Toolbar ────────────────────────────────────────────────────── */
.aksh-catalog-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--astylio-space-4);
	margin-bottom: var(--astylio-space-7);
	flex-wrap: wrap;
}

.aksh-catalog-toolbar__left {
	display: flex;
	align-items: center;
	gap: var(--astylio-space-4);
}

/* Minimal filter toggle — lightweight utility control */
.aksh-filter-toggle {
	display: inline-flex;
	align-items: center;
	gap: var(--astylio-space-2);
	background: transparent;
	border: none;
	cursor: pointer;
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	font-weight: 500;
	color: var(--color-text-primary);
	padding: var(--astylio-space-2) 0;
	line-height: 1;
	transition: color 0.2s ease;
}

.aksh-filter-toggle svg,
.aksh-filter-toggle .astylio-icon {
	width: 16px;
	height: 16px;
	stroke-width: 1.5;
}

.aksh-filter-toggle:hover {
	background: transparent !important;
	background-color: transparent !important;
	color: var(--color-text-primary);
	opacity: 1;
}

.aksh-filter-toggle:hover svg,
.aksh-filter-toggle:hover .astylio-icon {
	stroke: var(--color-text-primary);
}

.aksh-filter-toggle:active {
	background: transparent !important;
	background-color: transparent !important;
	color: var(--color-text-primary);
	opacity: 1;
}

.aksh-catalog-toolbar__count,
.aksh-catalog-toolbar__sort {
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	color: var(--color-text-secondary);
}

.aksh-catalog-toolbar__sort {
	display: flex;
	align-items: center;
	gap: var(--astylio-space-4);
}

.aksh-catalog-toolbar__sort select,
.aksh-catalog-toolbar__sort .woocommerce-ordering select {
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	color: var(--color-text-primary);
	background: var(--color-bg-surface);
	border: 1px solid var(--color-border-default);
	border-radius: var(--astylio-radius-md, 6px);
	padding: 0.5em 2em 0.5em 1em;
	min-width: 190px;
	max-width: 190px;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5L6 8L9 5' stroke='%236B625D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75em center;
	background-size: 12px;
}

/* ── Custom Sort Dropdown (replaces native select for width control) ── */
.aksh-sort-dropdown {
	position: relative;
	display: inline-block;
	min-width: 190px;
}

.aksh-sort-dropdown__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-width: 190px;
	padding: 0.5em 1em;
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	color: var(--color-text-primary);
	background: var(--color-bg-surface);
	border: 1px solid var(--color-border-default);
	border-radius: var(--astylio-radius-md, 6px);
	cursor: pointer;
	text-align: left;
	line-height: 1.4;
	transition: border-color 0.2s ease;
}

.aksh-sort-dropdown__trigger:hover {
	border-color: var(--color-text-muted, #A89B91);
}

.aksh-sort-dropdown__trigger:focus {
	outline: none;
	border-color: var(--color-brand-primary, #5A1F2B);
}

.aksh-sort-dropdown__trigger:focus-visible {
	outline: 2px solid var(--color-brand-primary, #5A1F2B);
	outline-offset: 2px;
}

.aksh-sort-dropdown__arrow {
	flex-shrink: 0;
	width: 12px;
	height: 12px;
	margin-left: 1em;
	transition: transform 0.2s ease;
}

.aksh-sort-dropdown--open .aksh-sort-dropdown__arrow {
	transform: rotate(180deg);
}

.aksh-sort-dropdown__menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 100;
	margin-top: 4px;
	background: var(--color-bg-surface);
	border: 1px solid var(--color-border-default);
	border-radius: var(--astylio-radius-md, 6px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
	list-style: none;
	padding: 4px 0;
	margin: 0;
	overflow: hidden;
}

.aksh-sort-dropdown--open .aksh-sort-dropdown__menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.aksh-sort-dropdown__option {
	padding: 0.5em 1em;
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	color: var(--color-text-primary);
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: background-color 0.15s ease;
}

.aksh-sort-dropdown__option:hover {
	background: var(--color-bg-page);
}

.aksh-sort-dropdown__option--selected {
	font-weight: 500;
	color: var(--color-brand-primary, #5A1F2B);
}

/* Hide native select when custom dropdown is active */
.aksh-sort-dropdown--active + select,
.aksh-sort-dropdown--active ~ select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ----------------------------------------------------------------
   Product Grid
   ---------------------------------------------------------------- */
.aksh-product-grid {
	width: 100%;
	min-width: 0;
}
/* Apply flexbox to the WooCommerce products UL directly. Neutralize Storefront's
   float/percentage column system that fights with our layout.
   Storefront uses high-specificity rules like:
   .site-main ul.products.columns-4 li.product { width:22%; float:left; margin-right:3.8% }
   We use !important on the critical reset properties to ensure our flex layout owns the
   layout, not Storefront's float system. */
.aksh-product-grid ul.products,
.related.products ul.products {
	display: flex !important;
	flex-wrap: wrap;
	gap: 0 20px;
	padding: 0 !important;
	margin: 0 !important;
	list-style: none;
	width: 100%;
	float: none !important;
	/* Collapse whitespace text nodes between LIs (WooCommerce renders newlines) */
	font-size: 0;
}
/* Kill clearfix pseudo-elements that Storefront/WooCommerce adds to ul.products.
   In a flex context these become flex items, adding unwanted space before the first product. */
.aksh-product-grid ul.products::before,
.aksh-product-grid ul.products::after,
.related.products ul.products::before,
.related.products ul.products::after {
	content: none !important;
	display: none !important;
}
.aksh-product-grid ul.products li.product,
.related.products ul.products li.product {
	display: block !important;
	float: none !important;
	clear: none !important;
	width: calc(25% - 15px) !important;
	max-width: calc(25% - 15px) !important;
	padding: 0 !important;
	margin: 0 !important;
	box-sizing: border-box;
	/* Reset font-size from UL's whitespace-collapse hack */
	font-size: var(--astylio-fs-body-md, 1rem);
}
.aksh-product-grid ul.products li.product.first,
.aksh-product-grid ul.products li.product.last {
	clear: none !important;
	margin-right: 0 !important;
}

/* ----------------------------------------------------------------
   Sidebar Filters
   ---------------------------------------------------------------- */
.aksh-catalog-sidebar {
	position: sticky;
	top: var(--astylio-space-4);
}

/* ── Filter Panel (sidebar toggle) ──────────────────────────────── */
.aksh-filter-panel {
	padding: 0;
}

.aksh-filter-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: var(--astylio-space-4);
	margin-bottom: var(--astylio-space-5);
	border-bottom: 1px solid var(--color-border-default);
}

.aksh-filter-panel__title {
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-text-primary);
	margin: 0;
}

.aksh-filter-panel__close {
	background: none;
	border: none;
	cursor: pointer;
	padding: var(--astylio-space-1);
	color: var(--color-text-primary);
	line-height: 0;
}

/* Close buttons (sidebar + mobile drawer): no background shift on hover —
   the × turns burgundy only. Beats the global button:hover (style.css). */
.aksh-filter-panel__close:hover,
.aksh-filter-drawer-close:hover {
	background: transparent;
	background-color: transparent;
	border-color: transparent;
	color: var(--color-brand-primary);
}

.aksh-filter-panel__body {
	max-height: calc(100vh - 200px);
	overflow-y: auto;
	padding-right: var(--astylio-space-4);
	/* Hide scrollbar while keeping scrollable */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.aksh-filter-panel__body::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.aksh-filter-panel__footer {
	display: flex;
	gap: var(--astylio-space-3);
	padding-top: var(--astylio-space-4);
	margin-top: var(--astylio-space-4);
	border-top: 1px solid var(--color-border-default);
}

.aksh-filter-panel__clear {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--color-brand-primary);
	color: var(--color-brand-primary);
	background: transparent;
	min-height: 44px;
}

.aksh-filter-panel__clear:hover {
	background: var(--color-brand-primary);
	color: var(--color-text-inverse, #fff);
}

.aksh-filter-panel__apply {
	flex: 1 1 0;
}

/* ── Filter Group (collapsible) ─────────────────────────────────── */
.aksh-filter-group {
	border-bottom: 1px solid var(--color-border-default);
}

.aksh-filter-group:last-child {
	border-bottom: none;
}

/* Group toggle button */
.aksh-filter-group__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: none;
	border: none;
	cursor: pointer;
	padding: var(--astylio-space-4) 0;
	color: var(--color-text-primary);
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	/* Override global button:hover from style.css */
	background-color: transparent;
	border-color: transparent;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover: no background, darker text */
.aksh-filter-group__toggle:hover {
	background-color: transparent;
	color: var(--color-text-primary);
}

/* Focus: accessible ring only on keyboard, no persistent line */
.aksh-filter-group__toggle:focus {
	outline: none;
	box-shadow: none;
}

.aksh-filter-group__toggle:focus-visible {
	outline: 2px solid var(--color-brand-primary);
	outline-offset: -2px;
	border-radius: var(--astylio-radius-sm);
}

/* Active/pressed state */
.aksh-filter-group__toggle:active {
	background-color: var(--color-bg-surface, #FCFAF7);
	color: var(--color-text-primary);
}

.aksh-filter-group__title {
	font-size: var(--astylio-fs-body-sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0;
}

/* Chevron rotation */
.aksh-filter-group__chevron {
	transition: transform 0.25s ease;
	flex-shrink: 0;
}

.aksh-filter-group.is-open .aksh-filter-group__chevron {
	transform: rotate(180deg);
}

/* Collapsible content */
.aksh-filter-group__content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.aksh-filter-group.is-open .aksh-filter-group__content {
	/* No fixed cap — the JS toggle sets an inline max-height from the
	   real content height so tall groups (e.g. 35 category items) are
	   never clipped. `none` here is a no-JS fallback. */
	max-height: none;
}

.aksh-filter-group__list {
	list-style: none;
	margin: 0;
	padding: 0 0 var(--astylio-space-4) 0;
}

.aksh-filter-group__item {
	margin-bottom: 0;
}

/* Category subcategories */
.aksh-filter-group__sublist {
	list-style: none;
	margin: 0;
	padding: 0 0 0 var(--astylio-space-4);
}
.aksh-filter-group__sublist--nested {
	padding-left: var(--astylio-space-3);
}

.aksh-filter-group__item--child {
	margin-bottom: 0;
}
.aksh-filter-group__item--grandchild {
	margin-bottom: 0;
}

/* ── Category tree (persistent, expand/collapse) ──────────────── */
.aksh-category-tree {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aksh-category-item {
	margin: 0;
	padding: 0;
}

.aksh-category-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

/* Override global button:hover for category filter items — no dark border */
.aksh-category-link:hover,
.aksh-category-expand:hover {
	background: transparent;
	border-color: transparent;
}

/* Override global button:focus — remove outline on mouse click */
.aksh-category-link:focus,
.aksh-category-expand:focus {
	outline: none;
}

.aksh-category-expand {
	/* Reset — override global button defaults */
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	margin: 0;
	min-height: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	color: var(--color-text-muted);
	transition: color 0.15s ease;
	border-radius: var(--astylio-radius-sm, 4px);
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	font-weight: 400;
	line-height: 1;
}

.aksh-category-expand:hover {
	color: var(--color-text-primary);
	background: var(--color-bg-surface, #FCFAF7);
}

.aksh-category-expand:focus-visible {
	outline: 2px solid var(--color-brand-primary);
	outline-offset: -2px;
}

/* ── Category navigation buttons ──────────────────────────────── */
.aksh-category-link {
	/* Reset button styles — override global button defaults */
	background: none;
	border: none;
	cursor: pointer;
	flex: 1 1 auto;
	min-width: 0;
	min-height: auto;
	padding: var(--astylio-space-2) 0;
	margin: 0;
	justify-content: flex-start;
	text-align: left;
	/* Typography */
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	font-weight: 400;
	color: var(--color-text-primary);
	line-height: 1.4;
	/* Transition */
	transition: color 0.15s ease, font-weight 0.15s ease;
}

.aksh-category-link:hover {
	color: var(--color-brand-primary);
}

.aksh-category-link:focus-visible {
	outline: 2px solid var(--color-brand-primary);
	outline-offset: -2px;
	border-radius: var(--astylio-radius-sm, 4px);
}

.aksh-category-link.is-active {
	font-weight: 600;
	color: var(--color-brand-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.aksh-category-link--ancestor {
	font-size: var(--astylio-fs-caption, 12px);
	color: var(--color-text-muted);
	font-weight: 400;
	display: inline;
	width: auto;
	padding: 0;
}

.aksh-category-link--ancestor:hover {
	color: var(--color-brand-primary);
}

/* Ancestor breadcrumb row */
.aksh-category-ancestors {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--astylio-space-1);
	margin-bottom: var(--astylio-space-2);
}

.aksh-category-sep {
	font-size: var(--astylio-fs-caption, 12px);
	color: var(--color-text-muted);
	line-height: 1;
}

/* Children list */
.aksh-category-children {
	list-style: none;
	margin: 0;
	padding: 0 0 0 var(--astylio-space-3);
}

.aksh-category-children li {
	margin: 0;
	padding: 0;
}

/* ── Loading state ────────────────────────────────────────────── */
.aksh-product-grid.is-loading {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* ── Error message ────────────────────────────────────────────── */
.aksh-filter-error {
	background: var(--color-bg-surface, #FCFAF7);
	border: 1px solid var(--color-border-default);
	border-radius: var(--astylio-radius-md, 6px);
	padding: var(--astylio-space-4);
	margin-bottom: var(--astylio-space-4);
	text-align: center;
}

.aksh-filter-error p {
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	color: var(--color-text-secondary);
	margin: 0 0 var(--astylio-space-3) 0;
}

.aksh-filter-error__retry {
	font-size: var(--astylio-fs-body-sm);
}

/* ── Checkbox (label LEFT, checkbox RIGHT) ──────────────────────── */
.aksh-filter-checkbox {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--astylio-space-3);
	cursor: pointer;
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	color: var(--color-text-primary);
	padding: var(--astylio-space-2) 0;
}

.aksh-filter-checkbox:hover {
	color: var(--color-brand-primary);
}

.aksh-filter-checkbox__text {
	display: flex;
	align-items: center;
	gap: var(--astylio-space-2);
	flex: 1;
	min-width: 0;
}

.aksh-filter-checkbox__label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aksh-filter-checkbox__count {
	color: var(--color-text-muted);
	font-size: var(--astylio-fs-caption, 0.75rem);
}

.aksh-filter-checkbox__input {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--color-border-default);
	border-radius: var(--astylio-radius-sm);
	background: var(--color-bg-surface);
	flex-shrink: 0;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
	margin: 0;
}

.aksh-filter-checkbox__input:checked {
	background: var(--color-brand-primary);
	border-color: var(--color-brand-primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.5L4 8l4.5-5.5' stroke='white' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 10px;
}

.aksh-filter-checkbox__input:focus-visible {
	outline: 2px solid var(--color-brand-primary);
	outline-offset: 2px;
}

.aksh-filter-checkbox__box {
	display: none;
}

/* Price range */
/* ── Price Dual-Range Slider ───────────────────────────────────── */
.aksh-price-slider {
	padding: var(--astylio-space-2) 0;
}

.aksh-price-slider__values {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--astylio-space-3);
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	color: var(--color-text-primary);
}

.aksh-price-slider__sep {
	color: var(--color-text-muted, #A89B91);
	padding: 0 var(--astylio-space-1);
}

.aksh-price-slider__track {
	position: relative;
	width: 100%;
	height: 28px;
}

.aksh-price-slider__input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	pointer-events: none;
	z-index: 2;
	/* Ensure thumb is vertically centered */
	vertical-align: middle;
}

.aksh-price-slider__input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	background: var(--color-brand-primary, #5A1F2B);
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	/* Center thumb vertically on track */
	margin-top: -6px;
}

.aksh-price-slider__input::-webkit-slider-thumb:hover {
	transform: scale(1.15);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.aksh-price-slider__input::-moz-range-thumb {
	width: 16px;
	height: 16px;
	background: var(--color-brand-primary, #5A1F2B);
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.aksh-price-slider__input::-webkit-slider-runnable-track {
	height: 3px;
	background: transparent;
	border: none;
	outline: none;
}

.aksh-price-slider__input::-moz-range-track {
	height: 3px;
	background: transparent;
	border: none;
	outline: none;
}

/* Ensure tracks stay hidden on all interaction states */
.aksh-price-slider__input:hover::-webkit-slider-runnable-track,
.aksh-price-slider__input:focus::-webkit-slider-runnable-track,
.aksh-price-slider__input:active::-webkit-slider-runnable-track {
	background: transparent;
	border: none;
	outline: none;
}

.aksh-price-slider__input:hover::-moz-range-track,
.aksh-price-slider__input:focus::-moz-range-track,
.aksh-price-slider__input:active::-moz-range-track {
	background: transparent;
	border: none;
	outline: none;
}

/* Remove focus outline from the input itself */
.aksh-price-slider__input:focus {
	outline: none;
}

/* Remove focus-visible outline */
.aksh-price-slider__input:focus-visible {
	outline: none;
}

/* Override global input:focus outline for price slider */
.aksh-price-slider__input:focus,
.aksh-price-slider__input:active {
	outline: none !important;
	outline-offset: 0 !important;
	box-shadow: none !important;
	border-color: transparent !important;
}

/* Active range highlight */
.aksh-price-slider__range {
	background: var(--color-border-default);
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 3px;
	border-radius: 2px;
	transform: translateY(-50%);
	z-index: 1;
}

.aksh-price-slider__range::after {
	content: '';
	position: absolute;
	top: 0;
	height: 100%;
	left: var(--range-left, 0%);
	right: var(--range-right, 0%);
	background: var(--color-brand-primary, #5A1F2B);
	border-radius: 2px;
}

/* ----------------------------------------------------------------
   Active Filters
   ---------------------------------------------------------------- */
.aksh-active-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--astylio-space-2);
	margin-bottom: var(--astylio-space-4);
}

.aksh-active-filter {
	display: inline-flex;
	align-items: center;
	gap: var(--astylio-space-1);
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-caption);
	text-decoration: none;
	background: var(--color-bg-surface);
	border: 1px solid var(--color-border-default);
	border-radius: var(--astylio-radius-pill);
	padding: 0.3em 0.75em;
	color: var(--color-text-primary);
	transition: background 0.2s ease;
}

.aksh-active-filter:hover {
	background: var(--color-bg-page);
}

.aksh-active-filter__remove {
	font-size: 14px;
	line-height: 1;
	opacity: 0.6;
}

/* ----------------------------------------------------------------
   Mobile Filter Drawer
   ---------------------------------------------------------------- */
.aksh-filter-drawer {
	display: none;
	position: fixed;
	top: 44px;   /* below the announcement bar (44px desktop) */
	left: 0;
	right: 0;
	width: 100%;
	max-width: 100vw;
	height: calc(100% - 44px);
	z-index: var(--astylio-z-drawer);
	background: var(--color-bg-page);
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
}

.aksh-filter-drawer.is-open {
	display: flex;
}

/* Announcement dismissed: fill from the very top. */
body.astylio-announcement-off .aksh-filter-drawer {
	top: 0;
	height: 100%;
}

/* Mobile announcement bar is shorter (38px). */
@media (max-width: 768px) {
	.aksh-filter-drawer {
		top: 38px;
		height: calc(100% - 38px);
	}
	body.astylio-announcement-off .aksh-filter-drawer {
		top: 0;
		height: 100%;
	}
}

.aksh-filter-drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--astylio-space-4);
	border-bottom: 1px solid var(--color-border-default);
}

.aksh-filter-drawer-title {
	font-family: var(--astylio-font-display, 'Playfair Display', serif);
	font-size: var(--astylio-fs-heading-md);
	font-weight: 600;
	margin: 0;
}

.aksh-filter-drawer-body {
	flex: 1;
	padding: var(--astylio-space-4);
	overflow-y: auto;
}

.aksh-filter-drawer-footer {
	display: flex;
	gap: var(--astylio-space-3);
	padding: var(--astylio-space-4);
	border-top: 1px solid var(--color-border-default);
	background: var(--color-bg-page);
}

.aksh-filter-drawer-footer .astylio-btn {
	flex: 1;
}

/* The drawer provides its own header + footer, so hide the shared
   filter-panel's duplicate header (FILTERS + close) and footer (Clear/Apply)
   and let the drawer body be the single scroll container. */
.aksh-filter-drawer .aksh-filter-panel__header,
.aksh-filter-drawer .aksh-filter-panel__footer {
	display: none;
}
.aksh-filter-drawer .aksh-filter-panel__body {
	max-height: none;
	overflow-y: visible;
	padding-right: 0;
}

/* Lock background scroll while the filter drawer is open (JS toggles
   `aksh-drawer-open` on <body>). */
body.aksh-drawer-open {
	overflow: hidden;
}

/* ----------------------------------------------------------------
   Empty State
   ---------------------------------------------------------------- */
.aksh-catalog-empty {
	text-align: center;
	padding: var(--astylio-space-12) var(--astylio-space-4);
}

.aksh-catalog-empty__icon {
	color: var(--color-text-muted);
	margin-bottom: var(--astylio-space-4);
}

.aksh-catalog-empty__icon svg {
	width: 48px;
	height: 48px;
}

.aksh-catalog-empty__title {
	margin-bottom: var(--astylio-space-3);
}

.aksh-catalog-empty__text {
	margin-bottom: var(--astylio-space-6);
}

.aksh-catalog-empty__actions {
	display: flex;
	justify-content: center;
	gap: var(--astylio-space-3);
}

/* ----------------------------------------------------------------
   Breadcrumbs
   ---------------------------------------------------------------- */
.astylio-breadcrumb {
	margin-bottom: var(--astylio-space-4);
}

.astylio-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--astylio-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
	font-family: var(--astylio-font-ui, 'Poppins', sans-serif);
	font-size: var(--astylio-fs-body-sm);
	color: var(--color-text-muted);
}

.astylio-breadcrumb__list li:not(:last-child)::after {
	content: ' /';
	margin-left: var(--astylio-space-1);
	color: var(--color-text-muted);
}

.astylio-breadcrumb__link {
	text-decoration: none;
	color: var(--color-text-secondary);
	transition: color 0.2s ease;
}

.astylio-breadcrumb__link:hover {
	color: var(--color-text-primary);
}

.astylio-breadcrumb__current {
	color: var(--color-text-primary);
	font-weight: 500;
}

/* ----------------------------------------------------------------
   Search Results
   ---------------------------------------------------------------- */
.aksh-catalog-search-term {
	font-style: normal;
	color: var(--color-text-primary);
}

.aksh-catalog-result-count {
	margin-top: var(--astylio-space-2);
}

/* ----------------------------------------------------------------
   Badge extensions (ASTYLIO Design System Step 1 extension)
   ---------------------------------------------------------------- */
.aksh-badge--sale {
	background: var(--color-brand-primary);
	color: var(--color-text-inverse);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.2em 0.5em;
	border-radius: var(--astylio-radius-sm);
}

.aksh-badge--new {
	background: var(--color-text-primary);
	color: var(--color-text-inverse);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.2em 0.5em;
	border-radius: var(--astylio-radius-sm);
}

.aksh-badge--low-stock,
.aksh-badge--out-of-stock {
	background: var(--color-text-muted);
	color: var(--color-text-inverse);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.2em 0.5em;
	border-radius: var(--astylio-radius-sm);
}

/* Card badges container */
.aksh-card-badges {
	position: absolute;
	top: var(--astylio-space-2);
	left: var(--astylio-space-2);
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: var(--astylio-space-1);
	align-items: flex-start;
}

/* ----------------------------------------------------------------
   Product Grid — Card adjustments
   ---------------------------------------------------------------- */
ul.products li.product {
	margin-bottom: 0;
}

ul.products li.product a.aksh-card-link .aksh-card-media {
	aspect-ratio: 4 / 5;
}

ul.products li.product a.aksh-card-link .aksh-card-media img {
	object-fit: cover;
	width: 100%;
	height: 100%;
}

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */

/* Tablet (3 cols) */
@media (max-width: 1024px) {
	/* Sidebar hidden by default on tablet too */
	.aksh-catalog-sidebar.is-open {
		width: 240px;
	}
	.aksh-catalog-layout.has-filter {
		grid-template-columns: 240px 1fr;
		gap: var(--astylio-space-5);
	}

	.aksh-product-grid ul.products,
	.related.products ul.products {
		gap: 0 16px;
	}
	.aksh-product-grid ul.products li.product,
	.related.products ul.products li.product {
		width: calc(33.333% - 10.67px) !important;
		max-width: calc(33.333% - 10.67px) !important;
	}
}

/* Small tablet / large phone: mobile drawer, no sidebar */
@media (max-width: 768px) {
	/* On mobile, sidebar never shows — use drawer instead */
	.aksh-catalog-layout {
		grid-template-columns: 1fr !important;
	}
	.aksh-catalog-sidebar {
		display: none !important;
	}
	.aksh-catalog-layout.has-filter {
		grid-template-columns: 1fr !important;
	}

	.aksh-product-grid ul.products,
	.related.products ul.products {
		gap: 0 12px;
	}
	.aksh-product-grid ul.products li.product,
	.related.products ul.products li.product {
		width: calc(50% - 6px) !important;
		max-width: calc(50% - 6px) !important;
		padding: 0 !important;
	}

	/* Toolbar: single row — Filter left, Sort right. */
	.aksh-catalog-toolbar {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: space-between;
		gap: var(--astylio-space-4);
		margin-top: var(--astylio-space-5);
		margin-bottom: var(--astylio-space-7);
	}
	.aksh-catalog-toolbar__left {
		flex: 0 0 auto;
	}

	/* Hide result count on mobile. */
	.aksh-catalog-toolbar__count {
		display: none;
	}

	/* Hide "Sort by" label on mobile. */
	.aksh-catalog-toolbar__sort-label {
		display: none;
	}

	/* Sort dropdown: compact auto width, right-aligned. */
	.aksh-catalog-toolbar__sort {
		flex: 0 0 auto;
		width: auto;
		min-width: 0;
	}
	.aksh-catalog-toolbar__sort .woocommerce-ordering {
		margin: 0;
	}
	.aksh-catalog-toolbar__sort select,
	.aksh-catalog-toolbar__sort .woocommerce-ordering select {
		max-width: 100%;
		min-width: 0;
	}
	.aksh-sort-dropdown {
		min-width: 0;
		width: auto;
	}
	.aksh-sort-dropdown__trigger {
		min-width: 0;
	}

	/* Pagination mobile wrap — chips wrap instead of overflowing. */
	.aksh-catalog-main .woocommerce-pagination .page-numbers {
		flex-wrap: wrap;
		justify-content: center;
		max-width: 100%;
	}

	/* Filter drawer + category-tree width guarantee (P0 overflow fixes). */
	.aksh-filter-drawer-body,
	.aksh-filter-drawer-header,
	.aksh-filter-drawer-footer {
		max-width: 100%;
		min-width: 0;
	}
	.aksh-filter-group__content,
	.aksh-category-tree,
	.aksh-category-item,
	.aksh-category-row {
		max-width: 100%;
		min-width: 0;
	}
	.aksh-category-link {
		overflow-wrap: anywhere;
	}
	.aksh-category-children {
		max-width: 100%;
		min-width: 0;
	}
}

/* Small phone */
@media (max-width: 480px) {
	.aksh-catalog-title {
		font-size: var(--astylio-fs-heading-md);
	}
}
