.esnaf-store .esnaf-preview-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 5px 0 0;
  border-radius: 8px;
  color: #126639;
  font: 700 clamp(11px, 3vw, 13px)/1.1 var(--esnaf-font);
  text-decoration: none;
  white-space: nowrap;
}

.esnaf-store .esnaf-preview-trigger:hover { background: #eaf4eb; }
.esnaf-store [data-product-preview][aria-busy="true"] { cursor: progress; }

.esnaf-store .esnaf-product-preview {
  width: min(94vw, 950px);
  max-width: none;
  --esnaf-preview-limit: min(86dvh, 620px);
  height: fit-content;
  max-height: var(--esnaf-preview-limit);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 23px;
  color: var(--esnaf-ink);
  background: #fff;
  box-shadow: 0 24px 80px #102a1b3e;
}

.esnaf-product-preview:is([open], .is-preparing) {
  display: grid;
  grid-template-rows: auto minmax(0, auto);
}

.esnaf-product-preview.is-preparing:not([open]) {
  position: fixed;
  visibility: hidden;
  pointer-events: none;
}

.esnaf-product-preview::backdrop {
  background: #182d246b;
  backdrop-filter: blur(3px);
}

.esnaf-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(15px, 3vw, 24px);
  border-bottom: 1px solid #e1ebe2;
}

.esnaf-preview-heading h2 {
  margin: 0;
  color: #143d29;
  font: 750 clamp(20px, 4.7vw, 26px)/1.2 var(--esnaf-font);
  overflow-wrap: anywhere;
}

.esnaf-preview-heading button {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #234534;
  background: #edf3ed;
  font-size: 16px;
}

.esnaf-store :is(.esnaf-preview-heading button, .esnaf-preview-trigger):focus-visible {
  outline: 2px solid #177648;
  outline-offset: 2px;
}

.esnaf-product-preview iframe {
  display: block;
  width: 100%;
  height: min(var(--esnaf-preview-content-height, 1px), max(0px, calc(var(--esnaf-preview-limit) - var(--esnaf-preview-heading-height, 65px))));
  border: 0;
}

.esnaf-preview-status {
  align-self: start;
  padding: 24px;
  color: #41584a;
}

.esnaf-product-preview [hidden] { display: none; }

@media (max-width: 767px) {
  .esnaf-store .esnaf-product-preview {
    inset: auto 0 0;
    width: 100%;
    --esnaf-preview-limit: min(91dvh, calc(var(--esnaf-dialog-height, 100dvh) - 12px));
    margin: 0;
    border-radius: 23px 23px 0 0;
  }

}

html.esnaf-product-preview-page {
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.esnaf-product-preview-page body.esnaf-store {
  background: #fff;
  height: auto;
  padding-bottom: 0;
}

.esnaf-product-preview-page #container {
  position: static;
  min-height: 0;
  margin: 0;
}

.esnaf-product-preview-page #product-info > .breadcrumb { display: none; }

.esnaf-product-preview-page #product-info.esnaf-detail {
  width: 100%;
  max-width: none;
  padding: 12px clamp(14px, 3vw, 26px) 14px;
}

.esnaf-product-preview-page #product-info > .row { margin-inline: 0; }
.esnaf-product-preview-page #product-info #content { width: 100%; padding: 0; }

.esnaf-product-preview-page #product-info .image > a {
  width: min(100%, 320px);
}

@media (max-width: 767px) {
  .esnaf-product-preview-page #product-info .image > a {
    width: min(100%, 56vw, 235px);
  }
}

.esnaf-product-preview-page :is(.esnaf-detail, .esnaf-product-description) {
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.esnaf-product-preview-page .esnaf-detail h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.esnaf-product-preview-page .esnaf-product-description {
  border-top: 1px solid #e1ebe2;
}
