/* Product template only; keep catalog and other site pages unchanged. */
.product-dynamic-page [hidden] {
  display: none !important;
}

.product-dynamic-page .product-hero {
  padding-top: clamp(1.25rem, 3vw, 2.25rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.product-breadcrumb {
  position: relative;
  z-index: 1;
  width: var(--site-shell);
  max-width: var(--site-content-max);
  margin: 0 auto clamp(1.25rem, 3vw, 2rem);
}

.product-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  color: #214d78;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.product-breadcrumb a::before { content: '←'; }
.product-breadcrumb a:hover { text-decoration: underline; }

.product-dynamic-page .product-hero-image {
  min-height: 320px;
  box-shadow: 0 16px 40px rgba(8, 46, 84, 0.08);
}

.product-dynamic-page .product-hero-image > img {
  max-height: 320px;
}

.product-dynamic-page .product-hero-text p { max-width: 56ch; }
.product-dynamic-page .product-hero-text h1 { overflow-wrap: anywhere; }

.product-dynamic-page .product-button--primary {
  color: #fff;
  background: #005db9;
  border-color: #005db9;
  box-shadow: 0 6px 16px rgba(0, 93, 185, 0.16);
}

.product-dynamic-page .product-button--primary:hover {
  background: #00488f;
  border-color: #00488f;
}

.product-dynamic-page :is(a, button):focus-visible {
  outline: 3px solid #005db9;
  outline-offset: 4px;
}

.product-dynamic-page :is(#formula, #benefits, #usage, #pharmacy-partners) {
  scroll-margin-top: 112px;
}

.product-dynamic-page .partner-card { position: relative; }

.product-information-box {
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid rgba(7, 59, 117, 0.12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(8, 46, 84, 0.06);
  color: #334b63;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.product-information-box[contenteditable="true"] { min-height: 220px; }

.product-dynamic-page .product-hero-buy.is-expanding {
  box-sizing: border-box;
  overflow: clip;
  overflow-clip-margin: 24px;
  will-change: height, opacity;
}
html.product-partners-expanding,
html.product-partners-expanding body { overflow-anchor: none; }
.product-dynamic-page .product-hero-buy.is-expanding .vitrum-animate,
.product-dynamic-page .product-hero-buy.is-expanding .partner-card {
  transition: none !important;
}
.partner-card-external {
  position: absolute;
  top: 0.65rem;
  right: 0.8rem;
  color: #426180;
  font-size: 1.15rem;
}

.product-dynamic-page .usage-item,
.product-dynamic-page .usage-item:hover {
  cursor: default;
  transform: none;
  background: #fff;
  border-color: var(--product-card-border);
  box-shadow: var(--product-card-shadow);
}

@media (max-width: 720px) {
  .product-dynamic-page .product-hero-content { gap: 1.5rem; }
  .product-dynamic-page .product-hero-image { min-height: 235px; }
  .product-dynamic-page .product-hero-image > img { max-height: 210px; }
  .product-dynamic-page .product-hero-actions { flex-wrap: wrap; }
  .product-dynamic-page .product-hero-actions .product-button {
    flex: 1 1 150px;
    width: auto;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.product-dynamic-page) { scroll-behavior: auto; }
  .product-dynamic-page *, .product-dynamic-page *::before, .product-dynamic-page *::after {
    animation: none !important;
    transition: none !important;
  }
  .product-dynamic-page .vitrum-animate { opacity: 1; transform: none; }
}

/* Formatting shared by the product information box and its editor preview. */
.product-information-box, .product-text-preview { white-space: normal; }
.product-information-box h2, .product-text-preview h2 { font-size:clamp(25px,3vw,34px);line-height:1.25;color:#003f7d;margin:1.2em 0 .55em;font-weight:700; }
.product-information-box h3, .product-text-preview h3 { font-size:clamp(20px,2vw,24px);line-height:1.4;color:#003f7d;margin:1.2em 0 .55em;font-weight:700; }
.product-information-box p, .product-text-preview p { font-size:inherit;line-height:1.85;margin:0 0 1em;white-space:pre-wrap; }
.product-information-box strong, .product-text-preview strong { font-weight:700;color:#003f7d; }
.product-information-box > :first-child, .product-text-preview > :first-child { margin-top:0; }
.product-information-box > :last-child, .product-text-preview > :last-child { margin-bottom:0; }
.product-text-preview { padding:20px;border:1px solid #d6e2ec;border-radius:12px;background:white;color:#334b63;overflow-wrap:anywhere; }
.product-text-toolbar { display:flex;flex-wrap:wrap;gap:8px;margin:12px 0; }
.product-text-toolbar button,.product-text-edit { padding:9px 14px;border:1px solid #b7ccde;border-radius:8px;background:#eff6fc;color:#003f7d;font-family:inherit;font-size:14px;font-weight:700;line-height:1.4;cursor:pointer; }
.product-text-edit { margin-bottom:16px; }
.product-editor-dialog:has(textarea) { width:min(94vw,760px); }
.product-editor-dialog textarea { box-sizing:border-box;width:100%;padding:14px;border:1px solid #9db6c7;border-radius:8px;resize:vertical;font:15px/1.6 monospace; }
.product-editor-dialog .product-editor-actions { margin-top:20px; }
