/* === Container === */
.bos-volume-bundles-widget {
  background: var(--bos-vb-widget-bg, transparent);
  border: none;
  border-radius: var(--bos-vb-widget-radius, 12px);
  padding: 0;
  margin: 16px 0;
  font-family: var(--bos-vb-font, inherit);
}

.bos-vb-widget {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* === Title === */
.bos-vb-title {
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  margin-bottom: 6px;
  opacity: 0.8;
}

.bos-vb-description {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.bos-vb-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #111827;
  font-weight: 600;
  margin-bottom: 8px;
}

/* === Tier rows === */
.bos-vb-tiers {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bos-vb-tier {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  border: 1px solid var(--bos-vb-tier-border, #e5e7eb);
  border-radius: 0;
  padding: 10px 14px;
  cursor: pointer;
  background: var(--bos-vb-tier-bg, #ffffff);
  transition: border-color 0.15s ease, background 0.15s ease;
  margin-top: -1px;
  z-index: 0;
}

.bos-vb-tier:first-child {
  margin-top: 0;
  border-radius: var(--bos-vb-tier-radius, 10px) var(--bos-vb-tier-radius, 10px) 0 0;
}

.bos-vb-tier:last-child {
  border-radius: 0 0 var(--bos-vb-tier-radius, 10px) var(--bos-vb-tier-radius, 10px);
}

.bos-vb-tier:only-child {
  border-radius: var(--bos-vb-tier-radius, 10px);
}

.bos-vb-tier:hover {
  background: var(--bos-vb-tier-hover-bg, #f9fafb);
  border-color: var(--bos-vb-tier-hover-border, #d1d5db);
  z-index: 1;
}

.bos-vb-tier--selected {
  border-color: var(--bos-vb-tier-active-border, var(--bos-vb-selected, #16a34a)) !important;
  background: var(--bos-vb-tier-active-bg, #f0fdf4);
  z-index: 2;
}

.bos-vb-tier--partial {
  border-color: var(--bos-vb-tier-active-border, var(--bos-vb-selected, #16a34a));
  background: var(--bos-vb-tier-active-bg, #f0fdf4);
  border-style: dashed;
}

.bos-vb-tier--disabled {
  opacity: 0.55;
  filter: saturate(0.8);
  cursor: not-allowed;
  pointer-events: none;
}

.bos-vb-tier--disabled .bos-vb-tier-img {
  filter: grayscale(0.08);
}

.bos-vb-tier--disabled .bos-vb-tier-qty-pill {
  background: #9ca3af;
}

/* === Product image + qty pill === */
.bos-vb-tier-media {
  position: relative;
  flex-shrink: 0;
}

.bos-vb-tier-img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  border: 1px solid #f0f0f0;
}

.bos-vb-tier-qty-pill {
  position: absolute;
  bottom: -6px;
  inset-inline-end: -6px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
}

.bos-vb-tier--selected .bos-vb-tier-qty-pill {
  background: var(--bos-vb-selected, #16a34a);
}

.bos-vb-tier--partial .bos-vb-tier-qty-pill {
  background: color-mix(in srgb, var(--bos-vb-selected, #16a34a) 60%, #f3f4f6);
  color: var(--bos-vb-selected, #16a34a);
}

/* === Product name + subtitle === */
.bos-vb-tier-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bos-vb-tier-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.bos-vb-tier-name {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bos-vb-tier-sub {
  font-size: 12px;
  color: #9ca3af;
}

.bos-vb-tier-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* === Pricing column (right side, RTL = inline-start) === */
.bos-vb-tier-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 58px;
  gap: 3px;
  flex-shrink: 0;
  text-align: end;
}

.bos-vb-tier-total-price {
  font-size: var(--bos-vb-tier-total-size, 16px);
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  line-height: 1.1;
}

.bos-vb-unit-price-line {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.bos-vb-unit-price-subvalue {
  font-size: 12px;
  color: #111827;
  font-weight: 600;
}

.bos-vb-unit-price-label {
  font-size: 10px;
  color: #9ca3af;
  white-space: nowrap;
}

.bos-vb-unit-price-value {
  white-space: nowrap;
}

.bos-vb-unit-price-original {
  font-size: 12px;
  color: #ef4444;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}

.bos-vb-tier-meta-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  white-space: nowrap;
  justify-content: flex-end;
}

.bos-vb-savings-pill {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--bos-vb-tier-active-border, var(--bos-vb-selected, #16a34a));
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.bos-vb-discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--bos-vb-discount-badge-radius, 999px);
  background: var(--bos-vb-discount-badge-bg, #dc2626);
  color: var(--bos-vb-discount-badge-text, #ffffff);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* === Best value badge === */
.bos-vb-best-badge {
  display: inline-flex;
  align-items: center;
  background: var(--bos-vb-badge-bg, #f0fdf4);
  color: var(--bos-vb-badge-text, #16a34a);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.bos-vb-stock-warning {
  font-size: 11px;
  color: #d97706;
}

/* === Total row below tiers === */
.bos-vb-total-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 14px 0;
  font-size: 13px;
  color: #6b7280;
  border-top: 0;
  gap: 12px;
}

.bos-vb-nudge {
  font-size: 13px;
  color: var(--bos-vb-selected, #16a34a);
  font-weight: 500;
  padding: 6px 0 0;
}

.bos-vb-nudge--reached {
  font-weight: 600;
}

.bos-vb-total-label {
  order: 2;
  text-align: start;
  white-space: nowrap;
}

.bos-vb-total-meta {
  order: 1;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0;
  text-align: end;
  margin-inline-end: 0;
}

.bos-vb-total-main {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: end;
}

.bos-vb-total-value {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.bos-vb-total-original,
.bos-vb-cart-old-price {
  text-decoration: line-through;
  color: #ef4444;
  font-size: 14px;
}

.bos-vb-total-saving {
  font-size: 12px;
  color: var(--bos-vb-tier-active-border, var(--bos-vb-selected, #16a34a));
  font-weight: 600;
  white-space: nowrap;
}

.bos-vb-cart-new-price {
  color: var(--bos-text-main, #111111);
  font-weight: 700;
}

.bos-bundle-badge--save {
  background: var(--bos-success-bg, #f0fdf4);
  color: var(--bos-success, #16a34a);
}

/* === Responsive === */
@media (max-width: 480px) {
  .bos-vb-tier {
    padding: 10px;
    gap: 10px;
    min-height: 88px;
  }

  .bos-vb-tier-img {
    width: 44px;
    height: 44px;
  }

  .bos-vb-tier-total-price {
    font-size: 16px;
  }

  .bos-vb-unit-price-subvalue {
    font-size: 11px;
  }
}
