/* Zen Aura — The collection block (acf/za-shop-collection). ZA-MARKER: shop-collection-styles */

.za-collection {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--100);
}

.za-collection__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
}

.za-collection .za-collection__head h2 {
	color: var(--wp--preset--color--brand);
}

.za-collection .za-collection__count {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--soft);
}

/* Filter bar: sticks just under the header while you browse */
.za-collection__bar {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--header-height) - 1px);
	z-index: 59;
	margin-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--70);
	padding-block: var(--wp--preset--spacing--30);
	background: var(--wp--custom--header-bg);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

html:not(.za-js) .za-collection__bar {
	display: none;
}

.za-filter {
	display: flex;
	gap: var(--wp--preset--spacing--20);
	overflow-x: auto;
	padding: 3px;
	margin: -3px;
	scrollbar-width: none;
}

.za-filter::-webkit-scrollbar {
	display: none;
}

.za-filter__chip {
	flex: none;
	padding: 0.55rem 1.15rem;
	border-radius: var(--wp--custom--radius--pill);
	border: 1px solid var(--wp--custom--line--strong);
	background: var(--wp--preset--color--raised);
	color: var(--wp--preset--color--brand);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--weight--regular);
	white-space: nowrap;
	transition: background-color var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle), color var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle), border-color var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle);
}

.za-filter__chip:hover {
	border-color: var(--wp--preset--color--brand);
}

.za-filter__chip[aria-pressed="true"] {
	background: var(--wp--preset--color--brand);
	border-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--base);
	font-weight: var(--wp--custom--weight--medium);
}

/* Grid: compact square tiles — two per row on phones, three on tablets, four on desktop */
.za-shop-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(0.75rem, 2vw, 1.5rem);
}

.za-shop-grid > [hidden] {
	display: none;
}

@media (min-width: 48rem) {
	.za-shop-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 64rem) {
	.za-shop-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: no-preference) {
	.za-shop-grid > li {
		animation: za-card-in var(--wp--custom--duration--calm) var(--wp--custom--ease--gentle);
	}
}

@keyframes za-card-in {
	from { opacity: 0; transform: translateY(0.75rem); }
}

/* Product tile: square photo shown whole, details below */
.za-shop-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--wp--custom--line--soft);
	border-radius: var(--wp--custom--radius--l);
	background: var(--wp--preset--color--raised);
	transition: border-color var(--wp--custom--duration--calm), box-shadow var(--wp--custom--duration--calm), transform var(--wp--custom--duration--calm);
}

.za-shop-card:hover {
	border-color: rgb(201 163 90 / 0.55);
	box-shadow: 0 0 1.6rem rgb(201 163 90 / 0.28), var(--wp--preset--shadow--soft);
	transform: translateY(-2px);
}

/* square frame; undo the crystal cut used on Home */
.za-collection .za-shop-card__media {
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 0;
	background: var(--wp--preset--color--linen);
	filter: none;
}

.za-collection .za-shop-card__media::before {
	display: none;
}

.za-collection .za-shop-card__media::after {
	clip-path: none;
}

.za-collection .za-shop-card__media > img {
	clip-path: none;
	object-fit: contain;
	background: transparent;
}

.za-collection .za-shop-card:hover .za-shop-card__media {
	filter: none;
}

.za-shop-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--10);
	padding: var(--wp--preset--spacing--40);
}

.za-shop-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
}

.za-shop-card__type {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--soft);
}

.za-collection .za-shop-card__name {
	margin: 0;
	font-size: var(--wp--preset--font-size--md);
	line-height: 1.25;
	color: var(--wp--preset--color--brand);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

/* short description: two lines at most, the full text is on the product page */
.za-collection .za-shop-card__note {
	margin: 0 0 var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--xs);
	line-height: 1.5;
	color: var(--wp--preset--color--soft);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

@media (max-width: 47.99rem) {
	.za-collection .za-shop-card__note {
		display: none;
	}
}


/* Links, price and buttons */
.za-shop-card__media {
	display: block;
}

.za-collection .za-shop-card__name a {
	color: inherit;
	text-decoration: none;
}

.za-collection .za-shop-card__name a:hover {
	color: var(--wp--preset--color--brand-hover);
}

.za-collection .za-shop-card__price {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--base);
	color: var(--wp--preset--color--accent-strong);
}

.za-shop-card__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--wp--preset--spacing--20);
	width: 100%;
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--20);
}

.za-shop-card__actions .za-btn {
	justify-content: center;
	width: 100%;
	min-height: 2.5rem;
	padding: 0.45rem 1rem;
	font-size: var(--wp--preset--font-size--xs);
}

.za-shop-card__actions .za-text-link {
	justify-content: center;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: var(--wp--custom--weight--regular);
}

/* WooCommerce adds a "View cart" link after adding */
.za-shop-card__actions .added_to_cart {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--brand);
	text-decoration-color: var(--wp--preset--color--accent);
}

.za-shop-card__actions .za-btn.loading {
	opacity: 0.6;
}

/* Stone picker (products with a choice of stone): small round swatches inside a normal card */
.za-picker {
	border: 0;
	padding: 0;
	margin: 0 0 var(--wp--preset--spacing--40);
	min-inline-size: 0;
}

.za-picker__legend {
	padding: 0;
	margin-bottom: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--soft);
}

.za-picker__legend span {
	font-weight: var(--wp--custom--weight--medium);
	color: var(--wp--preset--color--brand);
}

.za-picker__options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.za-picker__option {
	position: relative;
	display: block;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: var(--wp--custom--radius--round);
	cursor: pointer;
	box-shadow: 0 0 0 1px var(--wp--custom--line--soft);
	transition: box-shadow var(--wp--custom--duration--quick) var(--wp--custom--ease--gentle), transform var(--wp--custom--duration--quick) var(--wp--custom--ease--gentle);
}

.za-picker__option img {
	width: 100%;
	height: 100%;
	border-radius: var(--wp--custom--radius--round);
	object-fit: cover;
	object-position: 50% 62%;
}

.za-picker__option input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.za-picker__option:hover {
	transform: translateY(-2px);
}

.za-picker__option:has(input:checked) {
	box-shadow: 0 0 0 2px var(--wp--preset--color--base), 0 0 0 4px var(--wp--preset--color--brand);
}

.za-picker__option:has(input:focus-visible) {
	box-shadow: 0 0 0 2px var(--wp--preset--color--base), 0 0 0 4px var(--wp--preset--color--accent-strong);
}

/* Gold button (on the dark offer tile) */
.za-btn--gold {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--deep);
}

.za-btn--gold:hover {
	background: var(--wp--preset--color--gold-light);
	color: var(--wp--preset--color--deep);
	transform: translateY(-2px);
}

/* Offer tile */
.za-shop-offer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	gap: var(--wp--preset--spacing--60);
	align-items: center;
	padding: clamp(1.75rem, 4vw, 3rem);
	border-radius: var(--wp--custom--radius--xl) clamp(4.5rem, 13vw, 14rem) clamp(4rem, 11vw, 12rem) var(--wp--custom--radius--xl) / var(--wp--custom--radius--xl) clamp(3.5rem, 10vw, 11rem) clamp(3rem, 8vw, 9rem) var(--wp--custom--radius--xl);
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--base);
}

.za-shop-offer::before {
	content: "";
	position: absolute;
	z-index: -1;
	right: -20%;
	top: -30%;
	width: 90%;
	aspect-ratio: 1000 / 700;
	background: var(--wp--custom--texture--wash-amethyst) center / contain no-repeat;
	mix-blend-mode: screen;
	opacity: 0.6;
}

.za-shop-offer__text {
	display: grid;
	justify-items: start;
	gap: var(--wp--preset--spacing--40);
}

.za-collection .za-shop-offer__flag {
	padding: 0.2rem 0.8rem;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--gold-pale);
	color: var(--wp--preset--color--deep);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: var(--wp--custom--weight--medium);
}

.za-collection .za-shop-offer__title {
	font-size: var(--wp--preset--font-size--xl);
	color: var(--wp--preset--color--raised);
	max-width: 14ch;
}

:lang(si) .za-collection .za-shop-offer__title {
	max-width: 18em;
}

.za-collection .za-shop-offer__text p:not(.za-shop-offer__flag) {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--plum-pale);
	max-width: 34ch;
}

.za-shop-offer__text .za-btn {
	margin-top: var(--wp--preset--spacing--20);
}

.za-shop-offer__text .za-btn:focus-visible {
	box-shadow: 0 0 0 3px var(--wp--preset--color--brand), 0 0 0 5px var(--wp--preset--color--gold-pale);
}

.za-shop-offer__pendants {
	display: flex;
	justify-content: center;
}

.za-shop-offer__pendants img {
	width: clamp(4.5rem, 9vw, 6rem);
	aspect-ratio: 3 / 5;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--arch);
	border: 0.25rem solid var(--wp--preset--color--brand-hover);
	box-shadow: var(--wp--preset--shadow--lift);
}

.za-shop-offer__pendants img:nth-child(1) {
	rotate: -8deg;
	translate: 0.9rem 0.6rem;
}

.za-shop-offer__pendants img:nth-child(2) {
	position: relative;
	z-index: 1;
	translate: 0 -0.4rem;
}

.za-shop-offer__pendants img:nth-child(3) {
	rotate: 8deg;
	translate: -0.9rem 0.6rem;
}

@media (min-width: 36rem) {
	.za-shop-offer {
		grid-column: 1 / -1;
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	}
}

/* Custom pieces band */
.za-shop-custom {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	gap: var(--wp--preset--spacing--60);
	align-items: center;
	padding: clamp(1.75rem, 4vw, 3rem);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--mist);
}

.za-shop-custom__media {
	width: clamp(8rem, 30vw, 13rem);
	aspect-ratio: 1;
	border-radius: var(--wp--custom--radius--pebble);
	overflow: hidden;
	box-shadow: 0 0 0 0.4rem var(--wp--preset--color--raised), var(--wp--preset--shadow--soft);
}

.za-shop-custom__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.za-shop-custom__text {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	justify-items: start;
}

.za-collection .za-shop-custom__title {
	font-size: var(--wp--preset--font-size--xl);
	color: var(--wp--preset--color--brand);
	max-width: 16ch;
}

:lang(si) .za-collection .za-shop-custom__title {
	max-width: 18em;
}

.za-collection .za-shop-custom__text p {
	font-size: var(--wp--preset--font-size--base);
	color: var(--wp--preset--color--soft);
	max-width: 48ch;
}

.za-shop-custom__text .za-btn {
	margin-top: var(--wp--preset--spacing--20);
}

.za-shop-custom__sprig {
	display: none !important;
	position: absolute;
	z-index: -1;
	right: 3%;
	top: 50%;
	width: clamp(5rem, 9vw, 7.5rem);
	translate: 0 -50%;
	opacity: 0.35;
}

@media (min-width: 36rem) {
	.za-shop-custom__sprig {
		display: block;
	}

	.za-shop-custom {
		grid-column: 1 / -1;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: var(--wp--preset--spacing--80);
		padding-inline: clamp(2rem, 5vw, 4rem);
	}
}
