/**
 * Hair Hub Product Archive — Phase 3 Step 2 Rev.3 Final.
 * Filter: manufacturer / category / price. Sort: new / rating / reviews / price.
 * Shared Standard Product Card remains authoritative and is only reshaped archive-locally on narrow screens.
 */
.hh-product-archive {
	--hh-archive-primary: #14b8a6;
	--hh-archive-primary-dark: #0f8f89;
	--hh-archive-text: #263638;
	--hh-archive-muted: #647476;
	--hh-archive-border: #dce9e9;
	--hh-archive-soft: #f6fbfb;
	background: #fff;
	color: var(--hh-archive-text);
}

/*
 * Rev.2: SWELL may place archive templates inside a left-aligned content column.
 * On desktop, let the Hair Hub archive span the viewport so its 1180px inner
 * container is centered against the browser window rather than that column.
 * Mobile/tablet behavior remains unchanged.
 */
@media (min-width: 901px) {
	.hh-product-archive {
		width: 100vw;
		max-width: none;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
	}
}

.hh-product-archive__inner {
	width: min(1180px, calc(100% - 32px));
	margin: 0 auto;
	padding: clamp(.65rem, 1.4vw, 1.15rem) 0 clamp(3rem, 7vw, 6rem);
}

.hh-product-archive__header {
	max-width: 760px;
	margin: 0 auto clamp(1.25rem, 2.8vw, 2rem);
	text-align: center;
}

.hh-product-archive__eyebrow { margin: 0 0 .4rem; color: var(--hh-archive-primary-dark); font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.hh-product-archive__title { margin: 0; color: var(--hh-archive-text); font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.25; }
.hh-product-archive__title::after { content: ''; display: block; width: 52px; height: 4px; margin: .7rem auto 0; border-radius: 999px; background: linear-gradient(90deg, #36c7ba, var(--hh-archive-primary-dark)); }
.hh-product-archive__lead { margin: .8rem auto 0; color: var(--hh-archive-muted); font-size: .95rem; line-height: 1.8; }

.hh-product-filter { margin-bottom: 1.55rem; }
.hh-product-filter__desktop {
	display: grid;
	grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
	gap: .8rem;
	align-items: end;
	padding: 1rem 1.1rem;
	border: 1px solid #cbe9eb;
	border-radius: 16px;
	background: linear-gradient(180deg, #f4fcfd 0%, #eefafa 100%);
	box-shadow: 0 10px 28px rgba(15, 143, 137, .08);
}
.hh-product-filter__field { min-width: 0; }
.hh-product-filter__field label { display: block; margin-bottom: .38rem; color: #34484a; font-size: .76rem; font-weight: 800; }
.hh-product-filter__field select,
.hh-product-filter__mobile-sort select {
	width: 100%;
	height: 44px;
	box-sizing: border-box;
	padding: 0 2.35rem 0 .8rem;
	border: 1px solid #d7e4e4;
	border-radius: 10px;
	background: #fff;
	color: #334547;
	font-size: .86rem;
}
.hh-product-filter__field select:focus-visible,
.hh-product-filter__mobile-sort select:focus-visible,
.hh-product-filter__open:focus-visible,
.hh-product-filter__submit:focus-visible,
.hh-product-filter__apply:focus-visible,
.hh-product-filter__panel-reset:focus-visible {
	outline: 3px solid rgba(20, 184, 166, .22);
	outline-offset: 2px;
}
.hh-product-filter__submit {
	height: 44px;
	padding: 0 1rem;
	border: 0;
	border-radius: 10px;
	background: var(--hh-archive-primary-dark);
	color: #fff;
	font-size: .82rem;
	font-weight: 800;
	cursor: pointer;
}
.hh-product-filter__summary {
	grid-column: 1 / -1;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 1rem;
	margin-top: .1rem;
	padding-top: .75rem;
	border-top: 0;
	font-size: .82rem;
}
.hh-product-filter__count { color: #47595b; font-weight: 700; }
.hh-product-filter__reset,
.hh-product-filter__mobile-summary a { display: inline-flex; align-items: center; gap: .3rem; color: var(--hh-archive-primary-dark); font-weight: 800; text-decoration: none; }
.hh-product-filter__mobile-toolbar,
.hh-product-filter__mobile-summary,
.hh-product-filter__drawer { display: none; }

.hh-product-archive__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; align-items: stretch; }
.hh-product-archive__grid > .hh-standard-product-card__whole-link { height: 100%; }
.hh-product-archive__grid .hh-standard-product-card { height: 100%; box-sizing: border-box; }
.hh-product-archive__grid > .hh-standard-product-card__whole-link:only-child {
	width: 100%;
	max-width: 840px;
	margin-inline: auto;
	grid-column: 1 / -1;
}


/* 2026-08-22: adopted reference-price row for Product Archive Standard Cards. */
.hh-product-archive__grid .hh-standard-product-card__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .18rem .35rem;
	margin: .6rem 0 0;
	color: var(--hh-archive-text);
	line-height: 1.35;
}
.hh-product-archive__grid .hh-standard-product-card__price-label {
	color: var(--hh-archive-text);
	font-size: .72rem;
	font-weight: 700;
}
.hh-product-archive__grid .hh-standard-product-card__price-amount {
	color: var(--hh-archive-primary-dark);
	font-size: 1.18rem;
	font-weight: 800;
	letter-spacing: .01em;
}
.hh-product-archive__grid .hh-standard-product-card__price-tax {
	color: var(--hh-archive-muted);
	font-size: .7rem;
	font-weight: 600;
}

.hh-product-archive__pagination { margin-top: clamp(2rem, 5vw, 3.5rem); }
.hh-product-archive__pagination .page-numbers { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.hh-product-archive__pagination .page-numbers li { margin: 0; }
/* Keep SWELL's page-number hover off the non-interactive list background. */
.hh-product-archive__pagination > ul.page-numbers:hover { background-color: #dedede; }
.hh-product-archive__pagination a.page-numbers,
.hh-product-archive__pagination span.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 .8rem; border: 1px solid var(--hh-archive-border); border-radius: 999px; background: #fff; color: #425456; font-size: .86rem; font-weight: 700; line-height: 1; text-decoration: none; }
.hh-product-archive__pagination a.page-numbers:hover,
.hh-product-archive__pagination a.page-numbers:focus-visible,
.hh-product-archive__pagination span.page-numbers.current { border-color: var(--hh-archive-primary); background: var(--hh-archive-primary); color: #fff; }
.hh-product-archive__pagination a.page-numbers:focus-visible { outline: 3px solid rgba(20, 184, 166, .25); outline-offset: 2px; }

.hh-product-archive__empty { padding: 2.5rem 1.25rem; border: 1px solid var(--hh-archive-border); border-radius: 16px; background: #f8fbfb; text-align: center; }
.hh-product-archive__empty h2 { margin: 0; font-size: 1.2rem; }
.hh-product-archive__empty p { margin: .65rem 0 0; color: var(--hh-archive-muted); }
.hh-product-archive__empty-reset { display: inline-flex; margin-top: 1rem; padding: .7rem 1rem; border-radius: 10px; background: var(--hh-archive-primary-dark); color: #fff; font-weight: 800; text-decoration: none; }

@media (max-width: 900px) {
	.hh-product-filter__desktop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hh-product-filter__submit { align-self: end; }
	.hh-product-archive__grid { grid-template-columns: 1fr; }
}

@media (max-width: 699px) {
	.hh-product-archive__inner { width: min(100% - 24px, 1180px); padding-top: 1.5rem; }
	.hh-product-archive__header { text-align: left; margin-bottom: 1.25rem; }
	.hh-product-archive__title::after { margin-left: 0; }
	.hh-product-archive__lead { font-size: .9rem; line-height: 1.8; }
	.hh-product-filter { margin-bottom: 1rem; }
	.hh-product-filter__desktop { display: none; }
	.hh-product-filter__mobile-toolbar { display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); gap: .65rem; }
	.hh-product-filter__mobile-sort { position: relative; }
	.hh-product-filter__mobile-sort::before { content: "並び順:"; position: absolute; z-index: 1; top: 50%; left: .8rem; transform: translateY(-50%); color: #284143; font-size: .74rem; font-weight: 800; pointer-events: none; }
	.hh-product-filter__mobile-sort select { padding-left: 3.65rem; padding-right: 1.9rem; }
	.hh-product-filter__open,
	.hh-product-filter__mobile-sort select { height: 44px; border: 1px solid #cbdede; border-radius: 10px; background: #fff; color: #284143; font-size: .78rem; font-weight: 800; }
	.hh-product-filter__open { display: inline-flex; justify-content: center; align-items: center; gap: .45rem; cursor: pointer; }
	.hh-product-filter__mobile-summary { display: flex; justify-content: space-between; align-items: center; margin-top: .65rem; padding: 0 .1rem; color: #536466; font-size: .76rem; }
	.hh-product-filter__drawer[hidden] { display: none !important; }
	.hh-product-filter__drawer { display: block; position: fixed; inset: 0; z-index: 999999; }
	.hh-product-filter__backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(20, 37, 38, .38); cursor: pointer; }
	.hh-product-filter__panel { position: absolute; right: 0; bottom: 0; left: 0; max-height: min(78vh, 620px); overflow: auto; padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); border-radius: 18px 18px 0 0; background: #fff; box-shadow: 0 -14px 40px rgba(20, 45, 46, .18); }
	.hh-product-filter__panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
	.hh-product-filter__panel-head h2 { margin: 0; font-size: 1rem; }
	.hh-product-filter__close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f3f7f7; color: #394d4f; font-size: 1.35rem; cursor: pointer; }
	.hh-product-filter__panel form { display: grid; gap: .8rem; }
	.hh-product-filter__panel .hh-product-filter__field label { font-size: .75rem; }
	.hh-product-filter__panel-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; margin-top: .25rem; }
	.hh-product-filter__apply,
	.hh-product-filter__panel-reset { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box; border-radius: 10px; font-size: .8rem; font-weight: 800; }
	.hh-product-filter__apply { border: 0; background: var(--hh-archive-primary-dark); color: #fff; cursor: pointer; }
	.hh-product-filter__panel-reset { padding: 0 1rem; border: 1px solid #d7e4e4; background: #fff; color: var(--hh-archive-primary-dark); text-decoration: none; }
	.hh-filter-is-open { overflow: hidden; }
	/* Rev.1: keep SWELL page-top control out of the filter dialog. */
	html.hh-filter-is-open #pagetop {
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}
	.hh-product-archive__pagination a.page-numbers,
	.hh-product-archive__pagination span.page-numbers { min-width: 40px; height: 40px; padding: 0 .7rem; }
}

@media (max-width: 480px) {
	.hh-product-archive__inner { width: min(100% - 20px, 1180px); padding-top: 1.25rem; }
	.hh-product-archive__header { margin-bottom: 1.15rem; }
	.hh-product-archive__eyebrow { font-size: .68rem; letter-spacing: .1em; }
	.hh-product-archive__title { font-size: 1.72rem; }
	.hh-product-archive__lead { margin-top: .85rem; font-size: .88rem; line-height: 1.75; }
	.hh-product-archive__grid .hh-standard-product-card { grid-template-columns: minmax(0, 1fr); gap: .8rem; padding: .9rem; align-items: stretch; }
	.hh-product-archive__grid .hh-standard-product-card__media { width: 7.25rem; max-width: 100%; margin-inline: auto; }
	.hh-product-archive__grid .hh-standard-product-card__body { width: 100%; }
	.hh-product-archive__grid .hh-standard-product-card__eyebrow,
	.hh-product-archive__grid .hh-standard-product-card__tags,
	.hh-product-archive__grid .hh-standard-product-card__review { justify-content: center; }
	.hh-product-archive__grid .hh-standard-product-card__title { font-size: 1rem; line-height: 1.55; text-align: center; overflow-wrap: anywhere; }
	.hh-product-archive__grid .hh-standard-product-card__review { gap: .3rem .4rem; font-size: .72rem; }
	.hh-product-archive__grid .hh-standard-product-card__price { justify-content: center; margin-top: .55rem; }
	.hh-product-archive__grid .hh-standard-product-card__excerpt { font-size: .78rem; line-height: 1.7; }
	.hh-product-archive__grid .hh-standard-product-card__action { margin-top: .8rem; }
	.hh-product-archive__grid .hh-standard-product-card__button { width: 100%; min-width: 0; box-sizing: border-box; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.hh-product-archive__pagination a.page-numbers { scroll-behavior: auto; }
}
