/* =====================================================
   Haine PSL Shop Cards - Styles
   ===================================================== */

/* Product Card Basics */
.psl-thumb img,
.psl-thumb {
	margin: 0 auto !important;
}

.psl-slide {
	height: 100% !important;
	display: flex !important;
	flex-direction: column !important;
}

.haine-psl-item,
.psl-slide {
	max-width: 100% !important;
	width: 100%;
}

/* Product Image - Fixed Height */
.psl-thumb {
	position: relative;
	width: 100%;
	height: 300px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #f9f9f9;
	background: #fff;
}

.psl-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.psl-info {
	flex: 1;
	display: flex;
	flex-direction: column;
}

/* Container Max Width */
.woocommerce-page .container,
.woocommerce .container {
	max-width: 1500px;
	margin: 0 auto;
}

/* =====================================================
   Product Grid Layout - 4/2/1 columns
   ===================================================== */
/* Product Grid Layout - 4/2/1 columns */
.woocommerce ul.products,
ul.products.columns-4,
ul.products.columns-3,
ul.products.columns-2 {
	display: grid !important;
	gap: 20px;
	list-style: none;
	padding: 0 20px;
	margin: 0 auto !important;
	max-width: 100%;
}

/* Desktop: 4 columns */
@media (min-width: 1200px) {

	.woocommerce ul.products,
	ul.products.columns-4,
	ul.products.columns-3,
	ul.products.columns-2 {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 1199px) {

	.woocommerce ul.products,
	ul.products.columns-4,
	ul.products.columns-3,
	ul.products.columns-2 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: 1 column */
@media (max-width: 767px) {

	.woocommerce ul.products,
	ul.products.columns-4,
	ul.products.columns-3,
	ul.products.columns-2 {
		grid-template-columns: 1fr;
	}
}

/* Reset WooCommerce default float/width */
.woocommerce ul.products li.product {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Remove unwanted pseudo-elements from products grid */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
ul.products::before,
ul.products::after {
	display: none !important;
	content: none !important;
}

/* =====================================================
   Subcategories Buttons
   ===================================================== */
.haine-psl-subcategories {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 1.5rem;
	padding: 0;
}

.haine-psl-subcategories__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 15px 18px;
	background: #be1622;
	color: #fff;
	border: 1px solid #be1622;
	border-radius: 0;
	font-size: 14px;
	border-radius: 8px;
	/* aspect-ratio: 2 / 1; */
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
}

.haine-psl-subcategories__btn:hover {
	background: #1e1e1e;
	color: #fff;
	border-color: #1e1e1e;
}

.haine-psl-subcategories__btn--active {
	background: #1e1e1e;
	color: #fff;
	border-color: #1e1e1e;
}

.haine-psl-subcategories__count {
	font-size: 12px;
	opacity: 0.7;
}

/* =====================================================
   Filter Modal - All Screens
   ===================================================== */
.haine-psl-filters {
	margin-bottom: 1.5rem;
	display: block;
	/* Visible on all screens */
}

.haine-psl-filters__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: #1e1e1e;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 0.6rem 1.2rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.haine-psl-filters__toggle:hover {
	background: #3a3a3a;
}

.haine-psl-filters__toggle svg {
	display: block;
}

.haine-psl-filters__modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
}

.haine-psl-filters__modal[hidden] {
	display: none !important;
}

.haine-psl-filters__modal--open {
	display: block !important;
}

.haine-psl-filters__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.haine-psl-filters__modal-dialog {
	position: relative;
	margin: 2rem auto;
	max-width: min(600px, 92vw);
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem;
	max-height: calc(100vh - 4rem);
	overflow-y: auto;
}

.haine-psl-filters__modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.haine-psl-filters__modal-header h2 {
	margin: 0;
	font-size: 1.25rem;
}

.haine-psl-filters__close {
	background: none;
	border: none;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}

body.haine-psl-no-scroll {
	overflow: hidden;
}

/* Hide sidebar column globally - filters only in modal */
.product-left-sidebar {
	display: none !important;
}

/* Hide the empty sidebar column container */
.full-col.col-lg-4:has(.product-left-sidebar),
.full-col.col-lg-4:has(.products-area:empty) {
	display: none !important;
}

/* Make product area take full width but center content */
.full-col.col-lg-8 {
	flex: 0 0 100% !important;
	max-width: 1540px !important;
	margin: 0 auto !important;
	width: 100% !important;
}

.haine-psl-filters__modal-body .product-left-sidebar {
	display: block !important;
}

/* =====================================================
   Active Filters Indicator
   ===================================================== */
.haine-psl-filters__active-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	background: #fff;
	color: #1e1e1e;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 700;
	margin-left: 8px;
}

.haine-psl-filters__active-count:empty {
	display: none;
}