/*
Theme Name: qvidro
Theme URI: 
Author: Webdados
Author URI: 
Description: Purple child theme for QuadrosVidro.pt
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: purple
Text Domain: qvidro
Tags: 
*/


/*
 * The VAT inclusive price, which the QVidro Plugin appends to WooCommerce's price HTML.
 *
 * The plugin owns the markup and the class; how it looks is the theme's side of the deal, and
 * the selector differs per theme: the classic theme targets Storefront's p.price, this one the
 * price block's own wrapper.
 */
.wp-block-woocommerce-product-price .qv_price_with_vat {
	display: block;
	margin-top: 0.5em;
}

/*
 * Product images: slightly rounded, with a hairline so white photos separate from the near-white
 * page.
 *
 * On the container, never on the image. WooCommerce's product-image.css sets
 * `border-radius: inherit` on the img, so the block expects the container to carry the shape, and
 * a border put on the image itself makes it 2px wider than the box it sits in, which reads as a
 * misaligned inset frame rather than an edge.
 *
 * Not in theme.json: the gallery blocks declare no border support, and the product-image block
 * skips serialization of its own border support, so neither emits anything usable here.
 */
.wc-block-components-product-image {
	border: 1px solid var(--wp--preset--color--theme-6);
	border-radius: var(--wp--custom--radius--medium);
	box-sizing: border-box;
	overflow: hidden;
}

/*
 * The thumbnail border goes on the image, not on its box.
 *
 * WooCommerce sizes the strip by dividing the gallery height between however many thumbnails
 * there are, then lets the image size itself inside that box with `width: fit-content`. With six
 * images the box stops matching the image and a border on the box frames air around it. On the
 * image it hugs whatever the strip computes, for three thumbnails or for nine.
 *
 * The active one keeps its own stronger outline, which WooCommerce draws in the text colour with
 * 2px of padding: without restating the colour here, our hairline would win and the selected
 * thumbnail would look like all the others.
 */
.wc-block-product-gallery-thumbnails__thumbnail__image {
	border: 1px solid var(--wp--preset--color--theme-6);
	border-radius: var(--wp--custom--radius--small);
	box-sizing: border-box;
}

.wc-block-product-gallery-thumbnails__thumbnail__image--is-active {
	border-color: currentColor;
}

/*
 * The main image is a slider, so its frame belongs to the viewport rather than to each slide:
 * bordering the slides means watching a bordered box slide past. The container is the element
 * that stays put and already clips its overflow, so the images move inside a frame that does not.
 */
.wc-block-product-gallery-large-image__container {
	border: 1px solid var(--wp--preset--color--theme-6);
	border-radius: var(--wp--custom--radius--medium);
	box-sizing: border-box;
}

.wc-block-product-gallery-large-image__wrapper .wc-block-components-product-image {
	border: 0;
	border-radius: 0;
}

/*
 * Product names in the cart and the mini cart drawer keep the text colour, like the product titles
 * in listings, instead of the accent every other link takes. They still underline on hover.
 *
 * Not in theme.json: these are WooCommerce components, not blocks, so no block style reaches them.
 */
a.wc-block-components-product-name {
	color: var(--wp--preset--color--theme-2);
}

/*
 * The same hairline where the cart shows a product: the cart page, the mini cart drawer and the
 * checkout summary.
 *
 * These are not the product-image block, so there is no container carrying the shape and no
 * inherited radius: the image takes the border itself. box-sizing keeps a cart thumbnail, which
 * WooCommerce sets to width:100%, from overflowing its cell once it has a border.
 */
.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
	border: 1px solid var(--wp--preset--color--theme-6);
	border-radius: var(--wp--custom--radius--small);
	box-sizing: border-box;
}

/*
 * Forms: 4px, matching the buttons.
 *
 * Buttons are set in theme.json, where global styles can express them. Form controls cannot be:
 * Purple squares them off selector by selector in its own stylesheet, with doubled classes chosen
 * to win specificity ties, so theme.json's element rule never reaches them. The selectors below
 * are Purple's own, restated with the radius this theme wants. Its custom property is redefined
 * on body for the same reason Purple sets it there, to win against WooCommerce's :root.
 *
 * Radio inputs are left alone: circular radios are deliberate.
 */
body {
	--wc-form-border-radius: var(--wp--custom--radius--small);
}

.wp-block-woocommerce-cart .wc-block-components-text-input:not(.has-error) input,
.wp-block-woocommerce-cart .wc-block-components-textarea:not(.has-error),
.wp-block-woocommerce-cart .wc-blocks-components-select:not(.has-error) .wc-blocks-components-select__select,
.wp-block-woocommerce-cart .wc-blocks-components-select:not(.has-error) .wc-blocks-components-select__container,
.wp-block-woocommerce-cart .wc-block-components-checkbox__input[type="checkbox"],
.wp-block-woocommerce-checkout .wc-block-components-text-input:not(.has-error) input,
.wp-block-woocommerce-checkout .wc-block-components-textarea:not(.has-error),
.wp-block-woocommerce-checkout .wc-blocks-components-select:not(.has-error) .wc-blocks-components-select__select,
.wp-block-woocommerce-checkout .wc-blocks-components-select:not(.has-error) .wc-blocks-components-select__container,
.wp-block-woocommerce-checkout .wc-block-components-checkbox__input[type="checkbox"],
.wp-block-woocommerce-cart .wc-block-components-text-input.wc-block-components-text-input input,
.wp-block-woocommerce-checkout .wc-block-components-text-input.wc-block-components-text-input input,
.woocommerce-account form .form-row:not(.woocommerce-invalid) .input-text,
.woocommerce-account form .form-row:not(.woocommerce-invalid) select,
.woocommerce-account form .form-row:not(.woocommerce-invalid) textarea,
.woocommerce-account .woocommerce-Input:not([type="hidden"]),
.woocommerce-account .select2-container .select2-selection {
	border-radius: var(--wp--custom--radius--small);
}

.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted.wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted.wc-block-components-radio-control__option--checked-option-highlighted,
.wc-block-components-address-card.wc-block-components-address-card,
.wc-block-components-local-pickup-select--multiple.wc-block-components-local-pickup-select--multiple,
.wc-block-components-address-autocomplete-suggestions.wc-block-components-address-autocomplete-suggestions {
	border-radius: var(--wp--custom--radius--small);
}

/*
 * The gallery's next and previous buttons.
 *
 * WooCommerce gives each one an opaque background from the `base` preset, which this palette does
 * not define, so they fall back to solid white and sit as two hard squares on the photograph.
 * They become translucent, and the pair is rounded as a set: outer corners only, so the two read
 * as one control rather than two buttons touching.
 */
.wc-block-next-previous-buttons__button {
	background: color-mix(in srgb, var(--wp--preset--color--theme-1) 65%, transparent);
}

.wc-block-next-previous-buttons__button:first-child {
	border-radius: var(--wp--custom--radius--small) 0 0 var(--wp--custom--radius--small);
}

.wc-block-next-previous-buttons__button:last-child {
	border-radius: 0 var(--wp--custom--radius--small) var(--wp--custom--radius--small) 0;
}

/*
 * Star ratings in orange.
 *
 * The stars are the WooCommerce icon font coloured by currentColor, with the empty track being
 * the same colour at 50% opacity, so one value drives both. Only the stars are coloured, not the
 * whole rating block, which also carries its review count text.
 *
 * The colour is the palette's Rating entry, at 3.99:1 against the page background. A star rating
 * carries meaning, so it is a graphical object under WCAG 1.4.11 and wants 3:1: the amber most
 * shops use, #ffb800, manages 1.65:1 on a background this light.
 */
.wc-block-components-product-rating__stars,
.wc-block-grid__product-rating .star-rating,
.wc-block-grid__product-rating .wc-block-grid__product-rating__stars,
.wc-block-grid__product-rating .wc-block-product-review-rating__stars,
.wp-block-woocommerce-product-review-rating .star-rating,
.wp-block-woocommerce-product-review-rating .wc-block-grid__product-rating__stars,
.wp-block-woocommerce-product-review-rating .wc-block-product-review-rating__stars {
	color: var(--wp--preset--color--rating);
}

/*
 * The star picker in the review form, same colour as the stars it produces.
 *
 * The block form draws each star as an SVG whose outline is a stroke, and adds `is-selected` or
 * `is-hovered` to the button to fill it. Both states take the same colour, so choosing a rating
 * never changes hue, only whether the star is filled.
 *
 * The classic `p.stars a` markup is covered too: it is what the shortcode form renders, and the
 * glyph there is a font character coloured by `color`.
 */
.wp-block-woocommerce-product-review-form .comment-form-rating .stars button svg path,
.wp-block-woocommerce-product-review-form .comment-form-rating .stars button svg polygon {
	stroke: var(--wp--preset--color--rating);
}

.wp-block-woocommerce-product-review-form .comment-form-rating .stars button.is-selected svg path,
.wp-block-woocommerce-product-review-form .comment-form-rating .stars button.is-selected svg polygon,
.wp-block-woocommerce-product-review-form .comment-form-rating .stars button.is-hovered svg path,
.wp-block-woocommerce-product-review-form .comment-form-rating .stars button.is-hovered svg polygon {
	fill: var(--wp--preset--color--rating);
	stroke: var(--wp--preset--color--rating);
}

p.stars a,
p.stars a:hover,
p.stars a:focus,
p.stars.selected a.active,
p.stars.selected a:not(.active) {
	color: var(--wp--preset--color--rating);
}

/*
 * Notices and panels take the medium radius, the same as the large images: they are surfaces
 * rather than controls. WooCommerce ships its notice banner at a flat 4px, which is the radius
 * this theme gives to things you click.
 */
.wc-block-components-notice-banner,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-radius: var(--wp--custom--radius--medium);
}

/*
 * A deeper fade at the ends of the thumbnail strip.
 *
 * WooCommerce fades whichever end has thumbnails out of view, as the only hint that the strip
 * scrolls, but it fades over 14% of the strip, which on a tall column is a couple of pixels of
 * softness and easy to miss. These are its own selectors with a longer ramp, so the cut-off end
 * clearly dissolves rather than looking like the last thumbnail.
 *
 * Only the vertical directions are restated: this gallery is a column. WooCommerce has
 * --overflow-left and --overflow-right for the horizontal layout, untouched here.
 */
.wc-block-product-gallery-thumbnails.wc-block-product-gallery-thumbnails--overflow-bottom {
	mask-image: linear-gradient(0deg, transparent, rgba(0, 0, 0, 0.3) 10%, #000 26%);
}

.wc-block-product-gallery-thumbnails.wc-block-product-gallery-thumbnails--overflow-top {
	mask-image: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3) 10%, #000 26%);
}

.wc-block-product-gallery-thumbnails.wc-block-product-gallery-thumbnails--overflow-top.wc-block-product-gallery-thumbnails--overflow-bottom {
	mask-image: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3) 10%, #000 26%, #000 74%, rgba(0, 0, 0, 0.3) 90%, transparent);
}

/*
 * The product page's two columns sit closer together than Purple's Extra Large gap.
 *
 * The image and the thing you buy with are a functional pair and should read as one unit, where
 * marketing columns are separate ideas and want the air. Purple sets the gap inside
 * hidden-single-product.php, its whole 142-line product layout, so changing it there would mean
 * owning the gallery, the price, the add to cart, the accordion and the reviews to move one
 * number. `:has()` reaches only the columns block that actually contains a product gallery, so
 * marketing patterns using the same token are untouched.
 *
 * If the single product template is ever forked for real, this belongs in the template instead:
 * it is layout, and layout belongs in the template whenever the template is ours to edit. Move it
 * there and delete this rule, rather than leaving the same decision expressed in two places.
 */
.wp-block-columns:has(> .wp-block-column > .wp-block-woocommerce-product-gallery) {
	gap: var(--wp--preset--spacing--70);
}

/*
 * Tables read as lists, not as spreadsheets.
 *
 * Core's table block puts a 1px box on every cell, so any table arrives as a full grid. In the
 * product specifications that grid also lands its top edge under the accordion's own rule, two
 * parallel lines a few pixels apart. Borders go, alternating rows do the separating, and the
 * padding grows from core's 0.5em.
 *
 * Applied to the core table block, which is what the specifications block renders inside, so one
 * rule covers both and any table written into a page later matches without anyone remembering to
 * style it. WooCommerce's own tables, the cart and the account screens, are not this block and
 * keep their own design.
 *
 * The wash is a hint of the text colour rather than white: on a background this close to white, a
 * lighter tint has nowhere to go. Core's own Stripes variation is left alone, so choosing it in
 * the editor does not stripe a striped table.
 */
.wp-block-table table {
	border-collapse: collapse;
}

.wp-block-table th,
.wp-block-table td {
	border: 0;
	padding: 0.75em 1em;
}

.wp-block-table:not(.is-style-stripes) tbody tr:nth-child(odd of :not([hidden])) th,
.wp-block-table:not(.is-style-stripes) tbody tr:nth-child(odd of :not([hidden])) td {
	background: color-mix(in srgb, var(--wp--preset--color--theme-2) 3%, transparent);
}

/* The specifications table alone gets a label column: muted, and wide enough to align the values. */
.wp-block-woocommerce-product-specifications th {
	color: var(--wp--preset--color--theme-4);
	font-weight: 400;
	width: 40%;
}

/* The add to cart row follows you down the page until you reach it.

   WooCommerce's Add to Cart with Options block puts the quantity and the button in a flex group of
   its own, the last thing in the form. On a product with a long list of options or accessories that
   row ends up well below the fold, and the one thing the page is for goes missing. position: sticky
   with bottom: 0 pins it to the bottom of the viewport for exactly as long as its own place on the
   page is still further down, then lets it settle where it belongs. No script, and nothing to undo
   at any breakpoint.

   The sticky range is the form, because that is the row's containing block, so the row is never
   pinned over anything but the add to cart area it belongs to.

   The generated wp-container-* class in the middle of that group's class list is a hash of the
   layout settings and changes when they do, so it is matched as the form's own flex child instead. */
.wp-block-add-to-cart-with-options > .wp-block-group.is-layout-flex {
	position: sticky;
	bottom: 0;
	z-index: 5;
	padding-block: 0.75rem;
	background-color: var(--wp--preset--color--theme-1);
	/* A hairline so the row reads as its own thing while the list scrolls under it. It stays once
	   the row settles, where it separates the buy action from the options above it, which is what
	   Purple's own accordion below does too. There is no way to tell pinned from settled in CSS. */
	border-top: 1px solid var(--wp--preset--color--theme-6);
}

/* The product price one step down from Purple's.

   Purple's hidden-single-product pattern hardcodes {"fontSize":"large"} on the price block, and
   WordPress emits every preset size class carrying !important, so global styles cannot reach it:
   a styles.blocks rule in theme.json is :root :where(...) and loses. Overriding it here is the
   only route short of forking the whole product page pattern for one number.

   The value itself still lives in theme.json, as the medium-large step, which was added because
   the scale jumped straight from 1.09rem to 1.5rem with nothing in between. */
.wp-block-woocommerce-product-price .wc-block-components-product-price.has-large-font-size {
	font-size: var(--wp--preset--font-size--medium-large) !important;
}

/*
 * The top bar over the header, which the plugin fills with the site's top bar menu: each item a
 * full-height block of its own, and the item for the page's own site on a lighter band, like the
 * classic shop's store network bar. No underline, not even on the current item, where Purple
 * underlines it in every menu: the band already marks it. The light text colour is restated on the
 * links because Purple's own link colour for Navigation blocks outranks the colour the block sets.
 *
 * Not in theme.json: the navigation link's padding and the current item's background are not
 * block styles it can express for one instance of a block.
 */
.qvidro-top-bar .wp-block-navigation-item__content,
.qvidro-top-bar .wp-block-navigation-item__content:hover {
	display: block;
	padding: 0.4em 1em;
	color: var(--wp--preset--color--theme-1);
	text-decoration: none;
}

.qvidro-top-bar .current-menu-item {
	background-color: rgba(255, 255, 255, 0.1);
}

/*
 * One content width for every page, 1000px, set as contentSize in theme.json.
 *
 * Purple gives the cart page and the order confirmation their own, 1060px, on the <main> group of
 * templates/page-cart.html and of its hidden-order-confirmation pattern. Rather than copying either
 * into this theme, their content is brought back to the global width here, restating the rule
 * WordPress generates for that group's layout, with more specificity. Checkout (1000px, Purple's
 * template) and My Account (1000px, WooCommerce's block theme stylesheet) already match.
 *
 * Layout belongs in the template: if either is ever forked, this goes and the value moves there.
 */
body.woocommerce-cart main.wp-block-group > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body.woocommerce-order-received main.wp-block-group > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: var(--wp--style--global--content-size);
}

/*
 * The checkout at the wide width, 1340px, the one exception to the 1000px content width.
 *
 * It is a form next to an order summary, not a page of text, and at 1000px the summary column
 * wrapped each product name over four or five lines. Purple's templates/page-checkout.html puts
 * the page content at Wide inside a group whose layout sets contentSize 1000px and no wideSize, so
 * Wide fell back to 1000px as well. Restated here with the global wide size, without forking the
 * template. If it is ever forked, this goes and the value moves there.
 */
body.woocommerce-checkout main.wp-block-group > .alignwide {
	max-width: var(--wp--style--global--wide-size);
}

/*
 * WS Form, in this theme's colours, type and shapes.
 *
 * WS Form's own styling stays on (its layout CSS is off in its settings): it lays the fields out and
 * hides each field's error until it is needed. It draws everything from CSS variables it declares
 * under :where([data-wsf-style-id]), with no specificity on purpose, so a theme overrides values
 * only, never WS Form's selectors, and its updates keep working. The attribute is on the form and
 * on its alert boxes, which is why it is the selector here.
 *
 * The values are the ones WooCommerce's fields and Purple's buttons already use in this theme:
 * light border, white field, the small radius, teal button lightening on hover. WS Form precomputes
 * the darker shades of its primary colour as fixed values, so the button's hover and focus are set
 * here too, not left to follow the primary colour.
 */
[data-wsf-style-id] {
	--wsf-form-font-family: inherit;
	--wsf-form-font-size: var(--wp--preset--font-size--medium);
	--wsf-form-font-size-small: var(--wp--preset--font-size--small);
	--wsf-form-color-base: var(--wp--preset--color--theme-2);
	--wsf-form-color-primary: var(--wp--preset--color--theme-3);
	--wsf-form-color-accent: var(--wp--preset--color--theme-3);
	--wsf-field-color-background: #ffffff;
	--wsf-field-border-color: var(--wp--preset--color--theme-6);
	--wsf-field-border-color-hover: var(--wp--preset--color--theme-4);
	--wsf-field-border-radius: var(--wp--custom--radius--small);
	/* The form's main button as the theme's buttons: the brand blue with dark text. */
	--wsf-field-button-primary-color: var(--wp--preset--color--theme-2);
	--wsf-field-button-primary-color-background: var(--wp--preset--color--brand);
	--wsf-field-button-primary-border-color: var(--wp--preset--color--brand);
	--wsf-field-button-primary-color-background-hover: var(--wp--preset--color--brand-light);
	--wsf-field-button-primary-border-color-hover: var(--wp--preset--color--brand-light);
	--wsf-field-button-primary-color-background-focus: var(--wp--preset--color--brand-light);
	--wsf-field-button-primary-border-color-focus: var(--wp--preset--color--brand-light);
}


/* The phone numbers, one per line, lined up on the right in the header. Elsewhere they keep the
 * pattern's left alignment. */
header.wp-block-template-part .qv-header-phones {
	align-items: flex-end;
}

/* The footer, and WPML's language list below it, on a faint shade to set them apart from the
 * page. The list loses WPML's bottom margin, so the shade runs to the bottom of the page. The div
 * outranks WPML's own rule, which uses the same two classes. */
footer.wp-block-template-part,
div.wpml-ls-legacy-list-horizontal.wpml-ls-statics-footer {
	background-color: rgba(0, 0, 0, 0.025);
}
div.wpml-ls-legacy-list-horizontal.wpml-ls-statics-footer {
	margin-bottom: 0;
	padding-bottom: 1.5rem;
}

/* On the homepage the last section runs straight into the footer, without the gap WordPress puts
 * between the page's top-level blocks. The template part block has no margin setting of its own. */
body.home footer.wp-block-template-part {
	margin-block-start: 0;
}

/* A product carousel sits right under a subline paragraph placed above it, without the gap the
 * collection's flow layout puts before each of its blocks. Where the heading row comes straight
 * before the products, the gap stays. The Product Template block has no spacing control. */
.wp-block-woocommerce-product-collection > p + .wc-block-product-template {
	margin-block-start: 0;
}

/* The "Text shadow" block style (functions.php), for headings and paragraphs over a photo. */
.is-style-text-shadow {
	text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.75);
}

/* "Square tiles" (class qv-square-tiles on a Columns block, used by the homepage's Ergo banner): a
 * row of square photos and one text tile, built as nested Columns. Core sizes each photo by its own
 * aspect ratio, so a text tile taller than the squares left a band of background under the photos.
 * The tile is a container and its text scales with its width, which keeps it square in nearly
 * every case; where the text still does not fit, the photos fill the row's height instead,
 * cropped (object-fit is already cover). */
.qv-square-tiles .wp-block-column > .wp-block-columns {
	height: 100%;
}
.qv-square-tiles .wp-block-columns .wp-block-column > .wp-block-image,
.qv-square-tiles .wp-block-columns .wp-block-column > .wp-block-image img {
	height: 100%;
	width: 100%;
}
.qv-square-tiles .wp-block-columns .wp-block-column > .wp-block-group {
	container-type: inline-size;
}
.qv-square-tiles .wp-block-column > .wp-block-group h2 {
	font-size: clamp(1rem, 10cqi, var(--wp--preset--font-size--large));
}
.qv-square-tiles .wp-block-column > .wp-block-group p {
	font-size: clamp(0.8125rem, 6.5cqi, var(--wp--preset--font-size--small));
	line-height: 1.4;
}

/* WooCommerce's brand logos ([product_brand_thumbnails], the homepage's "Our brands" strip) keep the
 * list's default left indent, so the row sat off centre, most visibly two by two on phones. */
ul.brand-thumbnails {
	padding-inline-start: 0;
}

/*
 * Space between the variation choices (colour swatches, size pills) and the quantity and buy row.
 * WooCommerce's own variable product part puts 1rem above and below the choices; Purple's copy of
 * that part (parts/variable-product-add-to-cart-with-options.html) keeps the margin above, as
 * spacing|20, and drops the one below, so the quantity field touched the swatches. The blocks have
 * no spacing support, so theme.json cannot set it. If the part is ever forked here, set the
 * group's bottom margin in it and drop this rule.
 */
.wp-block-woocommerce-add-to-cart-with-options-variation-selector {
	margin-block-end: var(--wp--preset--spacing--20);
}

/*
 * Page numbers of the product listings and the blog, as boxes like the theme's buttons. Purple
 * leaves them as plain links in a row. The arrows instead of "Previous" and "Next" are the
 * pagination block's own settings, given as defaults by the QuadrosVidro Core plugin.
 */
.wp-block-query-pagination {
	gap: var(--wp--preset--spacing--10);
}
.wp-block-query-pagination .wp-block-query-pagination-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--10);
}
.wp-block-query-pagination .page-numbers,
.wp-block-query-pagination .wp-block-query-pagination-previous,
.wp-block-query-pagination .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	padding: 0 0.5rem;
	border: 1px solid var(--wp--preset--color--theme-6);
	border-radius: var(--wp--custom--radius--small);
	color: var(--wp--preset--color--theme-2);
	text-decoration: none;
}
.wp-block-query-pagination a.page-numbers:hover,
.wp-block-query-pagination .wp-block-query-pagination-previous:hover,
.wp-block-query-pagination .wp-block-query-pagination-next:hover {
	border-color: var(--wp--preset--color--theme-3);
	color: var(--wp--preset--color--theme-3);
}
/* The current page in the light tint with the link colour, not filled: a filled box read as a button
   and competed with the product buttons (Marco, 2026-11-19). */
.wp-block-query-pagination .page-numbers.current {
	border-color: var(--wp--preset--color--theme-3);
	background: var(--wp--preset--color--theme-5);
	color: var(--wp--preset--color--theme-3);
}
.wp-block-query-pagination .page-numbers.dots {
	border-color: transparent;
}
.wp-block-query-pagination .wp-block-query-pagination-previous-arrow,
.wp-block-query-pagination .wp-block-query-pagination-next-arrow {
	margin: 0;
}

/*
 * A product listing with no filters (the QuadrosVidro Core plugin adds `qv-no-filters` to the body
 * when its rule gives the listing none): no empty side column, the products take the full width.
 * The classes are on the columns of the theme's copy of `purple/product-grid-with-filters`; the
 * column's width is written inline by the block, hence the !important.
 */
.qv-no-filters .qv-filters-column {
	display: none;
}
.qv-no-filters .qv-products-column {
	flex-basis: 100% !important;
}

/*
 * The header's submenus above the product listings' filter panel. Purple's listing pattern makes
 * the panel sticky, which core gives z-index 10, while the Navigation block's submenus have 2, so
 * the Products submenu opened behind the panel (woocommerce/woocommerce#71110). Only the submenus
 * are raised: giving the whole header a z-index would also cap the mobile menu overlay, which
 * lives inside it, and let the page's own layers (the carousels' arrows, at 22) show through it.
 * The selector is core's own for that z-index, with the header in front so it wins.
 */
header.wp-block-template-part .wp-block-navigation .has-child .wp-block-navigation__submenu-container {
	z-index: 20;
}

/*
 * Temporary, until the Workmood logo (see the rebrand checklist): the current logo's pen is drawn
 * against the top edge, so the header has no top padding (parts/header.html) and the logo meets
 * the top bar. Everything else in that row keeps the space it had: the phone numbers get it back
 * as a margin. On tablets and phones the desktop logo row is hidden but its gap to the next row
 * still applied, 10px above the logo there; the row is cancelled and the logo aligned to the top.
 * Revert all of this, and the header part's padding, with the new logo.
 */
header.wp-block-template-part .qv-header-logo-row .qv-header-phones {
	margin-block-start: var(--wp--preset--spacing--20);
}
@media (width <= 782px) {
	header.wp-block-template-part .qv-header-menu-row {
		margin-block-start: 0;
	}
	header.wp-block-template-part .qv-header-menu-row > .wp-block-site-logo {
		align-self: flex-start;
	}
}

/*
 * The brand's logo in the product page's specifications table, where the QuadrosVidro Core plugin
 * puts it in place of the brand name (Modules\Product_Attributes).
 */
.wp-block-woocommerce-product-specifications .qv-product-brand-logo {
	display: inline-block;
	vertical-align: middle;
}
.wp-block-woocommerce-product-specifications .qv-product-brand-logo img {
	display: block;
	width: auto;
	max-width: 120px;
	height: auto;
	max-height: 32px;
}

/*
 * The product cards' second photo, shown on hover: the first gallery image, which the QuadrosVidro
 * Core plugin adds after the card's image (Modules\Product_Hover_Image). It sits over the main
 * image and fades in, only on devices that hover; on touch screens it stays hidden.
 */
.wc-block-components-product-image a:has(> .qv-hover-image) {
	position: relative;
	display: block;
}
.wc-block-components-product-image .qv-hover-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}
@media (hover: hover) {
	.wc-block-components-product-image a:hover > .qv-hover-image,
	.wc-block-components-product-image a:focus-visible > .qv-hover-image {
		opacity: 1;
	}
}
@media (prefers-reduced-motion: reduce) {
	.wc-block-components-product-image .qv-hover-image {
		transition: none;
	}
}

/*
 * Product carousels fade out at the edge that has more products to scroll to: on the right while
 * there is more to the right, on the left once scrolled, both in the middle. WooCommerce's carousel
 * script already tracks that position for its arrows (`aria-disabled` on each), so the fade follows
 * the arrows and needs no script of its own. Before the script runs, the markup has the left arrow
 * disabled and the right one enabled, which is the right fade for a carousel at its start.
 */
.wp-block-woocommerce-product-collection:has(.is-product-collection-layout-carousel) {
	--qv-fade-start: 0px;
	--qv-fade-end: 0px;
	--qv-fade-size: 64px;
}
.wp-block-woocommerce-product-collection:has(.wc-block-next-previous-buttons__button[aria-disabled="false"] .wc-block-next-previous-buttons__icon--left) {
	--qv-fade-start: var(--qv-fade-size);
}
.wp-block-woocommerce-product-collection:has(.wc-block-next-previous-buttons__button[aria-disabled="false"] .wc-block-next-previous-buttons__icon--right) {
	--qv-fade-end: var(--qv-fade-size);
}
.wp-block-woocommerce-product-collection .is-product-collection-layout-carousel {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--qv-fade-start), #000 calc(100% - var(--qv-fade-end)), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 var(--qv-fade-start), #000 calc(100% - var(--qv-fade-end)), transparent 100%);
}
@media (width <= 782px) {
	.wp-block-woocommerce-product-collection:has(.is-product-collection-layout-carousel) {
		--qv-fade-size: 32px;
	}
}

/*
 * Long text pages (terms, privacy, cookies): a section heading gets clear room above it, where the
 * theme gives every block the same small gap. Pages only, not the home page, whose headings sit in
 * their own groups; and H3 only on pages that have H2s, so the FAQs keep their spacing.
 */
body.page:not(.home) .wp-block-post-content > h2.wp-block-heading:not(:first-child) {
	margin-block-start: var(--wp--preset--spacing--70);
}
body.page:not(.home) .wp-block-post-content > h2.wp-block-heading ~ h3.wp-block-heading {
	margin-block-start: var(--wp--preset--spacing--30);
}

/*
 * The same rules inside Complianz's cookie policy, which sits in the terms page in a box of its own
 * (#cmplz-document), out of reach of the rules above and of the layout's block gap: its blocks get
 * the page's gap, and its H3 sections the H3 spacing, so the page reads as one document.
 */
body.page:not(.home) .wp-block-post-content #cmplz-document > * {
	margin-block-start: var(--wp--preset--spacing--20);
	margin-block-end: 0;
}
body.page:not(.home) .wp-block-post-content #cmplz-document > :first-child {
	margin-block-start: 0;
}
body.page:not(.home) .wp-block-post-content #cmplz-document > h3 {
	margin-block-start: var(--wp--preset--spacing--30);
}
