/* Shop Page CSS */

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

/* Drawer Overlay */
.shop-filter-overlay {
	position: fixed;
	inset: 0;
	background: rgba(78, 43, 12, 0.4);
	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(132, 76, 22, 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: #fffaf2;
	text-align: left;
	width: 100%;
	font-weight: 600;
}
.filter-list a:hover,
.filter-list a.active {
	color: #fff;
	background: linear-gradient(120deg, #ff9e21 0%, #ff8c00 70%, #e67900 100%);
	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: 46px;
	border-radius: 14px;
	border: 1px solid #f1c28d;
	background: linear-gradient(160deg, rgba(255, 252, 246, 0.98) 0%, rgba(255, 242, 223, 0.96) 100%);
	color: #6d4524;
	font-weight: 600;
	padding: 10px 42px 10px 14px;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image:
		linear-gradient(160deg, rgba(255, 252, 246, 0.98) 0%, rgba(255, 242, 223, 0.96) 100%),
		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='%23c56f08' 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: 0 8px 18px rgba(179, 98, 16, 0.1);
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		color 0.2s ease;
}

#sort-select:hover {
	border-color: #ffab45;
	box-shadow: 0 10px 22px rgba(179, 98, 16, 0.14);
}

#sort-select:focus {
	outline: none;
	border-color: #ff9a1a;
	box-shadow:
		0 0 0 3px rgba(255, 140, 0, 0.16),
		0 12px 24px rgba(179, 98, 16, 0.14);
}

.shop-filter-toggle {
	border-radius: 999px;
	padding: 8px 16px;
	font-weight: 600;
	border: 1px solid var(--border-color);
	background: #fffaf2;
	color: #8f5b29;
	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: #ffab45;
	color: #c56f08;
	background: #fff5e8;
	box-shadow: 0 8px 18px rgba(179, 98, 16, 0.1);
}

.shop-filter-toggle:focus-visible {
	outline: none;
	border-color: #ff9a1a;
	box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.16);
}

/* Shop Content */
.product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
}
.shop-content .product-card {
	--product-card-height: 440px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 100%;
	min-height: 430px;
}
.shop-content .product-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	margin-top: 4px;
}
.shop-content .product-info h3 {
	-webkit-line-clamp: 2;
}
.shop-content .product-desc {
	width: 100%;
	-webkit-line-clamp: 2;
}
.shop-content .product-img-wrap {
	height: 220px;
	aspect-ratio: auto;
	background: var(--surface-color);
	border: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: center;
}
.shop-content .product-img-wrap a {
	display: inline-block;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding: 12px;
}
.shop-content .product-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.shop-content .price {
	margin-top: 8px;
	margin-bottom: 12px;
}

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

@media (min-width: 900px) {
	.product-grid {
		grid-template-columns: repeat(3, minmax(280px, 1fr));
	}
}
@media (min-width: 1200px) {
	.product-grid {
		grid-template-columns: repeat(4, minmax(280px, 1fr));
	}
}
