/* BellaBloom shared quick preview: collection and homepage cards use this one modal. */

html.quickview-open,
html.quickview-open body {
  overflow: hidden;
}

#product-quickview-modal {
  display: none;
}

#product-quickview-modal[open] {
  --color-foreground: 44, 41, 37;
  --color-background: 251, 248, 242;
  background: #fbf8f2;
  border: 1px solid #d8ccbc;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(58, 42, 33, 0.28);
  color: #2c2925;
  display: block;
  left: 50%;
  max-height: min(86dvh, 760px);
  max-width: 980px;
  overflow: hidden;
  position: fixed;
  text-align: left;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - 40px);
  z-index: 10000;
}

#product-quickview-modal[open] + .product-quickview-modal-backdrop {
  background: rgba(58, 42, 33, 0.66);
  display: block;
  inset: 0;
  opacity: 1;
  position: fixed;
  transition: opacity var(--duration-default) ease;
  z-index: 9999;
}

.product-quickview-modal-backdrop {
  display: none;
}

.product-quickview-modal__body,
.product-quickview {
  max-height: min(86dvh, 760px);
}

.product-quickview {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  overflow: hidden;
}

.product-quickview .product-quickview__img-wrapper {
  align-items: center;
  background: #efe6d8;
  display: flex;
  justify-content: center;
  min-height: min(520px, 86dvh);
  overflow: hidden;
}

.product-quickview .product-quickview__img-link {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.product-quickview .product-quickview__img-wrapper img {
  aspect-ratio: 1 / 1;
  display: block;
  height: auto;
  max-height: min(86dvh, 760px);
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.product-quickview .product-quickview__content-wrapper {
  max-width: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 46px 38px 0;
  scrollbar-gutter: stable;
}

.product-quickview-modal-wrapper .product-quickview-modal__close {
  align-items: center;
  background: rgba(255, 253, 249, 0.98);
  border: 1px solid #d8ccbc;
  border-radius: 50%;
  color: #5a3e24;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 44px;
  z-index: 5;
}

.product-quickview-modal-wrapper .product-quickview-modal__close svg {
  display: block;
  height: 15px;
  width: 15px;
}

.product-quickview-modal-wrapper .product-quickview-modal__close:focus-visible {
  outline: 3px solid #9a6a2f;
  outline-offset: 3px;
}

.product-quickview .quickview-title {
  color: #5a3e24;
  display: inline-block;
  text-decoration: none;
}

.product-quickview .quickview-title h2,
.product-quickview .bbc-numbered-quickview-title {
  color: #5a3e24;
  font-family: var(--bbc-display, var(--bbh-display, "Cormorant Garamond", Georgia, serif));
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0 42px 16px 0;
  overflow-wrap: anywhere;
}

.product-quickview .quickview-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.product-quickview #price-ProductModal {
  margin-bottom: 14px;
}

.product-quickview .product-form {
  margin-top: 18px;
}

.product-quickview__view-link {
  align-items: center;
  color: #5a3e24;
  display: inline-flex;
  font-size: 13px;
  font-weight: 650;
  gap: 7px;
  margin-top: 8px;
  text-decoration: none;
}

.product-quickview__view-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.quickview-sticky-actions {
  background: linear-gradient(to bottom, rgba(251, 248, 242, 0), #fbf8f2 22px);
  bottom: 0;
  margin-top: 12px;
  padding: 32px 0 24px;
  position: sticky;
  width: 100%;
  z-index: 2;
}

.quickview-sticky-actions .button {
  margin: 0;
  position: relative;
}

.product-quickview-modal-wrapper .loading-overlay {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.product-quickview-modal-wrapper .loading-overlay__spinner {
  width: 4rem;
}

.product-quickview-modal__error {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  min-height: 300px;
  padding: 40px;
  text-align: center;
}

.product-quickview-modal__error a {
  color: #5a3e24;
  font-weight: 650;
}

.bbh-product-card__media-link {
  overflow: hidden;
}

.bbh-product-card__media-link {
  display: block;
}

.bbh-product-card__media-link:hover img {
  transform: scale(1.02);
}

/* Promotion label */
.quickview_promo-promo-label {
  border: 1px solid;
  border-radius: 2px;
  cursor: pointer;
  display: inline-block;
  font-size: 0.7em;
  font-weight: 400;
  line-height: 1.3;
  margin-right: 5px;
  margin-top: 5px;
  max-width: 100%;
  padding: 5px 10px;
  position: relative;
  text-decoration: none;
}

.quickview_promo-promo-label::before {
  background: currentColor;
  border-radius: 2px;
  content: '';
  height: 100%;
  left: 0;
  opacity: 0.05;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1;
}

.quickview_promo-promo-label.quickview_promo-label-unclickable {
  border: 1px dashed;
}

.quickview_promo-promo-label.quickview_promo-label-clickable {
  padding-right: 2.6em;
}

.quickview_promo-promo-label .quickview_promo-svg-icon {
  fill: none;
  height: 1.4em;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 1.4em;
}

@media screen and (max-width: 749px) {
  #product-quickview-modal[open] {
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    bottom: 0;
    left: 0;
    max-height: min(92dvh, 820px);
    max-width: none;
    top: auto;
    transform: none;
    width: 100%;
  }

  .product-quickview-modal__body,
  .product-quickview {
    max-height: min(92dvh, 820px);
  }

  .product-quickview {
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .product-quickview .product-quickview__img-wrapper {
    min-height: 0;
  }

  .product-quickview .product-quickview__img-wrapper img {
    max-height: 275px;
  }

  .product-quickview .product-quickview__content-wrapper {
    overflow: visible;
    padding: 28px 22px 0;
  }

  .product-quickview .quickview-title h2,
  .product-quickview .bbc-numbered-quickview-title {
    font-size: clamp(32px, 10vw, 42px);
    margin-right: 30px;
  }

  .quickview-sticky-actions {
    margin-left: -22px;
    margin-right: -22px;
    padding: 32px 22px calc(14px + env(safe-area-inset-bottom));
    width: calc(100% + 44px);
  }

}

@media screen and (min-width: 750px) and (max-width: 998px) {
  #product-quickview-modal[open] {
    max-height: 88dvh;
    width: calc(100vw - 32px);
  }

  .product-quickview-modal__body,
  .product-quickview {
    max-height: 88dvh;
  }

  .product-quickview {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.92fr);
  }

  .product-quickview .product-quickview__content-wrapper {
    padding: 42px 30px 0;
  }
}
