/**
 * Site-wide primary buttons — solid blue + white label;
 * hover → white fill, blue border, blue text.
 * Loads after theme so it beats ecomall reset.css.
 */

:root {
  --gv-btn-bg: var(--gv-color-blue);
  --gv-btn-fg: #ffffff;
  --gv-btn-hover-bg: #ffffff;
  --gv-btn-hover-fg: var(--gv-color-blue);
  --gv-btn-hover-border: var(--gv-color-blue);
  --gv-btn-radius: var(--gv-radius-sm);
}

/* ---- Shared primary (solid blue, white text) — not header Search ---- */
.woocommerce .product .product-group-button-meta div.loop-add-to-cart .button,
.woocommerce .product .product-group-button-meta div.loop-add-to-cart a.button,
.woocommerce .products .product .loop-add-to-cart .button,
.woocommerce ul.products .product .loop-add-to-cart .button,
.woocommerce .products .product .loop-add-to-cart a.button,
.woocommerce a.button.add_to_cart_button,
.woocommerce button.button.add_to_cart_button,
.woocommerce .single_add_to_cart_button,
.woocommerce button.single_add_to_cart_button,
.woocommerce a.single_add_to_cart_button,
.ts-product-quick-view-modal .single_add_to_cart_button,
.ts-popup-modal .single_add_to_cart_button,
.woocommerce .ts-popup-content .single_add_to_cart_button,
.woocommerce #respond input#submit.alt:not(.cart-dropdown-form *):not(.omw_send_order):not([href*='wa.me']):not([href*='whatsapp']),
.woocommerce a.button.alt:not(.cart-dropdown-form *):not(.omw_send_order):not([href*='wa.me']):not([href*='whatsapp']),
.woocommerce button.button.alt:not(.cart-dropdown-form *):not(.omw_send_order),
.woocommerce input.button.alt:not(.cart-dropdown-form *) {
  background-color: var(--gv-btn-bg) !important;
  background-image: none !important;
  color: var(--gv-btn-fg) !important;
  border: 1px solid var(--gv-btn-bg) !important;
  box-shadow: none !important;
  outline: none !important;
  text-shadow: none !important;
  fill: var(--gv-btn-fg);
  transition: background-color var(--gv-transition, 150ms ease),
    color var(--gv-transition, 150ms ease),
    border-color var(--gv-transition, 150ms ease);
}

.woocommerce .product .product-group-button-meta div.loop-add-to-cart .button:hover,
.woocommerce .product .product-group-button-meta div.loop-add-to-cart .button:focus,
.woocommerce .product .product-group-button-meta div.loop-add-to-cart .button:focus-visible,
.woocommerce .product .product-group-button-meta div.loop-add-to-cart a.button:hover,
.woocommerce .products .product .loop-add-to-cart .button:hover,
.woocommerce .products .product .loop-add-to-cart .button:focus-visible,
.woocommerce .products .product .loop-add-to-cart a.button:hover,
.woocommerce a.button.add_to_cart_button:hover,
.woocommerce button.button.add_to_cart_button:hover,
.woocommerce .single_add_to_cart_button:hover,
.woocommerce .single_add_to_cart_button:focus-visible,
.woocommerce button.single_add_to_cart_button:hover,
.woocommerce a.single_add_to_cart_button:hover,
.ts-product-quick-view-modal .single_add_to_cart_button:hover,
.ts-popup-modal .single_add_to_cart_button:hover,
.woocommerce .ts-popup-content .single_add_to_cart_button:hover,
.woocommerce #respond input#submit.alt:hover:not(.cart-dropdown-form *):not(.omw_send_order),
.woocommerce a.button.alt:hover:not(.cart-dropdown-form *):not(.omw_send_order):not([href*='wa.me']):not([href*='whatsapp']),
.woocommerce button.button.alt:hover:not(.cart-dropdown-form *):not(.omw_send_order),
.woocommerce input.button.alt:hover:not(.cart-dropdown-form *) {
  background-color: var(--gv-btn-hover-bg) !important;
  background-image: none !important;
  color: var(--gv-btn-hover-fg) !important;
  border: 1px solid var(--gv-btn-hover-border) !important;
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
  fill: var(--gv-btn-hover-fg);
}

/* Loop ATC — radius / weight / full-width (beat theme list 200–210px caps) */
.woocommerce .product .product-group-button-meta div.loop-add-to-cart .button,
.woocommerce .products .product .loop-add-to-cart .button,
.woocommerce .products .product .loop-add-to-cart a.button,
.woocommerce .products .product .loop-add-to-cart a,
.woocommerce.main-products.list .products .product-wrapper .loop-add-to-cart .button,
.woocommerce.ts-product.list .products .product-wrapper .loop-add-to-cart .button,
.ts-product-wrapper.list .products .product-wrapper .loop-add-to-cart .button,
.woocommerce .products .product .product-group-button-meta .loop-add-to-cart .button,
/* Theme @media ≤1279: .woocommerce.list … a { max-width: 200px } */
.woocommerce .list .products .product .loop-add-to-cart a,
.woocommerce.list .products .product .loop-add-to-cart a,
.woocommerce.main-products.list .products .product-wrapper .loop-add-to-cart .button {
  border-radius: var(--gv-btn-radius) !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  box-sizing: border-box !important;
}

@media only screen and (max-width: 1279px) {
  .woocommerce .list .products .product .loop-add-to-cart a,
  .woocommerce.list .products .product .loop-add-to-cart a,
  .woocommerce .list .products .product .loop-add-to-cart .button,
  .woocommerce.list .products .product .loop-add-to-cart .button,
  .woocommerce.ts-product.list .products .product .loop-add-to-cart .button,
  .ts-product-wrapper.list .products .product .loop-add-to-cart a.button {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}

/*
 * Header Search — flush blue end-cap.
 * Theme sets padding: 16px 30px !important on submit — override in ux-polish.
 */
.ts-header .ts-search-by-category .search-button {
  background-color: #1f2a7c !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ts-header .ts-search-by-category .search-table .search-button input[type^='submit'],
.ts-header .ts-search-by-category .search-button input[type='submit'],
.ts-header .ts-search-by-category .search-button button {
  background-color: #1f2a7c !important;
  background-image: none !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  text-shadow: none !important;
  padding: 0 18px !important;
  line-height: calc(var(--gio-h, 44px) - 2px) !important;
  fill: #ffffff;
}

.ts-header .ts-search-by-category .search-button:hover:not(.gv-search-busy):not(:has([aria-busy='true'])):not(:has(:disabled)) {
  background-color: #ffffff !important;
  box-shadow: none !important;
}

.ts-header .ts-search-by-category .search-table .search-button input[type^='submit']:hover:not(:disabled):not([aria-busy='true']),
.ts-header .ts-search-by-category .search-button input[type='submit']:hover:not(:disabled):not([aria-busy='true']),
.ts-header .ts-search-by-category .search-button button:hover:not(:disabled):not([aria-busy='true']) {
  background-color: #ffffff !important;
  color: #1f2a7c !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
  fill: #1f2a7c;
}

.ts-header .ts-search-by-category .search-button.gv-search-busy,
.ts-header .ts-search-by-category .search-button:has([aria-busy='true']),
.ts-header .ts-search-by-category .search-button:has(:disabled),
.ts-header .ts-search-by-category .search-button.gv-search-busy input[type^='submit'],
.ts-header .ts-search-by-category .search-button.gv-search-busy button,
.ts-header .ts-search-by-category .search-button input[type^='submit'][aria-busy='true'],
.ts-header .ts-search-by-category .search-button input[type^='submit']:disabled,
.ts-header .ts-search-by-category .search-button button[aria-busy='true'],
.ts-header .ts-search-by-category .search-button button:disabled {
  background-color: #1f2a7c !important;
  color: #ffffff !important;
  box-shadow: none !important;
  border: none !important;
  filter: none !important;
  fill: #ffffff;
}
