/* =============================================================
   710 GVNG — product.css
   WooCommerce in the 710 grammar. Single product follows the Palace
   layout: photos stacked in a wide column, the buying column stays
   in view. Styles WooCommerce's own markup — no template overrides,
   so WooCommerce updates keep working.
   ============================================================= */

/* WooCommerce 8+ colours everything through these variables: its
   default primary is purple and its price colour olive. */
.sg-site {
	--wc-primary: #ff1f1f;
	--wc-primary-text: #ffffff;
	--wc-secondary: #f5f5f5;
	--wc-secondary-text: #000000;
	--wc-highlight: #000000;
	--wc-highligh-text: #ffffff; /* sic — WooCommerce's own spelling */
	--wc-highlight-text: #ffffff;
	--wc-content-bg: #ffffff;
	--wc-subtext: #666666;
	--wc-form-border-color: rgba(0, 0, 0, 0.16);
	--wc-form-border-radius: 0;
	--wc-form-border-width: 1.5px;
}

/* ------------------------------------------------------ layout -- */

.sg-shop--wc div.product {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
	gap: 32px 48px;
	align-items: start;
	position: relative;
}

/* WooCommerce floats these at 48% — the grid owns the layout now. */
.sg-site #content .sg-shop--wc div.product div.images,
.sg-site #content .sg-shop--wc div.product div.summary {
	float: none;
	width: auto;
	margin: 0;
}

.sg-shop--wc div.product .woocommerce-product-gallery {
	grid-column: 1;
	grid-row: 1 / span 2;
}

.sg-shop--wc div.product .summary {
	grid-column: 2;
	position: sticky;
	top: calc(var(--sg-header-offset) + var(--sg-header-height) + 24px);
}

.sg-shop--wc div.product .woocommerce-tabs,
.sg-shop--wc div.product .related,
.sg-shop--wc div.product .upsells {
	grid-column: 1 / -1;
}

/* ----------------------------------------------------- gallery -- */

.sg-shop--wc div.product div.images .woocommerce-product-gallery__wrapper {
	display: grid;
	gap: 10px;
	margin: 0;
}

.sg-site #content .sg-shop--wc div.product div.images .woocommerce-product-gallery__image,
.sg-site #content .sg-shop--wc div.product div.images .woocommerce-product-gallery__image:nth-child(n+2) {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
}

.sg-shop--wc div.product div.images img {
	display: block;
	width: 100%;
	height: auto;
	background: var(--sg-gray-100);
}

.sg-shop--wc div.product .woocommerce-product-gallery__trigger {
	display: none;
}

.sg-site #content .sg-shop--wc div.product span.onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 6px 8px;
	border-radius: 0;
	background: var(--sg-red);
	color: var(--sg-white);
	font: 700 11px/1 var(--sg-font);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ----------------------------------------------------- summary -- */

.sg-shop--wc div.product .product_title {
	font-family: var(--sg-font);
	font-size: clamp(22px, 2.2vw, 30px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.005em;
	text-transform: uppercase;
	margin: 0 0 12px;
}

.sg-site #content .sg-shop--wc div.product p.price,
.sg-site #content .sg-shop--wc div.product span.price {
	color: var(--sg-black);
	font: 500 17px/1.3 var(--sg-font);
	margin: 0 0 26px;
}

.sg-site #content .sg-shop--wc div.product .price del {
	opacity: 0.45;
	margin-right: 6px;
}

.sg-site #content .sg-shop--wc div.product .price ins {
	color: var(--sg-red);
	font-weight: 700;
	text-decoration: none;
}

.sg-shop--wc .woocommerce-product-details__short-description {
	font: 400 14px/1.6 var(--sg-font);
	margin: 0 0 24px;
}

/* ------------------------------------------ variations → buttons -- */

.sg-site #content .sg-shop--wc table.variations {
	width: 100%;
	margin: 0 0 6px;
	border: 0;
}

.sg-site #content .sg-shop--wc table.variations tr {
	display: block;
	margin: 0 0 20px;
}

.sg-site #content .sg-shop--wc table.variations th,
.sg-site #content .sg-shop--wc table.variations td {
	display: block;
	padding: 0;
	border: 0;
	line-height: 1.2;
	text-align: left;
}

.sg-site #content .sg-shop--wc table.variations th.label,
.sg-site #content .sg-shop--wc table.variations th.label label {
	font: 700 11px/1 var(--sg-font);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sg-gray-600);
	margin: 0 0 10px;
}

/* Without JavaScript the native selects stay — styled, full width. */
.sg-site #content .sg-shop--wc table.variations select {
	width: 100%;
	max-width: 320px;
	height: 44px;
	padding: 0 12px;
	border: 1.5px solid var(--sg-border);
	border-radius: 0;
	background: var(--sg-white);
	font: 600 14px var(--sg-font);
}

/* With JavaScript (product.js) the buttons are the interface and the
   select is WooCommerce's hidden source of truth. */
.sg-shop--wc .variations_form.sg-has-swatches table.variations select {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
	opacity: 0;
}

.sg-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sg-swatch {
	appearance: none;
	min-width: 48px;
	height: 44px;
	padding: 0 14px;
	border: 1.5px solid var(--sg-border);
	border-radius: 0;
	background: var(--sg-white);
	color: var(--sg-black);
	font: 700 13px/1 var(--sg-font);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 0.15s var(--sg-ease), background 0.15s var(--sg-ease), color 0.15s var(--sg-ease);
}

.sg-swatch:hover {
	border-color: var(--sg-black);
}

.sg-swatch[aria-pressed="true"] {
	background: var(--sg-black);
	border-color: var(--sg-black);
	color: var(--sg-white);
}

.sg-swatch.is-soldout,
.sg-swatch:disabled {
	color: #b5b5b5;
	border-color: var(--sg-gray-100);
	background: var(--sg-white);
	text-decoration: line-through;
	cursor: not-allowed;
}

.sg-site #content .sg-shop--wc .reset_variations {
	display: inline-block;
	margin: 12px 0 0;
	font: 700 11px/1 var(--sg-font);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sg-gray-600);
}

.sg-shop--wc .woocommerce-variation-price .price {
	margin-bottom: 12px;
}

.sg-shop--wc .woocommerce-variation-availability p.stock,
.sg-shop--wc div.product p.stock {
	font: 700 12px/1.3 var(--sg-font);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 14px;
}

.sg-site #content .sg-shop--wc div.product .stock.out-of-stock {
	color: var(--sg-red);
}

.sg-site #content .sg-shop--wc div.product .stock.in-stock {
	color: var(--sg-gray-600);
}

/* ------------------------------------- quantity + add to cart -- */

.sg-shop--wc div.product form.cart {
	margin: 0 0 28px;
}

.sg-shop--wc div.product .woocommerce-variation-add-to-cart,
.sg-shop--wc div.product form.cart:not(.variations_form) {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.sg-site #content .sg-shop--wc div.product form.cart div.quantity {
	float: none;
	margin: 0;
}

.sg-site #content .sg-shop--wc div.product .quantity .qty {
	width: 64px;
	height: 54px;
	border: 1.5px solid var(--sg-border);
	border-radius: 0;
	background: var(--sg-white);
	font: 700 15px var(--sg-font);
	text-align: center;
}

.sg-site #content .sg-shop--wc div.product form.cart .single_add_to_cart_button {
	flex: 1;
	float: none;
	height: 54px;
	padding: 0 24px;
	border-radius: 0;
	background: var(--sg-red);
	color: var(--sg-white);
	font: 700 14px/1 var(--sg-font);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition: filter 0.2s var(--sg-ease), opacity 0.2s var(--sg-ease);
}

.sg-site #content .sg-shop--wc div.product form.cart .single_add_to_cart_button:hover {
	background: var(--sg-red);
	filter: brightness(0.86);
}

.sg-site #content .sg-shop--wc div.product form.cart .single_add_to_cart_button.disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* -------------------------------------------------------- tabs -- */

.sg-site #content .sg-shop--wc div.product .woocommerce-tabs {
	margin-top: 32px;
	padding-top: 28px;
	border-top: 1px solid var(--sg-border);
}

.sg-site #content .sg-shop--wc div.product .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 22px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	border: 0;
	overflow: visible;
}

.sg-site #content .sg-shop--wc div.product .woocommerce-tabs ul.tabs::before,
.sg-site #content .sg-shop--wc div.product .woocommerce-tabs ul.tabs li::before,
.sg-site #content .sg-shop--wc div.product .woocommerce-tabs ul.tabs li::after {
	display: none;
}

.sg-site #content .sg-shop--wc div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

.sg-site #content .sg-shop--wc div.product .woocommerce-tabs ul.tabs li a {
	padding: 0 0 6px;
	font: 700 12px/1 var(--sg-font);
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--sg-gray-600);
}

.sg-site #content .sg-shop--wc div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--sg-black);
	box-shadow: inset 0 -2px 0 var(--sg-red);
}

.sg-shop--wc .woocommerce-Tabs-panel {
	max-width: 720px;
	font: 400 15px/1.7 var(--sg-font);
}

/* The panel repeats the tab name as a heading. */
.sg-shop--wc .woocommerce-Tabs-panel > h2:first-child {
	display: none;
}

.sg-site #content .sg-shop--wc table.shop_attributes {
	border: 0;
	font: 400 14px/1.5 var(--sg-font);
}

.sg-site #content .sg-shop--wc table.shop_attributes th,
.sg-site #content .sg-shop--wc table.shop_attributes td {
	padding: 10px 16px 10px 0;
	border: 0;
	border-bottom: 1px solid var(--sg-gray-100);
	background: none;
	font-style: normal;
	text-align: left;
}

.sg-site #content .sg-shop--wc table.shop_attributes th {
	width: 160px;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.05em;
}

/* ----------------------------------------------------- related -- */

.sg-shop--wc div.product .related > h2,
.sg-shop--wc div.product .upsells > h2 {
	font: 700 13px/1 var(--sg-font);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 56px 0 26px;
}

/* ----------------------------------------------------- notices -- */

.sg-site .woocommerce-message,
.sg-site .woocommerce-info,
.sg-site .woocommerce-error {
	margin: 0 0 24px;
	padding: 16px 20px;
	border: 0;
	border-radius: 0;
	background: var(--sg-black);
	color: var(--sg-white);
	font: 700 13px/1.4 var(--sg-font);
	letter-spacing: 0.02em;
	list-style: none;
}

.sg-site .woocommerce-error {
	background: var(--sg-red);
}

.sg-site .woocommerce-message::before,
.sg-site .woocommerce-info::before,
.sg-site .woocommerce-error::before {
	display: none;
}

.sg-site .woocommerce-message a,
.sg-site .woocommerce-info a,
.sg-site .woocommerce-error a,
.sg-site .woocommerce-message .button,
.sg-site .woocommerce-info .button {
	float: right;
	padding: 0;
	margin: 0 0 0 16px;
	background: none;
	color: var(--sg-white);
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ------------------------------------------------------ mobile -- */

@media (max-width: 900px) {
	.sg-shop--wc div.product {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.sg-shop--wc div.product .woocommerce-product-gallery,
	.sg-shop--wc div.product .summary {
		grid-column: 1;
		grid-row: auto;
	}

	.sg-shop--wc div.product .summary {
		position: static;
	}

	/* Photos swipe sideways, like the reference's mobile product page. */
	.sg-shop--wc div.product div.images .woocommerce-product-gallery__wrapper {
		grid-auto-flow: column;
		grid-auto-columns: 86%;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.sg-shop--wc div.product div.images .woocommerce-product-gallery__wrapper::-webkit-scrollbar {
		display: none;
	}

	.sg-shop--wc div.product div.images .woocommerce-product-gallery__image {
		scroll-snap-align: start;
	}
}
