/* =============================================================================
   RTN Broadcasting - WooCommerce store styles
   Loaded only on store pages (shop, product, cart, checkout, account) from
   functions.php. Product-agnostic: nothing here names a specific product.
   Kept out of style.css on purpose so store work never collides with theme work.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. NATIVE DROPDOWN LISTS
   style.css gives <select> Light text on Surface, but Chrome and Edge on Windows
   draw the OPEN option list on white, so options vanish (Light on white ~1.2:1).
   Paint the list itself in the dark system.
   -------------------------------------------------------------------------- */
select option,
select optgroup {
	background-color: var(--wp--preset--color--surface, #14181F);
	color: var(--wp--preset--color--light, #EDEDF0);
}

/* -----------------------------------------------------------------------------
   2. VARIATION PICKER (size, color, ...)
   Label above the field instead of a two-column table: no baseline drift between
   the label and the select, and it reads the same on a phone.
   -------------------------------------------------------------------------- */
form.variations_form table.variations {
	width: 100%;
	max-width: 26rem;
	margin: 0 0 1.25rem;
	border: 0;
	border-collapse: collapse;
}
form.variations_form table.variations tbody,
form.variations_form table.variations tr,
form.variations_form table.variations th,
form.variations_form table.variations td {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
}
form.variations_form table.variations tr {
	margin: 0 0 1rem;
}
form.variations_form table.variations th.label {
	margin: 0 0 0.4rem;
}
form.variations_form table.variations th.label label {
	font-family: var(--wp--preset--font-family--oswald, Oswald, sans-serif);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
	text-shadow: none;
	color: var(--wp--preset--color--light, #EDEDF0);
}

/* An attribute with only one real choice (e.g. the only colour) is not a
   choice: hide the row, but ONLY while that one option is actually selected
   (:checked is the live selection). A future product with no default set would
   otherwise hide a required field and the cart would refuse the item with no
   visible reason; with :checked the row simply shows until it is filled. */
form.variations_form table.variations tr:has(select option:nth-child(2):last-child:checked) {
	display: none;
}

/* The select: full width, 48px tall touch target, high-contrast chevron.
   Selector is deliberately long: it must outrank WooCommerce's
   ".woocommerce div.product form.cart .variations select" (black chevron) and
   ".woocommerce div.product form.cart table.variations td select" (min-width 70%). */
.woocommerce div.product form.cart.variations_form table.variations td.value select {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	min-width: 100%;
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 0.6rem 2.75rem 0.6rem 0.9rem;
	font-family: var(--wp--preset--font-family--inter, Inter, sans-serif);
	font-size: 1rem;
	line-height: 1.3;
	color: var(--wp--preset--color--light, #EDEDF0);
	background-color: var(--wp--preset--color--surface, #14181F);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23EDEDF0' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	background-size: 14px 9px;
	border: 1px solid rgba(237, 237, 240, 0.28);
	border-radius: 0.25rem;
	cursor: pointer;
}
.woocommerce div.product form.cart.variations_form table.variations td.value select:hover {
	border-color: rgba(237, 237, 240, 0.5);
}

/* "Clear" resets EVERY attribute, including a hidden single-choice one (see the
   :has() rule above). The shopper could then never re-select it and the cart
   would refuse the item. Picking another option is all anyone needs, so drop it. */
.woocommerce div.product form.cart .reset_variations {
	display: none !important;
}

/* Variation price / availability line that appears after a size is picked. */
.single_variation_wrap .woocommerce-variation {
	margin: 0 0 1rem;
}
.single_variation_wrap .woocommerce-variation-price .price {
	font-size: var(--wp--preset--font-size--large, 1.5rem);
	color: var(--wp--preset--color--light, #EDEDF0);
}

/* -----------------------------------------------------------------------------
   3. QUANTITY + ADD TO CART
   One aligned row, equal heights.
   -------------------------------------------------------------------------- */
/* The block template's Add to Cart form lays this row out as a GRID
   (".wp-block-woocommerce-add-to-cart-form .variations_button / form.cart":
   min-content auto auto), so flex here never applied and the button sat at its
   text width. Same selectors, loaded later: quantity hugs, button takes the rest. */
.wp-block-woocommerce-add-to-cart-form .variations_button,
.wp-block-woocommerce-add-to-cart-form form.cart:not(.variations_form) {
	display: grid;
	grid-auto-flow: column;
	grid-template-columns: min-content minmax(0, 1fr);
	align-items: stretch;
	gap: 0.75rem;
	max-width: 26rem;
}
/* Fallback for the classic (non-block) product template. */
.woocommerce-variation-add-to-cart,
form.cart:not(.variations_form) {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.75rem;
	max-width: 26rem;
}
form.cart .quantity {
	margin: 0;
}
form.cart .quantity input.qty {
	width: 4.5rem;
	height: 100%;
	min-height: 48px;
	padding: 0 0.5rem;
	text-align: center;
	font-size: 1rem;
}
form.cart .single_add_to_cart_button {
	flex: 1 1 auto;
	min-height: 48px;
	margin: 0;
}
/* Woo pins the button to the start of its grid cell; stretch it across. */
.wp-block-woocommerce-add-to-cart-form .variations_button > .single_add_to_cart_button,
.wp-block-woocommerce-add-to-cart-form form.cart > .single_add_to_cart_button {
	justify-self: stretch;
}

/* Before a size is chosen WooCommerce fades the button to 50%, which reads as
   broken. Show a clear outlined "not yet" state instead; clicking it still
   prompts the shopper to pick a size. */
form.cart .single_add_to_cart_button.disabled,
form.cart .single_add_to_cart_button:disabled {
	opacity: 1 !important;
	color: var(--wp--preset--color--light, #EDEDF0);
	background: transparent;
	border: 1px solid rgba(237, 237, 240, 0.35);
	box-shadow: none;
	cursor: not-allowed;
}

/* -----------------------------------------------------------------------------
   4. SQUARE APPLE PAY / GOOGLE PAY BUTTONS
   The plugin centres the wallet box at 510px; align it with the form instead.
   -------------------------------------------------------------------------- */
#wc-square-digital-wallet {
	max-width: 26rem;
	margin: 1rem 0 0;
	padding-top: 0;
}
body.woocommerce-cart #wc-square-digital-wallet,
body.woocommerce-checkout #wc-square-digital-wallet {
	max-width: none;
}
.wc-square-wallet-buttons {
	border-radius: 0.25rem;
}

/* -----------------------------------------------------------------------------
   5. PRODUCT TEXT
   -------------------------------------------------------------------------- */
.single-product .wp-block-post-excerpt__excerpt {
	color: var(--wp--preset--color--light, #EDEDF0);
}

/* Category / Tags line. theme.json styles core/post-terms as loud orange
   uppercase Oswald (right for post bylines, too loud as product fine print).
   Quiet it to small Inter: muted prefix, light links. */
.wp-block-woocommerce-product-meta .wp-block-post-terms {
	font-family: var(--wp--preset--font-family--inter, Inter, sans-serif);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wp--preset--color--muted, #8A8F9A);
}
.wp-block-woocommerce-product-meta .wp-block-post-terms a {
	color: var(--wp--preset--color--light, #EDEDF0);
}
.wp-block-woocommerce-product-meta .wp-block-post-terms a:hover,
.wp-block-woocommerce-product-meta .wp-block-post-terms a:focus-visible {
	color: var(--wp--preset--color--nebula-blue, #2E9BFF);
}

/* -----------------------------------------------------------------------------
   6. TABS (Description / Additional information / Reviews)
   Inactive tabs were dim; the panel repeated the tab name as a glowing
   display-size H2. Brighter tabs, and drop the duplicate heading.
   -------------------------------------------------------------------------- */
/* WooCommerce's "minimal" tab style (product-details.css) uses a very long
   selector, fades inactive tabs to opacity .65 and colours the active marker
   with the text colour: white, drawn as an underline on desktop and a LEFT bar
   in the stacked phone layout (<=768px). Same selector, loaded later: full
   opacity, quieter inactive text, Signal Orange marker in both layouts. */
html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li {
	opacity: 1;
	color: rgba(237, 237, 240, 0.72);
}
html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li.active,
html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li:hover,
html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li:focus-within {
	color: var(--wp--preset--color--light, #EDEDF0);
}
html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li.active {
	border-color: var(--wp--preset--color--signal-orange, #FF6B1A);
}
.woocommerce-tabs ul.tabs li a {
	text-shadow: none;
}
/* Classic tab corners are painted with --wp--preset--color--background, which
   this theme does not define, so they fall back to white. */
.woocommerce div.product .woocommerce-tabs ul.tabs li.active::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li.active::after {
	box-shadow: none;
}
.woocommerce-Tabs-panel > h2:first-child {
	display: none;
}
.woocommerce-Tabs-panel h2,
.woocommerce-Tabs-panel h3,
.woocommerce-Reviews-title {
	font-size: var(--wp--preset--font-size--large, 1.5rem);
	text-shadow: none;
}

/* Additional information table: readable rows on the dark surface. */
.woocommerce-product-attributes {
	width: 100%;
	max-width: 40rem;
	border-collapse: collapse;
}
.woocommerce-product-attributes th,
.woocommerce-product-attributes td {
	padding: 0.75rem 0.9rem;
	text-align: left;
	border-bottom: 1px solid rgba(237, 237, 240, 0.12);
	background: none;
	color: var(--wp--preset--color--light, #EDEDF0);
}
.woocommerce-product-attributes th {
	width: 35%;
	font-weight: 500;
	color: rgba(237, 237, 240, 0.78);
}
.woocommerce-product-attributes td p {
	margin: 0;
}

/* -----------------------------------------------------------------------------
   7. GALLERY THUMBNAILS
   WooCommerce dims inactive thumbs to 50%, which on Void reads as a grey veil.
   -------------------------------------------------------------------------- */
.woocommerce-product-gallery .flex-control-thumbs li img {
	opacity: 0.7;
	transition: opacity 0.15s ease;
}
.woocommerce-product-gallery .flex-control-thumbs li img:hover,
.woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
	opacity: 1;
}
