/* Sovyno storefront product and market controls. */
body[data-page-type="product"] theme-product-detail #salesAutoCouponBannerLeftHook,
body[data-page-type="product"] theme-product-detail :is([role="region"],section[aria-label]):has(#salesAutoCouponBannerLeftHook) {
  display: none !important;
}

#ZerntoRegionSettings .sovyno-market-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  margin: 12px 0 0;
}
#ZerntoRegionSettings .sovyno-market-summary > p {
  display: grid;
  gap: 4px;
  justify-content: start;
  align-content: start;
  margin: 0;
  padding: 10px 12px;
  background: #edf0e7;
  border-radius: 10px;
  color: #355b49;
  overflow-wrap: anywhere;
}
#ZerntoRegionSettings .sovyno-market-summary strong {
  color: #173e31;
  font-size: 15px;
  text-align: start;
}
#ZerntoRegionSettings .zernto-region-panel__close { width: 44px; height: 44px; }

@media (max-width: 749px) {
  header theme-action-bar.right > button.zernto-region-trigger[data-v-region-open] {
    gap: 4px;
    min-width: 0;
    min-height: 44px;
    padding: 4px 8px;
    border-radius: 999px;
  }
  header .zernto-region-trigger[data-v-region-open] .zernto-region-trigger__labels {
    flex-direction: row;
    gap: 4px;
    align-items: center;
  }
  header .zernto-region-trigger[data-v-region-open] .zernto-region-trigger__globe { width: 13px; height: 13px; }
  header .zernto-region-trigger[data-v-region-open] .zernto-region-trigger__code,
  header .zernto-region-trigger[data-v-region-open] .zernto-region-trigger__currency {
    color: #173e31;
    font-size: 11px;
    font-weight: 650;
  }
  header .zernto-region-trigger[data-v-region-open] .zernto-region-trigger__currency::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin-inline-end: 4px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: .22em;
  }
}
@media (max-width: 370px) {
  header .zernto-region-trigger[data-v-region-open] .zernto-region-trigger__globe { display: none; }
  header theme-action-bar.right > button.zernto-region-trigger[data-v-region-open] { padding-inline: 7px; }
}

@media (max-width: 959px) {
  body:has(details.product-media-preview[open][data-mobile-zoom-type="slider"])
    :is(.zernto-product-nav, .zernto-floating-actions) {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"][data-mount-modal] {
    --z-index: 100000;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"][data-mount-modal] > summary + .product-media-preview__main {
    --gallery-ink: #f7f2e9;
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-rows: minmax(0,1fr) 46px;
    gap: 12px;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: calc(56px + env(safe-area-inset-top, 0px)) 0 max(14px, env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    background: #12241d;
    color: var(--gallery-ink);
    border: 0;
    border-radius: 0;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"] .product-media-preview__content {
    min-height: 0;
    height: 100%;
    margin: 0;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"] .product-media-preview__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"] .product-media-preview__close-control {
    position: absolute;
    inset: calc(7px + env(safe-area-inset-top, 0px)) 12px auto auto;
    z-index: 4;
    display: flex;
    width: 44px;
    height: 44px;
    color: var(--gallery-ink);
    background: #ffffff1c;
    border: 1px solid #ffffff40;
    border-radius: 50%;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"] .product-media-preview__close-control .icon {
    width: 16px;
    height: 16px;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"] .product-media-preview__tools {
    position: relative;
    inset: auto;
    gap: 18px;
    height: 46px;
    transform: none;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"] .product-media-preview__tool-close-control {
    display: none;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"] .product-media-preview__arrow {
    width: 46px;
    height: 46px;
    color: var(--gallery-ink);
    background: #ffffff1c;
    border: 1px solid #ffffff40;
    border-radius: 50%;
  }
  details.product-media-preview[data-mobile-zoom-type="slider"] .product-media-preview__arrow:disabled {
    opacity: .35;
  }
}


.product-detail__media-gallery button.media-gallery__preview-icon {
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  pointer-events: auto;
  color: #173e31;
  background: #faf5ec;
  border: 1px solid #d8d3c4;
  border-radius: 50%;
  cursor: zoom-in;
}
.product-detail__media-gallery button.media-gallery__preview-icon .icon { width: 28px; height: 28px; }
.product-detail__media-gallery button.media-gallery__preview-icon .icon circle { fill: transparent; }
.product-detail__media-gallery button.media-gallery__preview-icon:focus-visible {
  opacity: 1;
  outline: 2px solid #806d47;
  outline-offset: 2px;
}
