/* Shared NovaEdge shell; app branding stays inside the product content. */
body.app-publishing { min-width: 0; }
.app-publishing .site-shell { overflow: visible; }
.publishing-header { max-width: var(--content-max); margin: auto; padding: 24px var(--page-gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--color-border); }
.publishing-brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.publishing-brand img { border-radius: 50%; object-fit: cover; }
.publishing-header nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.publishing-header nav a, .app-publishing .site-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; }
.app-publishing .page-title { font-size: clamp(2.1rem, 5vw, 4.5rem); line-height: 1.08; overflow-wrap: anywhere; }
.app-publishing p, .app-publishing li { line-height: 1.7; overflow-wrap: anywhere; }
.product-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; margin: 24px 0 40px; padding-bottom: 32px; border-bottom: 2px solid var(--app-accent, var(--color-accent)); }
.product-intro { display: grid; gap: 22px; }
.product-icon { width: 100px; height: 100px; border-radius: 24px; object-fit: contain; }
.product-name { display: flex; align-items: center; gap: 20px; }
.product-name h1 { margin: 0; }
.product-tagline { margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.35; }
/* A fixed stage keeps portrait, tablet and widget screenshots from shifting the page. */
.product-gallery { min-width: 0; display: grid; grid-template-columns: repeat(var(--gallery-count), minmax(0, 58px)); grid-template-rows: clamp(260px, 42vw, 420px) 62px; justify-content: center; gap: 16px 10px; padding: 20px; border-radius: var(--radius-md); background: var(--color-panel); position: relative; }
.gallery-slide { display: none; grid-area: 1 / 1 / 2 / -1; min-width: 0; height: 100%; }
.gallery-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-choice { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.gallery-choice:checked + .gallery-thumbnail + .gallery-slide { display: block; }
.gallery-thumbnail { grid-row: 2; cursor: pointer; height: 62px; padding: 4px; border: 2px solid var(--color-border); border-radius: 8px; position: relative; }
.gallery-thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbnail span { position: absolute; bottom: 0; right: 1px; font-size: 10px; line-height: 14px; padding: 0 3px; background: var(--color-panel); border-radius: 3px; }
.gallery-choice:checked + .gallery-thumbnail { border-color: var(--app-accent, currentColor); box-shadow: 0 0 0 1px var(--app-accent, currentColor); }
.gallery-choice:focus-visible + .gallery-thumbnail { outline: 3px solid currentColor; outline-offset: 4px; }
.product-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.product-section { padding: 26px; background: var(--color-panel); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.product-section h2 { overflow-wrap: anywhere; margin-top: 0; font-family: var(--font-display); }
.product-section a { text-decoration: underline; text-underline-offset: 4px; }
.product-faq { margin-top: 28px; }
.product-faq details { padding: 18px 0; border-bottom: 1px solid var(--color-border); }
.product-faq summary { min-height: 44px; cursor: pointer; font-weight: 600; line-height: 1.6; }
.product-faq p { max-width: 75ch; }
.publishing-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; margin-top: 32px; }
.publishing-card { display: grid; gap: 16px; padding: 28px; border: 1px solid var(--color-border); border-top: 3px solid var(--app-accent); border-radius: var(--radius-sm); background: var(--color-panel); }
.publishing-card img { width: 72px; height: 72px; object-fit: contain; border-radius: 16px; }
.publishing-card h2, .publishing-card p { margin: 0; }
.publishing-card a { text-decoration: underline; text-underline-offset: 5px; min-height: 44px; display: inline-flex; align-items: center; }
.verified-date { color: var(--color-muted); font-size: .88rem; margin-top: 30px; }
@media (max-width: 700px) {
  .publishing-header { align-items: start; flex-direction: column; gap: 10px; padding: 18px 20px; }
  .app-publishing .page-main { padding: 20px 20px 40px; }
  .product-hero, .product-facts { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .product-icon { width: 72px; height: 72px; border-radius: 18px; }
  .product-name { gap: 14px; align-items: start; }
  .product-gallery { grid-template-rows: 340px 62px; }
  .product-section { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.language-switcher { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.language-switcher a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border: 1px solid var(--color-border); border-radius: 8px; text-decoration: underline; }
.language-switcher a[aria-current="page"] { font-weight: 700; border-color: var(--app-accent, var(--color-accent)); }
.language-switcher a:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

html[dir="rtl"] .app-publishing { text-align: start; }
.language-switcher a { unicode-bidi: isolate; }

.gallery-enlarge { display: block; width: 100%; height: 100%; cursor: zoom-in; border-radius: 8px; }
.gallery-enlarge:focus-visible { outline: 3px solid var(--app-accent, currentColor); outline-offset: 4px; }
html.gallery-zoom-open { overflow: hidden; }
.gallery-lightbox { border: 0; padding: 52px 12px 12px; background: transparent; max-width: 96vw; max-height: 96dvh; color: white; overflow: auto; }
.gallery-lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.gallery-lightbox img { display: block; width: auto; height: auto; max-width: calc(96vw - 24px); max-height: calc(96dvh - 64px); object-fit: contain; margin: auto; }
.gallery-lightbox-close { position: absolute; top: 0; inset-inline-end: 12px; width: 44px; height: 44px; border: 1px solid white; border-radius: 50%; background: #17233b; color: white; font: 32px/1 sans-serif; cursor: pointer; }
.gallery-lightbox-close:focus-visible { outline: 3px solid white; outline-offset: 3px; }

/* Decide from the actual gallery width, including when the hero becomes one column. */
.gallery-container { container-type: inline-size; min-width: 0; }
@container (min-width: 360px) {
  .product-gallery--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: clamp(340px, 42vw, 420px); gap: 16px; }
  .product-gallery--pair .gallery-slide { display: block; grid-area: auto; grid-row: 1; }
  .product-gallery--pair .gallery-choice, .product-gallery--pair .gallery-thumbnail { display: none; }
}
