.shoppable-image {
  position: relative;
  width: 100%;
  margin-bottom: 0.5rem;
}

.shoppable-image__edit {
  z-index: 4;
}

.shoppable-image__scene,
.shoppable-image-overlay__scene {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
  container-type: inline-size;
}

.shoppable-image__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.shoppable-image__caption {
  position: absolute;
  z-index: 1;
  left: var(--shoppable-left, 6%);
  top: var(--shoppable-top, 40%);
  margin: 0;
  max-width: 46%;
  color: var(--shoppable-caption-color, #fff);
  font-size: calc(var(--shoppable-caption-size, 52) * 1px);
  font-size: calc(var(--shoppable-caption-size, 52) * 1cqi / 12);
  line-height: 1.05;
  pointer-events: none;
  user-select: none;
}

.shoppable-image__caption--title {
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.shoppable-image__caption--subtitle {
  font-weight: 600;
  max-width: 52%;
  white-space: nowrap;
}

.shoppable-image__hotspot {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  left: var(--shoppable-left, 50%);
  top: var(--shoppable-top, 50%);
}

.shoppable-image__hotspot-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 4.5px var(--color-primary-darkest),
    0 2px 8px rgba(0, 0, 0, 0.45);
  animation: shoppable-hotspot-pulse 2.6s ease-in-out infinite;
}

.shoppable-image__hotspot:nth-of-type(2) .shoppable-image__hotspot-dot {
  animation-delay: 0.15s;
}

.shoppable-image__hotspot:nth-of-type(3) .shoppable-image__hotspot-dot {
  animation-delay: 0.3s;
}

.shoppable-image__hotspot:nth-of-type(4) .shoppable-image__hotspot-dot {
  animation-delay: 0.45s;
}

.shoppable-image__hotspot:nth-of-type(5) .shoppable-image__hotspot-dot {
  animation-delay: 0.6s;
}

.shoppable-image__hotspot.is-active .shoppable-image__hotspot-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  box-shadow:
    0 0 0 6px var(--color-primary-darkest),
    0 0 0 7.5px #fff,
    0 1px 6px rgba(0, 0, 0, 0.4);
  animation: none;
  transform: none;
}

@keyframes shoppable-hotspot-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shoppable-image__hotspot-dot {
    animation: none;
  }
}

.shoppable-image__open-products {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: var(--color-primary-darkest08);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.shoppable-image__open-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
}

@media (max-width: 767.98px) {
  .shoppable-image__open-products {
    display: inline-flex;
    left: 8px;
    bottom: 8px;
    gap: 5px;
    padding: 4px 10px 4px 4px;
    font-size: 0.7rem;
    line-height: 1;
  }

  .shoppable-image__open-count {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.62rem;
  }

  .shoppable-image-card {
    display: none !important;
  }

  .shoppable-image__hotspot {
    width: 22px;
    height: 22px;
  }

  .shoppable-image__hotspot-dot {
    width: 6px;
    height: 6px;
    box-shadow:
      0 0 0 2px #fff,
      0 0 0 3px var(--color-primary-darkest),
      0 1px 4px rgba(0, 0, 0, 0.4);
  }

  .shoppable-image__hotspot.is-active .shoppable-image__hotspot-dot {
    width: 5px;
    height: 5px;
    box-shadow:
      0 0 0 4px var(--color-primary-darkest),
      0 0 0 5px #fff,
      0 1px 4px rgba(0, 0, 0, 0.35);
  }

  .shoppable-image__caption {
    max-width: 58%;
  }
}

.shoppable-image-card {
  position: fixed;
  z-index: 1080;
  display: flex;
  align-items: stretch;
  width: min(400px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  min-height: 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(7, 18, 40, 0.72);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  backdrop-filter: blur(20px) saturate(130%);
  gap: 12px;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .shoppable-image-card {
    background: rgba(7, 18, 40, 0.94);
  }
}

.shoppable-image-card[hidden] {
  display: none;
}

.shoppable-image-card__arrow {
  position: absolute;
  z-index: 2;
  width: 16px;
  height: 16px;
  background: rgba(7, 18, 40, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  left: var(--shoppable-arrow-left, 50%);
  margin-left: -8px;
  transform: rotate(45deg);
  pointer-events: none;
}

.shoppable-image-card--below .shoppable-image-card__arrow {
  top: -8px;
  border-right: 0;
  border-bottom: 0;
  box-shadow: none;
}

.shoppable-image-card--above .shoppable-image-card__arrow {
  bottom: -8px;
  border-top: 0;
  border-left: 0;
  box-shadow: none;
}

.shoppable-image-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.shoppable-image-card__close:hover,
.shoppable-image-card__close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.shoppable-image-card__close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.shoppable-image-card .shoppable-image-card__media {
  flex: 0 0 112px;
  width: 112px;
  height: auto;
  max-width: 112px;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.shoppable-image-card .shoppable-image-card__thumb {
  display: block;
  width: 96px;
  height: 96px;
  max-height: 96px;
  object-fit: contain;
  filter: none;
}

.shoppable-image-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 24px;
}

.shoppable-image-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 6px;
  color: var(--color-black);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.shoppable-image-card__price {
  margin: 0 0 10px;
  color: var(--color-black);
  font-size: 1.1rem;
  font-weight: 700;
}

.shoppable-image-card__cta {
  width: 100%;
  border-radius: 8px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.shoppable-image-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.shoppable-image-card > .shoppable-image-card__body > .shoppable-image-card__actions {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
}

.shoppable-image-card > .shoppable-image-card__body > .shoppable-image-card__actions .shoppable-image-card__cta {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 36px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 8px 10px;
  white-space: nowrap;
}

.shoppable-image-card > .shoppable-image-card__body > .shoppable-image-card__actions .btn-primary.shoppable-image-card__cta:hover,
.shoppable-image-card > .shoppable-image-card__body > .shoppable-image-card__actions .btn-primary.shoppable-image-card__cta:focus-visible {
  filter: brightness(1.08);
}

.shoppable-image-card > .shoppable-image-card__body > .shoppable-image-card__actions .shoppable-image-card__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.shoppable-image-card__actions .btn-default.shoppable-image-card__cta {
  background: #fff;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  text-shadow: none;
}

.shoppable-image-card__cta--hidden {
  display: none;
}

.shoppable-image-card .shoppable-image-card__name {
  margin: 0 0 8px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.28;
}

.shoppable-image-card .shoppable-image-card__name:hover,
.shoppable-image-card .shoppable-image-card__name:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shoppable-image-card .shoppable-image-card__price {
  margin: 10px 0 0;
  color: #fff;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.shoppable-image-card > .shoppable-image-card__body > .shoppable-image-card__actions .btn-default.shoppable-image-card__cta {
  background: transparent;
  color: #fff;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-shadow: none;
}

.shoppable-image-card > .shoppable-image-card__body > .shoppable-image-card__actions .btn-default.shoppable-image-card__cta:hover,
.shoppable-image-card > .shoppable-image-card__body > .shoppable-image-card__actions .btn-default.shoppable-image-card__cta:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.shoppable-image-card .scr-product-reviews,
.shoppable-image-overlay .scr-product-reviews {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 4px 0 8px;
  padding: 0.3rem 0.6rem;
  background: #fff8e8;
  border: 1px solid #f0e2c4;
  border-radius: 999px;
  line-height: 1.2;
  width: fit-content;
  max-width: 100%;
}

.shoppable-image-card .scr-product-reviews[hidden],
.shoppable-image-overlay .scr-product-reviews[hidden] {
  display: none;
}

.shoppable-image-card .scr-stars,
.shoppable-image-overlay .scr-stars {
  color: #f5a623;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  gap: 0.08rem;
}

.shoppable-image-card .scr-rating-value,
.shoppable-image-overlay .scr-rating-value {
  font-weight: 700;
  color: var(--color-black);
  font-size: 0.85rem;
}

.shoppable-image-card .scr-reviews-count,
.shoppable-image-overlay .scr-reviews-count {
  color: var(--color-black-200);
  font-size: 0.78rem;
  white-space: nowrap;
}

.shoppable-image-card .scr-product-reviews {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.shoppable-image-card .scr-stars {
  font-size: 0.75rem;
}

.shoppable-image-card .scr-rating-value {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.shoppable-image-card .scr-reviews-count {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  font-weight: 400;
}

.shoppable-image-card .scr-reviews-count:not(:empty)::before {
  content: "·";
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.4);
}

.shoppable-image-overlay .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100% - 24px);
  margin: 12px auto;
  max-width: min(640px, calc(100% - 16px));
}

.shoppable-image-overlay__content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 24px);
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shoppable-image-overlay__stage {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.shoppable-image-overlay__scene .shoppable-image__image {
  border-radius: 12px 12px 0 0;
}

.shoppable-image-overlay__close {
  position: static;
  z-index: 4;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--color-black);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.shoppable-image-overlay__panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  height: 248px;
  min-height: 248px;
  max-height: 248px;
  padding: 16px;
  overflow: hidden;
}

.shoppable-image-overlay__product {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 112px;
  min-height: 112px;
  max-height: 112px;
  overflow: hidden;
}

.shoppable-image-overlay__panel .shoppable-image-card__media {
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  max-width: 112px;
  overflow: hidden;
}

.shoppable-image-overlay__panel .shoppable-image-card__thumb {
  display: block;
  width: 112px;
  height: 112px;
  max-height: 112px;
  object-fit: contain;
}

.shoppable-image-overlay__panel .shoppable-image-card__body {
  padding-right: 0;
  min-height: 112px;
  overflow: hidden;
}

.shoppable-image-overlay__panel .shoppable-image-card__name {
  min-height: calc(1.3em * 2);
  margin-bottom: 4px;
}

.shoppable-image-overlay .scr-product-reviews {
  margin: 0 0 6px;
}

.shoppable-image-overlay .scr-product-reviews[hidden] {
  display: inline-flex;
  visibility: hidden;
}

.shoppable-image-overlay__panel .shoppable-image-card__price {
  margin-bottom: 0;
}

.shoppable-image-overlay__panel .shoppable-image-card__actions {
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 92px;
  margin-top: 0;
}

.shoppable-image-overlay__panel .shoppable-image-card__cta {
  width: 100%;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 999px;
}

@media (min-width: 768px) {
  .shoppable-image-overlay {
    display: none !important;
  }
}
