/**
 * Storefront upsell styles — keep in sync with:
 * apps/dashboard/src/styles/upsell-storefront.css
 */
.clijet-upsell-embed-fallback-wrap {
  margin: 1.5rem auto;
  max-width: var(--page-width, 1200px);
  padding: 0 1.5rem;
}

.clijet-upsell-embed-fallback-wrap--in-product-info,
product-info .clijet-upsell-embed-fallback-wrap {
  margin: 1.5rem 0 0;
  max-width: none;
  padding: 0;
}

.clijet-upsell {
  margin: 1.5rem 0;
  padding: var(--clijet-upsell-section-padding, 1rem);
  border: var(--clijet-upsell-section-border-width, 1px) solid
    var(--clijet-upsell-section-border-color, rgba(0, 0, 0, 0.08));
  border-radius: var(--clijet-upsell-section-radius, 8px);
  background-color: var(--clijet-upsell-section-bg, transparent);
  max-width: 100%;
  overflow: hidden;
}

/* Stay invisible until upsell-core.js (app embed) successfully renders products */
.clijet-upsell[hidden],
.clijet-upsell-embed-fallback-wrap[hidden] {
  display: none !important;
}

.clijet-upsell__title {
  font-size: var(--clijet-upsell-title-size, 1.125rem);
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--clijet-upsell-title-color, inherit);
}

.clijet-upsell__subtitle {
  margin: -0.5rem 0 1rem;
  color: var(--clijet-upsell-subtitle-color, #6b7280);
  font-size: var(--clijet-upsell-subtitle-size, 0.875rem);
}

.clijet-upsell__loading {
  color: #6b7280;
  font-size: 0.875rem;
}

.clijet-upsell__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clijet-upsell__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.clijet-upsell__row img,
.clijet-upsell__row .clijet-upsell__addon-image {
  width: 48px;
  height: 48px;
  aspect-ratio: auto;
  flex-shrink: 0;
  margin-top: 0;
  object-fit: cover;
  border-radius: 4px;
}

.clijet-upsell__row .clijet-upsell__addon-title {
  margin-top: 0;
}

.clijet-upsell__row .clijet-upsell__addon-price {
  margin-top: 0.125rem;
}

.clijet-upsell__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.clijet-upsell--grid .clijet-upsell__grid {
  grid-template-columns: repeat(var(--clijet-upsell-grid-columns, 2), minmax(0, 1fr));
  gap: var(--clijet-upsell-cards-gap, 0.75rem);
}

.clijet-upsell--grid.clijet-upsell--grid-has-rows .clijet-upsell__grid {
  grid-template-rows: repeat(var(--clijet-upsell-grid-rows), minmax(0, auto));
}

.clijet-upsell--grid .clijet-upsell__grid-item {
  width: 100%;
  min-width: 0;
}

.clijet-upsell__content {
  min-width: 0;
}

.clijet-upsell--carousel {
  overflow: hidden;
}

.clijet-upsell__carousel-wrap {
  position: relative;
  min-width: 0;
  width: 100%;
}

.clijet-upsell__swiper {
  overflow: hidden;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.clijet-upsell__swiper .clijet-upsell__swiper-slide {
  width: 140px;
  height: auto;
  box-sizing: border-box;
}

.clijet-upsell__swiper--paged .clijet-upsell__swiper-slide {
  width: calc(
    (100% - 12px * (var(--clijet-upsell-slides-per-view, 3) - 1)) /
      var(--clijet-upsell-slides-per-view, 3)
  );
  flex-shrink: 0;
  box-sizing: border-box;
}

.clijet-upsell__swiper--paged .clijet-upsell__carousel-item {
  flex: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.clijet-upsell__swiper--paged .clijet-upsell__addon-image {
  max-width: 100%;
}

.clijet-upsell__swiper .swiper-button-next,
.clijet-upsell__swiper .swiper-button-prev {
  display: none;
}

.clijet-upsell__carousel-nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.clijet-upsell__carousel-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  cursor: pointer;
}

.clijet-upsell__carousel-nav-btn:hover:not(:disabled) {
  background: #f9fafb;
}

.clijet-upsell__carousel-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.clijet-upsell__carousel-item,
.clijet-upsell__grid-item {
  scroll-snap-align: start;
  border: 1px solid var(--clijet-upsell-item-border-color, #e5e7eb);
  border-radius: var(--clijet-upsell-item-radius, 6px);
  padding: var(--clijet-upsell-item-padding, 0.5rem);
  background: var(--clijet-upsell-item-bg, #fff);
}

.clijet-upsell__carousel-item {
  flex: 0 0 140px;
}

.clijet-upsell__swiper-slide.clijet-upsell__carousel-item {
  flex: none;
  width: 140px;
}

.clijet-upsell__addon-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.clijet-upsell__addon-image--placeholder {
  background: #f3f4f6;
}

.clijet-upsell__addon-title {
  font-weight: 600;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25;
}

.clijet-upsell__addon-price {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.clijet-upsell__addon-info {
  flex: 1;
  min-width: 0;
}

.clijet-upsell__empty {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

.clijet-upsell__cta {
  margin-top: 1rem;
  width: 100%;
  padding: var(--clijet-upsell-button-padding-y, 0.75rem)
    var(--clijet-upsell-button-padding-x, 1rem);
  background: var(--clijet-upsell-button-bg, #111);
  color: var(--clijet-upsell-button-color, #fff);
  border: none;
  border-radius: var(--clijet-upsell-button-radius, 6px);
  cursor: pointer;
  font-weight: 600;
}

.clijet-upsell__cta--inline {
  margin-top: 0;
  width: auto;
  flex-shrink: 0;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.clijet-upsell__cta--compact {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
}

.clijet-upsell__cta:hover {
  opacity: 0.9;
}

.clijet-upsell__cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.clijet-upsell__compare {
  color: #9ca3af;
  text-decoration: line-through;
  margin-right: 0.35rem;
}

/* FBT bundle */
.clijet-upsell__bundle-items {
  display: flex;
  flex-direction: column;
  gap: var(--clijet-upsell-cards-gap, 0.75rem);
}

.clijet-upsell__bundle-items--horizontal {
  gap: 0;
}

.clijet-upsell__bundle-row {
  display: flex;
  align-items: stretch;
  gap: 0.625rem;
  width: 100%;
}

.clijet-upsell__bundle-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  color: #374151;
}

.clijet-upsell__bundle-group {
  display: flex;
  flex: var(--clijet-fbt-offer-count, 2) 1 0;
  min-width: 0;
  align-items: stretch;
  align-self: stretch;
  border: 1px solid var(--clijet-upsell-item-border-color, #e5e7eb);
  border-radius: var(--clijet-upsell-item-radius, 12px);
  background: var(--clijet-upsell-item-bg, #fff);
  overflow: hidden;
}

.clijet-upsell__bundle-item {
  border: 1px solid var(--clijet-upsell-item-border-color, #e5e7eb);
  border-radius: var(--clijet-upsell-item-radius, 8px);
  padding: var(--clijet-upsell-item-padding, 0.75rem);
  background: var(--clijet-upsell-item-bg, #fff);
  min-width: 0;
}

.clijet-upsell__bundle-items--list .clijet-upsell__bundle-item-label {
  width: 100%;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-trigger {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-self: stretch;
  padding: 0.75rem 0.625rem;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-group .clijet-upsell__bundle-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-self: stretch;
  border: none;
  border-radius: 0;
  border-right: 1px solid var(--clijet-upsell-item-border-color, #e5e7eb);
  padding: 0.75rem 0.625rem;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-group .clijet-upsell__bundle-item:last-child {
  border-right: none;
}

.clijet-upsell__bundle-item-label {
  display: flex;
  align-items: flex-start;
  gap: var(--clijet-upsell-item-inner-gap, 0.75rem);
  cursor: pointer;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-item-label {
  position: relative;
  flex: 1;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-trigger .clijet-upsell__bundle-item-label {
  cursor: default;
}

.clijet-upsell__bundle-check {
  appearance: none;
  -webkit-appearance: none;
  margin-top: 0.15rem;
  width: var(--clijet-upsell-checkbox-size, 1.125rem);
  height: var(--clijet-upsell-checkbox-size, 1.125rem);
  flex-shrink: 0;
  border: 2px solid var(--clijet-upsell-checkbox-border-color, #d1d5db);
  border-radius: var(--clijet-upsell-checkbox-radius, 6px);
  background: var(--clijet-upsell-checkbox-bg-unchecked, #ffffff);
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.clijet-upsell__bundle-check:hover:not(:disabled):not(.clijet-upsell__bundle-check--locked) {
  border-color: var(--clijet-upsell-checkbox-bg, #111111);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--clijet-upsell-checkbox-bg, #111111) 12%, transparent);
}

.clijet-upsell__bundle-check:checked {
  background-color: var(--clijet-upsell-checkbox-bg, #111111);
  border-color: var(--clijet-upsell-checkbox-bg, #111111);
}

.clijet-upsell__bundle-check:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0.3rem;
  height: 0.55rem;
  border: solid var(--clijet-upsell-checkbox-check-color, #ffffff);
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.clijet-upsell__bundle-check:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.clijet-upsell__bundle-check--locked {
  cursor: not-allowed;
}

.clijet-upsell__bundle-check:focus-visible {
  outline: 2px solid var(--clijet-upsell-checkbox-bg, #111111);
  outline-offset: 2px;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-check {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  z-index: 1;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-trigger .clijet-upsell__bundle-check--locked {
  pointer-events: none;
}

.clijet-upsell__bundle-item-media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-item-media {
  width: 100%;
}

.clijet-upsell__bundle-image {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--clijet-upsell-item-image-radius, 6px);
  flex-shrink: 0;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.clijet-upsell__bundle-image--placeholder {
  background: #f3f4f6;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-image--placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.clijet-upsell__bundle-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-item-info {
  width: 100%;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-item-title {
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clijet-upsell__bundle-item-title {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-item-price {
  font-size: 0.75rem;
  min-height: 2.25rem;
}

.clijet-upsell__bundle-item-price {
  color: #374151;
  font-size: 0.875rem;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-qty-stepper {
  display: none;
}

.clijet-upsell__bundle-qty-stepper {
  display: inline-flex;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.clijet-upsell__bundle-qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-width: 2rem;
  border: none;
  background: #f9fafb;
  color: #374151;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.clijet-upsell__bundle-qty-btn:hover:not(:disabled) {
  background: #f3f4f6;
}

.clijet-upsell__bundle-qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.clijet-upsell__bundle-qty {
  width: 2.75rem;
  min-width: 2.75rem;
  padding: 0.35rem 0.25rem;
  border: none;
  border-left: 1px solid #d1d5db;
  border-right: 1px solid #d1d5db;
  border-radius: 0;
  text-align: center;
  font-size: 0.875rem;
  background: #fff;
  -moz-appearance: textfield;
  appearance: textfield;
}

.clijet-upsell__bundle-qty::-webkit-outer-spin-button,
.clijet-upsell__bundle-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.clijet-upsell__bundle-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-footer {
  border-top: none;
  padding-top: 0.875rem;
}

.clijet-upsell--horizontal .clijet-upsell__bundle-totals {
  margin-bottom: 0.625rem;
  font-size: 0.8125rem;
  text-align: center;
}

.clijet-upsell__bundle-totals {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.clijet-upsell__bundle-total-label {
  color: #6b7280;
  margin-right: 0.35rem;
}

.clijet-upsell__bundle-total {
  font-size: 1.125rem;
}

.clijet-upsell__bundle-savings {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  background: #ecfdf5;
  color: #047857;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.clijet-upsell__bundle-add {
  margin-top: 0;
}

.clijet-upsell--horizontal .clijet-upsell__cta {
  border-radius: 999px;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

@media (max-width: 520px) {
  .clijet-upsell--horizontal .clijet-upsell__bundle-row {
    flex-wrap: wrap;
  }

  .clijet-upsell--horizontal .clijet-upsell__bundle-group {
    flex-basis: 100%;
  }
}

.clijet-upsell-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.clijet-upsell-popup {
  background: #fff;
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.clijet-upsell-popup__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.clijet-upsell-popup__actions button {
  flex: 1;
  padding: 0.625rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

.clijet-upsell-popup__actions .primary {
  background: #111;
  color: #fff;
  border-color: #111;
}

.clijet-upsell-popup--multi .clijet-upsell-popup__title {
  margin: 0 0 1rem;
}

.clijet-upsell-popup__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.clijet-upsell-popup__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.clijet-upsell-popup__item--selected {
  border-color: #111827;
  background: #f9fafb;
}

.clijet-upsell-popup__checkbox {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
}

.clijet-upsell-popup__checkbox--checked {
  background: #111827;
  border-color: #111827;
  box-shadow: inset 0 0 0 2px #fff;
}

.clijet-upsell-popup__image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.clijet-upsell-popup__image--placeholder {
  background: #f3f4f6;
}

.clijet-upsell-popup__item-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.clijet-upsell-popup__item-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
}

.clijet-upsell-popup__item-price {
  font-size: 0.8125rem;
  color: #6b7280;
}

.clijet-upsell-popup__item-price s {
  margin-right: 0.25rem;
}

.clijet-upsell-popup--sequential {
  text-align: center;
}

.clijet-upsell-popup--sequential .clijet-upsell-popup__title {
  margin-bottom: 1rem;
}

.clijet-upsell-popup__single {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.clijet-upsell-popup__image--large {
  width: 7.5rem;
  height: 7.5rem;
  object-fit: cover;
  border-radius: 0.75rem;
}

.clijet-upsell--popup-preview .clijet-upsell-popup-overlay {
  position: absolute;
}

.clijet-upsell__row-image {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.clijet-upsell__row-image--placeholder {
  background: #f3f4f6;
}

.clijet-upsell__row--sold-out,
.clijet-upsell__bundle-item--sold-out,
.clijet-upsell__addon-card--sold-out {
  opacity: 0.72;
}

.clijet-upsell__sold-out-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.clijet-upsell__availability-notice {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin-bottom: 0.875rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.clijet-upsell__availability-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.clijet-upsell__availability-notice-title,
.clijet-upsell__availability-tooltip-title,
.clijet-upsell__feedback-title {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
}

.clijet-upsell__availability-notice-body,
.clijet-upsell__availability-tooltip-body,
.clijet-upsell__feedback-body {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.clijet-upsell__availability-tooltip-hint,
.clijet-upsell__feedback-hint {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #6b7280;
}

.clijet-upsell__availability-tooltip {
  margin-top: 0.375rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.clijet-upsell__bundle-item--sold-out .clijet-upsell__availability-tooltip {
  margin-top: 0.5rem;
}

.clijet-upsell__row-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.clijet-upsell__row-actions--sold-out .clijet-upsell__availability-tooltip {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.375rem);
  z-index: 3;
  width: min(16rem, 70vw);
  margin-top: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.clijet-upsell__row-actions--sold-out:hover .clijet-upsell__availability-tooltip,
.clijet-upsell__row-actions--sold-out:focus-within .clijet-upsell__availability-tooltip {
  display: block;
}

.clijet-upsell__availability-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: help;
  padding: 0;
}

.clijet-upsell__availability-info-btn:hover,
.clijet-upsell__availability-info-btn:focus-visible {
  border-color: #9ca3af;
  outline: none;
}

.clijet-upsell__feedback {
  margin: 0 0 0.875rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
}

.clijet-upsell__feedback--success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.clijet-upsell__feedback--warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.clijet-upsell__feedback--error,
.clijet-upsell__feedback--info {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.clijet-upsell__bundle-item-label--sold-out {
  cursor: not-allowed;
}
/* Plain product cards (add-ons, collection, cart upsell). Section look comes from the rules above. */
.clijet-upsell-item {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.clijet-upsell-item img {
  max-width: 120px;
  height: auto;
}

.clijet-upsell-add {
  width: fit-content;
}

/* Scrollable carousel for add-on widgets (the Shopify one uses Swiper; this needs no library). */
.clijet-wp-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.clijet-wp-track > .clijet-upsell__carousel-item {
  flex: 0 0 calc((100% - 12px * (var(--clijet-upsell-slides-per-view, 3) - 1)) / var(--clijet-upsell-slides-per-view, 3));
  min-width: 0;
  box-sizing: border-box;
}

/* Themes differ on box-sizing; the widget layout (grid columns, paddings) assumes border-box like Shopify themes. */
.clijet-upsell,
.clijet-upsell *,
.clijet-upsell *::before,
.clijet-upsell *::after {
  box-sizing: border-box;
}

/*
 * A theme that lays the product summary out as a flex column must not squash or narrow the widget:
 * without an explicit width its height is computed for narrower cards and the bottom padding is clipped.
 */
.clijet-upsell {
  flex-shrink: 0;
  width: 100%;
}
