/* =========================================================
   BUY ENGINE FORM (qtbe2)
   - Variant
   - Quantity
   - Features / ETA
   - Form fields
   - Sample box
   - Total / legal / CTA
   ========================================================= */

/* -------------------------
   VARIANT
------------------------- */
.qtbe2-variantBlock{
  margin: 12px 0 14px;
}

.qtbe2-variantTitle{
  margin: 0 0 8px;
  font-weight: 950;
  font-size: 13px;
  color: rgba(0,0,0,.78);
}

.qtbe2-req{
  color: #ef4444 !important;
  font-weight: 950 !important;
}

#qtVariantSelect{
  margin-top: 6px;
}

/* -------------------------
   QTY
------------------------- */
.qtbe2-qty{
  margin: 0 0 14px;
}

.qtbe2-qty--left{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}

#qtQtyWrap{
  margin-top: 12px;
}

.qtbe2-qtyBtn{
  width: 100%;
  min-height: 54px;
  appearance: none;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;

  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 3px;

  padding: 12px 10px;
  text-align: center;
  font: inherit;
  font-weight: 950;
  font-size: 13px;
  color: var(--be-ink);

  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.62));
  transition:
    transform .12s ease,
    box-shadow .12s ease,
    border-color .12s ease,
    filter .12s ease;
}

.qtbe2-qtyBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(15,23,42,.18);
  box-shadow: 0 12px 26px rgba(2,6,23,.11);
}

.qtbe2-qtyBtn:focus-visible{
  outline: none;
  box-shadow: var(--be-focus), 0 12px 26px rgba(2,6,23,.11);
}

.qtbe2-qtyBtn.is-active{
  border-color: transparent;
  color: #fff;
  filter: saturate(1.10) contrast(1.02);
  background:
    radial-gradient(160px 70px at 30% 20%, rgba(255,255,255,.20), rgba(255,255,255,0) 58%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0)),
    var(--be-accent);
  box-shadow: 0 18px 44px rgba(2,6,23,.18);
}

.qtbe2-qtyBtn.is-active .qtbe2-qtyUnit{
  opacity: .92;
}

.qtbe2-qtyNum,
.qtbe2-qtyUnit{
  min-width: 0;
  max-width: 100%;
}

.qtbe2-qtyNum{
  white-space: nowrap;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(12px, 2.6vw, 15px);
}

.qtbe2-qtyUnit{
  font-weight: 900;
  line-height: 1.15;
  opacity: .66;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (min-width:520px){
  .qtbe2-qty--left{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (min-width:980px){
  .qtbe2-qty--left{
    grid-template-columns: repeat(4, minmax(0,1fr));
  }
}

/* -------------------------
   FEATURES
------------------------- */
.qtbe2-feats{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.qtbe2-feats li{
  position: relative;
  padding-left: 32px;
  font-size: 14px;
  line-height: 1.5;
}

.qtbe2-feats li::before{
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: var(--be-accent-soft);
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.74);
}

.qtbe2-feats li::after{
  content: "";
  position: absolute;
  left: 6px;
  top: .50em;
  width: 8px;
  height: 4px;
  transform: rotate(-45deg);
  opacity: .95;
  border-left: 2px solid var(--be-accent);
  border-bottom: 2px solid var(--be-accent);
}

/* -------------------------
   ETA
------------------------- */
.qtbe2-eta{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,.08);
  display: grid;
  gap: 8px;
}

.qtbe2-eta__k{
  color: var(--be-muted);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
}

.qtbe2-eta__v{
  font-weight: 950;
  font-size: 13px;
  line-height: 1.45;
}

.qtbe2-eta__sep{
  margin: 0 8px;
  opacity: .55;
}

/* -------------------------
   FORM
------------------------- */
.qtbe2-form{
  display: grid;
  gap: 14px;
}

.qtbe2-field{
  min-width: 0;
}

.qtbe2-field__l{
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 950;
  color: var(--be-ink);
}

.qtbe2-field__l--row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.qtbe2-field__l--row > span{
  min-width: 0;
  flex: 1 1 220px;
}

.qtbe2-field__i{
  width: 100%;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 16px;
  outline: none;

  font-size: 15px;
  color: var(--be-ink);

  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.90));
  box-shadow: 0 4px 14px rgba(15,23,42,.04);

  transition:
    box-shadow .14s ease,
    border-color .14s ease,
    transform .14s ease,
    background .14s ease;
}

.qtbe2-field__i::placeholder{
  color: rgba(15,23,42,.38);
}

.qtbe2-field__i:focus{
  border-color: color-mix(in srgb, var(--be-accent) 38%, rgba(15,23,42,.16));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--be-accent) 14%, transparent),
    0 10px 24px rgba(15,23,42,.08);
  transform: translateY(-1px);
  background: rgba(255,255,255,.99);
}

/* -------------------------
   SAMPLE BUTTON
------------------------- */
.qtbe2-sampleBtn{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--be-accent) 16%, rgba(15,23,42,.08));
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;

  font: inherit;
  font-weight: 900;
  font-size: 12px;
  line-height: 1;

  color: color-mix(in srgb, var(--be-accent) 68%, #0f172a);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--be-accent) 8%, #fff),
    color-mix(in srgb, var(--be-accent) 4%, #fff)
  );
  box-shadow: 0 4px 12px rgba(15,23,42,.05);

  transition:
    transform .12s ease,
    box-shadow .12s ease,
    border-color .12s ease,
    background .12s ease,
    color .12s ease;
}

.qtbe2-sampleBtn::before{
  content: "?";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 950;
  color: #fff;
  background: color-mix(in srgb, var(--be-accent) 82%, #0f172a);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--be-accent) 20%, transparent);
}

.qtbe2-sampleBtn:hover{
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--be-accent) 24%, rgba(15,23,42,.08));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--be-accent) 10%, #fff),
    color-mix(in srgb, var(--be-accent) 6%, #fff)
  );
  box-shadow: 0 8px 18px rgba(15,23,42,.07);
}

.qtbe2-sampleBtn[aria-expanded="true"]{
  border-color: color-mix(in srgb, var(--be-accent) 28%, rgba(15,23,42,.08));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--be-accent) 12%, #fff),
    color-mix(in srgb, var(--be-accent) 7%, #fff)
  );
}

/* -------------------------
   SAMPLE BOX
------------------------- */
.qtbe2-sampleBox{
  margin-top: 12px;
  position: relative;
  overflow: visible;

  padding: 14px 14px 12px;
  padding-right: 50px;
  border: 1px solid color-mix(in srgb, var(--be-accent) 12%, rgba(15,23,42,.08));
  border-radius: 18px;

  background:
    radial-gradient(560px 170px at 0% 0%, color-mix(in srgb, var(--be-accent) 8%, transparent), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.92), color-mix(in srgb, var(--be-accent) 3%, #fff));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 10px 24px rgba(15,23,42,.05);
}

.qtbe2-sampleBox[hidden]{
  display: none !important;
}

.qtbe2-sampleTitle{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-weight: 950;
  font-size: 12.5px;
  line-height: 1.3;
  letter-spacing: .01em;
  color: color-mix(in srgb, var(--be-accent) 62%, #0f172a);
}

.qtbe2-sampleTitle::before{
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--be-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--be-accent) 14%, transparent);
}

.qtbe2-sampleList{
  display: grid;
  gap: 8px;
}

.qtbe2-sampleItem{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;

  padding: 11px 12px;
  border: 1px solid rgba(15,23,42,.04);
  border-radius: 14px;

  text-align: left;
  cursor: default;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--be-ink);

  overflow-wrap: anywhere;
  word-break: break-word;

  background: rgba(255,255,255,.72);
  box-shadow: none !important;
  transform: none !important;
}

.qtbe2-sampleItem::before{
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,.92), rgba(255,255,255,0) 45%),
    color-mix(in srgb, var(--be-accent) 18%, #fff);
  border: 1px solid color-mix(in srgb, var(--be-accent) 14%, rgba(15,23,42,.08));
}

.qtbe2-sampleItem__text{
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.qtbe2-sampleItem:hover,
.qtbe2-sampleItem:focus-visible{
  background: rgba(255,255,255,.72);
  border-color: rgba(15,23,42,.04);
  box-shadow: none;
  transform: none;
  outline: none;
}

/* -------------------------
   SAMPLE CLOSE
------------------------- */
.qtbe2-sampleClose{
  appearance: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;

  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  color: rgba(15,23,42,.58);

  background: rgba(255,255,255,.84);
  box-shadow: 0 4px 12px rgba(15,23,42,.06);

  transition:
    transform .12s ease,
    box-shadow .12s ease,
    background .12s ease,
    color .12s ease,
    border-color .12s ease;
}

.qtbe2-sampleClose:hover{
  transform: translateY(-1px);
  color: rgba(15,23,42,.82);
  background: #fff;
  border-color: rgba(15,23,42,.12);
  box-shadow: 0 8px 18px rgba(15,23,42,.10);
}

.qtbe2-sampleClose:focus-visible{
  outline: none;
  box-shadow: var(--be-focus), 0 8px 18px rgba(15,23,42,.10);
}

/* -------------------------
   TOTAL
------------------------- */
.qtbe2-total{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.08);
}

.qtbe2-total__k{
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--be-muted);
}

.qtbe2-total__v{
  font-weight: 950;
  font-size: 13px;
}

.qtbe2-total__r{
  min-width: 160px;
  text-align: right;
}

.qtbe2-total__p{
  font-size: 22px;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.qtbe2-total__s{
  margin-top: 4px;
  font-size: 12px;
  font-weight: 950;
  color: #16a34a;
}

/* -------------------------
   LEGAL
------------------------- */
.qtbe2-legal{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.74);
}

.qtbe2-legal__check{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--be-muted);
}

.qtbe2-legal__check input{
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--be-accent);
}

.qtbe2-legal__check a{
  color: var(--be-ink);
  font-weight: 950;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.qtbe2-legal__check a:hover{
  opacity: .9;
}

/* -------------------------
   CTA
------------------------- */
.qtbe2-btn{
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;

  font-size: 15px;
  font-weight: 950;
  color: #fff;

  background:
    radial-gradient(180px 80px at 30% 20%, rgba(255,255,255,.22), rgba(255,255,255,0) 58%),
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0)),
    var(--be-accent);
  box-shadow: 0 20px 52px rgba(2,6,23,.20);
  filter: saturate(1.08) contrast(1.02);

  transition:
    transform .12s ease,
    box-shadow .12s ease,
    filter .12s ease;
}

.qtbe2-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 26px 70px rgba(2,6,23,.24);
  filter: saturate(1.14) contrast(1.03);
}

.qtbe2-btn:active{
  transform: translateY(0);
  box-shadow: 0 16px 44px rgba(2,6,23,.20);
}

.qtbe2-btn:focus-visible{
  outline: none;
  box-shadow: var(--be-focus), 0 26px 70px rgba(2,6,23,.24);
}

.qtbe2-btn::after{
  content: "";
  position: absolute;
  top: -40%;
  left: -35%;
  width: 45%;
  height: 180%;
  transform: rotate(18deg);
  opacity: .6;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.28), rgba(255,255,255,0));
  transition: left .55s ease;
}

.qtbe2-btn:hover::after{
  left: 120%;
}

/* -------------------------
   MOBILE
------------------------- */
@media (max-width:560px){
  .qtbe2-field__l--row{
    align-items: flex-start;
  }

  .qtbe2-field__l--row > span{
    flex: 1 1 100%;
  }

  .qtbe2-sampleBtn{
    margin-top: 2px;
    padding: 8px 10px;
    font-size: 11.5px;
  }

  .qtbe2-sampleBox{
    padding: 12px;
    padding-right: 44px;
    border-radius: 16px;
  }

  .qtbe2-sampleItem{
    padding: 10px 11px;
    font-size: 13px;
    line-height: 1.5;
  }

  .qtbe2-sampleClose{
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    font-size: 15px;
  }

  .qtbe2-total__r{
    min-width: 140px;
  }

  .qtbe2-total__p{
    font-size: 20px;
  }
}

@media (max-width:420px){
  .qtbe2-qtyBtn{
    padding: 10px;
    border-radius: 14px;
  }
}

/* -------------------------
   REDUCED MOTION
------------------------- */
@media (prefers-reduced-motion:reduce){
  .qtbe2-qtyBtn,
  .qtbe2-btn,
  .qtbe2-sampleBtn,
  .qtbe2-sampleClose{
    transition: none !important;
  }
}