:where(main, [role="main"], article, dialog) img:not(:where(
  .logo, .brand-logo, .icon, .avatar, .review-avatar, .review-source-icon,
  [aria-hidden="true"], [src$=".svg"], [src*=".svg?"], [src*="/logos/"],
  [width="16"], [width="24"], [width="32"]
)) {
  border-radius: clamp(12px, 3vw, 22px);
}

@layer molisan-preview-product {
  html[data-molisan-v2] #main.machine-detail .preview-exact-stage img.preview-stage-packshot {
    border-radius: clamp(16px, 4vw, 26px) !important;
  }
}

#main.machine-detail .machine-bundle-label {
  text-wrap: pretty;
}

.footer-refresh .privacy-settings-trigger {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

@media (max-width: 767px) {
  @layer molisan-preview-product {
    html[data-molisan-v2] #main.machine-detail .preview-exact-stage {
      min-height: 0 !important;
      height: auto !important;
      padding: 0 !important;
      border: 0 !important;
      background: transparent !important;
      margin-block: 0 12px !important;
    }

    html[data-molisan-v2] #main.machine-detail .preview-exact-stage .preview-gallery-photo {
      padding-block: 4px !important;
    }

    html[data-molisan-v2] #main.machine-detail .preview-v2-product > .owner-product-copy {
      padding-block-start: 0 !important;
    }

    html[data-molisan-v2] #main.machine-detail .preview-v2-product .owner-product-title {
      margin-block-start: 0 !important;
    }

    html[data-molisan-v2] #main.machine-detail .preview-exact-stage img.preview-stage-packshot {
      display: block !important;
      width: auto !important;
      max-width: 100% !important;
      height: auto !important;
      max-height: min(31svh, 255px) !important;
      margin-inline: auto !important;
      object-fit: contain !important;
    }
  }

  @layer molisan-compact-shop {
    html body #main.machine-detail [data-order-product="capsule-machine-100"] > .machine-hero {
      max-width: calc(min(31svh, 255px) * 1260 / 1110) !important;
      margin-inline: auto !important;
      margin-block-end: 12px !important;
    }
  }

  #main.machine-detail :is(.machine-copy, .owner-product-copy) {
    padding-block-start: 0;
    margin-block-start: 0;
  }

  #main.machine-detail .machine-bundle-label {
    margin-block: 5px 12px;
  }
}

@media (max-width: 767px) {
  @layer molisan-package-columns {
    html body #main #purchase :is(
      .mol-pack-choice[data-mol-pack-choice] > .mol-pack-native-row > .mol-card-controls > :is(.mol-card-cart-add, [data-card-add-id]),
      .mol-card-cart-add, [data-card-add-id]
    ):not(:where([hidden], [aria-disabled="true"], .storefront-order-disabled, .is-disabled, :disabled)) {
      width: 100% !important;
      min-width: 0 !important;
      max-width: min(100%, 11rem) !important;
      justify-self: start;
      justify-content: center !important;
      gap: 8px !important;
      padding-inline: 10px !important;
      text-align: center !important;
    }
  }

  @layer molisan-preview-product {
    html[data-molisan-v2] #main #purchase .mol-card-cart-add .preview-buy-arrow {
      display: none !important;
    }

    html[data-molisan-v2] #main .preview-v2-product:has(#purchase) {
      --preview-stage-height: clamp(148px, 34svh, 270px);
      --preview-bottle-height: calc(var(--preview-stage-height) - 24px);
    }

    html[data-molisan-v2] #main .preview-v2-product:has(#purchase) > .mol-product-caption,
    html[data-molisan-v2] #main .preview-v2-product:has(#purchase):not(:has(> .mol-product-caption))
      > :is(.owner-product-copy, .product-detail-copy, .page-hero-copy) {
      padding-block-start: 12px !important;
    }

    html[data-molisan-v2] #main .preview-v2-product:has(#purchase)
      :is(.mol-product-caption, .owner-product-copy, .product-detail-copy, .page-hero-copy) h1 {
      margin-block-start: 0 !important;
    }

    html[data-molisan-v2] #main .preview-v2-product:has(#purchase)
      :is(.mol-product-caption, .owner-product-copy, .product-detail-copy, .page-hero-copy)
      :is(p.product-summary, p.hero-summary, p.product-intro) {
      margin-block-start: 10px !important;
      line-height: 1.45 !important;
    }

    html[data-molisan-v2] #main .preview-v2-product #purchase {
      margin-block-start: 15px !important;
      padding-block-start: 12px !important;
    }

    html[data-molisan-v2] #main .preview-v2-product #purchase .mol-pack-choice[data-preview-split-offer] {
      grid-template-rows: auto minmax(38px, auto) 12px auto !important;
    }
  }
}

@media (max-width: 767px) and (max-height: 650px) {
  @layer molisan-preview-product {
    html[data-molisan-v2] #main .preview-v2-product:has(#purchase) {
      --preview-stage-height: clamp(144px, 31svh, 215px);
    }

    html[data-molisan-v2] #main.machine-detail .preview-exact-stage img.preview-stage-packshot {
      max-height: 23svh !important;
    }

    html[data-molisan-v2] #main.machine-detail .preview-exact-stage {
      margin-block-end: 5px !important;
    }

    html[data-molisan-v2] #main.machine-detail .preview-v2-product .owner-product-title {
      line-height: 1.07 !important;
    }

    html[data-molisan-v2] #main .preview-v2-product:has(#purchase)
      :is(.mol-product-caption, .owner-product-copy, .product-detail-copy, .page-hero-copy)
      :is(p.product-summary, p.hero-summary, p.product-intro) {
      margin-block-start: 8px !important;
      line-height: 1.35 !important;
    }

    html[data-molisan-v2] #main .preview-v2-product #purchase {
      margin-block-start: 11px !important;
      padding-block-start: 9px !important;
    }
  }

  @layer molisan-compact-shop {
    html body #main.machine-detail [data-order-product="capsule-machine-100"] > .machine-hero {
      max-width: calc(27svh * 1260 / 1110) !important;
      margin-block-end: 7px !important;
    }
  }
}
