/* Detail families alone use contextual reading headers and persistent purchase. */
html[data-detail-header-ready="true"] { scroll-padding-top: calc(var(--detail-anchor-offset, var(--detail-header-height, 64px)) + 1rem); }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .detail-header { position: sticky; z-index: 80; top: 0; width: 100%; max-width: none; min-height: 64px; height: 64px; margin: 0; padding: 10px max(1rem, calc((100% - 1220px)/2)); display: flex; align-items: center; background: var(--bg); border-bottom: 1px solid var(--line); }
.detail-header [hidden] { display: none !important; }
.detail-header.is-direction-hidden { visibility: hidden; pointer-events: none; }
.detail-context { display: flex; align-items: center; gap: .75rem; min-width: 0; width: 100%; }
.detail-context__thumb { width: 40px; height: 40px; flex: 0 0 40px; border-radius: .4rem; object-fit: contain; background: var(--paper); }
body[data-page-kind="stain"] .detail-context__thumb { object-fit: cover; }
.detail-context__title { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 700; line-height: 1.3; }
body[data-page-kind="stain"] .detail-context__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .index-list { list-style: none; padding-inline-start: 0; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .index-list > li::marker { content: none; }
.detail-product-context { position: fixed; top: var(--detail-header-base-height, 64px); left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 58px; padding: .4rem max(1rem, calc((100% - 1220px)/2)); border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: 0 .2rem .6rem #30152b12; }
.detail-product-context__detail { display: flex; align-items: center; gap: .5rem; min-width: 0; flex: 1 1 auto; color: var(--brand); text-decoration: none; }
.detail-product-context__detail .stain-product-card__thumb, .detail-product-context__detail .stain-product-card__placeholder { width: 32px; height: 36px; flex: 0 0 32px; padding: .1rem; }
.detail-product-context__detail strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; line-height: 1.4; }
.detail-product-context__detail .editor-choice { width: 14px; height: 14px; }
.detail-product-context .shops.shops--compact { display: flex; flex-direction: row; flex: 0 0 auto; width: auto; max-width: 52%; margin: 0; gap: .35rem; }
.detail-product-context .shops.shops--compact .shop-link { min-height: 44px; padding: .3rem .35rem; }
.detail-product-context .shops.shops--compact .shop-link .shop-logo { height: 18px; width: auto; max-width: 65px; }
.detail-product-context .shops.shops--compact .shop-link--amazon .shop-logo { max-width: 54px; }
.detail-product-context a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) #continue-a-consulta { border-top: 0; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .related-links.detail-related-links .index-list { display: grid; gap: .75rem; list-style: none; border-top: 0; padding: 0; margin: 0; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .related-links.detail-related-links .index-list > li { margin: 0; padding: 0; list-style: none; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .related-links.detail-related-links .index-list > li::before, body:is([data-page-kind="stain"],[data-page-kind="product"]) .related-links.detail-related-links .index-list > li::marker { content: none; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) :is(.method-reading,#perguntas-uteis) details > summary { display: flex; align-items: baseline; gap: .75rem; list-style: none; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) :is(.method-reading,#perguntas-uteis) details > summary::-webkit-details-marker { display: none; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) :is(.method-reading,#perguntas-uteis) details > summary::before { content: '›'; flex: 0 0 .75rem; font-size: 1.2em; line-height: 1; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) :is(.method-reading,#perguntas-uteis) details[open] > summary::before { transform: rotate(90deg); }
@media (min-width: 768px) {
  html:has(body[data-page-kind="product"] .mobile-purchase-bar) { --purchase-bar-height: calc(6rem + env(safe-area-inset-bottom, 0px)); scroll-padding-bottom: calc(var(--purchase-bar-height) + 1rem); }
  body[data-page-kind="product"]:has(.mobile-purchase-bar) { padding-bottom: var(--purchase-bar-height); }
  body[data-page-kind="product"] .mobile-purchase-bar { position: fixed; z-index: 900; inset: auto 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 28rem); align-items: center; column-gap: 1.5rem; row-gap: .2rem; padding: .65rem max(1.5rem, calc((100% - 1220px)/2)) calc(.65rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--paper); color: var(--ink); box-shadow: 0 -.25rem 1.5rem #30152b18; }
  body[data-page-kind="product"] .mobile-purchase-bar__product { margin: 0; font-size: .95rem; font-weight: 700; }
  body[data-page-kind="product"] .mobile-purchase-bar .shops { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  body[data-page-kind="product"] .mobile-purchase-bar__notice { margin: 0; font-size: .75rem; color: var(--muted); }
  body[data-page-kind="product"]:has(.mobile-purchase-bar) .analytics-consent { bottom: calc(var(--purchase-bar-height) + 1rem); max-height: calc(100dvh - var(--purchase-bar-height) - 2rem); }
}

body:is([data-page-kind="stain"],[data-page-kind="product"]) .related-links.detail-related-links { display: block; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .related-links.detail-related-links .index-list > li > a { display: flex; width: 100%; margin: 0; }

/* The stain photograph keeps its own corners; the caption lives on the page. */
body[data-page-kind="stain"] .page-intro__media { display: block; overflow: visible; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body[data-page-kind="stain"] .page-intro__media img.stain-photo { display: block; border-radius: var(--radius); }
body[data-page-kind="stain"] .page-intro__media figcaption { width: 100%; max-width: none; margin: .55rem 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: .75rem; line-height: 1.45; overflow: visible; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .page > .section { padding-block: clamp(1.625rem, 3.25vw, 3rem); }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .section-head { margin-bottom: 1rem; }
body:is([data-page-kind="stain"],[data-page-kind="product"]) .section > .wrap > :last-child { margin-bottom: 0; }
body[data-page-kind="stain"] .method-reading .method-reading__conditions { font-size: .875rem; line-height: 1.5; font-weight: 400; color: var(--muted); }
body[data-page-kind="stain"] .related-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
body[data-page-kind="stain"] .related-product-grid .stain-product-card { width: 100%; margin: 0; }
body[data-page-kind="stain"] .stain-product-card__conditions { margin: 0; font-size: .8125rem; line-height: 1.5; color: var(--muted); }
body[data-page-kind="stain"] .common-stains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; max-width: 42rem; }
body[data-page-kind="stain"] .common-stain-link { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: .6rem; color: var(--brand); text-align: center; text-decoration: none; font-size: .875rem; font-weight: 650; line-height: 1.25; }
body[data-page-kind="stain"] .common-stain-link .stain-photo { display: block; width: clamp(58px, 12vw, 88px); height: auto; aspect-ratio: 1; border: 3px solid var(--paper); border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line), 0 .2rem .6rem #30152b18; }
body[data-page-kind="stain"] .common-stain-link span { min-width: 0; max-width: 12ch; overflow-wrap: anywhere; }
body[data-page-kind="product"] .related-stain-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; list-style: none; margin: 0; padding: 0; }
body[data-page-kind="product"] .related-stain-list > li { list-style: none; margin: 0; padding: 0; }
body[data-page-kind="product"] .related-stain-list > li::marker { content: none; }
body[data-page-kind="product"] .related-stain-list a { display: flex; align-items: center; min-height: 44px; height: 100%; padding: .8rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--paper); color: var(--brand); text-decoration: none; font-size: .875rem; line-height: 1.4; }
@media (max-width: 600px) {
  body[data-page-kind="stain"] .method-reading .method-reading__conditions { font-size: .8125rem; }
  body[data-page-kind="stain"] .related-product-grid, body[data-page-kind="product"] .related-stain-list { grid-template-columns: minmax(0, 1fr); }
  body[data-page-kind="stain"] .common-stains { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1rem; }
  body[data-page-kind="stain"] .common-stain-link { font-size: .8125rem; }
  body[data-page-kind="stain"] .common-stain-link .stain-photo { width: 86px; }
}

.page--product .specification-table caption.sr-only { padding: 0; }
