/*
 * Products: additions to main.css (which carries the prototype classes).
 * Helpers used by the product templates, the brochure dialog, and the
 * tablet / mobile layout (the prototype is desktop only).
 */

/* Helpers */
.bsec[hidden], .gal .vis[hidden] { display: none !important; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
#pg-products, #pg-product { overflow-x: clip; }
.pcard-ft { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; position: relative; }
.pcard .tg h3, .pcard .d { overflow-wrap: anywhere; }
.bhd h2 a { color: inherit; text-decoration: none; }
.bhd h2 a:hover { color: #DF3626; }
.bhd > div:last-child { min-width: 0; }
.det-txt { min-width: 0; }
.det .crumb span[aria-current] { color: inherit; }
.pinfo h2.eyebrow, .rel h2.eyebrow { line-height: 1.4; }
.rng .lnk b a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.rng .lnk b a:hover { color: #DF3626; }
.ord-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
details.ord summary::-webkit-details-marker { display: none; }
details.ord summary::marker { content: ""; }
.gal .thumbs { flex-wrap: wrap; }
.gal .thumbs button img { display: block; }
.det .vis img { width: auto; height: auto; }

/* Visible focus */
.filters a:focus-visible, .pcard:focus-visible, .gal .thumbs button:focus-visible,
details.ord summary:focus-visible, .btns .btn:focus-visible, .chips a:focus-visible,
.pdocs a:focus-visible, .pdocs-x:focus-visible {
	outline: 2px solid #DF3626; outline-offset: 3px;
}

/* Brochure dialog (prototype #dm styling) */
dialog.pdocs {
	border: 1px solid rgba(255, 255, 255, .12); border-radius: 28px; padding: 0;
	background: #0a1520; color: #e9eef3; width: min(560px, 92vw); max-height: 86vh; overflow: auto;
	margin: auto; /* the global "* { margin: 0 }" reset would pin the modal to the top-left corner */
}
dialog.pdocs::backdrop { background: rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pdocs-box { padding: 40px; }
.pdocs-hd { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pdocs-x { background: none; border: 0; font-size: 22px; line-height: 1; color: #93a3b0; cursor: pointer; padding: 6px; }
.pdocs-x:hover { color: #fff; }
.pdocs h3 { font-size: 30px; font-weight: 900; margin: 10px 0 20px; color: #fff; line-height: 1.15; }
.pdocs-list { list-style: none; margin: 0; padding: 0; }
.pdocs-list a {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .1); color: #dbe3ea; text-decoration: none;
}
.pdocs-list a b { font-weight: 700; }
.pdocs-list a:hover b { color: #fff; }
.pdocs-list a > span { font-size: 12px; letter-spacing: 2px; color: #DF3626; white-space: nowrap; font-weight: 700; }

/* Tablet */
@media (max-width: 1100px) {
	.ph-hero { padding: 150px 32px 60px; }
	.wrapx { padding: 60px 32px; }
	.bsec .grid3 { grid-template-columns: repeat(2, 1fr); }
	.det { grid-template-columns: 1fr; gap: 40px; padding: 130px 32px 50px; }
	.det .vis { height: 440px; }
	.det h1 { font-size: 52px; }
	.pinfo, .rel { padding-left: 32px; padding-right: 32px; }
	.st { grid-template-columns: 1fr; gap: 16px; }
	#prel { grid-template-columns: repeat(2, 1fr); }
}

/* Phone (designed at 375px) */
@media (max-width: 760px) {
	.ph-hero { padding: 116px 16px 36px; }
	.ph-hero h1 { font-size: 44px; letter-spacing: -1.5px; }
	.ph-hero p { font-size: 16px; }
	.wrapx { padding: 28px 16px 48px; }

	/* Filters: one row that scrolls sideways */
	.filters {
		flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
		margin: 0 -16px 28px; padding: 0 16px 6px; gap: 8px;
	}
	.filters::-webkit-scrollbar { display: none; }
	.filters a { flex: none; white-space: nowrap; padding: 10px 16px; font-size: 14px; }

	.bsec { margin-bottom: 44px; }
	.bhd { flex-wrap: wrap; gap: 14px; padding-bottom: 16px; margin-bottom: 18px; }
	.blg { width: 140px; height: 58px; }
	.bhd h2 { font-size: 30px; letter-spacing: -1px; }
	.bhd p { font-size: 14px; }
	.grid3, .bsec .grid3 { grid-template-columns: 1fr; gap: 12px; }
	.bsec .pcard { height: 300px; padding: 20px; }
	body.editorial .bsec .pcard h3 { font-size: 22px; }

	/* Product top */
	.det { padding: 96px 16px 28px; gap: 26px; }
	.det .vis { height: 300px; padding: 18px; border-radius: 8px; }
	.det .vis.light { padding: 12px; }
	.gal .thumbs { gap: 8px; }
	.gal .thumbs button { width: calc(25% - 6px); height: 58px; padding: 4px; }
	.det h1 { font-size: 36px; letter-spacing: -1px; margin: 10px 0 16px; }
	body.editorial .det h1 { letter-spacing: -1px; }
	.det p.lead { font-size: 16px; }
	.btns .btn { flex: 1 1 auto; justify-content: center; }

	/* Product info */
	.pinfo { padding: 8px 16px 40px; }
	.pinfo .eyebrow { margin: 36px 0 16px; }
	.apps2, .rng, .ben { grid-template-columns: 1fr; }
	.apps2 div { font-size: 16px; padding: 16px 18px; }
	.story { margin-top: 36px; }
	.st { padding: 28px 0; gap: 12px; }
	.st h3 { font-size: 24px; letter-spacing: -.5px; }
	.st p { font-size: 16px; line-height: 1.65; }
	.rng .ri { height: 140px; }
	details.ord { margin-top: 40px; }
	details.ord summary { font-size: 18px; padding: 18px 0; gap: 10px; }
	table.spec { font-size: 14px; }
	table.spec th, table.spec td { padding: 10px 8px; }
	table.refs td.ref { white-space: normal; overflow-wrap: anywhere; width: 40%; font-size: 13px; }

	/* Related */
	.rel { padding: 24px 16px 40px; }
	#prel { grid-template-columns: 1fr 1fr; gap: 10px; }
	#prel .pcard { height: 170px; padding: 14px; }
	#prel .pcard h3 { font-size: 15px; }

	/* Dialog */
	.pdocs-box { padding: 24px; }
	.pdocs h3 { font-size: 24px; }
	dialog.pdocs { border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.pcard, .filters a { transition: none; }
	.pcard:hover { transform: none; }
}
