/* Quantity Breaks Pro — frontend (pixel-faithful to reference, theme-conflict hardened) */
.qbp-wrap,
.qbp-wrap *,
.qbp-wrap *::before,
.qbp-wrap *::after {
  box-sizing: border-box;
}
.qbp-wrap {
  max-width: 560px;
  margin: 0 0 24px;
  padding: 0;
  font-size: 15px;
  line-height: 1.45;
  color: #1a1a1a;
  text-align: left;
}
.qbp-wrap p { margin: 0; }
.qbp-wrap img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}
.qbp-wrap button {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  text-transform: none;
}
.qbp-wrap select {
  font-family: inherit;
  text-transform: none;
}

/* ---------- tier cards ---------- */
.qbp-tier {
  position: relative;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  margin: 0 0 14px;
  padding: 0;
  background: #ffffff;
  transition: border-color .15s ease, background .15s ease;
}
.qbp-tier.qbp-selected {
  border-color: #1e7a4c;
  background: #ffffff;
  box-shadow: 0 0 0 1px #1e7a4c;
}
.qbp-badge {
  position: absolute;
  top: -13px;
  right: 14px;
  z-index: 2;
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: .02em;
  margin: 0;
}
.qbp-tier-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.qbp-thumb {
  flex: 0 0 auto;
  width: 60px;
  margin: 0;
  padding: 0;
}
.qbp-thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}
.qbp-tier-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.qbp-tier-label {
  font-weight: 700;
  font-size: 17px;
  color: #1a1a1a;
}
.qbp-tier-sub {
  color: #5f5f5f;
  font-size: 14px;
}
.qbp-tier-prices {
  flex: 0 0 auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.qbp-tier-total {
  font-weight: 700;
  font-size: 17px;
  color: #1a1a1a;
  white-space: nowrap;
}
.qbp-tier-was {
  color: #8a8a8a;
  text-decoration: line-through;
  font-size: 14px;
  white-space: nowrap;
}

/* ---------- expanded body ---------- */
.qbp-tier-body {
  padding: 2px 16px 16px;
  margin: 0;
}
.qbp-lowstock {
  color: #d34a4a;
  font-size: 14px;
  margin: 12px 0 10px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.qbp-lowstock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d34a4a;
  flex: 0 0 auto;
}

/* ---------- per-unit rows ---------- */
.qbp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0;
}
.qbp-row .qbp-thumb { width: 48px; }
.qbp-row .qbp-thumb img { width: 48px; height: 48px; }
.qbp-select-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.qbp-swatch {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
  pointer-events: none;
  margin: 0;
  padding: 0;
}
.qbp-row select,
.qbp-tier-body select {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1.5px solid #cfcfcf;
  border-radius: 8px;
  background-color: #ffffff;
  color: #1a1a1a;
  padding: 11px 32px 11px 12px;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  box-shadow: none;
}
.qbp-select-wrap select.qbp-color { padding-left: 34px; }

/* ---------- custom color dropdown (per-option swatches) ---------- */
.qbp-select-wrap .qbp-dd-btn {
  width: 100%;
  margin: 0;
  padding: 11px 32px 11px 34px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: #1a1a1a;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: #ffffff;
  border: 1.5px solid #cfcfcf;
  border-radius: 8px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.qbp-select-wrap .qbp-dd-btn:hover,
.qbp-select-wrap .qbp-dd-btn[aria-expanded="true"] {
  border-color: #1e7a4c;
}
.qbp-dd-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #ffffff;
  border: 1.5px solid #cfcfcf;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
  max-height: 230px;
  overflow-y: auto;
}
.qbp-dd-list[hidden] { display: none; }
.qbp-dd-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 15px;
  color: #1a1a1a;
  cursor: pointer;
}
.qbp-dd-list li:hover,
.qbp-dd-list li:focus {
  background: #f4faf6;
  outline: none;
}
.qbp-dd-list li[aria-selected="true"] .qbp-dd-opt-label { font-weight: 700; }
.qbp-dd-dot {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
  margin: 0;
  padding: 0;
}
.qbp-row select:focus,
.qbp-tier-body select:focus {
  outline: none;
  border-color: #1e7a4c;
  box-shadow: none;
}

/* ---------- free gift row ---------- */
.qbp-gift {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid #e2e2e2;
  border-radius: 10px;
  padding: 12px;
  margin: 6px 0 12px;
  background: #ffffff;
}
.qbp-gift .qbp-thumb { width: 64px; }
.qbp-gift .qbp-thumb img { width: 64px; height: 64px; }
.qbp-gift-info { flex: 1 1 auto; min-width: 0; }
.qbp-gift-info strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
}
.qbp-gift-info span {
  display: block;
  color: #6a6a6a;
  font-size: 13px;
  margin-top: 2px;
}
.qbp-gift-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: 0 0 auto;
}
.qbp-free-badge {
  background: #1e7a4c;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
  padding: 5px 12px;
  border-radius: 6px;
  letter-spacing: .03em;
  margin: 0;
}
.qbp-gift-was {
  color: #8a8a8a;
  text-decoration: line-through;
  font-size: 13px;
}
.qbp-gift-btn {
  flex: 0 0 auto;
  background: #1e7a4c;
  background-color: #1e7a4c;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
.qbp-gift-btn:hover { background-color: #166b40; color: #fff; }
.qbp-gift-btn.qbp-added { background-color: #14532d; }

/* ---------- variable gift option select (revealed on ADD) ---------- */
.qbp-gift-var {
  display: block;
  margin: 8px 0 0;
  padding: 0;
}
.qbp-gift-var[hidden] {
  display: none;
}
.qbp-gift-var select.qbp-gift-variation {
  width: 100%;
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 14px;
}

/* ---------- BUY NOW (the only button: adds tier, goes straight to checkout) ---------- */
.qbp-buy-now {
  display: block;
  width: 100%;
  background: #111111;
  background-color: #111111;
  color: #ffffff;
  border: 0;
  border-radius: 10px;
  padding: 15px;
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
}
.qbp-buy-now:hover { background-color: #000000; color: #ffffff; }
.qbp-buy-now:disabled { opacity: .6; cursor: wait; }

/* ---------- messages / cart ---------- */
.qbp-msg {
  margin: 10px 0 0;
  padding: 0;
  font-size: 14px;
}
.qbp-msg.qbp-error-msg { color: #c0392b; }
.qbp-msg.qbp-success-msg { color: #1e7a4c; }
.qbp-msg a { color: #1e7a4c; font-weight: 600; margin: 0 6px; }
.qbp-locked-qty { font-weight: 600; }

@media (max-width: 480px) {
  .qbp-tier-head { gap: 9px; padding: 12px; }
  .qbp-tier-label { font-size: 15px; }
  .qbp-tier-sub { font-size: 13px; }
  .qbp-tier-total { font-size: 15px; }
  .qbp-row { flex-wrap: wrap; }
  .qbp-row .qbp-thumb { width: 100%; }
  .qbp-row .qbp-thumb img { width: 40px; height: 40px; }
  .qbp-select-wrap { flex: 1 1 45%; }
  .qbp-row select.qbp-size { flex: 1 1 45%; }
  .qbp-gift { flex-wrap: wrap; }
}
