/*
 * Her Agency — Product Category Archive Styles
 *
 * Depends on shop.css being loaded first (for .her-btn, .her-shop-newsletter,
 * and .her-benefits-strip shared classes).
 *
 * Brand tokens (re-declared here since shop.css scopes them to #her-shop-page):
 *   --her-dark:     #2b2b2b
 *   --her-accent:   #8b7355
 *   --her-light-bg: #f9f7f4
 *   --her-border:   #e0dbd3
 *   --her-text:     #555
 *   --her-muted:    #888
 */

/* ── Scope / Reset ─────────────────────────────────────────────────────────── */

#her-cat-page {
	--her-dark:     #2b2b2b;
	--her-accent:   #8b7355;
	--her-light-bg: #f9f7f4;
	--her-border:   #e0dbd3;
	--her-text:     #555;
	--her-muted:    #888;

	font-family: 'Public Sans', sans-serif;
	color: var(--her-dark);
	line-height: 1.6;
}

#her-cat-page *,
#her-cat-page *::before,
#her-cat-page *::after {
	box-sizing: border-box;
}

#her-cat-page img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Shared button styles — mirrors shop.css so they work here too */
#her-cat-page .her-btn {
	display: inline-block;
	font-family: 'Montserrat', 'Public Sans', sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 12px 28px;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	line-height: 1;
	border: 2px solid transparent;
}

#her-cat-page .her-btn--outline-dark {
	background-color: transparent;
	color: var(--her-dark);
	border-color: var(--her-dark);
}

#her-cat-page .her-btn--outline-dark:hover {
	background-color: var(--her-dark);
	color: #fff;
}

#her-cat-page .her-btn--solid {
	background-color: var(--her-dark);
	color: #fff;
	border-color: var(--her-dark);
}

#her-cat-page .her-btn--solid:hover {
	background-color: var(--her-accent);
	border-color: var(--her-accent);
}

#her-cat-page .her-btn--small {
	padding: 10px 20px;
	font-size: 0.7rem;
}

/* ── 1. HERO ───────────────────────────────────────────────────────────────── */

.her-cat-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 340px;
	background-color: var(--her-dark);
	background-image: var(--her-cat-hero-bg);
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	color: #fff;
}

.her-cat-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.72) 0%,
		rgba(0, 0, 0, 0.35) 50%,
		rgba(0, 0, 0, 0.1) 100%
	);
	z-index: 1;
}

.her-cat-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 40px 48px;
}

/* Breadcrumb */
.her-cat-breadcrumb {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	font-family: 'Public Sans', sans-serif;
	font-size: 0.78rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.75);
	margin-bottom: 14px;
}

.her-cat-breadcrumb a {
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
	transition: color 0.15s ease;
}

.her-cat-breadcrumb a:hover {
	color: #fff;
}

.her-cat-breadcrumb span {
	color: rgba(255, 255, 255, 0.5);
}

/* Heading */
.her-cat-hero__heading {
	font-family: 'Cormorant Garamond', 'Georgia', serif;
	font-size: clamp(2.2rem, 5vw, 3.8rem);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 16px;
	line-height: 1.05;
}

/* Description */
.her-cat-hero__desc {
	font-family: 'Public Sans', sans-serif;
	font-size: 0.92rem;
	font-weight: 300;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
	max-width: 660px;
	line-height: 1.7;
}

/* ── Mobile filter bar ─────────────────────────────────────────────────────── */

.her-cat-mobile-bar {
	display: none; /* shown only on mobile via media query */
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background-color: #fff;
	border-bottom: 1px solid var(--her-border);
}

.her-cat-mobile-filter-btn {
	font-family: 'Montserrat', 'Public Sans', sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--her-dark);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

.her-cat-mobile-clear {
	font-family: 'Montserrat', 'Public Sans', sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--her-accent);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

/* ── 2. BODY (two-column layout) ───────────────────────────────────────────── */

.her-cat-body {
	display: grid;
	grid-template-columns: 220px 1fr;
	align-items: start;
	max-width: 1280px;
	margin: 0 auto;
	padding: 48px 40px 80px;
	gap: 48px;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */

.her-cat-sidebar {
	position: sticky;
	top: 24px;
}

.her-cat-sidebar__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 6px;
}

.her-cat-sidebar__label {
	font-family: 'Montserrat', 'Public Sans', sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--her-dark);
}

.her-cat-sidebar__clear {
	font-family: 'Montserrat', 'Public Sans', sans-serif;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--her-accent);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 1px;
	transition: color 0.15s ease;
}

.her-cat-sidebar__clear:hover {
	color: var(--her-dark);
}

.her-cat-sidebar__count {
	font-family: 'Public Sans', sans-serif;
	font-size: 0.8rem;
	color: var(--her-muted);
	margin: 0 0 24px;
}

/* Filter form */
.her-cat-filters {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Filter group */
.her-cat-filter-group {
	border-top: 1px solid var(--her-border);
	padding: 0;
}

.her-cat-filter-group:last-of-type {
	border-bottom: 1px solid var(--her-border);
	margin-bottom: 24px;
}

.her-cat-filter-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: none;
	border: none;
	cursor: pointer;
	padding: 14px 0;
	text-align: left;
	font-family: 'Montserrat', 'Public Sans', sans-serif;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--her-dark);
}

.her-cat-filter-icon {
	font-size: 1rem;
	font-weight: 300;
	line-height: 1;
	color: var(--her-muted);
	flex-shrink: 0;
}

/* Filter body — hidden when group does NOT have .is-open */
.her-cat-filter-body {
	display: none;
	padding-bottom: 16px;
}

.her-cat-filter-group.is-open .her-cat-filter-body {
	display: block;
}

/* Radio options */
.her-cat-filter-option {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: 'Public Sans', sans-serif;
	font-size: 0.85rem;
	color: var(--her-text);
	cursor: pointer;
	margin-bottom: 10px;
	line-height: 1.4;
}

.her-cat-filter-option:last-child {
	margin-bottom: 0;
}

.her-cat-filter-option input[type="radio"] {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	accent-color: var(--her-dark);
}

/* Price range */
.her-cat-price-range {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.her-cat-price-field {
	display: flex;
	align-items: center;
	border: 1px solid var(--her-border);
	background: #fff;
	overflow: hidden;
}

.her-cat-price-sym {
	padding: 8px 10px;
	font-size: 0.85rem;
	color: var(--her-muted);
	background: var(--her-light-bg);
	border-right: 1px solid var(--her-border);
	line-height: 1;
	flex-shrink: 0;
}

.her-cat-price-field input {
	flex: 1;
	border: none;
	padding: 8px 10px;
	font-family: 'Public Sans', sans-serif;
	font-size: 0.85rem;
	color: var(--her-dark);
	background: #fff;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	min-width: 0;
}

.her-cat-price-field input::placeholder {
	color: var(--her-muted);
}

/* Apply button */
.her-cat-filter-submit {
	width: 100%;
	text-align: center;
	justify-content: center;
}

/* ── Main area ─────────────────────────────────────────────────────────────── */

.her-cat-main {
	min-width: 0;
}

/* Toolbar */
.her-cat-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-bottom: 32px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--her-border);
}

.her-cat-sort-form {
	display: flex;
	align-items: center;
	gap: 10px;
}

.her-cat-sort-label {
	font-family: 'Public Sans', sans-serif;
	font-size: 0.85rem;
	color: var(--her-text);
	white-space: nowrap;
}

.her-cat-sort-select {
	font-family: 'Public Sans', sans-serif;
	font-size: 0.85rem;
	color: var(--her-dark);
	border: 1px solid var(--her-border);
	background: #fff;
	padding: 6px 28px 6px 10px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232b2b2b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	cursor: pointer;
	outline: none;
}

.her-cat-sort-select:focus {
	border-color: var(--her-accent);
}

/* ── Sub-category group ────────────────────────────────────────────────────── */

.her-cat-subgroup {
	margin-bottom: 48px;
}

.her-cat-subgroup:last-child {
	margin-bottom: 0;
}

.her-cat-subgroup__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 20px;
	gap: 16px;
	flex-wrap: wrap;
}

.her-cat-subgroup__name {
	font-family: 'Cormorant Garamond', 'Georgia', serif;
	font-size: clamp(1.4rem, 2.5vw, 1.9rem);
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--her-dark);
	margin: 0;
	line-height: 1.1;
}

.her-cat-subgroup__viewall {
	font-family: 'Montserrat', 'Public Sans', sans-serif;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--her-dark);
	text-decoration: none;
	background-color: var(--her-dark);
	color: #fff;
	padding: 9px 18px;
	transition: background-color 0.2s ease;
	white-space: nowrap;
}

.her-cat-subgroup__viewall:hover {
	background-color: var(--her-accent);
}

/* ── Product row (4-up, scrollable if overflow) ────────────────────────────── */

.her-cat-product-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

/* ── Product grid (no sub-cats, paginated) ─────────────────────────────────── */

.her-cat-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px 20px;
	margin-bottom: 40px;
}

/* ── Product card ──────────────────────────────────────────────────────────── */

.her-cat-card {
	display: flex;
	flex-direction: column;
}

.her-cat-card__img-wrap {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background-color: var(--her-border);
	text-decoration: none;
	margin-bottom: 12px;
}

.her-cat-card__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.her-cat-card__img-wrap:hover img {
	transform: scale(1.04);
}

/* Quick view overlay */
.her-cat-card__quick-view {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.42);
	font-family: 'Montserrat', 'Public Sans', sans-serif;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.her-cat-card__img-wrap:hover .her-cat-card__quick-view {
	opacity: 1;
}

/* Card info */
.her-cat-card__info {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.her-cat-card__name {
	font-family: 'Montserrat', 'Public Sans', sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--her-dark);
	margin: 0;
	line-height: 1.3;
}

.her-cat-card__desc {
	font-family: 'Public Sans', sans-serif;
	font-size: 0.82rem;
	font-weight: 300;
	color: var(--her-text);
	margin: 0;
	line-height: 1.5;
	/* Clamp to 2 lines */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.her-cat-card__price {
	font-family: 'Public Sans', sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--her-dark);
	margin-top: 2px;
}

/* WooCommerce price: sale price + original price */
.her-cat-card__price .price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
}

.her-cat-card__price .price ins {
	text-decoration: none;
	font-weight: 700;
	color: var(--her-dark);
}

.her-cat-card__price .price del {
	font-size: 0.82rem;
	font-weight: 400;
	color: var(--her-muted);
	opacity: 1;
}

.her-cat-card__price .price del .woocommerce-Price-amount {
	color: var(--her-muted);
}

/* ── Pagination ────────────────────────────────────────────────────────────── */

.her-cat-pagination {
	display: flex;
	justify-content: center;
	margin-top: 48px;
}

.her-cat-pagination .page-numbers {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

.her-cat-pagination .page-numbers li {
	display: flex;
}

.her-cat-pagination .page-numbers a,
.her-cat-pagination .page-numbers span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	font-family: 'Public Sans', sans-serif;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--her-dark);
	text-decoration: none;
	border: 1px solid var(--her-border);
	background: #fff;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.her-cat-pagination .page-numbers a:hover {
	background-color: var(--her-dark);
	border-color: var(--her-dark);
	color: #fff;
}

.her-cat-pagination .page-numbers .current {
	background-color: var(--her-dark);
	border-color: var(--her-dark);
	color: #fff;
}

.her-cat-pagination .page-numbers .prev,
.her-cat-pagination .page-numbers .next {
	font-size: 1rem;
	font-weight: 300;
}

/* ── Empty state ───────────────────────────────────────────────────────────── */

.her-cat-empty {
	font-family: 'Public Sans', sans-serif;
	font-size: 0.95rem;
	color: var(--her-muted);
	padding: 40px 0;
}

/* ── Newsletter — re-scope tokens so shop.css classes work inside #her-cat-page ─ */

#her-cat-page .her-shop-newsletter {
	--her-dark: #2b2b2b;
	--her-accent: #8b7355;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

/* Tablet: 3-column product rows */
@media (max-width: 1100px) {
	.her-cat-body {
		grid-template-columns: 200px 1fr;
		gap: 32px;
		padding: 40px 24px 64px;
	}

	.her-cat-product-row,
	.her-cat-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Narrow tablet: 2-column */
@media (max-width: 900px) {
	.her-cat-body {
		grid-template-columns: 180px 1fr;
		gap: 24px;
		padding: 32px 20px 56px;
	}

	.her-cat-product-row,
	.her-cat-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile */
@media (max-width: 768px) {

	/* Hero */
	.her-cat-hero {
		min-height: 260px;
		align-items: flex-end;
	}

	.her-cat-hero__inner {
		padding: 24px 20px 32px;
	}

	.her-cat-hero__heading {
		font-size: 2rem;
	}

	/* Show mobile filter bar */
	.her-cat-mobile-bar {
		display: flex;
	}

	/* Collapse body to single column */
	.her-cat-body {
		display: block;
		padding: 0 20px 56px;
	}

	/* Sidebar: hidden by default, shown when .is-open */
	.her-cat-sidebar {
		position: static;
		display: none;
		border-bottom: 1px solid var(--her-border);
		padding: 24px 0;
		margin-bottom: 0;
	}

	.her-cat-sidebar.is-open {
		display: block;
	}

	.her-cat-main {
		padding-top: 24px;
	}

	/* 2-column product grid on mobile */
	.her-cat-product-row,
	.her-cat-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px 12px;
	}

	.her-cat-subgroup {
		margin-bottom: 36px;
	}

	.her-cat-subgroup__name {
		font-size: 1.3rem;
	}

	.her-cat-subgroup__viewall {
		font-size: 0.65rem;
		padding: 8px 14px;
	}

	.her-cat-toolbar {
		margin-bottom: 20px;
	}

	.her-cat-card__img-wrap {
		aspect-ratio: 1 / 1;
	}
}

@media (max-width: 480px) {
	.her-cat-hero__heading {
		font-size: 1.7rem;
	}

	.her-cat-product-row,
	.her-cat-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px 10px;
	}

	.her-cat-card__name {
		font-size: 0.68rem;
	}

	.her-cat-card__desc {
		font-size: 0.78rem;
	}
}
