/* Shop Page CSS */

.shop-container {
	display: grid;
	gap: 24px;
}

/* Drawer Overlay */
.shop-filter-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 2300;
}
.shop-filter-overlay.active {
	opacity: 1;
	pointer-events: auto;
}

/* Side Panel Drawer */
.shop-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	width: min(320px, 86vw);
	background: var(--surface-color);
	border-right: 1px solid var(--border-color);
	padding: 18px 18px 22px;
	transform: translateX(-110%);
	transition: transform 0.25s ease;
	z-index: 2400;
	overflow-y: auto;
	box-shadow: 16px 0 40px rgba(0, 0, 0, 0.16);
}
.shop-sidebar.is-open {
	transform: translateX(0);
}

.shop-filter-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.shop-filter-header h4 {
	margin: 0;
	font-size: 1rem;
	letter-spacing: 0.02em;
	color: var(--heading-color);
}
.shop-filter-close {
	border: 1px solid var(--border-color);
	background: var(--surface-color);
	color: var(--heading-color);
	width: 32px;
	height: 32px;
	border-radius: 8px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.filter-group {
	margin-bottom: 12px;
}
.filter-group h4 {
	display: none;
}
.filter-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.filter-list li {
	margin: 0;
}
.filter-list a {
	color: var(--text-color);
	transition: var(--transition);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid var(--border-color);
	background: var(--surface-color);
	text-align: left;
	width: 100%;
	font-weight: 600;
}
.filter-list a:hover,
.filter-list a.active {
	color: #fff;
	background: var(--primary-color);
	border-color: transparent;
}

/* Shop Header */
.shop-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	gap: 16px;
	flex-wrap: wrap;
}
.shop-header-left {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.shop-header-left p {
	margin: 0;
}

#sort-select {
	width: auto;
	min-width: 160px;
	min-height: 48px;
	border-radius: 14px;
	border: 1px solid var(--border-color);
	background: var(--surface-color);
	color: var(--text-color);
	font-weight: 600;
	padding: 10px 42px 10px 14px;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: var(--surface-color), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23003366' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat, no-repeat;
	background-position:
		center,
		right 14px center;
	background-size: auto, 14px;
	box-shadow: var(--shadow-sm);
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		color 0.2s ease;
}

#sort-select:hover {
	border-color: var(--primary-color);
	box-shadow: var(--shadow);
}

#sort-select:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.15);
}

.shop-filter-toggle {
	border-radius: 999px;
	padding: 8px 16px;
	font-weight: 600;
	border: 1px solid var(--border-color);
	background: var(--surface-color);
	color: var(--text-color);
	transition:
		border-color 0.2s ease,
		color 0.2s ease,
		background 0.2s ease,
		box-shadow 0.2s ease;
}

.shop-filter-toggle:hover {
	border-color: var(--primary-color);
	color: var(--primary-color);
	background: var(--surface-color);
	box-shadow: var(--shadow-sm);
}

.shop-filter-toggle:focus-visible {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.15);
}

/* Shop Content */
.product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
	align-items: start;
}
.shop-content .product-card {
	--product-card-height: auto;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 100%;
	min-height: 460px;
}
.shop-content .product-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin-top: 4px;
	min-height: 140px;
}
.shop-content .product-info > * {
	width: 100%;
}
.shop-content .product-info h3 {
	flex-shrink: 0;
}
.shop-content .product-desc {
	flex-shrink: 0;
}
.shop-content .price {
	flex-shrink: 0;
}
.shop-content .add-to-cart-btn {
	margin-top: auto;
}

@media (max-width: 480px) {
	.shop-container {
		padding-left: 0;
		padding-right: 0;
	}
	.shop-header {
		padding-left: 16px;
		padding-right: 16px;
	}
	.product-grid {
		gap: 10px;
	}
	.shop-content .product-card {
		min-height: 380px;
	}
	.shop-content .product-info {
		min-height: 120px;
	}
	.shop-content .product-img-wrap {
		height: 140px;
	}
	.shop-content .product-img-wrap a {
		padding: 8px;
	}
	.shop-content .add-to-cart-btn {
		font-size: 0.85rem;
		min-height: 48px;
	}
	.shop-content .price {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}
}

@media (min-width: 768px) {
	.shop-sidebar {
		width: min(360px, 80vw);
	}
}

@media (min-width: 900px) {
	.product-grid {
		grid-template-columns: repeat(3, minmax(280px, 1fr));
	}
	.shop-content .product-card {
		min-height: 460px;
	}
	.shop-content .product-img-wrap {
		height: 220px;
	}
}
@media (min-width: 1200px) {
	.product-grid {
		grid-template-columns: repeat(4, minmax(280px, 1fr));
	}
}
