/* Weby SaaS 2.5.6 RC1 — Shopini Quick Order visual integration.
 * CSS only, no change to orders, cart, checkout or plugin activation.
 * X remains the untouched reference. All selectors are scoped to other families.
 */
body.weby-theme.weby-visual-aqua {
  --weby-qo-brand: var(--wa-primary, #086db0);
  --weby-qo-heading: var(--wa-dark, #102f46);
  --weby-qo-muted: var(--wa-text, #64748b);
  --weby-qo-radius: 12px;
}
body.weby-theme:is(.weby-visual-studio,.weby-visual-signature,.weby-visual-pro,.weby-visual-pulse,.weby-visual-marketplace) {
  --weby-qo-brand: var(--wv-brand, #276c8b);
  --weby-qo-heading: var(--wv-ink, #1e293b);
  --weby-qo-muted: var(--wv-text, #64748b);
  --weby-qo-radius: var(--wv-radius, 12px);
}
body.weby-theme.weby-visual-marketplace { --weby-qo-brand: var(--wv-brand, #ff8200); --weby-qo-radius: 10px; }
body.weby-theme.weby-visual-studio { --weby-qo-radius: 4px; }
body.weby-theme.weby-visual-signature { --weby-qo-radius: 10px; }

/* The shortcode or automatic insertion can be inside/outside the Woo summary.
 * Never move its DOM: this maintains Woo hooks, nonces and AJAX listeners.
 * Eliminate a centered 680px "floating panel" and align it with product content. */
body.weby-theme:not(.weby-visual-x) .shopini-qo {
  --shopini-orange: var(--weby-qo-brand);
  --shopini-orange-dark: var(--weby-qo-brand);
  --shopini-text: var(--weby-qo-heading);
  --shopini-muted: var(--weby-qo-muted);
  --shopini-border: #e3e8ee;
  --shopini-surface: #fff;
  --shopini-summary: #f7f9fb;
  display:block;
  clear:both;
  float:none;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:18px 0 24px;
  padding:0;
  box-sizing:border-box;
  color:var(--weby-qo-heading);
  font-family:inherit;
  isolation:isolate;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo,
body.weby-theme:not(.weby-visual-x) .shopini-qo *,
body.weby-theme:not(.weby-visual-x) .shopini-qo *::before,
body.weby-theme:not(.weby-visual-x) .shopini-qo *::after { box-sizing:border-box; }
/* The plugin inserts an empty clearing DIV ahead of its form. In a
 * single-product summary this otherwise clears the floated product gallery. */
body.weby-theme:not(.weby-visual-x) .woocommerce div.product .summary .shopini-qo { clear:none!important; }
body.weby-theme:not(.weby-visual-x) .woocommerce div.product .summary > div[style*="clear:both"]:has(+ .shopini-qo) { display:none; }
body.weby-theme:not(.weby-visual-x) .shopini-qo__form {
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  padding:clamp(16px,2vw,24px);
  overflow:visible;
  background:#fff;
  border:1px solid #e5e9ef;
  border-radius:var(--weby-qo-radius);
  box-shadow:0 2px 12px rgba(15,23,42,.045);
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__form::before {
  display:block;
  margin:0 0 14px;
  color:var(--weby-qo-heading);
  font-size:clamp(16px,1.4vw,20px);
  font-weight:750;
  letter-spacing:-.015em;
  line-height:1.35;
  text-align:start;
}
/* Original plugin injects a second marketing tagline with ::after after ALL fields.
 * Hiding it is purely cosmetic and avoids an awkward line beneath Submit. */
body.weby-theme:not(.weby-visual-x) .shopini-qo__form::after { display:none; }
body.weby-theme:not(.weby-visual-x) .shopini-qo__row {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:12px;
  width:100%;
  max-width:100%;
  margin:0 0 12px;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__field {
  min-width:0;
  width:100%;
  gap:5px;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__field label {
  display:block;
  margin:0;
  padding:0;
  color:var(--weby-qo-heading);
  font-family:inherit;
  font-weight:600;
  font-size:12px;
  line-height:1.5;
  text-align:start!important;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__field :is(input,select,textarea) {
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:9px 12px!important;
  border:1px solid #dce3eb!important;
  border-radius:max(7px,calc(var(--weby-qo-radius) - 3px))!important;
  background-color:#fff!important;
  color:var(--weby-qo-heading)!important;
  box-shadow:none!important;
  font-family:inherit!important;
  font-size:14px!important;
  line-height:1.3!important;
  text-align:start!important;
  transition:border-color .15s ease, box-shadow .15s ease!important;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__field select {
  cursor:pointer;
  padding-inline-end:28px!important;
  background-image:none!important;
  appearance:auto;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__field :is(input,select,textarea):focus-visible {
  outline:2px solid var(--weby-qo-brand)!important;
  outline-offset:1px!important;
  border-color:var(--weby-qo-brand)!important;
  box-shadow:none!important;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__summary {
  min-width:0;
  margin:12px 0 14px;
  padding:12px 14px;
  background:#f7f9fb;
  border:1px solid #e9edf2;
  border-radius:max(8px,calc(var(--weby-qo-radius) - 2px));
  overflow:visible;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__summary-row {
  width:100%;
  min-width:0;
  gap:10px;
  margin-bottom:6px;
  font-size:13px;
  line-height:1.5;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__summary-row > * {
  min-width:0;
  overflow-wrap:anywhere;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__summary-row > span:last-child { white-space:normal; }
body.weby-theme:not(.weby-visual-x) .shopini-qo__summary-row--total {
  margin-top:8px;
  padding-top:10px;
  font-weight:750;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__summary-row--total :is(.shopini-qo__total,span:last-child) {
  color:var(--weby-qo-brand)!important;
  font-size:17px!important;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__submit {
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%!important;
  min-width:0;
  max-width:100%;
  min-height:46px;
  margin:0!important;
  padding:11px 16px!important;
  background:var(--weby-qo-brand)!important;
  color:#fff!important;
  border:1px solid var(--weby-qo-brand)!important;
  border-radius:max(7px,calc(var(--weby-qo-radius) - 2px))!important;
  box-shadow:none!important;
  font-family:inherit!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1.35!important;
  text-align:center!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
  transform:none!important;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__submit::before {display:none;}
body.weby-theme:not(.weby-visual-x) .shopini-qo__submit:hover:not(:disabled) {
  filter:brightness(.93);
  transform:none!important;
  box-shadow:none!important;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__submit:focus-visible {
  outline:2px solid var(--weby-qo-brand)!important;
  outline-offset:3px!important;
}
body.weby-theme:not(.weby-visual-x) .shopini-qo__error {width:100%;max-width:100%;overflow-wrap:anywhere;}

/* Woo's independent Buy Now button is part of the product CTA group.
 * The same sizing system applies; only styling, NOT click semantics, changes. */
body.single-product.weby-theme:not(.weby-visual-x) form.cart [data-shopini-buy-now] {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  max-width:100%;
  min-width:0;
  min-height:44px;
  padding:10px 16px;
  margin:0;
  background:#fff!important;
  color:var(--weby-qo-brand)!important;
  border:1px solid var(--weby-qo-brand)!important;
  border-radius:max(7px,calc(var(--weby-qo-radius) - 2px))!important;
  font-family:inherit;
  font-weight:700;
  font-size:14px;
  line-height:1.35;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
  box-shadow:none;
}
body.single-product.weby-theme:not(.weby-visual-x) form.cart [data-shopini-buy-now]:hover:not(:disabled) {
  background:var(--weby-qo-brand)!important;
  color:#fff!important;
}
body.single-product.weby-theme:not(.weby-visual-x) form.cart [data-shopini-buy-now]:focus-visible {
  outline:2px solid var(--weby-qo-brand)!important;
  outline-offset:2px;
}
body.single-product.weby-theme:not(.weby-visual-x) form.cart [data-shopini-buy-now]:disabled {
  opacity:.5;
  cursor:not-allowed;
}
body.weby-theme:not(.weby-visual-x) .woocommerce div.product .summary form.cart {max-width:100%;min-width:0}

@media(max-width:600px) {
  body.weby-theme:not(.weby-visual-x) .shopini-qo {margin:14px 0 22px;}
  /* The plugin inserts an empty clearing DIV ahead of its form. In a
 * single-product summary this otherwise clears the floated product gallery. */
body.weby-theme:not(.weby-visual-x) .woocommerce div.product .summary .shopini-qo { clear:none!important; }
body.weby-theme:not(.weby-visual-x) .woocommerce div.product .summary > div[style*="clear:both"]:has(+ .shopini-qo) { display:none; }
body.weby-theme:not(.weby-visual-x) .shopini-qo__form {padding:16px 14px;}
  body.weby-theme:not(.weby-visual-x) .shopini-qo__row {grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:10px;}
  body.weby-theme:not(.weby-visual-x) .shopini-qo__summary {padding:12px;}
  body.weby-theme:not(.weby-visual-x) .shopini-qo__submit {min-height:48px;}
}
@media(prefers-reduced-motion:reduce) {
  body.weby-theme:not(.weby-visual-x) .shopini-qo :is(input,select,button) {transition:none!important;}
}


/* ================================================================
 * Weby 2.5.8 RC1 — Fiche produit alignée sur le modèle Theme X
 * Référence : quantité − / + + Ajouter au panier sur la même ligne,
 * Acheter maintenant en pleine largeur, formulaire centré sous les CTA.
 * Toutes les règles sont visuelles et limitées aux six autres familles.
 * ================================================================ */
body.single-product.weby-theme:not(.weby-visual-x) div.product .summary {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  padding:clamp(18px,2.5vw,32px)!important;
  background:#fff;
  border:1px solid #e5e9f0;
  border-radius:clamp(16px,2vw,26px);
  box-shadow:0 6px 28px rgba(15,23,42,.045);
  overflow:visible;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product .summary > * {
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product .summary .woocommerce-product-details__short-description {
  line-height:1.72;
  overflow-wrap:anywhere;
}
/* Woo simple product: two columns for quantity and add-to-cart.
 * Preserve native Woo fields and the existing buy-now data attributes. */
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart:not(.variations_form) {
  display:grid!important;
  grid-template-columns:max-content minmax(0,1fr)!important;
  align-items:stretch!important;
  column-gap:16px!important;
  row-gap:12px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0;
  margin:24px 0 0!important;
  float:none!important;
  clear:none!important;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart:not(.variations_form) > .quantity {
  grid-column:1!important;
  grid-row:1!important;
  align-self:stretch;
  justify-self:start;
  margin:0!important;
  float:none!important;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart:not(.variations_form) > .single_add_to_cart_button {
  grid-column:2!important;
  grid-row:1!important;
  margin:0!important;
  min-width:0!important;
  width:100%!important;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart:not(.variations_form) > [data-shopini-buy-now] {
  grid-column:1/-1!important;
  grid-row:2!important;
}
/* Variations keep their options above, but share the two-row CTA grid. */
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart.variations_form .woocommerce-variation-add-to-cart {
  display:grid!important;
  grid-template-columns:max-content minmax(0,1fr)!important;
  align-items:stretch!important;
  gap:12px 16px!important;
  width:100%;
  min-width:0;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart.variations_form .woocommerce-variation-add-to-cart > .quantity {
  grid-column:1!important;
  grid-row:1!important;
  margin:0!important;
  float:none!important;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart.variations_form .woocommerce-variation-add-to-cart > .single_add_to_cart_button {
  grid-column:2!important;
  grid-row:1!important;
  min-width:0;
  width:100%!important;
  margin:0!important;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart.variations_form .woocommerce-variation-add-to-cart > [data-shopini-buy-now] {
  grid-column:1/-1!important;
  grid-row:2!important;
}
/* Shared visual rules for both simple and variation Woo CTAs. */
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .single_add_to_cart_button {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  min-height:46px!important;
  padding:10px 14px!important;
  border:1px solid var(--weby-qo-brand)!important;
  border-radius:max(7px,calc(var(--weby-qo-radius) - 2px))!important;
  background:var(--weby-qo-brand)!important;
  color:#fff!important;
  font-family:inherit!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1.35!important;
  text-align:center;
  white-space:normal!important;
  overflow-wrap:anywhere;
  box-shadow:none!important;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .single_add_to_cart_button:hover:not(:disabled) {
  filter:brightness(.93);
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart [data-shopini-buy-now] {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  float:none!important;
  width:100%!important;
  max-width:100%!important;
  min-height:46px!important;
  padding:10px 14px!important;
  margin:0!important;
  border:1px solid var(--weby-qo-brand)!important;
  border-radius:max(7px,calc(var(--weby-qo-radius) - 2px))!important;
  background:#fff!important;
  color:var(--weby-qo-brand)!important;
  box-shadow:none!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
}
/* Theme X-style plus/minus quantity control, progressively enhanced by JS.
 * Native one-input quantity remains usable if JS is unavailable. */
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity {
  display:grid!important;
  grid-template-columns:40px 50px 40px!important;
  width:max-content!important;
  max-width:100%!important;
  min-width:0;
  height:46px;
  align-items:stretch;
  padding:0;
  gap:0;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity .shopini-quantity__button {
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:46px;
  min-height:46px;
  margin:0;
  padding:0;
  background:#fff;
  color:var(--weby-qo-heading);
  border:1px solid #dce3ea;
  border-radius:0;
  box-shadow:none;
  font-size:17px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity .shopini-quantity__button:first-child {
  border-radius:8px 0 0 8px;
  border-inline-end:0;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity .shopini-quantity__button:last-child {
  border-radius:0 8px 8px 0;
  border-inline-start:0;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity input.qty {
  box-sizing:border-box!important;
  display:block!important;
  width:50px!important;
  max-width:50px!important;
  min-width:0!important;
  height:46px!important;
  min-height:46px!important;
  margin:0!important;
  padding:0 4px!important;
  border:1px solid #dce3ea!important;
  border-radius:0!important;
  background:#f7f8fa!important;
  color:var(--weby-qo-heading)!important;
  font-size:14px;
  text-align:center;
  box-shadow:none!important;
  appearance:textfield;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity input.qty::-webkit-inner-spin-button,
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity input.qty::-webkit-outer-spin-button {appearance:none;margin:0;}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity .shopini-quantity__button:hover {
  background:#f7f8fa;
  color:var(--weby-qo-brand);
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity .shopini-quantity__button:focus-visible {
  outline:2px solid var(--weby-qo-brand);outline-offset:2px;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity .shopini-quantity__button:disabled {
  opacity:.4;cursor:not-allowed;
}
/* Match the reference: order form centered in the product information card,
 * not a separate oversized panel and not glued to one edge. */
body.single-product.weby-theme:not(.weby-visual-x) div.product .summary .shopini-qo {
  clear:none!important;
  width:100%;
  max-width:680px;
  margin:26px auto 12px;
}
body.single-product.weby-theme:not(.weby-visual-x) div.product .summary .shopini-qo__form {
  padding:clamp(16px,2.4vw,26px);
  border-radius:20px;
  background:linear-gradient(180deg,#fffaf5 0%,#fff 35%);
  box-shadow:0 8px 30px rgba(15,23,42,.065);
}
@media(max-width:460px) {
  body.single-product.weby-theme:not(.weby-visual-x) div.product .summary {
    padding:16px!important;
    border-radius:16px;
  }
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart:not(.variations_form),
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart.variations_form .woocommerce-variation-add-to-cart {
    grid-template-columns:110px minmax(0,1fr)!important;
    gap:10px!important;
  }
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity {
    grid-template-columns:32px 46px 32px!important;
    height:44px;
  }
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity .shopini-quantity__button {
    width:32px;height:44px;min-height:44px;
  }
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity input.qty {
    width:46px!important;max-width:46px!important;height:44px!important;min-height:44px!important;
  }
  body.single-product.weby-theme:not(.weby-visual-x) div.product .summary .shopini-qo {margin:20px auto 8px;}
}
@media(max-width:335px) {
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart:not(.variations_form),
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart.variations_form .woocommerce-variation-add-to-cart {
    grid-template-columns:minmax(0,1fr)!important;
  }
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart:not(.variations_form) > .quantity,
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart:not(.variations_form) > .single_add_to_cart_button,
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart:not(.variations_form) > [data-shopini-buy-now],
  body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart.variations_form .woocommerce-variation-add-to-cart > :is(.quantity,.single_add_to_cart_button,[data-shopini-buy-now]) {
    grid-column:1!important;
    grid-row:auto!important;
  }
}

/* Direction-aware edges of the quantity stepper. */
html[dir="rtl"] body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity .shopini-quantity__button:first-child {
  border-radius:0 8px 8px 0;
}
html[dir="rtl"] body.single-product.weby-theme:not(.weby-visual-x) div.product form.cart .quantity.shopini-quantity .shopini-quantity__button:last-child {
  border-radius:8px 0 0 8px;
}
