/*
 * Во светот на Гоц — WooCommerce layer. Every WooCommerce page template that has its own markup
 * (archive-product, single-product, cart, checkout templates) is overridden outright (see woocommerce/*.php)
 * and styled through main.css's own classes plus assets/css/theme.css — this file only styles the one piece
 * of native WooCommerce markup this theme does NOT replace: the variation info box injected via JS once a
 * variable product's attributes are selected (single-product/add-to-cart/variation.php, loaded through
 * woocommerce_template_single_add_to_cart() in woocommerce/single-product.php).
 */

/* The design shows one plain button-group per attribute (inc/variants.php) — WooCommerce's own native
   attribute <select> table and its "Clear" link are kept in the DOM (so WooCommerce's variation-matching
   JS keeps working) but stay invisible. The reset link's own JS (add-to-cart-variation.js) sets an inline
   style="display:inline" on it once a variation is selected — only !important can still override that,
   the one deliberate, targeted use of it in this file. */
.variations_form .variations { display: none; }
.variations_form .reset_variations { display: none !important; }

/* WooCommerce also prints its own (redundant) description/price/availability box per variation — the
   design already shows the product's own description/price/availability once, above the variant buttons
   (see woocommerce/single-product.php), and .woocommerce_get_stock_html is filtered to an empty string
   (inc/woocommerce-support.php), so these three stay empty; collapse them instead of leaving blank gaps. */
.woocommerce-variation-description:empty,
.woocommerce-variation-price:empty,
.woocommerce-variation-availability:empty { display: none; }

/* WooCommerce's own bundled stylesheet restyles every element with class "button" (`.woocommerce
   a.button, .woocommerce button.button {…}`) at higher specificity than main.css's plain `.button` class —
   restated here at higher specificity still, with the theme's own tokens, for every real button/link this
   theme gives that class inside WooCommerce's own body classes (checkout/cart links, quantity, etc). */
body.woocommerce a.button, body.woocommerce-page a.button,
body.woocommerce button.button, body.woocommerce-page button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 43px;
  padding: 12px 23px;
  border: 1px solid var(--dark);
  border-radius: var(--radius);
  background: var(--dark);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  transition: background .25s, color .25s, border-color .25s;
}

/* The same rule above also flattens main.css's `.button:hover` / `.button-outline` states (WooCommerce's
   own grey `:hover` wins otherwise, and every outline button renders filled) — restated at the same
   higher specificity so hover and the selected/unselected variant buttons match the static design. */
body.woocommerce a.button:hover, body.woocommerce-page a.button:hover,
body.woocommerce button.button:hover, body.woocommerce-page button.button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
body.woocommerce a.button.button-outline, body.woocommerce-page a.button.button-outline,
body.woocommerce button.button.button-outline, body.woocommerce-page button.button.button-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--line);
}
body.woocommerce a.button.button-outline:hover, body.woocommerce-page a.button.button-outline:hover,
body.woocommerce button.button.button-outline:hover, body.woocommerce-page button.button.button-outline:hover {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}
body.woocommerce .variant-group button.button, body.woocommerce-page .variant-group button.button {
  min-height: 36px;
  padding: 8px 15px;
}
/* The shop's "Филтри" toggle is a .button too — the rule above gave it the dark fill and display:inline-flex
   on desktop. Restore the design: a transparent ghost button, shown only below 1024px (main.css). */
body.woocommerce .shop-toolbar button.filter-toggle, body.woocommerce-page .shop-toolbar button.filter-toggle {
  display: none;
  background: transparent;
  color: inherit;
  border-color: transparent;
}
@media (max-width: 1023px) {
  body.woocommerce .shop-toolbar button.filter-toggle, body.woocommerce-page .shop-toolbar button.filter-toggle { display: inline-flex; }
}

/* Options WooCommerce reports as unavailable for the current combination (product.js sets `disabled`). */
body.woocommerce .variant-group button.button:disabled, body.woocommerce-page .variant-group button.button:disabled {
  padding: 8px 15px;
  opacity: .4;
  cursor: not-allowed;
  background: transparent;
  color: var(--foreground);
  border-color: var(--line);
}

/* The same WooCommerce rule also sets `position:relative; left:auto` on the product card's "Избери опции"
   link, so it drops out of main.css's `.choose-options{position:absolute…}` overlay and sits in the flow
   under the image instead — only a clipped dark sliver of it shows on hover. Restated at higher
   specificity, together with main.css's own mobile `display:none` (which the `display:inline-flex` above
   would otherwise undo) and the slide transition the `transition` above replaces. */
body.woocommerce .product-image a.choose-options, body.woocommerce-page .product-image a.choose-options {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  transition: transform .3s, background .25s, color .25s, border-color .25s;
}
@media (max-width: 767px) {
  body.woocommerce .product-image a.choose-options, body.woocommerce-page .product-image a.choose-options { display: none; }
}

/* WooCommerce also gives the add-to-cart and place-order buttons a `.alt` class specifically, restyled a
   second time in its stylesheet with its own brand purple at even higher specificity than the plain
   `.button` fix above — this beats that too, restoring the same theme colours for those two buttons. */
body.woocommerce .single_add_to_cart_button.alt, body.woocommerce-page .single_add_to_cart_button.alt,
body.woocommerce #place_order.alt, body.woocommerce-page #place_order.alt,
body.woocommerce .single_add_to_cart_button.alt.disabled, body.woocommerce-page .single_add_to_cart_button.alt.disabled {
  background: var(--dark);
  color: #fff;
}
body.woocommerce button.single_add_to_cart_button.alt:hover, body.woocommerce-page button.single_add_to_cart_button.alt:hover,
body.woocommerce button#place_order.alt:hover, body.woocommerce-page button#place_order.alt:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
