/**
 * J Martin Skincare — Shop page styles
 */

.jmartin-shop-hero {
	position: relative;
	min-height: 280px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: url("../images/hero-shop-leaf.jpg") center/cover no-repeat;
}

.jmartin-shop-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.2);
}

.jmartin-shop-hero h1 {
	position: relative;
	z-index: 1;
	color: var(--jmartin-white);
	font-size: clamp(2.5rem, 6vw, 4rem);
	margin: 0;
}

.jmartin-shop-toolbar {
	background: var(--jmartin-beige);
	padding: 1.25rem 1rem;
}

.jmartin-shop-toolbar .jmartin-container {
	max-width: var(--jmartin-wide);
	margin-inline: auto;
}

.jmartin-shop-categories {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.5rem;
	overflow-x: auto;
	padding-bottom: 1rem;
	scrollbar-width: none;
}

.jmartin-shop-categories::-webkit-scrollbar {
	display: none;
}

.jmartin-category-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.5rem 1.25rem;
	border-radius: 999px;
	background: var(--jmartin-cream);
	color: var(--jmartin-olive-dark);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	border: 1px solid transparent;
	transition: all 0.2s ease;
}

.jmartin-category-pill:hover {
	opacity: 1;
	background: #e8e4dc;
}

.jmartin-category-pill.is-active {
	background: var(--jmartin-olive-dark);
	color: var(--jmartin-white);
}

.jmartin-category-pill__close {
	font-size: 1rem;
	line-height: 1;
}

.jmartin-shop-search-row {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.jmartin-shop-search {
	flex: 1;
	position: relative;
	display: flex;
	align-items: center;
}

.jmartin-shop-search__icon {
	position: absolute;
	left: 1rem;
	color: var(--jmartin-olive-dark);
	opacity: 0.5;
}

.jmartin-shop-search input {
	width: 100%;
	padding: 0.75rem 1rem 0.75rem 2.5rem;
	background: var(--jmartin-input-beige);
	border: none;
	border-radius: 999px;
	font-family: var(--jmartin-font-body);
	font-size: 0.9rem;
	outline: none;
}

.jmartin-shop-filter-btn {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--jmartin-input-beige);
	border: none;
	border-radius: var(--jmartin-radius-sm);
	color: var(--jmartin-olive-dark);
	cursor: pointer;
}

.jmartin-shop-content {
	padding: 2rem 1rem 4rem;
	background: var(--jmartin-cream);
}

.jmartin-shop-content .jmartin-container {
	max-width: var(--jmartin-wide);
	margin-inline: auto;
}

.jmartin-products-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.jmartin-product-card {
	text-align: center;
}

.jmartin-product-card__link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.jmartin-product-card__image {
	background: var(--jmartin-beige);
	border-radius: var(--jmartin-radius-md);
	padding: 1.5rem;
	margin-bottom: 0.75rem;
	overflow: hidden;
}

.jmartin-product-card__image img {
	width: 100%;
	height: auto;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.jmartin-product-card__link:hover .jmartin-product-card__image img {
	transform: scale(1.05);
}

.jmartin-product-card__title {
	font-family: var(--jmartin-font-body);
	font-size: 0.85rem;
	font-weight: 700;
	margin: 0 0 0.25rem;
	color: var(--jmartin-text);
}

.jmartin-product-card__price {
	font-size: 0.9rem;
	color: var(--jmartin-text-muted);
}

.jmartin-product-card__price .woocommerce-Price-amount {
	color: var(--jmartin-text-muted);
}

/* Filter modal */
.jmartin-filter-modal {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.jmartin-filter-modal[hidden] {
	display: none;
}

.jmartin-filter-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
}

.jmartin-filter-modal__panel {
	position: relative;
	background: #dfd3c3;
	border-radius: var(--jmartin-radius-md);
	padding: 1.5rem;
	width: min(100%, 360px);
	max-height: 90vh;
	overflow-y: auto;
}

.jmartin-filter-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

.jmartin-filter-modal__header h2 {
	font-family: var(--jmartin-font-body);
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0;
	color: #1a2e1a;
}

.jmartin-filter-modal__close {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: #1a2e1a;
	line-height: 1;
}

.jmartin-filter-option {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
	cursor: pointer;
	color: #1a2e1a;
	font-size: 0.9rem;
}

.jmartin-filter-option input[type="radio"] {
	appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #1a2e1a;
	border-radius: 50%;
	position: relative;
	flex-shrink: 0;
	cursor: pointer;
}

.jmartin-filter-option input[type="radio"]:checked::after {
	content: "";
	position: absolute;
	inset: 3px;
	background: #1a2e1a;
	border-radius: 50%;
}

.jmartin-filter-submit {
	display: none;
}

.woocommerce-result-count,
.woocommerce-ordering {
	display: none !important;
}

@media (min-width: 768px) {
	.jmartin-products-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1024px) {
	.jmartin-products-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.jmartin-shop-toolbar {
		padding: 1.5rem 2rem;
	}
}
