/*-------------------------------------------------------------
1. Mixin
--------------------------------------------------------------*/
:root {
  --ouqw-primary-color: #172a68;
  --ouqw-secondary-color: #f25a87;
  --ouqw-border-color: #cccccc;
  --ouqw-shadow-color: #36b97e;
}

.ouqw_hidden {
  display: none !important;
}

.ouqw-flex {
  display: flex;
}

.ouqw_flex_row_reverse {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.ouqw_flex_align_items_center {
  align-items: center;
}

.ouqw_flex_align_items_start {
  align-items: flex-start;
}

.ouqw_flex_align_items_end {
  align-items: flex-end;
}

.ouqw_flex_justify_content_center {
  justify-content: center;
}

.ouqw_flex_justify_content_start {
  justify-content: flex-start;
}

.ouqw_flex_justify_content_end {
  justify-content: flex-end;
}

.mt {
  margin-top: 30px;
}

.mb {
  margin-bottom: 30px;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.ouqw_hidden_line {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ouqw_toggle {
  cursor: pointer;
  display: inline-flex;
  margin: 5px 0;
  align-items: center;
}
.ouqw_toggle .ouqw_toggle_input {
  position: absolute;
  visibility: hidden;
  box-shadow: none !important;
  outline: none !important;
}
.ouqw_toggle .ouqw_toggle_input:checked + .ouqw_toggle_switch {
  background: var(--ouqw-primary-color);
}
.ouqw_toggle .ouqw_toggle_input:checked + .ouqw_toggle_switch::before {
  left: 23px;
}
.ouqw_toggle .ouqw_toggle_switch {
  display: inline-block;
  background: rgba(10, 9, 89, 0.08);
  border-radius: 16px;
  width: 46px;
  height: 26px;
  position: relative;
  vertical-align: middle;
  transition: background 0.25s;
  margin-right: 15px;
}
.ouqw_toggle .ouqw_toggle_switch::before {
  display: block;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 3px;
  transition: all 0.25s ease;
  content: "";
}

/*-------------------------------------------------------------
2. Frontend Render
--------------------------------------------------------------*/
.ouqw-buymore-savemore .ouqw-badge img {
  margin-right: 10px;
}
.ouqw-buymore-savemore .ouqw-badge-text {
  flex: 1;
}
.ouqw-buymore-savemore .ouqw-badge-inner {
  border: 2px dashed var(--ouqw-primary-color);
  border-radius: 10px;
  padding: 15px;
}

.ouqw_wraper_qty {
  min-width: 130px;
  margin-right: 10px;
}
.ouqw_wraper_qty.standard_show .ouqw-tier-qty {
  display: none;
}
.ouqw_wraper_qty.standard_show div.quantity {
  display: inline-flex !important;
}
.ouqw_wraper_qty:not(.standard_show) .quantity_wrap, .ouqw_wraper_qty:not(.standard_show) div.quantity {
  display: none !important;
}
.ouqw_wraper_qty .wrapper-tier-action {
  position: relative;
}
.ouqw_wraper_qty .tier-value {
  padding: 5px 0;
  border: 0;
  border-bottom: 2px solid var(--e-global-color-border);
  width: 100%;
  border-radius: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 800;
}
.ouqw_wraper_qty .tier-value::after {
  content: "";
  width: 0px;
  height: 0px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--ouqw-primary-color);
}
.ouqw_wraper_qty .show_qty_input {
  color: var(--ouqw-primary-color);
  font-size: 14px;
  display: block;
  margin-top: 10px;
  cursor: pointer;
}
.ouqw_wraper_qty .tier-table {
  position: absolute;
  z-index: 99;
  top: 100%;
  left: 0;
  width: 600px;
  margin-top: 0;
}

.tier-table {
  /*! width: 100%; */
  background-color: #fff;
  box-shadow: 0 0 5px 2px rgba(21, 22, 23, 0.2);
  border-radius: 5px;
  width: 100%;
  max-width: 100vw;
  word-break: initial;
  margin-bottom: 30px;
  margin-top: 30px;
}
.tier-table .ouqw-row {
  display: flex;
  padding: 15px 20px;
  grid-gap: 10px;
}
.tier-table .ouqw-row:not(:last-child) {
  border-bottom: 1px solid #ebebeb;
}
@media only screen and (max-width: 1024px) {
  .tier-table .ouqw-row {
    display: block;
  }
  .tier-table .ouqw-row .ouqw-row-price {
    display: none;
  }
}
.tier-table .ouqw-row > div {
  flex: 1 1 0;
}
.tier-table .ouqw-row .ouqw-row-qty, .tier-table .ouqw-row .ouqw-item-qty {
  flex: 0 0 50%;
}
.tier-table .ouqw-row.ouqw-item {
  cursor: pointer;
  transition: all 0.15s linear;
}
.tier-table .ouqw-row.ouqw-item.actived, .tier-table .ouqw-row.ouqw-item:hover {
  background-color: var(--ouqw-shadow-color);
  color: #fff;
}
.tier-table .ouqw-row.ouqw-head, .tier-table .ouqw-row.ouqw-foot {
  font-weight: 600;
  color: #222;
}

.tier-line {
  margin-top: 30px;
}
.tier-line .ouqw-range-discount {
  list-style: none;
  margin: 0 0 30px 0;
  font-weight: 600;
  font-size: 14px;
}
.tier-line .ouqw-range-discount .ouqw-percent-discount {
  margin-right: 10px;
  display: inline-block;
}
@media only screen and (max-width: 1024px) {
  .tier-line .ouqw-range-discount .ouqw-percent-discount {
    display: block;
    margin: 0 0 5px 0;
  }
}
.tier-line .ouqw-range-discount .ouqw-percent-discount span {
  padding: 5px 10px;
  background-color: var(--ouqw-shadow-color);
  color: #fff;
  display: inline-block;
}
.tier-line .ouqw-range-discount .ouqw-tier-discount {
  display: block;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ebebeb;
  cursor: pointer;
}
.tier-line .ouqw-range-discount .ouqw-tier-discount.actived .ouqw-percent-discount span {
  background-color: var(--ouqw-primary-color);
}
.tier-line .ouqw-range-discount .ouqw-discount-text {
  color: var(--ouqw-secondary-color);
  margin-right: 5px;
}

.woocommerce-grouped-product-list-item .ouqw_wraper_qty .tier-table {
  left: unset;
  right: 0;
}

/*-------------------------------------------------------------
3. Quantity Breaks - Modern Style
--------------------------------------------------------------*/
.quantity-breaks {
  /* Badge */
  --qb-badge-font-size: 14px;
  --qb-badge-line-height: 1.7;
  --qb-badge-border-radius: 3px;

  /* Label / Caption / Price */
  --qb-label-font-size: 16px;
  --qb-caption-font-size: 13px;
  --qb-price-font-size: 16px;
  --qb-compare-price-font-size: 14px;

  /* Layout */
  --qb-border-width: 2px;
  --qb-border-radius: 10px;
  --qb-column-gap: 8px;
  --qb-row-gap: 9px;

  /* Heading */
  --qb-heading-font-size: 14px;

  /* Colors - overridden inline from the plugin settings */
  --qb-accent-color: 109, 40, 168;
  --qb-background-color: 255, 255, 255;
  --qb-border-color: 226, 214, 238;
  --qb-selected-bg-color: 241, 233, 248;
  --qb-selected-border-color: 109, 40, 168;
  --qb-text-color: 28, 32, 29;
  --qb-price-color: 109, 40, 168;
  --qb-badge-bg-color: 123, 45, 142;
  --qb-badge-text-color: 255, 255, 255;

  margin: 20px 0!important;
  color: rgb(var(--qb-text-color));
  border:none;
}

/* Heading */
.quantity-breaks__heading {
  display: flex;
  align-items: center;
  column-gap: 10px;
  margin: 0 0 13px;
}

.quantity-breaks__heading::before,
.quantity-breaks__heading::after {
  content: "";
  flex: 1 1 auto;
  height: 2px;
  background: rgb(var(--qb-accent-color));
}

.quantity-breaks__heading span {
  flex: 0 0 auto;
  font-size: var(--qb-heading-font-size);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(var(--qb-text-color));
}

/* Container */
.quantity-breaks-container {
  position: relative;
  display: grid;
  align-items: flex-start;
  grid-template-columns: repeat(1, 1fr);
  column-gap: var(--qb-column-gap);
  row-gap: var(--qb-row-gap);
}

.quantity-breaks-container input[type="radio"] {
  opacity: 0;
  width: 0;
  height: 0;
  cursor: pointer;
  position: absolute;
  margin: 0;
  padding: 0;
}

/* Item
   Card colors fall back to accent-derived tints, so setting only the accent
   color restyles the whole block. The --qb-card-* vars are emitted by PHP only
   when the merchant explicitly picks a color. */
.quantity-break {
  padding: 15px;
  cursor: pointer;
  border-radius: var(--qb-border-radius);
  background: var(--qb-card-bg, rgba(var(--qb-accent-color), 0.02));
  border: solid var(--qb-border-width) var(--qb-card-border, rgba(var(--qb-accent-color), 0.3));
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: block;
  box-sizing: border-box;
  margin: 0;
}

/* Themes sometimes ship a snippet that hides the first tier
   (".quantity-breaks-container > label:first-of-type { display: none }").
   Only `display` is re-asserted here so the rest of the cascade is untouched. */
.quantity-breaks .quantity-breaks-container > label.quantity-break {
  display: block;
}

.quantity-breaks .quantity-breaks-container > input.ouqw-quantity-break-input {
  display: block;
}

.quantity-breaks--normal.quantity-breaks--show-indicator .quantity-break {
  padding-left: 45px;
}

.quantity-breaks-container input[type="radio"]:checked + .quantity-break {
  background: var(--qb-card-bg-selected, rgba(var(--qb-accent-color), 0.1));
  border-color: var(--qb-card-border-selected, rgb(var(--qb-accent-color)));
  box-shadow: 0 2px 10px rgba(var(--qb-accent-color), 0.18);
}

.quantity-breaks-container input[type="radio"]:focus-visible + .quantity-break {
  outline: 2px solid rgb(var(--qb-accent-color));
  outline-offset: 2px;
}

@media (hover: hover) {
  .quantity-breaks-container .quantity-break:hover {
    border-color: var(--qb-card-border-selected, rgb(var(--qb-accent-color)));
  }
}

/* Radio indicator dot */
.quantity-breaks--show-indicator .quantity-break::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: solid 2px rgba(var(--qb-text-color), 0.35);
  box-sizing: border-box;
  background: rgb(var(--qb-background-color));
}

.quantity-breaks--show-indicator .quantity-breaks-container input[type="radio"]:checked + .quantity-break::before {
  border-color: rgb(var(--qb-accent-color));
  background: rgb(var(--qb-accent-color));
  box-shadow: inset 0 0 0 3.5px rgb(var(--qb-background-color));
}

/* Badge */
/* Badge hangs off the top-right corner. It stays inside the card's right edge so
   it can never be clipped by a theme container with overflow set. */
.quantity-break__badge {
  position: absolute;
  top: -14px;
  right: 0;
  z-index: 2;
  transform: rotate(3deg);
  transform-origin: right center;
  margin: 0;
  padding: 1px 10px;
  font-weight: 700;
  font-size: var(--qb-badge-font-size);
  line-height: var(--qb-badge-line-height);
  border-radius: var(--qb-badge-border-radius);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quantity-break__badge.color-accent-1 {
  color: rgb(var(--qb-badge-text-color));
  background-color: rgb(var(--qb-badge-bg-color));
}

/* Layout */
.quantity-break__image-and-content {
  display: flex;
  align-items: center;
  column-gap: 10px;
}

.quantity-break__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-grow: 1;
  width: 100%;
}

.quantity-break__left > span,
.quantity-break__right > span {
  display: block;
}

/* Left */
.quantity-break__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  row-gap: 6px;
  text-align: left;
}

.quantity-break__left .quantity-break__label {
  display: flex;
  align-items: center;
  column-gap: 6px;
  row-gap: 6px;
  font-size: var(--qb-label-font-size);
  font-weight: 700;
  line-height: 1;
}

.quantity-break__label-text {
  line-height: 1;
}

.quantity-break__caption {
  font-size: var(--qb-caption-font-size);
  font-weight: 400;
  line-height: 1.2;
  color: rgba(var(--qb-text-color), 0.7);
}

.quantity-break__caption span {
  display: inline;
}

/* Right */
.quantity-break__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  row-gap: 6px;
  column-gap: 6px;
  text-align: right;
}

.quantity-break__price {
  font-size: var(--qb-price-font-size);
  font-weight: 700;
  line-height: 1;
  color: rgb(var(--qb-price-color));
}

.quantity-break__compare-price {
  font-size: var(--qb-compare-price-font-size);
  line-height: 1;
  text-decoration: line-through;
  color: rgba(var(--qb-text-color), 0.5);
}

/* WooCommerce price styling overrides */
.quantity-break__price .woocommerce-Price-amount,
.quantity-break__compare-price .woocommerce-Price-amount {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

.quantity-break__price .woocommerce-Price-amount bdi,
.quantity-break__compare-price .woocommerce-Price-amount bdi {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

/* Inline tag pill (e.g. "Free Shipping") */
.quantity-break__tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  border-radius: 999px;
  color: rgba(var(--qb-text-color), 0.75);
  border: solid 1px rgba(var(--qb-text-color), 0.35);
}

/* Quantity selector shown under the selected open-ended tier */
.quantity-break__qty {
  display: none;
  align-items: center;
  justify-content: space-between;
  column-gap: 12px;
  row-gap: 8px;
  flex-wrap: wrap;
  box-sizing: border-box;
  padding: 12px 16px;
  margin-top: calc(-1 * var(--qb-row-gap) + 6px);
  border-radius: var(--qb-border-radius);
  background: rgba(var(--qb-selected-bg-color), 0.6);
  border: dashed var(--qb-border-width) rgba(var(--qb-selected-border-color), 0.5);
}

.quantity-breaks-container input[type="radio"]:checked + .quantity-break + .quantity-break__qty {
  display: flex;
}

.quantity-break__qty-label {
  font-size: var(--qb-caption-font-size);
  font-weight: 500;
  color: rgba(var(--qb-text-color), 0.8);
}

.ouqw-qb-stepper {
  display: flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  border: solid 1px rgba(var(--qb-selected-border-color), 0.6);
  background: rgb(var(--qb-background-color));
}

.ouqw-qb-stepper button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  width: 34px;
  min-width: 34px;
  height: 34px;
  line-height: 1;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: rgb(var(--qb-accent-color));
  box-shadow: none;
  border-radius: 0;
  transition: background 0.2s ease;
}

.ouqw-qb-stepper button:hover {
  background: rgba(var(--qb-accent-color), 0.12);
}

.ouqw-qb-stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
}

.ouqw-qb-stepper input.ouqw-qb-qty-input {
  width: 52px;
  min-width: 52px;
  height: 34px;
  min-height: 45px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-left: solid 1px rgba(var(--qb-selected-border-color), 0.3);
  border-right: solid 1px rgba(var(--qb-selected-border-color), 0.3);
  border-radius: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 34px;
  color: rgb(var(--qb-text-color));
  background: transparent;
  box-shadow: none;
  -moz-appearance: textfield;
}

.ouqw-qb-stepper input.ouqw-qb-qty-input:focus {
  outline: none;
  box-shadow: none;
}

.ouqw-qb-stepper input.ouqw-qb-qty-input::-webkit-outer-spin-button,
.ouqw-qb-stepper input.ouqw-qb-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-summary form button {
    font-weight: 800;
    border-radius: 8px;
    background-color: --ouqw-primary-color!important;
    padding: 5px;
    font-size: 18px;
    width: 100%;
}

.product-summary form.cart {
    gap: 0;
    margin-top: 5px
}
form.cart .single_add_to_cart_button, form.cart .ux-buy-now-button {
    padding: 5px;
    font-size: 18px;
}
/* Responsive */
@media only screen and (max-width: 480px) {
  .quantity-break {
    padding: 14px;
  }

  .quantity-breaks--normal.quantity-breaks--show-indicator .quantity-break {
    padding-left: 40px;
  }

  .quantity-breaks--show-indicator .quantity-break::before {
    left: 20px;
  }
}
