/* Compare & Select Lab — modal (lab home + cart icon + after Add to cart) */
.lab-cart-lab-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lab-cart-lab-modal.is-open {
  display: flex;
}

.lab-cart-lab-modal__panel {
  width: 100%;
  max-width: 640px;
  max-height: min(92vh, 720px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lab-cart-lab-modal__head {
  flex-shrink: 0;
  padding: 1.1rem 1.15rem 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lab-cart-lab-modal__head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lab-cart-lab-modal__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.lab-cart-lab-modal__title-row > i {
  color: #1a6bb8;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.lab-cart-lab-modal__title-wrap h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.lab-cart-lab-modal__title-wrap p {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.35;
}

.lab-cart-lab-modal__cart-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2185d0 0%, #1a6bb8 100%);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
}

.lab-cart-lab-modal__cart-pill i {
  font-size: 0.95rem;
}

.lab-cart-lab-modal__close {
  border: none;
  background: rgba(15, 23, 42, 0.06);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: #475569;
  flex-shrink: 0;
}

.lab-cart-lab-modal__close:hover {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

.lab-cart-lab-modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem 1rem 1rem;
  -webkit-overflow-scrolling: touch;
}

.lab-cart-lab-modal__loading,
.lab-cart-lab-modal__error {
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
  font-size: 0.9375rem;
}

.lab-cart-lab-modal__error {
  color: #b91c1c;
}

.lab-cart-lab-item {
  border: 1px solid rgba(45, 156, 219, 0.22);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  margin-bottom: 0.85rem;
  background: linear-gradient(180deg, #eef6fc 0%, #f8fbfe 100%);
  box-shadow: 0 2px 12px rgba(33, 133, 208, 0.06);
}

.lab-cart-lab-item:last-child {
  margin-bottom: 0;
}

.lab-cart-lab-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.7rem;
}

.lab-cart-lab-item__titles {
  min-width: 0;
  flex: 1;
}

.lab-cart-lab-item__name {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  line-height: 1.25;
  display: block;
}

.lab-cart-lab-item__sub {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
}

/* Stepper + price — match reference: controls left, price right */
.lab-cart-lab-item__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lab-cart-lab-stepper {
  display: inline-flex;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(33, 133, 208, 0.35);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.lab-cart-lab-stepper__btn {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: none;
  background: linear-gradient(180deg, #2b8fd8 0%, #1a6bb8 100%);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
}

.lab-cart-lab-stepper__btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.lab-cart-lab-stepper__qty {
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  background: #fff;
}

.lab-cart-lab-item__prices {
  white-space: nowrap;
  text-align: right;
}

.lab-cart-lab-price-pair {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lab-cart-lab-price-pair--header .lab-cart-lab-price-pair__mrp {
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}

.lab-cart-lab-price-pair--header .lab-cart-lab-price-pair__sale {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a6bb8;
}

.lab-cart-lab-price-pair--card {
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.lab-cart-lab-price-pair--card .lab-cart-lab-price-pair__mrp {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
  line-height: 1.2;
}

.lab-cart-lab-price-pair--card .lab-cart-lab-price-pair__sale {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a6bb8;
  line-height: 1.2;
}

.lab-cart-lab-item__label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #64748b;
  margin-bottom: 0.5rem;
}

/* Horizontal lab row (reference) — not 2×2 grid */
.lab-cart-lab-options {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  margin: 0 -2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.lab-cart-lab-options::-webkit-scrollbar {
  height: 6px;
}

.lab-cart-lab-options::-webkit-scrollbar-thumb {
  background: rgba(33, 133, 208, 0.35);
  border-radius: 4px;
}

.lab-cart-lab-opt {
  position: relative;
  flex: 0 0 auto;
  width: 128px;
}

.lab-cart-lab-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lab-cart-lab-opt__face {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-align: center;
  min-height: 112px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lab-cart-lab-opt__top {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem 0.35rem 0.4rem;
  min-height: 0;
}

.lab-cart-lab-opt__logo {
  display: block;
  max-height: 36px;
  max-width: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.lab-cart-lab-opt input:focus-visible + .lab-cart-lab-opt__face {
  outline: 2px solid #2185d0;
  outline-offset: 2px;
}

.lab-cart-lab-opt input:checked + .lab-cart-lab-opt__face {
  border-color: #2185d0;
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(33, 133, 208, 0.35);
  background: #fff;
}

.lab-cart-lab-opt__name {
  font-size: 0.68rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lab-cart-lab-opt__bottom {
  flex-shrink: 0;
  padding: 0.45rem 0.3rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
}

.lab-cart-lab-modal__foot {
  flex-shrink: 0;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lab-cart-lab-modal__add-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 2px dashed rgba(33, 133, 208, 0.45);
  border-radius: 12px;
  background: transparent;
  color: #1a6bb8;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.lab-cart-lab-modal__add-more:hover {
  background: rgba(33, 133, 208, 0.06);
}

.lab-cart-lab-modal__proceed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2185d0 0%, #1a6bb8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(33, 133, 208, 0.35);
}

.lab-cart-lab-modal__proceed:hover {
  filter: brightness(1.03);
}

@media (max-width: 480px) {
  .lab-cart-lab-item__top {
    flex-wrap: wrap;
  }

  .lab-cart-lab-item__right {
    width: 100%;
    justify-content: flex-end;
  }

  .lab-cart-lab-opt {
    width: 104px;
    max-width: none;
  }
}
