/* Amazon-style fragrance swatch grid. */

/* Keep the native <select> functional but out of view (not display:none,
   so WooCommerce can still focus/validate it). */
.rc-fragrance-select-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Selected fragrance name + badge shown inside the variation (gray) box,
   above the description. */
.rc-variation-name {
	margin: 0 0 0.35em;
	font-size: 1.15em;
	font-weight: 600;
	color: #232f3e;
}
.rc-variation-badge {
	margin: 0 0 0.5em;
}

.rc-fragrance-picker {
	margin: 0 0 1em;
}

.rc-frag-search {
	display: block;
	width: 100%;
	max-width: 420px;
	margin: 0 0 0.75em;
	padding: 0.5em 0.75em;
	box-sizing: border-box;
}

.rc-fragrance-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
}

.rc-frag-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 6px;
	background: #fff;
	border: 2px solid #d5d9d9;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	line-height: 1.2;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.rc-frag-tile[hidden] {
	display: none;
}

.rc-frag-tile:hover {
	border-color: #9aa0a6;
}

.rc-frag-tile:focus-visible {
	outline: 2px solid #007185;
	outline-offset: 2px;
}

.rc-frag-tile.is-selected {
	border-color: #007185;
	box-shadow: 0 0 0 1px #007185 inset;
}

.rc-frag-thumb {
	width: 100%;
	max-width: 84px;
	aspect-ratio: 4 / 3;
	height: auto;
	object-fit: contain;
	display: block;
}

/* Round color swatch fallback (no variation image, but a _color_field). */
.rc-frag-swatch {
	width: 64px;
	height: 64px;
	margin: 6px 0;
	border-radius: 50%;
	border: 2px solid #232f3e;
	box-sizing: border-box;
}

/* Text-only fallback tile (no variation image and no color). */
.rc-frag-noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 84px;
	aspect-ratio: 4 / 3;
	padding: 4px;
	box-sizing: border-box;
	font-weight: 600;
	font-size: 0.72em;
	color: #232f3e;
	background: #f3f4f6;
	border-radius: 4px;
}

.rc-frag-name {
	font-size: 0.72em;
	color: #0f1111;
	overflow-wrap: anywhere;
}

.rc-frag-price {
	font-size: 0.72em;
	color: #565959;
}

.rc-frag-empty {
	margin: 0.75em 0;
	color: #565959;
}

/* Pager: ‹ 1 2 3 › */
.rc-frag-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin-top: 0.85em;
}

.rc-frag-page {
	min-width: 2em;
	margin: 0;
	padding: 0.35em 0.6em;
	background: #fff;
	border: 1px solid #d5d9d9;
	border-radius: 6px;
	cursor: pointer;
	line-height: 1;
}

.rc-frag-page:hover:not(:disabled) {
	border-color: #9aa0a6;
}

.rc-frag-page.is-current {
	background: #007185;
	border-color: #007185;
	color: #fff;
	font-weight: 700;
}

.rc-frag-page:disabled {
	opacity: 0.4;
	cursor: default;
}

.rc-frag-gap {
	padding: 0 0.25em;
	color: #565959;
}

/* Hide WooCommerce's native "Clear" (reset variations) link under the grid.
   This stylesheet only loads on fragrance-grid products, so other variable
   products keep their Clear link. */
.variations_form .reset_variations {
	display: none !important;
}
