/* ==========================================================================
   Atmos — shop: category listing with filters, single product page
   ========================================================================== */

/* ---------- Shared grid of product cards ---------- */
.product-grid { display: grid; gap: 16px; }
.product-grid--4 { grid-template-columns: repeat(4, 1fr); }
.product-grid .pfps-card:nth-child(n) { display: flex; }
@media (max-width: 1100px) { .product-grid--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 749px) { .product-grid--4 { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* ---------- Collection banner ---------- */
.page-banner--collection { height: 520px; }
@media (max-width: 749px) { .page-banner--collection { height: 260px; } }

/* ---------- Collection layout ---------- */
.collection {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: 36px;
	padding-top: 60px;
	padding-bottom: var(--section-gap);
	max-width: 1180px;
}
.collection__filter-toggle, .collection__filters-head, .collection__backdrop { display: none; }

.collection__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding-bottom: 14px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--line);
}
.collection__title { font-size: 26px; font-weight: 400; text-transform: uppercase; margin: 0; }
.collection__tools { display: flex; align-items: center; gap: 24px; font-size: 12px; }
.collection__tools .woocommerce-result-count { margin: 0; color: rgba(255, 255, 255, 0.8); font-family: var(--font-heading); }
.collection__tools .woocommerce-ordering { margin: 0; display: flex; align-items: center; gap: 8px; }
.collection__tools .woocommerce-ordering::before { content: "Sort by:"; font-family: var(--font-heading); text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.collection__tools select.orderby {
	border: 0;
	background: transparent;
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	padding: 4px 6px;
	cursor: pointer;
}
.collection__tools select.orderby option { background: #111; }
.collection__empty { padding: 40px 0; text-align: center; color: rgba(255, 255, 255, 0.75); }

.collection .woocommerce-pagination { margin-top: 30px; text-align: center; }
.collection .woocommerce-pagination ul { display: inline-flex; gap: 6px; list-style: none; padding: 0; margin: 0; border: 0; }
.collection .woocommerce-pagination li { border: 0; }
.collection .woocommerce-pagination a,
.collection .woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--line);
	color: #fff;
	font-size: 13px;
}
.collection .woocommerce-pagination .current { background: var(--gold); border-color: var(--gold); color: #000; }

/* ---------- Filter sidebar ---------- */
.collection__filters { font-size: 13px; }
.filter-group { border-bottom: 1px solid var(--line); padding: 14px 0; }
.filter-group:first-of-type { padding-top: 0; }
.filter-group summary {
	position: relative;
	list-style: none;
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	padding-right: 28px;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after {
	content: "";
	position: absolute;
	right: 0;
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	border-radius: 50%;
	background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3'%3E%3Cpolyline points='6 15 12 9 18 15'/%3E%3C/svg%3E") center / 10px no-repeat;
	transition: transform 0.25s;
}
.filter-group:not([open]) summary::after { transform: rotate(180deg); }
.filter-group__links, .filter-group__options { list-style: none; margin: 14px 0 0; padding: 0 6px 0 0; display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #666 transparent; }
.filter-group__links a { color: rgba(255, 255, 255, 0.85); }
.filter-group__links a:hover, .filter-group__links a[aria-current="page"] { color: var(--gold); }
.filter-group__options label { display: flex; align-items: center; gap: 8px; cursor: pointer; color: rgba(255, 255, 255, 0.85); }
.filter-group__options input { width: 15px; height: 15px; accent-color: var(--gold); margin: 0; }
.filter-group__count { color: rgba(255, 255, 255, 0.5); }
.filter-price { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.filter-price label { display: flex; align-items: center; gap: 4px; flex: 1; border: 1px solid rgba(255, 255, 255, 0.25); padding: 0 6px; font-size: 11px; color: rgba(255, 255, 255, 0.6); }
.filter-price input { width: 100%; border: 0 !important; padding: 8px 2px !important; font-size: 13px; background: transparent; -moz-appearance: textfield; }
.filter-price input::-webkit-outer-spin-button, .filter-price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-price__apply {
	margin-top: 10px;
	padding: 6px 14px;
	border: 1px solid var(--gold);
	background: transparent;
	color: var(--gold);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
}
.filter-price__apply:hover { background: var(--gold); color: #000; }
.filter-clear { display: inline-block; margin-top: 16px; color: var(--gold); text-decoration: underline; font-size: 12px; }

/* Mobile: filters slide in from the left. */
@media (max-width: 989px) {
	.collection { grid-template-columns: 1fr; gap: 0; padding-top: 30px; }
	.collection__filter-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		justify-self: start;
		margin-bottom: 16px;
		padding: 8px 16px;
		border: 1px solid rgba(255, 255, 255, 0.3);
		background: transparent;
		color: #fff;
		font-size: 13px;
		cursor: pointer;
	}
	.collection__filter-toggle svg { width: 18px; }
	.collection__filters {
		position: fixed;
		top: 0;
		left: 0;
		z-index: 1200;
		width: min(320px, 88vw);
		height: 100vh;
		height: 100dvh;
		padding: 20px;
		background: #0b0b0b;
		overflow-y: auto;
		transform: translateX(-100%);
		visibility: hidden;
		transition: transform 0.3s ease, visibility 0.3s;
	}
	.collection__filters.is-open { transform: none; visibility: visible; }
	.admin-bar .collection__filters { top: 46px; height: calc(100dvh - 46px); }
	.collection__filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 16px; font-weight: 700; }
	.collection__filters-close { width: 32px; height: 32px; padding: 4px; border: 0; background: none; color: #fff; cursor: pointer; }
	.collection__backdrop { display: block; position: fixed; inset: 0; z-index: 1199; background: rgba(0, 0, 0, 0.6); }
	.collection__backdrop[hidden] { display: none; }
	.collection__header { flex-direction: column; align-items: flex-start; }
	.collection__tools { width: 100%; justify-content: space-between; }
}

.collection-description { padding-bottom: var(--section-gap); }
.collection-description .rte { max-width: 1000px; margin: 0 auto; font-size: 14px; }

/* ---------- Single product ---------- */
.wc-main--product { padding-top: calc(var(--header-height) + 60px); max-width: 1180px; }
.atmos-product__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 50px; align-items: start; max-width: 960px; margin: 0 auto; }

.product-gallery__main { background: #111; }
.product-gallery__image { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.product-gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-gallery__thumb { width: 90px; padding: 0; border: 1px solid transparent; background: none; cursor: pointer; opacity: 0.75; transition: opacity 0.2s, border-color 0.2s; }
.product-gallery__thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-gallery__thumb:hover, .product-gallery__thumb.is-active { opacity: 1; border-color: #fff; }

.product-summary__badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	background: var(--gold-price);
	color: #000;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.product-summary__subtitle { margin: 14px 0 6px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.product-summary__title { font-size: 36px; font-weight: 400; line-height: 1.2; margin: 0 0 12px; }
.product-summary__badge + .product-summary__title { margin-top: 14px; }
.product-summary__price { font-size: 16px; margin-bottom: 30px; color: #fff; }
.product-summary__price .woocommerce-Price-amount { color: #fff; }
.product-summary__price del { color: rgba(255, 255, 255, 0.5); margin-right: 6px; }
.product-summary__price ins { text-decoration: none; }

.size-pills { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 28px; }
.size-pill { position: relative; cursor: pointer; }
.size-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size-pill > span {
	display: inline-flex;
	align-items: center;
	padding: 7px 16px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 40px;
	font-size: 12px;
	letter-spacing: 0.04em;
	color: #fff;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.size-pill:hover > span { border-color: #fff; }
.size-pill input:checked + span { background: var(--gold-price); border-color: var(--gold-price); color: #000; }
.size-pill input:focus-visible + span { outline: 1px solid var(--gold); outline-offset: 3px; }
.size-pill.is-unavailable { cursor: not-allowed; }
.size-pill.is-unavailable > span { opacity: 0.4; text-decoration: line-through; }
.size-pill.is-unavailable input { cursor: not-allowed; }

.product-form__stock { margin: -14px 0 18px; font-size: 13px; color: #e0a96d; }
.product-form__buy { display: flex; align-items: center; gap: 4px; margin-bottom: 36px; }
.qty-box { display: flex; align-items: center; height: 50px; border: 1px solid rgba(255, 255, 255, 0.55); }
.qty-box__btn { width: 38px; height: 100%; padding: 0; border: 0; background: none; color: #fff; font-size: 18px; cursor: pointer; }
.qty-box input {
	width: 38px;
	height: 100%;
	padding: 0 !important;
	border: 0 !important;
	text-align: center;
	font-size: 14px;
	-moz-appearance: textfield;
}
.qty-box input::-webkit-outer-spin-button, .qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product-form__submit {
	flex: 1;
	max-width: 260px;
	height: 50px;
	border: 0;
	background: var(--gold-price);
	color: #000;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.2s;
}
.product-form__submit:hover { background: #ffdf94; }
.product-form__submit:disabled { background: #555; color: #bbb; cursor: not-allowed; }
.product-form__wishlist { width: 40px; height: 40px; margin-left: 10px; padding: 8px; border: 0; background: none; color: #fff; cursor: pointer; }
.product-form__wishlist[aria-pressed="true"] svg { fill: #dcae5f; stroke: #dcae5f; }

.product-perks { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 24px; padding: 0; text-align: center; font-size: 13px; }
.product-perks li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.product-perks svg { width: 28px; height: 28px; }

.product-details { display: flex; flex-direction: column; gap: 10px; }
.product-details__item { border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 6px; background: #222; }
.product-details__item summary { position: relative; list-style: none; cursor: pointer; padding: 12px 36px 12px 10px; font-size: 15px; }
.product-details__item summary::-webkit-details-marker { display: none; }
.product-details__item summary::after { content: "⌄"; position: absolute; right: 12px; top: 8px; font-size: 16px; transition: transform 0.25s; }
.product-details__item[open] summary::after { transform: rotate(180deg); top: 12px; }
.product-details__body { padding: 0 12px 14px; font-size: 13px; }
.product-details__body p:last-child { margin-bottom: 0; }

.related-products { max-width: 960px; margin: 70px auto 0; }
.related-products__title { font-size: 26px; font-weight: 400; margin-bottom: 24px; }

/* WooCommerce notices (e.g. "added to your cart") */
.woocommerce-notices-wrapper:not(:empty) { max-width: 960px; margin: 0 auto 24px; }
.woocommerce-message, .woocommerce-error, .woocommerce-info {
	margin: 0 0 12px !important;
	padding: 14px 18px 14px 18px !important;
	border: 1px solid var(--line) !important;
	border-left: 3px solid var(--gold) !important;
	background: #111 !important;
	color: #fff !important;
	list-style: none;
}
.woocommerce-message::before, .woocommerce-error::before, .woocommerce-info::before { display: none; }
.woocommerce-message .button { float: right; min-height: 0; padding: 6px 14px; }
.woocommerce-error { border-left-color: #c0392b !important; }

@media (max-width: 849px) {
	.wc-main--product { padding-top: calc(var(--header-height) + 24px); }
	.atmos-product__grid { grid-template-columns: 1fr; gap: 26px; }
	.product-gallery__thumb { width: 64px; }
	.product-summary__title { font-size: 28px; }
	.product-form__submit { max-width: none; }
	.related-products { margin-top: 50px; }
}
