/*
================================================

Space Vanta Theme 1.0

Module:
Bundle Hero Preview

File:
public/bundle-template/bundle-hero-preview.css

Version:
3.0

Responsibility:
Preview Drawer Structure / Layout / Responsive

Brand visual styling:
public/brand/bundle/preview.css
public/brand/bundle/preview-products.css
public/brand/bundle/preview-interaction.css

Verified:
SHOPLINE Online Store 3.0

================================================
*/


/* =================================================
   1. Preview Root
================================================= */

.sv-bundle-hero-preview {
  position: fixed;

  inset: 0;

  z-index: 9999;

  visibility: hidden;

  pointer-events: none;
}


/* =================================================
   2. Active State
================================================= */

.sv-bundle-hero-preview.is-active {
  visibility: visible;

  pointer-events: auto;
}


/* =================================================
   3. Overlay
================================================= */

.sv-bundle-hero-preview__overlay {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  background:
    rgba(16, 18, 20, 0.18);

  opacity: 0;

  transition:
    opacity 360ms ease;
}


/* =================================================
   4. Active Overlay
================================================= */

.sv-bundle-hero-preview.is-active
.sv-bundle-hero-preview__overlay {
  opacity: 1;
}


/* =================================================
   5. Drawer Panel
================================================= */

.sv-bundle-hero-preview__panel {
  position: absolute;

  top: 0;
  right: 0;
  bottom: 0;

  display: flex;
  flex-direction: column;

  width: min(520px, 90vw);

  height: 100%;

  padding: 36px;

  overflow: hidden;

  transform:
    translateX(100%);

  transition:
    transform 460ms
      cubic-bezier(0.22, 1, 0.36, 1);
}


/* =================================================
   6. Active Drawer
================================================= */

.sv-bundle-hero-preview.is-active
.sv-bundle-hero-preview__panel {
  transform:
    translateX(0);
}


/* =================================================
   7. Preview Header
================================================= */

.sv-bundle-hero-preview__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  flex: 0 0 auto;

  gap: 24px;
}


/* =================================================
   8. Header Content
================================================= */

.sv-bundle-hero-preview__header > div {
  min-width: 0;
}


/* =================================================
   9. Eyebrow
================================================= */

.sv-bundle-hero-preview__eyebrow {
  margin: 0;
}


/* =================================================
   10. Preview Title
================================================= */

.sv-bundle-hero-preview__title {
  margin: 0;
}


/* =================================================
   11. Close Button
================================================= */

.sv-bundle-hero-preview__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 36px;
  height: 36px;

  padding: 0;

  border: 0;

  background: transparent;

  cursor: pointer;
}


/* =================================================
   12. Preview Content
================================================= */

.sv-bundle-hero-preview__content {
  flex: 1 1 auto;

  min-height: 0;

  margin-top: 30px;

  overflow-y: auto;

  overscroll-behavior: contain;

  scrollbar-width: thin;
}


/* =================================================
   13. Preview Section
================================================= */

.sv-bundle-hero-preview__section {
  position: relative;

  margin: 0 0 32px;
}


/* =================================================
   14. Section Heading
================================================= */

.sv-bundle-hero-preview__section-heading {
  display: flex;
  align-items: center;

  margin: 0 0 18px;
}


/* =================================================
   15. Included Products
================================================= */

.sv-bundle-hero-preview__products {
  display: flex;
  flex-direction: column;

  gap: 12px;
}


/* =================================================
   16. Included Product
================================================= */

.sv-bundle-hero-preview-product {
  display: grid;

  grid-template-columns: 72px minmax(0, 1fr);

  align-items: center;

  gap: 16px;

  min-width: 0;
}


/* =================================================
   17. Product Media
================================================= */

.sv-bundle-hero-preview-product__media {
  position: relative;

  width: 72px;
  height: 72px;

  overflow: hidden;

  flex: 0 0 auto;
}


/* =================================================
   18. Product Media Component
================================================= */

.sv-bundle-hero-preview-product__media img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}


/* =================================================
   19. Product Content
================================================= */

.sv-bundle-hero-preview-product__content {
  min-width: 0;
}


/* =================================================
   20. Product Title
================================================= */

.sv-bundle-hero-preview-product__content a,
.sv-bundle-hero-preview-product__content
.sv-product-card__title {
  display: block;

  margin: 0;
}


/* =================================================
   21. Bundle Preview Option
================================================= */

.sv-bundle-preview-option {
  display: grid;

  grid-template-columns:
    72px minmax(0, 1fr) auto;

  align-items: center;

  gap: 16px;

  min-width: 0;

  padding: 14px;
}


/* =================================================
   22. Option Media
================================================= */

.sv-bundle-preview-option__media {
  width: 72px;
  height: 72px;

  overflow: hidden;

  flex: 0 0 auto;
}


/* =================================================
   23. Option Image
================================================= */

.sv-bundle-preview-option__image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}


/* =================================================
   24. Option Content
================================================= */

.sv-bundle-preview-option__content {
  min-width: 0;
}


/* =================================================
   25. Option Title
================================================= */

.sv-bundle-preview-option__title {
  margin: 0;
}


/* =================================================
   26. Option CTA
================================================= */

.sv-bundle-preview-option__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  min-height: 38px;

  padding: 0 15px;

  cursor: pointer;
}


/* =================================================
   27. Empty / Missing Content
================================================= */

.sv-bundle-hero-preview__content:empty {
  display: none;
}


/* =================================================
   28. Mobile Bottom Sheet
================================================= */

@media (max-width: 768px) {

  .sv-bundle-hero-preview__panel {

    top: auto;
    right: 0;
    bottom: 0;
    left: 0;

    width: 100%;
    height: auto;

    max-height: 85vh;

    padding:
      28px 20px 24px;

    border-radius:
      24px 24px 0 0;

    transform:
      translateY(100%);
  }


  .sv-bundle-hero-preview.is-active
  .sv-bundle-hero-preview__panel {

    transform:
      translateY(0);
  }


  .sv-bundle-hero-preview__content {

    margin-top: 26px;
  }


  .sv-bundle-hero-preview__section {

    margin-bottom: 28px;
  }


  .sv-bundle-hero-preview-product {

    grid-template-columns:
      64px minmax(0, 1fr);

    gap: 14px;
  }


  .sv-bundle-hero-preview-product__media {

    width: 64px;
    height: 64px;
  }


  .sv-bundle-preview-option {

    grid-template-columns:
      64px minmax(0, 1fr);

    gap: 14px;

    padding: 12px;
  }


  .sv-bundle-preview-option__media {

    width: 64px;
    height: 64px;
  }


  .sv-bundle-preview-option__cart {

    grid-column: 2;

    justify-self: start;

    margin-top: 4px;
  }

}


/* =================================================
   29. Reduced Motion
================================================= */

@media (prefers-reduced-motion: reduce) {

  .sv-bundle-hero-preview__overlay,
  .sv-bundle-hero-preview__panel {

    transition: none;
  }

}