/* ── Bundles List ──────────────────────────────────────── */
.bundles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.bundle-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.bundle-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.bundle-card--featured {
  border-color: var(--primary, #2563eb);
}
.bundle-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.bundle-card__link:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
  border-radius: 12px;
}
.bundle-card__images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: #f9fafb;
  padding: 12px;
  min-height: 140px;
  align-items: center;
  justify-items: center;
}
.bundle-card__images img {
  width: 100%;
  max-width: 120px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}
.bundle-card__img-placeholder {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  background: #fff;
  border-radius: 6px;
}
.bundle-card__body {
  padding: 16px;
}
.bundle-card__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.3;
  color: var(--text, #111827);
}
.bundle-card__desc {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 10px;
  line-height: 1.4;
}
.bundle-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.bundle-card__count {
  font-size: 13px;
  color: #6b7280;
}
.bundle-card__discount {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}
.bundle-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.bundle-card__old-price {
  font-size: 14px;
  color: var(--muted, #6b7280);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.bundle-card__price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text, #111827);
  font-variant-numeric: tabular-nums;
}
.bundle-card__tax-note {
  font-size: 12px;
  color: var(--muted, #6b7280);
}
.bundle-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* ── Bundle Detail ────────────────────────────────────── */
.bd-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}
.bd-header {
  margin-bottom: 24px;
}
.bd-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text, #111827);
}
.bd-description {
  font-size: 15px;
  color: #4b5563;
  margin: 0 0 12px;
  line-height: 1.5;
}
.bd-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.bd-stats__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #6b7280;
}
.bd-stats__item--discount {
  color: #166534;
  font-weight: 600;
}

/* Items list */
.bd-items__heading {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text, #111827);
}
.bd-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}
.bd-item:last-child {
  border-bottom: none;
}
.bd-item--out .bd-item__image {
  opacity: .5;
}
.bd-item__image {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}
.bd-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #f9fafb;
}
.bd-item__img-placeholder {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border-radius: 8px;
  color: #d1d5db;
}
.bd-item__info {
  flex: 1;
  min-width: 0;
}
.bd-item__name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text, #111827);
  text-decoration: none;
  line-height: 1.3;
  margin-bottom: 4px;
}
.bd-item__name:hover {
  color: var(--primary, #2563eb);
  text-decoration: underline;
}
.bd-item__name:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
  border-radius: 4px;
}
.bd-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bd-item__qty {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}
.bd-item__stock {
  font-size: 12px;
  font-weight: 500;
}
.bd-item__stock--in {
  color: #166534;
}
.bd-item__stock--out {
  color: #dc2626;
}
.bd-item__price {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #111827);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bd-item__unit-price {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted, #6b7280);
}

/* Buy box sidebar */
.bd-sidebar {
  position: sticky;
  top: calc(var(--site-header-height, 72px) + 12px);
}
.bd-buy-box {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 24px;
}
.bd-buy-box__savings {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #dcfce7;
  color: #166534;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.bd-buy-box__pricing {
  margin-bottom: 20px;
}
.bd-buy-box__old,
.bd-buy-box__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.bd-buy-box__label {
  font-size: 14px;
  color: var(--muted, #6b7280);
}
.bd-buy-box__old-price {
  font-size: 16px;
  color: var(--muted, #6b7280);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.bd-buy-box__price {
  font-size: 28px;
  font-weight: 700;
  color: var(--text, #111827);
  font-variant-numeric: tabular-nums;
}
.bd-buy-box__tax {
  display: block;
  font-size: 12px;
  color: var(--muted, #6b7280);
  text-align: right;
  margin-top: -2px;
}
.bd-buy-box__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 20px 0 12px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
}
.bd-buy-box__cta:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.bd-buy-box__cta--loading {
  pointer-events: none;
}
.bd-buy-box__note {
  font-size: 13px;
  color: #b45309;
  margin: 0 0 12px;
  text-align: center;
}
.bd-buy-box__trust {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}
.bd-buy-box__trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
}

/* Notification toast */
.bd-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111827;
  color: #fff;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 9999;
  transform: translateY(20px);
  opacity: 0;
  transition: transform .3s, opacity .3s;
}
.bd-toast--visible {
  transform: translateY(0);
  opacity: 1;
}
.bd-toast--error {
  background: #dc2626;
}

/* PDP bundle section */
.pdp-bundles {
  margin-top: 24px;
}
.pdp-bundles__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text, #111827);
}
.pdp-bundle-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.pdp-bundle-card:hover {
  background: #dbeafe;
}
.pdp-bundle-card:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
  border-radius: 10px;
}
.pdp-bundle-card__icon {
  flex-shrink: 0;
  color: var(--primary, #2563eb);
}
.pdp-bundle-card__info {
  flex: 1;
  min-width: 0;
}
.pdp-bundle-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #111827);
  margin-bottom: 2px;
}
.pdp-bundle-card__meta {
  font-size: 13px;
  color: #6b7280;
}
.pdp-bundle-card__price {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #111827);
  font-variant-numeric: tabular-nums;
}
.pdp-bundle-card__discount {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 100px;
  margin-left: 6px;
}

/* ── Print — hide interactive elements, keep pricing/savings data ── */
@media print {
  .bd-buy-box__cta,
  .bd-buy-box__trust { display: none !important; }
  .bundle-card:hover { transform: none; box-shadow: none; }
  .bundle-card, .bd-buy-box, .bd-item { page-break-inside: avoid; }
}

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .bundle-card { transition: none; }
  .bundle-card:hover { transform: none; }
  .bd-toast { transition: none; }
  .pdp-bundle-card { transition: none; }
}

/* ── Forced colors (Windows High Contrast — WCAG 1.4.11) */
@media (forced-colors: active) {
  .bundle-card__badge,
  .bundle-card__discount,
  .bd-buy-box__savings,
  .pdp-bundle-card__discount { border: 2px solid; }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .bd-layout {
    grid-template-columns: 1fr;
  }
  .bd-sidebar {
    position: static;
  }
}
@media (max-width: 640px) {
  .bundles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .bundle-card__images {
    padding: 8px;
  }
  .bd-title {
    font-size: 22px;
  }
  .bd-item {
    gap: 10px;
  }
  .bd-item__image {
    width: 56px;
    height: 56px;
  }
  .bd-item__img-placeholder {
    width: 56px;
    height: 56px;
  }
  .bd-buy-box__price {
    font-size: 24px;
  }
  .bd-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}
