/* ==========================================================================
   LA Precast Mantels — product detail page, measurement modals
   ========================================================================== */

.pm-pdp { padding-top: 51px; padding-bottom: 0; }
.pm-pdp .pm-crumbs { margin-bottom: 32px; }
.pm-pdp__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6.7vw, 96px); margin-bottom: 48px; }

/* Gallery */
.pm-gallery { display: flex; flex-direction: column; gap: 16px; }
.pm-gallery__main { position: relative; background: var(--pm-well); border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; }
.pm-gallery__main img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: opacity 0.25s ease; }
.pm-gallery__main img.is-swapping { opacity: 0.35; }
.pm-gallery__sale { position: absolute; top: 16px; left: 16px; z-index: 10; background: var(--pm-red); color: var(--pm-white); padding: 4px 12px; font-size: 11px; letter-spacing: 0.05em; font-weight: 700; text-transform: uppercase; }
.pm-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.pm-thumbs button {
    display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; background: var(--pm-well); border-radius: var(--pm-radius);
    overflow: hidden; border: 1px solid transparent; cursor: pointer; transition: border-color 0.2s ease;
}
.pm-thumbs button:hover { border-color: var(--pm-line-strong); }
.pm-thumbs button[aria-pressed="true"] { border: 2px solid var(--pm-red); }
.pm-thumbs img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.pm-thumbs li.is-hidden { display: none; }
.pm-thumbs .pm-thumbs__more { background: var(--pm-hover); font-size: 12px; letter-spacing: 0.1em; font-weight: 600; color: var(--pm-muted); display: flex; align-items: center; justify-content: center; }

/* Info panels (architectural planning, firebox measurements) */
.pm-panel { background: var(--pm-band); border-radius: var(--pm-radius-panel); padding: 24px; border: 1px solid var(--pm-line); display: flex; align-items: flex-start; gap: 16px; }
.pm-panel__icon { width: 48px; height: 48px; border-radius: 9999px; flex-shrink: 0; background: var(--pm-red); color: var(--pm-white); display: flex; align-items: center; justify-content: center; }
.pm-panel h2 { font-size: 22px; line-height: 28px; color: var(--pm-ink); margin: 0 0 4px; font-weight: 500; }
.pm-panel p { font-size: 12px; line-height: 18px; color: var(--pm-body); margin: 0 0 16px; }
.pm-panel__links { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.pm-body .pm-panel__link {
    display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--pm-muted); font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase;
}
.pm-body .pm-panel__link:hover { color: var(--pm-red); }
.pm-body .pm-panel__link--accent { color: var(--pm-red); }
.pm-panel__link .pm-dot { width: 26px; height: 26px; border-radius: 9999px; background: var(--pm-red); color: var(--pm-white); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pm-panel__link .pm-dot .ms { font-size: 16px; }
.pm-gallery .pm-panel { margin-top: 24px; }

/* Buy box */
.pm-buy { display: flex; flex-direction: column; }
.pm-buy h1 { font-family: var(--pm-serif); font-size: clamp(30px, 2.5vw, 36px); line-height: 1.22; color: var(--pm-ink); margin: 0 0 16px; font-weight: 500; }
.pm-buy__price { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.pm-buy__was { font-size: 22px; color: var(--pm-muted); text-decoration: line-through; }
.pm-buy__now { font-size: 36px; line-height: 44px; color: var(--pm-red); font-weight: 500; }
.pm-buy__sku { font-size: 12px; line-height: 18px; color: var(--pm-muted); margin: 0 0 32px; }
.pm-badges { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 32px; }
.pm-badge { display: flex; align-items: center; gap: 8px; background: var(--pm-band); padding: 8px 12px; border-radius: var(--pm-radius); border: 1px solid rgba(231, 189, 182, 0.6); font-size: 11px; letter-spacing: 0.05em; font-weight: 700; color: var(--pm-ink); text-transform: uppercase; }
.pm-badge > span:not(.ms) { text-transform: none; }
.pm-badge .ms { font-size: 20px; color: var(--pm-muted); }
.pm-badge--red { border-color: rgba(237, 28, 36, 0.3); color: var(--pm-red); }
.pm-badge--red .ms { color: var(--pm-red); }
.pm-badge--usa { border-color: rgba(11, 33, 72, 0.25); color: #0b2148; }
.pm-badge small { display: block; font-size: 10px; font-weight: 400; letter-spacing: 0; color: var(--pm-body); }
.pm-badge--plain { font-weight: 500; }

.pm-options { display: flex; flex-direction: column; gap: 24px; margin: 0 0 32px; padding: 0 0 32px; border: 0; border-bottom: 1px solid var(--pm-line); }
.pm-options fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pm-options legend { font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: var(--pm-ink); margin: 0 0 12px; padding: 0; float: none; width: auto; }
.pm-options legend span { color: var(--pm-muted); font-weight: 500; letter-spacing: 0.04em; text-transform: none; margin-left: 6px; }
.pm-choices { display: flex; flex-wrap: wrap; gap: 12px; }
.pm-choice { position: relative; margin: 0; }
.pm-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pm-choice span {
    display: block; padding: 8px 16px; border: 1px solid var(--pm-line-strong); background: transparent; color: var(--pm-ink);
    border-radius: var(--pm-radius); font-size: 14px; cursor: pointer; transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.pm-choice span:hover { border-color: var(--pm-red); }
.pm-choice input:checked + span { border-color: var(--pm-red); background: rgba(237, 28, 36, 0.06); color: var(--pm-red); }
.pm-choice input:focus-visible + span { outline: 2px solid var(--pm-red); outline-offset: 2px; }
.pm-choice.is-unavailable span { border-style: dashed; color: var(--pm-muted); }
.pm-choice.is-unavailable span:hover { border-style: solid; color: var(--pm-ink); }
/* Hearth style picker (required; see buy_box.blade.php). */
.pm-choice__extra { margin-left: 6px; font-size: 12px; font-weight: 600; opacity: 0.8; }
.pm-hearth__note { margin: 10px 0 0; font-size: 13px; line-height: 20px; color: var(--pm-body); }
.pm-hearth.is-invalid .pm-choice span { border-color: var(--pm-red); }
.pm-options__error { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--pm-red); }
.pm-options__error[hidden] { display: none; }
.pm-options__error .ms { font-size: 18px; }
/* Filler panels (required; roadmap #27): checkboxes styled as choices, "No filler panels" exclusive. */
.pm-filler__help { margin: -4px 0 12px; }
.pm-filler.is-invalid .pm-choice span { border-color: var(--pm-red); }

/* Firebox measurements: required for surrounds (roadmap #28). */
.pm-measure-req { margin: 0 0 24px; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.pm-measure-req.is-invalid { border-color: var(--pm-red); box-shadow: inset 0 0 0 1px var(--pm-red); }
.pm-measure-req h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.pm-measure-req__status { padding: 2px 10px; border: 1px solid var(--pm-line-strong); border-radius: 9999px; background: var(--pm-white); font-size: 11px; line-height: 18px; letter-spacing: 0.08em; font-weight: 600; text-transform: uppercase; color: var(--pm-muted); }
.pm-measure-req__status.is-done { border-color: rgba(31, 122, 61, 0.4); color: #1f7a3d; }
.pm-measure-req .pm-attached { margin: 14px 0 0; font-size: 13px; line-height: 18px; color: #1f7a3d; }
.pm-measure-req .pm-panel__link { text-align: left; }
.pm-measure-req__unsure { margin-top: 14px; font-size: 13px; line-height: 20px; color: var(--pm-ink); }
.pm-measure-req .pm-options__error { margin: 10px 0 0; font-size: 13px; line-height: 18px; color: var(--pm-red); }

/* Live total before add to cart (roadmap #30). */
.pm-total { margin: 0 0 24px; padding: 16px 20px; border: 1px solid var(--pm-line); border-radius: var(--pm-radius-card); background: var(--pm-page); }
.pm-total__lines { margin: 0 0 10px; }
.pm-total__lines:empty { display: none; }
.pm-total__lines div { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; font-size: 13px; line-height: 20px; color: var(--pm-body); }
.pm-total__lines dt { font-weight: 400; min-width: 0; overflow-wrap: anywhere; }
.pm-total__lines dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--pm-ink); }
.pm-total__lines .is-discount dd { color: #1f7a3d; }
.pm-total__sum { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0; font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: var(--pm-ink); }
.pm-total__lines:not(:empty) + .pm-total__sum { padding-top: 10px; border-top: 1px solid var(--pm-line); }
.pm-total__sum small { font-size: 12px; letter-spacing: 0; font-weight: 400; text-transform: none; color: var(--pm-muted); }
.pm-total__sum strong { font-size: 24px; line-height: 30px; letter-spacing: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pm-total__note { margin: 6px 0 0; font-size: 12px; line-height: 18px; color: var(--pm-muted); }

/* Photos in the measurements modal (roadmap #17). */
.pm-measure-photos { margin-top: 20px; }
.pm-measure-photos .pm-po-upload { margin-top: 0; }
.pm-measure-photos.is-full .pm-upload { opacity: 0.55; pointer-events: none; }

.pm-actions-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 56px; }
.pm-qty { display: flex; align-items: center; border: 1px solid var(--pm-line-strong); border-radius: var(--pm-radius-sm); background: var(--pm-page); }
.pm-qty button { padding: 4px 12px; height: 100%; background: transparent; border: 0; color: var(--pm-muted); font-size: 18px; cursor: pointer; }
.pm-qty button:hover { color: var(--pm-red); }
.pm-qty input { width: 40px; text-align: center; font-size: 16px; border: 0; background: transparent; -moz-appearance: textfield; }
.pm-qty input::-webkit-outer-spin-button, .pm-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pm-actions-row .pm-btn { flex: 1 1 140px; padding: 12px 24px; }
.pm-like { width: 48px; height: 48px; flex: 0 0 auto; padding: 0; border: 1px solid var(--pm-red); border-radius: var(--pm-radius); background: transparent; color: var(--pm-red); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s ease; }
.pm-like:hover { background: var(--pm-red-soft); }
.pm-like[aria-pressed="true"] .ms { font-variation-settings: 'FILL' 1; }
.pm-attached { display: none; align-items: center; gap: 8px; margin: -40px 0 32px; font-size: 13px; color: #1f7a3d; }
.pm-attached.is-visible { display: flex; }

/* Tabs */
.pm-tabs { border-top: 1px solid var(--pm-line); padding-top: 48px; }
.pm-tabs__list { display: flex; border-bottom: 1px solid rgba(231, 189, 182, 0.35); margin-bottom: 32px; overflow-x: auto; }
.pm-tabs__tab { padding: 16px 32px; font-size: 22px; color: var(--pm-muted); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.pm-tabs__tab:hover { color: var(--pm-ink); }
.pm-tabs__tab[aria-selected="true"] { color: var(--pm-red); border-bottom-color: var(--pm-red); }
.pm-tabs__panel { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; }
.pm-tabs__panel[hidden] { display: none; }
.pm-prose { font-size: 16px; line-height: 26px; color: var(--pm-muted); }
.pm-prose p { margin: 0 0 24px; }
.pm-prose > h2, .pm-prose > h3 { color: var(--pm-ink); }
.pm-prose > h2 { font-size: 28px; line-height: 36px; margin: 0 0 24px; font-weight: 500; }
.pm-prose > h3 { font-size: 22px; line-height: 28px; font-weight: 700; margin: 8px 0 16px; }
.pm-specs { background: var(--pm-band); border-radius: 8px; padding: 24px; border: 1px solid rgba(231, 189, 182, 0.35); align-self: start; }
.pm-specs > h3 { font-size: 22px; line-height: 28px; color: var(--pm-ink); margin: 0 0 16px; font-weight: 500; }
.pm-specs dl { margin: 0; }
.pm-specs dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(231, 189, 182, 0.35); font-size: 16px; line-height: 19px; }
.pm-specs dt { font-weight: 500; color: var(--pm-ink); }
.pm-specs dd { color: var(--pm-muted); margin: 0; text-align: right; }
.pm-pairing { margin-top: 48px; padding-top: 48px; border-top: 1px solid rgba(231, 189, 182, 0.35); }
.pm-pairing > h3 { font-size: 28px; line-height: 36px; color: var(--pm-ink); margin: 0 0 32px; font-weight: 500; }
.pm-pairing .pm-grid-4 { column-gap: 16px; }

/* Consultation + personal order */
.pm-consult { margin-top: 120px; background: var(--pm-well); padding: 80px 0; }
.pm-consult__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.pm-consult__pill { display: inline-block; padding: 4px 12px; background: var(--pm-red-tint); color: var(--pm-red); font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; border-radius: var(--pm-radius-sm); margin-bottom: 24px; }
.pm-consult h2 { font-size: 36px; line-height: 44px; color: var(--pm-ink); margin: 0 0 24px; font-weight: 500; }
.pm-consult__lead { font-size: 22px; line-height: 30px; color: var(--pm-muted); margin: 0 0 24px; }
.pm-consult__text { font-size: 18px; line-height: 28px; color: var(--pm-body); margin: 0; }
.pm-contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pm-body .pm-contact-card { background: var(--pm-page); padding: 32px; border-radius: var(--pm-radius-panel); border: 1px solid var(--pm-line); box-shadow: 0 1px 3px rgba(28, 27, 27, 0.06); display: flex; flex-direction: column; align-items: center; text-align: center; transition: border-color 0.2s ease, transform 0.25s var(--pm-ease); }
.pm-body a.pm-contact-card:hover { border-color: var(--pm-red); transform: translateY(-3px); }
.pm-contact-card__icon { background: rgba(237, 28, 36, 0.08); border-radius: 9999px; margin-bottom: 16px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.pm-contact-card__icon .ms { color: var(--pm-red); font-size: 32px; }
.pm-contact-card__label { font-size: 12px; line-height: 15px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: var(--pm-muted); margin: 0 0 8px; }
.pm-contact-card__value { font-size: 12px; line-height: 15px; color: var(--pm-ink); font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.pm-promo-wrap { background: var(--pm-well); padding: 0 0 80px; }
.pm-promo { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: var(--pm-radius-panel); border: 1px solid var(--pm-line); box-shadow: 0 12px 30px rgba(28, 27, 27, 0.12); background: var(--pm-red); }
.pm-promo__media { position: relative; overflow: hidden; min-height: 320px; }
.pm-promo__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.pm-promo__media::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.2); }
.pm-promo__body { padding: 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.pm-promo__icon { border-radius: 9999px; margin-bottom: 24px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: var(--pm-white); }
.pm-promo__icon .ms { color: var(--pm-red); font-size: 32px; }
.pm-promo h2 { font-size: 36px; line-height: 44px; margin: 0 0 16px; color: var(--pm-white); font-weight: 500; }
.pm-promo p { font-size: 18px; line-height: 28px; margin: 0 0 32px; color: var(--pm-white); }
/* Design: Get a Quote is 12px text on normal line height, arrow inherits 12px. */
.pm-promo-wrap .pm-btn { line-height: 15px; }
.pm-promo-wrap .pm-btn .ms { font-size: 12px; }
.pm-body .pm-promo .pm-btn--white:hover { background: var(--pm-page); color: var(--pm-red-hover); }

/* Modals */
.pm-modal { position: fixed; inset: 0; z-index: 1200; background: rgba(28, 27, 27, 0.6); padding: 48px 24px; overflow: auto; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s linear 0.2s; }
.pm-modal.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.pm-modal--guide { z-index: 1300; }
.pm-modal__dialog { max-width: 820px; margin: 0 auto; background: var(--pm-page); border-radius: var(--pm-radius-panel); box-shadow: 0 24px 60px rgba(28, 27, 27, 0.3); overflow: hidden; transform: translateY(12px); transition: transform 0.3s var(--pm-ease); }
.pm-modal.is-open .pm-modal__dialog { transform: none; }
.pm-modal--guide .pm-modal__dialog { max-width: 980px; }
.pm-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px 36px; border-bottom: 1px solid var(--pm-line); background: var(--pm-band); }
.pm-modal__head h2 { font-family: var(--pm-serif); font-size: 30px; line-height: 38px; font-weight: 500; color: var(--pm-ink); margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.02em; }
.pm-modal__head p:last-child { font-size: 16px; line-height: 24px; color: var(--pm-body); margin: 0; }
.pm-modal__head .pm-label { color: var(--pm-red); margin: 0 0 6px; }
.pm-modal__close { color: var(--pm-muted); flex: 0 0 auto; }
.pm-modal__close .ms { font-size: 28px; }
.pm-modal__body { padding: 28px 36px 0; }
.pm-modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; padding: 28px 36px 32px; }
.pm-modal__foot--split { justify-content: space-between; }
.pm-note { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; font-size: 14px; line-height: 24px; color: var(--pm-body); }
.pm-note .ms { color: var(--pm-red); font-size: 22px; flex: 0 0 auto; }
.pm-link-btn { background: none; border: 0; padding: 0; color: var(--pm-red); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pm-field--wide { margin-top: 24px; }
.pm-guide__figure { margin: 0; border: 1px solid rgba(231, 189, 182, 0.6); border-radius: 8px; overflow: hidden; background: var(--pm-white); }
.pm-guide__figure img { width: 100%; height: auto; display: block; }
.pm-guide__caption { font-size: 12px; line-height: 18px; color: var(--pm-muted); margin: 10px 0 0; }
.pm-guide__intro { font-size: 15px; line-height: 26px; color: var(--pm-body); margin: 32px 0 28px; max-width: 46rem; }
.pm-guide__rows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; margin: 0; padding: 0; list-style: none; }
.pm-guide__rows li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid rgba(231, 189, 182, 0.45); }
.pm-guide__letter { width: 30px; height: 30px; border-radius: 9999px; background: var(--pm-red); color: var(--pm-white); font-family: var(--pm-serif); font-size: 17px; display: flex; align-items: center; justify-content: center; }
.pm-guide__rows h3 { font-size: 15px; line-height: 22px; color: var(--pm-ink); margin: 0 0 3px; font-weight: 600; }
.pm-guide__rows p { font-size: 13px; line-height: 20px; color: var(--pm-muted); margin: 0; }
.pm-body .pm-pdf-link { display: inline-flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--pm-band); border: 1px solid var(--pm-line-strong); border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--pm-ink); }
.pm-body .pm-pdf-link:hover { border-color: var(--pm-red); color: var(--pm-red); }
.pm-pdf-link .ms { font-size: 22px; color: var(--pm-red); }

/* Toast */
.pm-toast { position: fixed; left: 50%; bottom: 32px; z-index: 1400; transform: translate(-50%, 20px); opacity: 0; visibility: hidden; display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 9999px; background: var(--pm-ink); color: var(--pm-white); font-size: 14px; box-shadow: var(--pm-shadow-pop); transition: opacity 0.2s ease, transform 0.3s var(--pm-ease), visibility 0s linear 0.3s; }
.pm-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.pm-toast .ms { color: #6fd08c; }
.pm-toast--error .ms { color: #ff8a8f; }

@media (max-width: 1100px) {
    .pm-pdp__top, .pm-tabs__panel, .pm-consult__grid, .pm-promo { grid-template-columns: 1fr; }
    .pm-consult { margin-top: 72px; padding: 56px 0; }
}
/* Gallery prev / next / counter: phones only (design mobile). */
.pm-gallery__nav, .pm-gallery__count { display: none; }

@media (max-width: 900px) {
    .pm-pdp { padding-top: 16px; }
    .pm-pdp .pm-crumbs { margin-bottom: 32px; }
    /* Breadcrumb on one line; the style and product names truncate (design `crumb`). */
    .pm-pdp .pm-crumbs ol { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
    .pm-pdp .pm-crumbs li { flex: 0 0 auto; }
    .pm-pdp .pm-crumbs li:nth-child(3), .pm-pdp .pm-crumbs li:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

    /* One column in design order: photo, thumbs, title … buttons, planning panel, firebox panel.
       The wrappers step aside (display: contents) so the planning panel can move below the buttons. */
    .pm-pdp__top { display: flex; flex-direction: column; gap: 0; margin-bottom: 48px; }
    .pm-pdp__top > .pm-gallery, .pm-pdp__top > .pm-buy, .pm-pdp__top #pm-product-form { display: contents; }
    .pm-pdp__top .pm-gallery .pm-panel { order: 1; margin: 0 0 24px; }
    .pm-pdp__top .pm-measure-req, .pm-pdp__top [data-pm-measure-fields], .pm-pdp__top .pm-product-tools { order: 2; }
    .pm-thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
    .pm-buy h1 { margin-top: 28px; font-size: 36px; line-height: 44px; }

    /* Design text without its own line-height renders at `normal` (not the inherited 1.5). */
    .pm-gallery__sale, .pm-badge, .pm-options legend { line-height: normal; }
    .pm-badges { gap: 16px; }
    .pm-badge .ms { line-height: 24px; }
    .pm-choice span { line-height: 18px; }

    .pm-gallery__main { touch-action: pan-y; }
    .pm-gallery__nav {
        position: absolute; top: 50%; z-index: 10; transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; padding: 0; border: 0; border-radius: 9999px; background: rgba(252, 249, 248, 0.92); color: var(--pm-ink); cursor: pointer;
        box-shadow: 0 2px 8px rgba(28, 27, 27, 0.12);
    }
    .pm-gallery__nav--prev { left: 12px; }
    .pm-gallery__nav--next { right: 12px; }
    .pm-gallery__nav:focus-visible { outline: 2px solid var(--pm-red); outline-offset: 2px; }
    .pm-gallery__count { display: block; position: absolute; right: 12px; bottom: 12px; z-index: 10; padding: 4px 10px; border-radius: 9999px; background: rgba(28, 27, 27, 0.7); color: var(--pm-white); font-size: 12px; line-height: 16px; font-weight: 600; }

    /* Buy row: qty stepper + Add to cart, then Order a sample + like (design `qtybox`, README). */
    .pm-actions-row { gap: 16px; }
    .pm-qty { flex: 0 0 auto; height: 52px; }
    .pm-qty button { width: 44px; padding: 0; font-size: 20px; }
    .pm-qty input { width: 36px; min-height: 0 !important; height: 100%; padding: 0; }
    .pm-actions-row .pm-btn[data-pm-add] { flex: 1 1 0; min-width: 0; }
    .pm-actions-row .pm-btn[data-pm-sample] { flex: 1 1 calc(100% - 68px); }
    .pm-like { width: 52px; height: 52px; }

    /* Panels: icon above the copy, links stacked as rows (design `pcard` / `plinks`). */
    .pm-panel { flex-direction: column; gap: 12px; }
    .pm-panel__body, .pm-panel > div:last-child { width: 100%; }
    .pm-panel__links { flex-direction: column; align-items: stretch; gap: 0; }
    .pm-body .pm-panel__link { display: flex; width: 100%; min-height: 44px; gap: 10px; padding: 6px 0; border-top: 1px solid var(--pm-line-soft); font-size: 12px; letter-spacing: 0.04em; line-height: 16px; white-space: normal; text-align: left; }
    .pm-panel__link .pm-dot { width: 20px; height: 20px; background: transparent; color: inherit; }
    .pm-panel__link .pm-dot .ms { font-size: 20px; }

    /* Tabs + description: prose, then specs, then pairing (design `descgrid` / `pairing` / `p2`). */
    .pm-tabs__tab { padding: 12px 14px; font-size: 16px; }
    .pm-tabs__panel { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .pm-tabs__panel > div:first-child { display: contents; }
    .pm-tabs__panel .pm-specs { order: 1; }
    .pm-tabs__panel .pm-pairing { order: 2; margin-top: 24px; padding-top: 32px; }
    .pm-pairing > h3 { font-size: 24px; line-height: 30px; margin-bottom: 20px; }
    .pm-specs dl div { font-size: 14px; gap: 12px; }

    /* Consultation band + personal-order card (design `pbleed` / `pcards` / `po`). */
    .pm-consult { margin-top: 56px; padding: 48px 0; }
    .pm-consult__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .pm-consult h2 { font-size: 36px; line-height: 44px; }
    .pm-contact-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .pm-body .pm-contact-card { padding: 24px 20px; }
    .pm-promo-wrap { padding-bottom: 48px; }
    .pm-promo { grid-template-columns: minmax(0, 1fr); border: 0; box-shadow: 0 8px 20px rgba(28, 27, 27, 0.1); }
    .pm-promo__media { min-height: 0; aspect-ratio: 16 / 10; }
    .pm-promo__body { padding: 24px 20px 28px; }
    .pm-promo__icon { width: 44px; height: 44px; margin-bottom: 16px; }
    .pm-promo__icon .ms { font-size: 22px; }
    .pm-promo h2 { font-size: 24px; line-height: 30px; margin-bottom: 8px; }
    .pm-promo p { font-size: 15px; line-height: 24px; margin-bottom: 20px; }
    .pm-promo .pm-btn { min-height: 0; padding: 14px 20px !important; }
}

@media (max-width: 640px) {
    .pm-contact-cards, .pm-form-grid, .pm-guide__rows { grid-template-columns: 1fr; }
    .pm-modal { padding: 16px 12px; }
    .pm-modal__head, .pm-modal__body, .pm-modal__foot { padding-left: 20px; padding-right: 20px; }
    .pm-modal__head h2 { font-size: 24px; line-height: 30px; }
}
