html.quick-view-modal-open,
html.quick-view-modal-open body {
  overflow: hidden;
}

#quick-view-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
}

#quick-view-modal.open {
  display: block;
}

#quick-view-modal * {
  margin: 0;
}

#quick-view-modal .qv-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#quick-view-modal .qv-content {
  background: #fff;
  height: 100%;
  /* padding: 1.5rem; */
  position: relative;
  z-index: 10000;
}

#quick-view-modal ul {
  list-style-type: none;
  padding: 0;
}

.qv-close {
  position: absolute;
  top: 8px;
  right: 16px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  background-color: lightgrey;
  border-radius: 100%;
  min-width: 32px !important;
  min-height: 32px !important;
  text-align: center;
  z-index: 1;
}

.qv-wc-detail {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.qv-body .woocommerce span.onsale {
  top: 0.5em !important;
  left: 0.5em !important;
}

.qv-image {
  flex: 1;
  text-align: center;
}

.qv-image img {
  border-radius: 8px;
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  height: auto;
}

.qv-body .woocommerce .price del {
  font-size: 80%;
  opacity: 0.5;
}

.qv-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.qv-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.dr-quick-view-cta {
  display: flex;
  gap: var(--wp--preset--spacing--40);
  position: sticky;
  bottom: 0;
  background-color: #ffffff;
  padding-top: 0.75rem;
}

/* Allergen */
.qv-content {
  .allergens {
    --al-border: var(--border, #d9d6cc);
    --al-surface: var(--surface, #faf6ea);
    --al-muted: var(--muted, #6f6f68);
    --al-gold: var(--gold, #d9b25f);
    --al-gold-ink: var(--gold-ink, #4a3a10);

    margin: 0 0 1.5rem !important;
    padding: .9rem 0 .2rem;
    border-top: 1px solid var(--al-border);
  }
  .allergens[hidden] { display: none; }

  .allergens__title {
    margin: 0 0 .6rem !important;
    font-size: .9rem;
    font-weight: 600;
  }

  .allergens__list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }

  .chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .2rem .7rem .2rem .25rem;
    font-size: .85rem !important;
    line-height: 1.3;
    border: 1px solid var(--al-border);
    border-radius: 999px;
    background: var(--al-surface);
  }

  .chip__code {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: var(--al-gold);
    color: var(--al-gold-ink);
    font-size: .75rem;
    font-weight: 700;
  }

  .allergens__note {
    margin: .6rem 0 0 !important;
    font-size: .75rem;
    color: var(--al-muted);
  }
}

.dr-quick-view-cta .dr-quick-view-cta-quantity {
  display: flex;
  gap: 4px;
}

.dr-quick-view-cta .dr-quick-view-cta-quantity input {
  width: 32px;
  text-align: center;
}

.dr-quick-view-cta .dr-quick-view-cta-quantity a {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--wp--preset--color--accent);
  padding: 0 16px;
  color: var(--wp--preset--color--default);
  border-radius: 4px;
}

.dr-quick-view-cta .dr-quick-view-cta-quantity input[type="number"] {
  text-align: center;
}

.dr-quick-view-cta .dr-quick-view-cta-add-to-cart {
  flex-grow: 1;
}

.dr-quick-view-cta .dr_quickview_add_to_cart {
  background-color: var(--wp--preset--color--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 24px;
  display: flex;
  justify-content: space-between;
  white-space: nowrap;
}

.dr-quick-view-cta .dr_quickview_add_to_cart:hover {
  background-color: var(--wp--preset--color--link-hover);
}

@media (min-width: 576px) {

  .qv-wc-detail {
    top: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    left: 1.5rem;
  }

  #quick-view-modal .qv-content {
    border-radius: 12px;
    max-width: 576px;
    margin: 2% auto;
    height: 90%;
  }

  .dr-quick-view-cta {
    padding-top: 1rem;
    bottom: 0;
  }
}
