/**
 * Product category page – content overrides.
 * Category archives with theme shell scope styles under .pcat-page (header/footer unchanged).
 * Shop/tag archives keep full-page body scoping with the isolated Tailwind bundle.
 */

body.andalos-product-category-page #content.site-content {
	max-width: none;
	padding: 0;
	margin: 0;
	background: transparent;
}

/* Category archive – content island only */
body.andalos-product-category-with-theme-shell .pcat-page {
	background-color: #0a0a0a;
	color: #f1f5f9;
	font-family: 'Vazirmatn', 'Plus Jakarta Sans', sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.andalos-product-category-with-theme-shell .pcat-page .text-primary {
	color: #f20d0d !important;
}

body.andalos-product-category-with-theme-shell .pcat-page .bg-primary {
	background-color: #f20d0d !important;
}

/* Shop/tag archive – isolated mockup bundle */
body.andalos-product-category-page:not(.andalos-product-category-with-theme-shell).bg-dominant-bg {
	background-color: #0a0a0a !important;
	color: #f1f5f9 !important;
	font-family: 'Vazirmatn', 'Plus Jakarta Sans', sans-serif !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.andalos-product-category-page:not(.andalos-product-category-with-theme-shell) .text-primary {
	color: #f20d0d !important;
}

body.andalos-product-category-page:not(.andalos-product-category-with-theme-shell) .bg-primary {
	background-color: #f20d0d !important;
}

body.andalos-product-category-page .pcat-toolbar {
	top: 5rem;
}

body.andalos-product-category-with-theme-shell .pcat-page ::-webkit-scrollbar,
body.andalos-product-category-page:not(.andalos-product-category-with-theme-shell) ::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

body.andalos-product-category-with-theme-shell .pcat-page ::-webkit-scrollbar-track,
body.andalos-product-category-page:not(.andalos-product-category-with-theme-shell) ::-webkit-scrollbar-track {
	background: #0a0a0a;
}

body.andalos-product-category-with-theme-shell .pcat-page ::-webkit-scrollbar-thumb,
body.andalos-product-category-page:not(.andalos-product-category-with-theme-shell) ::-webkit-scrollbar-thumb {
	background: #333333;
	border-radius: 4px;
}

body.andalos-product-category-with-theme-shell .pcat-page ::-webkit-scrollbar-thumb:hover,
body.andalos-product-category-page:not(.andalos-product-category-with-theme-shell) ::-webkit-scrollbar-thumb:hover {
	background: #444444;
}

body.andalos-product-category-page .persian-num {
	font-feature-settings: 'ss01';
}

body.andalos-product-category-page .no-scrollbar::-webkit-scrollbar {
	display: none;
}

body.andalos-product-category-page .no-scrollbar {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

/* WooCommerce card price → match HTML spans */
body.andalos-product-category-page .pcat-card-price .price {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	font-size: inherit;
}

body.andalos-product-category-page .pcat-card-price ins {
	text-decoration: none;
}

body.andalos-product-category-page .pcat-card-price ins .woocommerce-Price-amount {
	font-size: 1.25rem;
	font-weight: 700;
	color: #f20d0d;
}

body.andalos-product-category-page .pcat-card-price del .woocommerce-Price-amount {
	font-size: 0.875rem;
	color: #9ca3af;
	text-decoration: line-through;
	opacity: 0.8;
}

body.andalos-product-category-page .pcat-card-price .price > .woocommerce-Price-amount {
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
}

body.andalos-product-category-page .pcat-card .add_to_cart_button,
body.andalos-product-category-page .pcat-card .button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

body.andalos-product-category-page .pcat-sort-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

body.andalos-product-category-page .pcat-sort-hidden select.orderby {
	width: 100%;
	height: 100%;
}

body.andalos-product-category-page .woocommerce-message,
body.andalos-product-category-page .woocommerce-info,
body.andalos-product-category-page .woocommerce-error {
	margin-bottom: 1rem;
}

/* Filters drawer */
body.andalos-product-category-page .pcat-filters-panel {
	position: fixed;
	inset: 0;
	z-index: 60;
	pointer-events: none;
}

body.andalos-product-category-page .pcat-filters-panel.is-open {
	pointer-events: auto;
}

body.andalos-product-category-page .pcat-filters-panel__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	transition: opacity 0.3s ease;
}

body.andalos-product-category-page .pcat-filters-panel.is-open .pcat-filters-panel__backdrop {
	opacity: 1;
}

body.andalos-product-category-page .pcat-filters-panel__drawer {
	position: absolute;
	top: 0;
	right: 0;
	width: min(100%, 24rem);
	height: 100%;
	background: #1a1a1a;
	border-left: 1px solid #333333;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	outline: none;
}

body.andalos-product-category-page .pcat-filters-panel.is-open .pcat-filters-panel__drawer {
	transform: translateX(0);
}

body.andalos-product-category-page .pcat-filters-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #333333;
}

body.andalos-product-category-page .pcat-filters-panel__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.5rem;
	color: #9ca3af;
	transition: color 0.2s ease, background 0.2s ease;
}

body.andalos-product-category-page .pcat-filters-panel__close:hover {
	color: #fff;
	background: #262626;
}

body.andalos-product-category-page .pcat-filters-panel__body {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem;
}

body.andalos-product-category-page .pcat-filters-group + .pcat-filters-group,
body.andalos-product-category-page .pcat-filters-widgets {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #333333;
}

body.andalos-product-category-page .pcat-filters-group__title {
	font-size: 0.875rem;
	font-weight: 700;
	color: #fff;
	margin-bottom: 0.75rem;
}

body.andalos-product-category-page .pcat-filters-group__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

body.andalos-product-category-page .pcat-filters-group__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	border: 1px solid #333333;
	color: #9ca3af;
	font-size: 0.875rem;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

body.andalos-product-category-page .pcat-filters-group__link:hover,
body.andalos-product-category-page .pcat-filters-group__link.is-active {
	border-color: #f20d0d;
	color: #fff;
	background: #262626;
}

body.andalos-product-category-page.pcat-filters-open {
	overflow: hidden;
}

/* Collapsible category descriptions */
body.andalos-product-category-page .pcat-collapsible__body.is-collapsed:not(.is-expanded) {
	max-height: var(--pcat-collapsed-max, 6.5em);
	overflow: hidden;
	position: relative;
}

body.andalos-product-category-page .pcat-collapsible__body.is-collapsed:not(.is-expanded)::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2.5rem;
	pointer-events: none;
}

body.andalos-product-category-page .pcat-collapsible[data-variant='hero'] .pcat-collapsible__body.is-collapsed:not(.is-expanded)::after {
	background: linear-gradient(to bottom, rgba(26, 26, 26, 0), #1a1a1a);
}

body.andalos-product-category-page .pcat-collapsible[data-variant='bottom'] .pcat-collapsible__body.is-collapsed:not(.is-expanded)::after {
	background: linear-gradient(to bottom, rgba(10, 10, 10, 0), #0a0a0a);
}

body.andalos-product-category-with-theme-shell .pcat-collapsible[data-variant='bottom'] .pcat-collapsible__body.is-collapsed:not(.is-expanded)::after {
	background: linear-gradient(to bottom, rgba(10, 10, 10, 0), #0a0a0a);
}

body.andalos-product-category-page .pcat-collapsible__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.75rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: #f20d0d;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.2s ease, opacity 0.2s ease;
}

body.andalos-product-category-page .pcat-collapsible__toggle:hover {
	color: #ff4d4d;
}

body.andalos-product-category-page .pcat-collapsible__toggle:focus-visible {
	outline: 2px solid #f20d0d;
	outline-offset: 3px;
	border-radius: 4px;
}

body.andalos-product-category-page .pcat-collapsible__toggle[hidden] {
	display: none;
}
