/* Phase 32: Public Content Protection + Share + Lead Engine */
.public-protection-mode-soft [data-protected-media] img,
.public-protection-mode-strong [data-protected-media] img {
  -webkit-user-drag: none;
  user-drag: none;
}

.public-protect-select .product-card [data-protected-text],
.public-protect-select .product-card h3,
.public-protect-select .product-card p,
.public-protect-select .product-card .sku,
.public-protect-select .product-card .price,
.public-protect-select .detail-body[data-protected-text] {
  -webkit-user-select: none;
  user-select: none;
}

.product-protected-image {
  position: relative;
  overflow: hidden;
}

.product-protected-image[data-watermark]::after {
  content: attr(data-watermark);
  position: absolute;
  z-index: 3;
  max-width: 80%;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .01em;
  pointer-events: none;
  backdrop-filter: blur(8px);
  opacity: .82;
}

.product-protected-image.watermark-bottom_right[data-watermark]::after { right: 10px; bottom: 10px; }
.product-protected-image.watermark-bottom_left[data-watermark]::after { left: 10px; bottom: 10px; }
.product-protected-image.watermark-top_right[data-watermark]::after { right: 10px; top: 10px; }
.product-protected-image.watermark-top_left[data-watermark]::after { left: 10px; top: 10px; }
.product-protected-image.watermark-center[data-watermark]::after { left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 14px; opacity: .62; }

.public-protection-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(460px, calc(100% - 28px));
  border: 1px solid #bfdbfe;
  background: rgba(239, 246, 255, .98);
  color: #1e3a8a;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .2);
  padding: 13px 15px;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.public-protection-toast[hidden] {
  display: none !important;
}

.public-protection-mode-strong .product-card,
.public-protection-mode-strong .detail-img {
  position: relative;
}

.public-protection-mode-strong .product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.02);
}

.protection-command-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
  gap: 16px;
  align-items: end;
  border: 1px solid var(--border, #dbe4ee);
  background: linear-gradient(135deg, #fff, #f8fafc);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
}

.protection-command-panel h3 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -.035em;
}

.protection-command-panel p {
  margin: 0;
  color: #64748b;
}

.protection-toggle-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .protection-command-panel,
  .protection-toggle-grid {
    grid-template-columns: 1fr;
  }
}


/* Phase 32 polish: single share dropdown instead of crowded product-card buttons */
.product-card.has-share-menu {
  overflow: visible;
}

.product-card.has-share-menu .product-img {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  overflow: hidden;
}

.compact-conversion-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-conversion-actions .view-product-btn,
.compact-conversion-actions .whatsapp-product-btn {
  flex: 1 1 0;
  min-width: 0;
}

.compact-conversion-actions .product-action-menu {
  flex: 0 0 auto;
}

.product-action-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-action-menu .share-menu-trigger {
  min-width: 78px;
}

.share-menu-trigger[aria-expanded="true"] {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #fff !important;
}

.share-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  z-index: 120;
  width: 230px;
  overflow: hidden;
  border: 1px solid var(--border, #dbe4ee);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .18);
  padding: 8px;
}

.share-menu-panel[hidden] {
  display: none !important;
}

.share-menu-panel::before {
  content: "";
  position: absolute;
  right: 22px;
  top: -7px;
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  background: #fff;
  border-left: 1px solid var(--border, #dbe4ee);
  border-top: 1px solid var(--border, #dbe4ee);
}

.share-menu-panel a,
.share-menu-panel button {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #111827;
  padding: 11px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.share-menu-panel a:hover,
.share-menu-panel button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.share-menu-panel a::before,
.share-menu-panel button::before {
  width: 18px;
  text-align: center;
  flex: 0 0 18px;
  opacity: .9;
}

.share-menu-panel [data-native-share-product]::before { content: "↗"; }
.share-menu-panel [data-track-event="whatsapp_share"]::before { content: "☘"; }
.share-menu-panel [data-track-event="email_share"]::before { content: "✉"; }
.share-menu-panel [data-copy-product-link]::before { content: "⧉"; }
.share-menu-panel [data-save-product]::before { content: "★"; }
.share-menu-panel [data-save-product].is-saved::before { content: "✓"; }

.detail-conversion-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-conversion-actions .product-action-menu {
  flex: 0 0 auto;
}

.detail-action-menu .share-menu-panel {
  width: 250px;
}

@media (max-width: 720px) {
  .compact-conversion-actions,
  .detail-conversion-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .compact-conversion-actions .product-action-menu,
  .detail-conversion-actions .product-action-menu,
  .product-action-menu .share-menu-trigger {
    width: 100%;
  }

  .share-menu-panel {
    left: 0;
    right: auto;
    width: min(100%, 280px);
  }

  .share-menu-panel::before {
    left: 24px;
    right: auto;
  }
}
