/* De'Stellar Catalog: product page swatches and variation subtitle. */

.dsc-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0;
}

.dsc-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 4px 0 8px;
	padding: 0;
	justify-content: flex-start;
	align-items: stretch;
}

.dsc-swatches .dsc-swatch {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	height: 44px;
	min-width: 44px;
	margin: 0 !important;
	padding: 0 16px;
	justify-content: center;
	white-space: nowrap;
	border: 1px solid #c9c9c9;
	border-radius: 4px;
	background: #fff;
	color: #111;
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: none;
	text-transform: none;
	letter-spacing: 0;
	transition: border-color 0.15s, background-color 0.15s;
}

.dsc-swatches .dsc-swatch:hover {
	border-color: #111;
	background: #fff;
	color: #111;
}

.dsc-swatches .dsc-swatch:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.dsc-swatches .dsc-swatch[aria-pressed="true"] {
	border-color: #111;
	box-shadow: inset 0 0 0 1px #111;
	font-weight: 600;
}

.dsc-swatches .dsc-swatch[aria-disabled="true"] {
	color: #8a8a8a;
	border-style: dashed;
	background: #fafafa;
}

.dsc-swatches .dsc-swatch[aria-disabled="true"] .dsc-swatch__label {
	text-decoration: line-through;
}

.dsc-swatches .dsc-swatch[aria-disabled="true"][aria-pressed="true"] {
	border-style: solid;
}

.dsc-swatch__chip {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.25);
}

.dsc-variation-subtitle {
	margin: 0 0 12px;
	color: #444;
	font-size: 15px;
	line-height: 1.4;
}

.dsc-variation-subtitle[hidden] {
	display: none;
}

/* Variation table: label above buttons on narrow screens so nothing overflows at 360px. */
.dsc-swatches + .reset_variations,
.variations .value {
	max-width: 100%;
}

@media (max-width: 480px) {
	.variations_form table.variations,
	.variations_form table.variations tbody,
	.variations_form table.variations tr,
	.variations_form table.variations th,
	.variations_form table.variations td {
		display: block;
		width: 100%;
	}

	.dsc-swatches .dsc-swatch {
		padding: 0 12px;
	}
}

/* Attribute labels above their button rows, left aligned, no theme grey cells. */
.variations_form table.variations,
.variations_form table.variations tbody,
.variations_form table.variations tr,
.variations_form table.variations th,
.variations_form table.variations td {
	display: block;
	width: 100%;
	text-align: left;
	background: transparent;
	border: 0;
}

.variations_form table.variations th.label,
.variations_form table.variations th {
	padding: 12px 0 4px;
	font-weight: 600;
}

.variations_form table.variations td.value {
	padding: 0 0 4px;
}

/* Additional information table: breathing room on both sides of every cell. */
table.woocommerce-product-attributes th,
table.woocommerce-product-attributes td {
	padding: 14px 24px !important;
	vertical-align: middle;
}

table.woocommerce-product-attributes td p {
	margin: 0;
	padding: 0;
}

@media (max-width: 480px) {
	table.woocommerce-product-attributes th,
	table.woocommerce-product-attributes td {
		padding: 12px 14px !important;
	}
}
/*
 * Gallery on desktop: thumbnails in a column beside the main image, and the main image no taller than the
 * window, so every thumbnail is visible without scrolling. Phones keep the row of thumbnails underneath.
 */
@media (min-width: 1025px) {
	.woocommerce-product-gallery.woocommerce-product-gallery--with-images {
		display: grid !important;
		grid-template-columns: 84px minmax(0, calc(100vh - 210px));
		column-gap: 14px;
		align-items: start;
	}

	.woocommerce-product-gallery--with-images .flex-viewport,
	.woocommerce-product-gallery--with-images > .woocommerce-product-gallery__wrapper {
		grid-column: 2;
		grid-row: 1;
	}

	.woocommerce-product-gallery--with-images .flex-control-thumbs {
		grid-column: 1;
		grid-row: 1;
		display: flex !important;
		flex-direction: column;
		gap: 10px;
		max-height: calc(100vh - 210px);
		margin: 0 !important;
		padding: 0 !important;
		overflow-y: auto;
	}

	.woocommerce-product-gallery--with-images .flex-control-thumbs li {
		float: none !important;
		width: 100% !important;
		margin: 0 !important;
	}

	.woocommerce-product-gallery--with-images .flex-control-thumbs img {
		display: block;
		width: 100%;
		height: auto;
		border: 1px solid #e3e3e3;
		border-radius: 3px;
	}

	.woocommerce-product-gallery--with-images .flex-control-thumbs img.flex-active {
		border-color: #111;
	}
}

