/* ==========================================================================
   Galleria De Rings: collection pages (shop, product categories, search)
   1. Header: breadcrumb at the left, then the serif title and one line of
      text centred, on white.
   2. Toolbar: pill filter dropdowns, result count + sort on a hairline row,
      removable chips for chosen filters.
   3. Grid of the home page product cards (3 / 3 / 2 per row), with an
      uploaded banner as a full-width row after the sixth card.
   4. "View more": progress line + outline pill; next page loads in place.
   5. "Shop other collections": title between hairlines, 3 category tiles.
   Navy #0B132A, white, warm off-white #F7F5F1. No gold, no ornaments, and
   photos never zoom (motion is fade / rise / curtain only).
   Markup: template-parts/shop/*.php. PHP: inc/shop-archive.php.
   ========================================================================== */

.shop-page {
	--shop-line: #e3e5ec;
	--shop-border: rgba(11, 19, 42, 0.2);
	--shop-muted: #5c6070;
	--shop-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--shop-radius: 14px;

	color: var(--g-navy);
}

/* The collection page sits flush under the header. */
.is-collection .site-main {
	padding-block: 0;
}

/* ---------- 1. Header ---------- */
.shop-hero {
	padding-top: clamp(14px, 1.6vw, 20px);
	text-align: center;
}

.shop-hero__crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	color: var(--shop-muted);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-align: left;
	text-transform: uppercase;
}

.shop-hero__crumbs a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.shop-hero__crumbs a:hover,
.shop-hero__crumbs a:focus-visible {
	color: var(--g-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.shop-hero__sep {
	opacity: 0.5;
}

.shop-hero__inner {
	max-width: 720px;
	margin-inline: auto;
	padding-block: clamp(6px, 1vw, 14px) 0;
}

.shop-hero__title {
	margin: 0;
	font-size: clamp(36px, 4.4vw, 58px);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.shop-hero__desc {
	max-width: 560px;
	margin: 8px auto 0;
	color: var(--shop-muted);
	font-size: clamp(15px, 1.15vw, 17px);
	line-height: 1.6;
	text-wrap: pretty;
}

.shop-hero__desc p {
	margin: 0;
}

/* ---------- 2. Toolbar ---------- */
.shop-body {
	padding-top: clamp(18px, 2vw, 28px);
}

.shop-toolbar {
	margin-bottom: clamp(24px, 3vw, 36px);
}

.shop-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
}

.shop-filter {
	position: relative;
}

.shop-filter__toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 16px 0 20px;
	border: 1px solid var(--shop-border);
	border-radius: 999px;
	background: var(--g-white);
	color: var(--g-navy);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	list-style: none;
	cursor: pointer;
	user-select: none;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.shop-filter__toggle::-webkit-details-marker {
	display: none;
}

.shop-filter__toggle:hover,
.shop-filter[open] .shop-filter__toggle {
	border-color: var(--g-navy);
}

.shop-filter.is-active .shop-filter__toggle {
	border-color: var(--g-navy);
	background: var(--g-navy);
	color: var(--g-white);
}

.shop-filter__chev {
	width: 12px;
	height: 12px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.25s var(--shop-ease);
}

.shop-filter[open] .shop-filter__chev {
	transform: rotate(180deg);
}

.shop-filter__menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 20;
	min-width: 240px;
	max-height: min(360px, 60vh);
	margin: 0;
	padding: 8px;
	overflow-y: auto;
	border: 1px solid var(--shop-line);
	border-radius: 12px;
	background: var(--g-white);
	box-shadow: 0 18px 40px -18px rgba(11, 19, 42, 0.35);
	list-style: none;
	animation: shop-menu-in 0.22s var(--shop-ease);
}

@keyframes shop-menu-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
}

.shop-filter__option {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--g-navy);
	font-size: 15px;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.shop-filter__option:hover,
.shop-filter__option:focus-visible {
	background: var(--g-cream);
	color: var(--g-navy);
}

.shop-filter__check {
	position: relative;
	flex: none;
	width: 18px;
	height: 18px;
	border: 1px solid var(--shop-border);
	border-radius: 50%;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.shop-filter__option.is-selected {
	font-weight: 600;
}

.shop-filter__option.is-selected .shop-filter__check {
	border-color: var(--g-navy);
	background: var(--g-navy);
}

.shop-filter__option.is-selected .shop-filter__check::after {
	position: absolute;
	top: 4px;
	left: 6px;
	width: 4px;
	height: 7px;
	border: solid var(--g-white);
	border-width: 0 1.5px 1.5px 0;
	content: "";
	transform: rotate(45deg);
}

/* Count + sort */
.shop-toolbar__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 24px;
	padding-block: 12px;
	border-block: 1px solid var(--shop-line);
}

.shop-count {
	margin: 0;
	color: var(--shop-muted);
	font-size: 15px;
	line-height: 1.4;
}

.shop-count strong {
	color: var(--g-navy);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.shop-sort {
	display: flex;
	align-items: center;
	gap: 6px;
}

.shop-sort__label {
	color: var(--shop-muted);
	font-size: 15px;
}

.shop-sort .woocommerce-ordering {
	float: none;
	margin: 0;
}

.shop-sort select.orderby {
	min-height: 44px;
	padding: 0 26px 0 4px;
	border: 0;
	border-radius: 0;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%230b132a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 4px center / 12px;
	color: var(--g-navy);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	appearance: none;
}

.shop-sort select.orderby:focus-visible {
	outline: 2px solid var(--g-navy);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Chosen filters */
.shop-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.shop-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 12px 0 16px;
	border-radius: 999px;
	background: var(--g-cream);
	color: var(--g-navy);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.shop-chip .icon {
	width: 14px;
	height: 14px;
}

.shop-chip:hover,
.shop-chip:focus-visible {
	background: var(--g-navy);
	color: var(--g-white);
}

.shop-chips__clear {
	color: var(--g-navy);
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- 3. Grid ---------- */
.shop-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(32px, 3.4vw, 48px) clamp(14px, 2.2vw, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.shop-grid__item {
	min-width: 0;
	margin: 0;
}

/* Loaded with "View more": soft rise in. */
@media (prefers-reduced-motion: no-preference) {
	.shop-grid__item.is-new {
		animation: shop-item-in 0.7s var(--g-ease-out, ease-out) both;
	}

	.shop-grid__item.is-new:nth-child(3n + 2) { animation-delay: 0.06s; }
	.shop-grid__item.is-new:nth-child(3n) { animation-delay: 0.12s; }
}

@keyframes shop-item-in {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
}

/* Uploaded banner: full-width row inside the grid, shown as uploaded. */
.shop-banner {
	grid-column: 1 / -1;
	margin: clamp(4px, 1vw, 12px) 0;
}

.shop-banner--after {
	margin-top: clamp(48px, 5vw, 72px);
}

.shop-banner__frame {
	display: block;
	overflow: hidden;
	border-radius: var(--shop-radius);
	background: var(--g-cream);
}

.shop-banner__frame picture,
.shop-banner__img {
	display: block;
	width: 100%;
	height: auto;
}

a.shop-banner__frame:focus-visible {
	outline: 2px solid var(--g-navy);
	outline-offset: 3px;
}

/* ---------- 4. View more ---------- */
.shop-more {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	margin-top: clamp(40px, 5vw, 64px);
}

.shop-more__bar {
	width: min(240px, 60%);
	height: 2px;
	overflow: hidden;
	border-radius: 2px;
	background: var(--shop-line);
}

.shop-more__fill {
	display: block;
	width: var(--shop-progress, 0%);
	height: 100%;
	background: var(--g-navy);
	transition: width 0.6s var(--shop-ease);
}

.shop-more__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 220px;
	min-height: 48px;
	padding: 0 32px;
	border: 1px solid var(--g-navy);
	border-radius: 999px;
	color: var(--g-navy);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease, color 0.25s ease, opacity 0.2s ease;
}

.shop-more__btn:hover,
.shop-more__btn:focus-visible {
	background: var(--g-navy);
	color: var(--g-white);
}

.shop-more__btn.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.shop-more__prev {
	color: var(--shop-muted);
	font-size: 14px;
	text-underline-offset: 3px;
}

/* Empty collection / no matches */
.shop-empty {
	max-width: 520px;
	margin: clamp(24px, 4vw, 56px) auto 0;
	padding: clamp(32px, 4vw, 48px) 24px;
	text-align: center;
}

.shop-empty > .icon {
	width: 44px;
	height: 44px;
	margin-bottom: 14px;
	color: var(--g-navy);
	stroke-width: 1;
}

.shop-empty__title {
	margin: 0 0 10px;
	font-size: clamp(26px, 2.6vw, 32px);
}

.shop-empty__text {
	margin: 0 0 24px;
	color: var(--shop-muted);
}

.shop-empty__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 24px;
}

.shop-empty__btn {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 28px;
	border-radius: 999px;
	background: var(--g-navy);
	color: var(--g-white);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease;
}

.shop-empty__btn:hover,
.shop-empty__btn:focus-visible {
	background: var(--g-navy-hover);
	color: var(--g-white);
}

.shop-empty__link {
	font-size: 15px;
	font-weight: 600;
	text-underline-offset: 3px;
}

/* ---------- 5. Shop other collections ---------- */
.shop-other {
	padding-block: clamp(40px, 4.5vw, 64px) clamp(48px, 5.5vw, 80px);
}

.shop-other__title {
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 40px);
	margin: 0 0 clamp(20px, 2.4vw, 32px);
	font-size: clamp(30px, 3.4vw, 44px);
	line-height: 1.1;
	text-align: center;
}

.shop-other__title::before,
.shop-other__title::after {
	flex: 1;
	height: 1px;
	background: var(--shop-line);
	content: "";
}

.shop-other__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(14px, 2.2vw, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.shop-other__item {
	margin: 0;
}

.shop-other__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	color: var(--g-navy);
	text-decoration: none;
}

.shop-other__media {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--shop-radius);
	background: radial-gradient(circle at 50% 45%, #1c2847 0%, #0b132a 70%);
	color: rgba(255, 255, 255, 0.35);
}

.shop-other__media::after {
	position: absolute;
	inset: 0;
	border: 1px solid transparent;
	border-radius: inherit;
	content: "";
	pointer-events: none;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.shop-other__card:hover .shop-other__media::after,
.shop-other__card:focus-visible .shop-other__media::after {
	border-color: rgba(255, 255, 255, 0.35);
	box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.06);
}

.shop-other__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.shop-other__img--cutout {
	padding: 14%;
	object-fit: contain;
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.shop-other__media .icon {
	width: 30%;
	height: 30%;
	stroke-width: 0.8;
}

.shop-other__name {
	font-family: var(--g-font-heading);
	font-size: clamp(19px, 1.6vw, 23px);
	line-height: 1.2;
	text-align: center;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
	transition: text-decoration-color 0.25s ease;
}

.shop-other__card:hover .shop-other__name,
.shop-other__card:focus-visible .shop-other__name {
	text-decoration-color: currentColor;
}

.shop-other__card:focus-visible {
	outline: none;
}

.shop-other__card:focus-visible .shop-other__media {
	outline: 2px solid var(--g-navy);
	outline-offset: 3px;
}

.shop-other__foot {
	display: flex;
	justify-content: center;
	margin-top: clamp(32px, 4vw, 48px);
}

.shop-other__all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px 0 28px;
	border: 1px solid var(--g-navy);
	border-radius: 999px;
	color: var(--g-navy);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.shop-other__all .icon {
	width: 18px;
	height: 18px;
	transition: transform 0.25s var(--shop-ease);
}

.shop-other__all:hover,
.shop-other__all:focus-visible {
	background: var(--g-navy);
	color: var(--g-white);
}

.shop-other__all:hover .icon {
	transform: translateX(3px);
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
	.shop-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 28px 12px;
	}

	.shop-grid__item.is-new:nth-child(n) { animation-delay: 0s; }
	.shop-grid__item.is-new:nth-child(2n) { animation-delay: 0.06s; }

	.shop-other__list {
		gap: 10px;
	}

	.shop-other__card {
		gap: 10px;
	}

	.shop-other__name {
		font-size: 16px;
	}

	/* Filter menus open under the filter row, full width. */
	.shop-filters {
		position: relative;
		gap: 8px;
	}

	.shop-filter {
		position: static;
	}

	.shop-filter__toggle {
		min-height: 42px;
		padding: 0 14px 0 16px;
		font-size: 13.5px;
	}

	.shop-filter__menu {
		top: calc(100% + 6px);
		right: 0;
		left: 0;
		min-width: 0;
	}

	.shop-toolbar__row {
		gap: 4px 16px;
		padding-block: 6px;
	}

	.shop-count,
	.shop-sort__label,
	.shop-sort select.orderby {
		font-size: 14px;
	}

	.shop-sort select.orderby {
		max-width: 52vw;
	}

	.shop-other__title {
		gap: 14px;
	}
}

@media (max-width: 420px) {
	.shop-sort__label {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.shop-filter__menu {
		animation: none;
	}

	.shop-filter__toggle,
	.shop-filter__chev,
	.shop-more__fill,
	.shop-more__btn,
	.shop-other__media::after,
	.shop-other__name,
	.shop-other__all,
	.shop-other__all .icon {
		transition: none;
	}
}
