/* ==========================================================================
   SMART COMPLEMENTARY BUNDLE WIDGET (AOV BOOSTER)
   ========================================================================== */

.bundle-widget-card,
.bundle-box-section {
  background: var(--bg-surface, #ffffff);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-2xl, 24px);
  padding: 24px;
  box-shadow: 0 8px 28px -4px rgba(16, 185, 129, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  margin-top: 24px;
  margin-bottom: 32px;
}

[data-theme="dark"] .bundle-widget-card,
[data-theme="dark"] .bundle-box-section {
  background: var(--bg-surface, #0f172a);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.bundle-header,
.bundle-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.bundle-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-bundle-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 0.75rem;
  font-weight: 800;
}

[data-theme="dark"] .badge-bundle-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.bundle-box-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  margin: 0;
}

.bundle-box-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #64748b);
  margin: 0;
}

.bundle-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bundle-items-row,
.bundle-items-rail {
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.bundle-item-card {
  flex: 1;
  min-width: 220px;
  border: 1.5px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-squircle, 18px);
  padding: 16px;
  background: var(--bg-surface, #ffffff);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.bundle-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
}

.bundle-item-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
}

.bundle-item-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  line-height: 1.5;
  margin: 0;
}

.bundle-item-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle, #e2e8f0);
}

.bundle-checkbox-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  color: #047857;
}

[data-theme="dark"] .bundle-checkbox-wrapper {
  color: #34d399;
}

.bundle-plus-sep,
.bundle-operator-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: #047857;
  flex-shrink: 0;
}

.bundle-item-card.selected {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.8) 0%, rgba(209, 250, 229, 0.3) 100%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.14);
}

[data-theme="dark"] .bundle-item-card.selected {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.35) 0%, rgba(6, 95, 70, 0.15) 100%);
  border-color: #059669;
}

.bundle-item-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-surface-muted, #f1f5f9);
  border: 1px solid var(--border-subtle, #e2e8f0);
  color: var(--text-primary, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .bundle-item-icon-box {
  background: var(--bg-surface-muted, #18181b);
  border-color: var(--border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--text-primary, #f8fafc);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.bundle-plus-sep,
.bundle-operator-plus {
  font-size: 1.5rem;
  font-weight: 900;
  color: #047857;
  flex-shrink: 0;
}

[data-theme="dark"] .bundle-plus-sep,
[data-theme="dark"] .bundle-operator-plus {
  color: #34d399;
}

.bundle-pricing-summary,
.bundle-checkout-bar {
  background: var(--bg-surface-muted);
  border-radius: var(--radius-xl);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid var(--border-subtle);
}

.bundle-checkout-bar #bundleCheckoutBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bundle-savings-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-crimson-subtle);
  color: var(--accent-crimson-text);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

@media (max-width: 768px) {
  .bundle-widget-card,
  .bundle-box-section {
    padding: 14px;
    border-radius: var(--radius-xl);
    margin-top: 16px;
    margin-bottom: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
  }
  .bundle-header,
  .bundle-box-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 10px;
  }
  .bundle-items-row,
  .bundle-items-rail {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .bundle-item-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    gap: 6px !important;
  }
  .bundle-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .bundle-item-thumb {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 2px 0;
  }
  .bundle-item-title {
    font-size: 0.8125rem;
    line-height: 1.45;
    text-align: right;
    width: 100%;
    word-break: break-word;
  }
  .bundle-item-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed var(--border-subtle);
  }
  .bundle-item-price-row .price-figure {
    font-size: 0.9rem !important;
  }
  .bundle-plus-sep,
  .bundle-operator-plus {
    display: none;
  }
  .bundle-pricing-summary,
  .bundle-checkout-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 12px;
  }
  .bundle-pricing-summary button,
  .bundle-pricing-summary .btn,
  .bundle-checkout-bar button,
  .bundle-checkout-bar .btn {
    width: 100%;
    justify-content: center;
  }
}
