/* Experiência compartilhada das páginas de produto Henny 3D. */

.product-image-viewer[hidden] {
  display: none !important;
}

.product-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: rgb(226 232 240 / 76%);
  color: #0f172a;
  backdrop-filter: blur(22px) saturate(115%);
  -webkit-backdrop-filter: blur(22px) saturate(115%);
}

.product-image-viewer__topbar {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-image-viewer__counter {
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  background: rgb(15 23 42 / 76%);
  padding: 0.45rem 0.75rem;
  color: #dbeafe;
  font: 700 0.72rem/1 'Inter', sans-serif;
  letter-spacing: 0.08em;
}

.product-image-viewer__toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.product-image-viewer__control,
.product-image-viewer__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 255 255 / 16%);
  background: rgb(15 23 42 / 82%);
  color: #fff;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.product-image-viewer__control {
  min-width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.8rem;
  font: 800 1.25rem/1 'Inter', sans-serif;
}

.product-image-viewer__reset {
  min-width: 4.25rem;
  color: #93c5fd;
  font-size: 0.7rem;
}

.product-image-viewer__close {
  margin-left: 0.25rem;
  background: rgb(37 99 235 / 88%);
  font-size: 1.55rem;
}

.product-image-viewer__control:hover,
.product-image-viewer__arrow:hover {
  border-color: rgb(96 165 250 / 75%);
  background: #1d4ed8;
}

.product-image-viewer__control:focus-visible,
.product-image-viewer__arrow:focus-visible,
.product-image-viewer-trigger:focus-visible {
  outline: 3px solid rgb(96 165 250 / 72%);
  outline-offset: 3px;
}

.product-image-viewer__control:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.product-image-viewer__stage {
  position: relative;
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
}

.product-image-viewer__surface {
  position: relative;
  display: flex;
  width: min(92vw, 80rem);
  height: min(78vh, 52rem);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgb(148 163 184 / 22%);
  border-radius: 1.15rem;
  background: #020617;
  box-shadow: 0 2rem 5rem rgb(0 0 0 / 45%);
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.product-image-viewer__surface.is-zoomed {
  cursor: grab;
}

.product-image-viewer__surface.is-zoomed:active {
  cursor: grabbing;
}

.product-image-viewer__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transform-origin: center;
  will-change: transform;
}

.product-image-viewer__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  font-size: 2rem;
  transform: translateY(-50%);
}

.product-image-viewer__arrow.is-previous { left: max(0.35rem, calc((100vw - min(92vw, 80rem)) / 2 - 3.5rem)); }
.product-image-viewer__arrow.is-next { right: max(0.35rem, calc((100vw - min(92vw, 80rem)) / 2 - 3.5rem)); }

.product-image-viewer__hint {
  margin: 0;
  color: #94a3b8;
  font: 600 0.7rem/1.3 'Inter', sans-serif;
  text-align: center;
}

.product-description-card {
  margin-top: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.product-description-card__title {
  margin: 0 0 0.85rem;
  color: #0f172a;
  font: 800 1rem/1.25 'Manrope', 'Inter', sans-serif;
}

.product-rich-text {
  color: #334155;
  font: 400 0.92rem/1.65 'Inter', sans-serif;
  overflow-wrap: anywhere;
}

.product-rich-text p { margin: 0 0 0.65rem; line-height: 1.65; }
.product-rich-text p:last-child { margin-bottom: 0; }
.product-rich-text ul {
  margin: 0.65rem 0 0.65rem 1.4rem !important;
  padding-left: 0.2rem !important;
  list-style-type: disc !important;
  list-style-position: outside !important;
}
.product-rich-text ol {
  margin: 0.65rem 0 0.65rem 1.4rem !important;
  padding-left: 0.2rem !important;
  list-style-type: decimal !important;
  list-style-position: outside !important;
}
.product-rich-text li {
  margin: 0.25rem 0 !important;
  padding-left: 0.25rem !important;
  line-height: 1.6 !important;
}
.product-rich-text li::marker {
  color: #0284c7 !important;
}
.product-rich-image {
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
}
.product-rich-image--center { align-items: center; text-align: center; }
.product-rich-image--left { align-items: flex-start; text-align: left; }
.product-rich-image--right { align-items: flex-end; text-align: right; }
.product-rich-image--full { width: 100%; }
.product-rich-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease;
}
.product-rich-image img:hover {
  transform: scale(1.01);
}
.product-rich-image figcaption {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: #64748b;
  font-style: italic;
}

.product-image-viewer-trigger {
  cursor: zoom-in;
}

.product-detail-attention {
  animation: product-detail-attention 850ms ease-out;
}

@keyframes product-detail-attention {
  0%, 100% { filter: none; }
  35% { filter: drop-shadow(0 0 0.8rem rgb(37 99 235 / 28%)); }
}

.product-media-item-active.product-image-viewer-trigger::after {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  content: 'Ampliar';
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 0.75rem;
  background: rgb(37 99 235 / 92%);
  padding: 0.4rem 0.65rem;
  color: #fff;
  font: 800 0.66rem/1 'Inter', sans-serif;
  box-shadow: 0 0.5rem 1.5rem rgb(15 23 42 / 24%);
  pointer-events: none;
}

body.product-shared-viewer #lightbox-modal {
  display: none !important;
}

.product-bottom-nav {
  display: none;
}

.product-related-shared {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.product-related-shared__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.product-related-shared__eyebrow {
  margin: 0;
  color: #2563eb;
  font: 800 0.7rem/1.2 'Inter', sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.product-related-shared__title {
  margin: 0.45rem 0 1.4rem;
  color: #0f172a;
  font: 800 clamp(1.35rem, 3vw, 1.8rem)/1.12 'Outfit', sans-serif;
}

.product-related-shared__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.product-related-shared__card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.2rem rgb(15 23 42 / 5%);
}

.product-related-shared__cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.product-related-shared__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.product-related-shared__card:hover .product-related-shared__cover img {
  transform: scale(1.025);
}

.product-related-shared__body {
  padding: 0.85rem;
}

.product-related-shared__name {
  display: -webkit-box;
  min-height: 2.4em;
  margin: 0;
  overflow: hidden;
  color: #0f172a;
  font: 800 0.9rem/1.2 'Outfit', sans-serif;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-related-shared__commerce {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.product-related-shared__price {
  color: #0f172a;
  font: 800 0.83rem/1.2 'Outfit', sans-serif;
}

.product-related-shared__action {
  display: inline-flex;
  min-height: 2.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: #0f172a;
  padding: 0.45rem 0.7rem;
  color: #fff;
  font: 800 0.68rem/1 'Inter', sans-serif;
  text-decoration: none;
}

.product-related-shared__action:hover {
  background: #2563eb;
}

@media (max-width: 1023px) {
  body.product-detail-page {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
  }

  .plugin-detail-shell,
  .resource-detail-main-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .plugin-detail-shell .plugin-detail-gallery-column,
  .resource-detail-main-grid .resource-detail-media-column {
    display: contents;
  }

  [data-product-gallery],
  [data-product-purchase],
  [data-product-information],
  .product-media-gallery,
  .product-media-stage {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  [data-product-gallery] { order: 1; }
  [data-product-purchase] { order: 2; position: static !important; }
  [data-product-description] { order: 3; }
  [data-product-information] { order: 4; }

  .product-static-purchase {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .plugin-related,
  [data-product-related] {
    margin-top: 2.5rem !important;
    padding-top: 2rem !important;
  }

  .plugin-related > div,
  [data-product-related-grid] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }

  .plugin-related .plugin-card,
  [data-product-related] .resource-card {
    min-width: 0;
    border-radius: 0.9rem;
  }

  .plugin-related .plugin-card-cover,
  [data-product-related] .resource-cover-wrapper {
    aspect-ratio: 1 / 0.78;
    min-height: 0;
  }

  .plugin-related .plugin-card-cover img,
  [data-product-related] .resource-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .plugin-related .plugin-card-body,
  [data-product-related] .resource-card-body {
    padding: 0.65rem !important;
  }

  .plugin-related .plugin-category,
  .plugin-related .plugin-card-description,
  .plugin-related .plugin-benefits,
  .plugin-related .plugin-card-compatibility,
  .plugin-related .plugin-card-state,
  .plugin-related .plugin-card-state-description,
  .plugin-related .plugin-select,
  .plugin-related .plugin-offer-box > label,
  .plugin-related .plugin-secondary-action,
  .plugin-related .plugin-card-policy,
  .plugin-related .plugin-card-feedback,
  [data-product-related] .resource-card-badges,
  [data-product-related] .resource-card-description,
  [data-product-related] .resource-card-price > span:first-child {
    display: none !important;
  }

  .plugin-related .plugin-card-title,
  [data-product-related] .resource-card-title {
    min-height: 2.4em;
    margin-top: 0 !important;
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
  }

  .plugin-related .plugin-commerce,
  .plugin-related .plugin-offer-box,
  [data-product-related] .resource-card-commerce {
    margin-top: 0.6rem !important;
    padding-top: 0.6rem !important;
  }

  .plugin-related .plugin-card-price-area {
    min-height: 0;
    margin-top: 0 !important;
  }

  .plugin-related .plugin-price,
  [data-product-related] .resource-card-price span {
    font-size: 0.82rem !important;
    line-height: 1.15 !important;
  }

  .plugin-related .plugin-from-price {
    display: none;
  }

  .plugin-related .plugin-primary-action,
  [data-product-related] .resource-card-action {
    min-height: 2.15rem;
    margin-top: 0.55rem !important;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.65rem !important;
    line-height: 1.1;
  }

  [data-product-related] .resource-card-commerce {
    display: block !important;
  }

  .product-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9500;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.35rem max(0.35rem, env(safe-area-inset-right)) calc(0.35rem + env(safe-area-inset-bottom)) max(0.35rem, env(safe-area-inset-left));
    border-top: 1px solid rgb(203 213 225 / 88%);
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 -0.8rem 2rem rgb(15 23 42 / 10%);
    backdrop-filter: blur(18px);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .product-bottom-nav__item {
    display: flex;
    min-width: 0;
    min-height: 3.75rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: #475569;
    cursor: pointer;
    font: 750 0.62rem/1 'Inter', sans-serif;
    text-decoration: none;
  }

  .product-bottom-nav__item svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .product-bottom-nav__item:hover,
  .product-bottom-nav__item:focus-visible {
    background: #eff6ff;
    color: #1d4ed8;
    outline: none;
  }

  .product-bottom-nav__item.is-primary {
    background: #2563eb;
    color: #fff;
  }

  .product-bottom-nav__item[aria-disabled='true'] {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
  }

  body.product-image-viewer-open .product-bottom-nav,
  body.product-overlay-open .product-bottom-nav,
  body.free-download-gate-open .product-bottom-nav,
  body:has(#henny-cookie-banner) .product-bottom-nav,
  body:has(#henny-checkout-modal:not(.hidden)) .product-bottom-nav {
    pointer-events: none;
    opacity: 0;
    transform: translateY(110%);
  }

  .product-related-shared__inner {
    padding: 2rem 1rem;
  }

  .product-related-shared__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .product-related-shared__card {
    border-radius: 0.9rem;
  }

  .product-related-shared__body {
    padding: 0.65rem;
  }

  .product-related-shared__name {
    font-size: 0.82rem;
  }

  .product-related-shared__commerce {
    display: block;
    margin-top: 0.55rem;
  }

  .product-related-shared__action {
    width: 100%;
    margin-top: 0.45rem;
  }
}

@media (max-width: 640px) {
  .product-image-viewer {
    gap: 0.4rem;
    padding: max(0.45rem, env(safe-area-inset-top)) 0.45rem max(0.45rem, env(safe-area-inset-bottom));
  }

  .product-image-viewer__surface {
    width: calc(100vw - 0.9rem);
    height: min(74vh, 42rem);
    border-radius: 0.9rem;
  }

  .product-image-viewer__arrow {
    width: 2.65rem;
    height: 2.65rem;
  }

  .product-image-viewer__arrow.is-previous { left: 0.65rem; }
  .product-image-viewer__arrow.is-next { right: 0.65rem; }

  .product-image-viewer__hint {
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-image-viewer__control,
  .product-image-viewer__arrow,
  .product-related-shared__cover img,
  .product-bottom-nav {
    transition: none !important;
  }

  .product-detail-attention {
    animation: none !important;
  }
}
