/* =========================================================
   DENTAL SOURCE NOW — BOM / WISHLIST
   Page presentation only; existing BOM behavior is unchanged.
   ========================================================= */

.wishlist-page-body {
  background: var(--surface-page);
  color: var(--text-primary);
}

.wishlist-page-body :is(button, input) {
  font: inherit;
}

.wishlist-page {
  min-height: 60vh;
}

.bom-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--brand-cyan);
  background:
    radial-gradient(circle at 82% 22%, rgba(0, 200, 255, .18), transparent 34%),
    linear-gradient(112deg, var(--brand-navy) 0%, #093654 62%, var(--brand-blue-dark) 135%);
  color: var(--surface-white);
  box-shadow: 0 10px 28px rgba(7, 31, 54, .1);
}

.bom-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background:
    linear-gradient(90deg, transparent 0 76%, rgba(255, 255, 255, .08) 76% 76.1%, transparent 76.1%),
    linear-gradient(0deg, transparent 0 66%, rgba(255, 255, 255, .06) 66% 66.2%, transparent 66.2%);
}

.bom-hero__inner {
  position: relative;
  z-index: 1;
  width: var(--site-container-width);
  margin: 0 auto;
  padding: 16px 0 28px;
}

.bom-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .55);
  font-size: .8rem;
  font-weight: 700;
}

.bom-breadcrumb a {
  color: var(--surface-white);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
}

.bom-breadcrumb a:hover,
.bom-breadcrumb a:focus-visible {
  color: var(--brand-cyan);
}

.bom-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.bom-eyebrow {
  margin: 0 0 7px !important;
  color: var(--brand-cyan) !important;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.25;
  text-transform: uppercase;
}

.bom-head h1 {
  margin: 0;
  color: var(--surface-white);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.bom-head p:not(.bom-eyebrow) {
  max-width: 720px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: .94rem;
  line-height: 1.5;
}

.bom-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.bom-content {
  width: var(--site-container-width);
  margin: 0 auto;
  padding: 24px 0 64px;
}

.bom-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(7, 31, 54, .1);
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.bom-btn--primary {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: var(--surface-white);
}

.bom-btn--primary:hover,
.bom-btn--primary:focus-visible {
  border-color: var(--brand-blue-dark);
  background: var(--brand-blue-dark);
  box-shadow: 0 11px 24px rgba(0, 95, 143, .24);
  transform: translateY(-1px);
}

.bom-btn--light {
  border-color: var(--border-subtle);
  background: var(--surface-white);
  color: var(--brand-navy);
}

.bom-btn--light:hover,
.bom-btn--light:focus-visible {
  border-color: var(--brand-blue);
  color: var(--brand-blue-dark);
  transform: translateY(-1px);
}

.bom-btn:focus-visible,
.bom-tab:focus-visible,
.bom-carousel-arrow:focus-visible,
.bom-card:focus-visible,
.bom-icon-btn:focus-visible,
.bom-qty button:focus-visible,
.bom-card__menu-btn:focus-visible {
  outline: 3px solid rgba(0, 120, 184, .22);
  outline-offset: 2px;
}

.bom-btn--save {
  min-height: 38px;
  padding: 8px 12px;
  box-shadow: none;
}

.bom-btn--wide {
  width: 100%;
  margin-top: 18px;
}

.bom-tabs {
  display: flex;
  margin: 0 0 22px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: thin;
}

.bom-tab {
  min-width: 230px;
  min-height: 54px;
  padding: 14px 20px;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--surface-white);
  color: var(--text-muted);
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
}

.bom-tab + .bom-tab {
  margin-left: -1px;
}

.bom-tab:hover {
  color: var(--brand-blue-dark);
}

.bom-tab.active {
  border-bottom: 3px solid var(--brand-cyan);
  color: var(--brand-navy);
  background: var(--surface-blue-soft);
}

.bom-carousel-wrap {
  position: relative;
  margin-bottom: 26px;
  padding: 0 52px;
}

.bom-carousel {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 2px 2px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.bom-carousel::-webkit-scrollbar {
  display: none;
}

.bom-carousel .bom-card {
  flex: 0 0 255px;
}

.bom-carousel .bom-card--new {
  flex-basis: 180px;
}

.bom-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: var(--surface-white);
  color: var(--brand-blue-dark);
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(7, 31, 54, .12);
  transform: translateY(-55%);
  transition: transform 150ms ease, color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.bom-carousel-arrow:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: var(--surface-white);
  transform: translateY(-55%) scale(1.04);
}

.bom-carousel-arrow:disabled {
  opacity: .28;
  cursor: default;
  transform: translateY(-55%);
}

.bom-carousel-arrow--left {
  left: 0;
}

.bom-carousel-arrow--right {
  right: 0;
}

.bom-card {
  position: relative;
  display: flex;
  min-height: 100px;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--surface-white);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(7, 31, 54, .055);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.bom-card:hover,
.bom-card.active {
  border-color: rgba(0, 120, 184, .48);
  box-shadow: 0 13px 28px rgba(7, 31, 54, .1);
  transform: translateY(-1px);
}

.bom-card.active {
  box-shadow: inset 0 -3px 0 var(--brand-cyan), 0 13px 28px rgba(7, 31, 54, .1);
}

.bom-card__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-blue-soft);
  color: var(--brand-blue);
}

.bom-card h3 {
  margin: 0 34px 4px 0;
  color: var(--brand-navy);
  font-size: .9rem;
  font-weight: 800;
}

.bom-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: .78rem;
  line-height: 1.45;
}

.bom-card__value {
  margin-top: 6px !important;
  color: var(--brand-navy) !important;
  font-weight: 800 !important;
}

.bom-card--new {
  align-items: center;
  justify-content: center;
  border-style: dashed;
  text-align: center;
}

.bom-card--new .bom-card__plus {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-blue-soft);
  color: var(--brand-blue);
}

.bom-card__menu-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f3f7fa;
  color: var(--text-muted);
  cursor: pointer;
}

.bom-card__menu-btn:hover {
  background: var(--surface-blue-soft);
  color: var(--brand-blue-dark);
}

.bom-card__menu {
  position: absolute;
  top: 43px;
  right: 9px;
  z-index: 12;
  display: none;
  min-width: 155px;
  padding: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: var(--surface-white);
  box-shadow: 0 14px 34px rgba(7, 31, 54, .16);
}

.bom-card.menu-open .bom-card__menu {
  display: block;
}

.bom-card__menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #a02a21;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.bom-card__menu button:hover {
  background: #fff5f4;
}

.bom-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.bom-panel,
.bom-side-card {
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  background: var(--surface-white);
  box-shadow: 0 10px 28px rgba(7, 31, 54, .065);
}

.bom-panel {
  overflow: hidden;
}

.bom-panel__bar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 18px;
  background: linear-gradient(112deg, var(--brand-navy), var(--brand-blue-dark));
  color: var(--surface-white);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.bom-panel__note {
  color: rgba(255, 255, 255, .72);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.bom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.bom-table th:nth-child(1) { width: 19%; }
.bom-table th:nth-child(2) { width: 30%; }
.bom-table th:nth-child(3) { width: 14%; }
.bom-table th:nth-child(4) { width: 13%; }
.bom-table th:nth-child(5) { width: 8%; }
.bom-table th:nth-child(6) { width: 7%; }
.bom-table th:nth-child(7) { width: 100px; }

.bom-table th:nth-child(1),
.bom-table th:nth-child(2) {
  white-space: nowrap;
}

.bom-table th:last-child,
.bom-table td:last-child {
  padding-inline: 10px;
}

.bom-table th {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: #f7fafc;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
}

.bom-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #eaf0f4;
  vertical-align: middle;
}

.bom-prod {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--brand-navy);
  font-weight: 800;
}

.bom-prod img {
  width: 58px;
  height: 48px;
  flex: 0 0 58px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: var(--surface-white);
  object-fit: contain;
}

.bom-desc {
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-weight: 700;
}

.bom-part-number {
  white-space: nowrap;
}

.bom-item-no {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bom-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #087b3a;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.bom-qty {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--surface-white);
}

.bom-qty button {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--surface-white);
  color: var(--brand-navy);
  font-weight: 800;
  cursor: pointer;
}

.bom-qty button:hover {
  background: var(--surface-blue-soft);
  color: var(--brand-blue-dark);
}

.bom-qty input {
  width: 44px;
  border: 0;
  outline: 0;
  color: var(--brand-navy);
  font-weight: 800;
  text-align: center;
}

.bom-price,
.bom-total {
  color: var(--brand-navy);
  font-weight: 800;
  white-space: nowrap;
}

.bom-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: var(--surface-white);
  color: var(--brand-blue);
  cursor: pointer;
}

.bom-icon-btn:hover {
  border-color: var(--brand-blue);
  background: var(--surface-blue-soft);
}

.bom-icon-btn.danger {
  color: #a02a21;
  background: #fff5f4;
}

.bom-actions-cell {
  white-space: nowrap;
}

.bom-row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.bom-add-row {
  padding: 16px;
}

.bom-add-row input,
.bom-name-edit input {
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  outline: 0;
  background: var(--surface-white);
  color: var(--text-primary);
  font-weight: 700;
}

.bom-add-row input {
  width: min(430px, 100%);
  padding: 12px 14px;
}

.bom-add-row input:focus,
.bom-name-edit input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 120, 184, .12);
}

.bom-side {
  display: grid;
  gap: 18px;
}

.bom-side-card {
  padding: 20px;
}

.bom-side-card h3 {
  margin: 0 0 17px;
  color: var(--brand-navy);
  font-size: 1.14rem;
}

.bom-side-card p {
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.5;
}

.bom-side-card p i {
  width: 20px;
  color: var(--brand-blue);
}

.bom-name-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.bom-name-edit input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
}

.bom-summary-row {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  color: var(--text-primary);
}

.bom-summary-row strong {
  color: var(--brand-navy);
}

.bom-summary-total {
  margin-top: 17px;
  padding-top: 17px;
  border-top: 1px solid var(--border-subtle);
  color: var(--brand-navy);
  font-size: 1.35rem;
  font-weight: 800;
}

.bom-feature-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  background: var(--surface-white);
}

.bom-feature {
  display: flex;
  gap: 13px;
  padding: 20px;
  border-right: 1px solid var(--border-subtle);
}

.bom-feature:last-child {
  border-right: 0;
}

.bom-feature i {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-blue-soft);
  color: var(--brand-blue);
}

.bom-feature strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-navy);
}

.bom-feature span {
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.4;
}

.bom-empty {
  padding: clamp(42px, 7vw, 76px) 24px;
  border: 1px dashed #b9cfdd;
  border-radius: 12px;
  background: var(--surface-white);
  color: var(--text-muted);
  text-align: center;
  box-shadow: 0 10px 28px rgba(7, 31, 54, .045);
}

.bom-empty h2 {
  margin: 0 0 10px;
  color: var(--brand-navy);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
}

.bom-empty p {
  margin: 0;
  line-height: 1.55;
}

.bom-flash {
  display: none;
  margin-bottom: 16px;
  padding: 12px 15px;
  border-radius: 8px;
  font-weight: 800;
}

.bom-flash.show {
  display: block;
}

.bom-flash.ok {
  background: #e7f8ee;
  color: #087b3a;
}

.bom-flash.err {
  background: #fff0f0;
  color: #a02a21;
}

@media (max-width: 1100px) {
  .bom-main {
    grid-template-columns: 1fr;
  }

  .bom-feature-strip {
    grid-template-columns: 1fr 1fr;
  }

  .bom-feature:nth-child(2) {
    border-right: 0;
  }

  .bom-feature:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 720px) {
  .bom-hero__inner {
    padding-block: 14px 22px;
  }

  .bom-head {
    display: block;
  }

  .bom-actions {
    margin-top: 17px;
  }

  .bom-content {
    padding-block: 18px 70px;
  }

  .bom-tab {
    min-width: 200px;
  }

  .bom-carousel-wrap {
    padding-inline: 44px;
  }

  .bom-carousel .bom-card {
    flex-basis: 235px;
  }

  .bom-carousel .bom-card--new {
    flex-basis: 170px;
  }

  .bom-panel {
    overflow-x: auto;
  }

  .bom-table {
    min-width: 900px;
  }
}

@media (max-width: 520px) {
  .bom-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bom-btn {
    width: 100%;
  }

  .bom-feature-strip {
    grid-template-columns: 1fr;
  }

  .bom-feature,
  .bom-feature:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .bom-feature:last-child {
    border-bottom: 0;
  }
}

@media print {
  .site-header,
  .site-footer,
  .ask-hkx-launcher,
  .quick-entry,
  .bom-actions,
  .bom-carousel-arrow,
  .bom-card__menu-btn {
    display: none !important;
  }

  .bom-content,
  .bom-hero__inner {
    width: 100%;
  }
}
