/* Trade & Designers page (design: isTrade). Forms/aside/accordion come from precast-pages.css, modal from precast-product.css. */

.pm-trade-benefits { margin-bottom: 56px; }

/* White panels */
.pm-form-panel { background: var(--pm-white); border: 1px solid var(--pm-line); border-radius: var(--pm-radius-panel); padding: 32px; }
.pm-panel__title { font-family: var(--pm-serif); font-size: 28px; line-height: 36px; font-weight: 500; color: var(--pm-ink); margin: 0 0 6px; }
.pm-panel__intro { font-size: 14px; line-height: 22px; color: var(--pm-body); margin: 0 0 28px; }
.pm-panel__note { font-size: 12px; line-height: 18px; color: var(--pm-muted); }
.pm-panel__divider { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--pm-line); }

/* Sign-in */
.pm-signin { display: flex; flex-direction: column; gap: 20px; max-width: 26rem; }
.pm-signin__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pm-signin__row .pm-check { color: var(--pm-muted); align-items: center; }
.pm-signin__row a { font-size: 14px; }
.pm-signin .pm-btn { justify-content: center; }
.pm-signin__alt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--pm-muted); }
.pm-signin__alt a { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.pm-signed { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--pm-band); border: 1px solid var(--pm-line); border-radius: var(--pm-radius-card); flex-wrap: wrap; }
.pm-signed > .ms { font-size: 32px; color: var(--pm-red); }
.pm-signed p { margin: 0; font-size: 15px; line-height: 22px; color: var(--pm-ink); }
.pm-signed small { display: block; font-size: 13px; color: var(--pm-muted); }
.pm-signed .pm-btn { margin-left: auto; }

.pm-trade-faq { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--pm-line); }
.pm-trade-faq h2 { font-family: var(--pm-serif); font-size: 24px; line-height: 32px; font-weight: 500; color: var(--pm-ink); margin: 0 0 4px; }
.pm-trade-faq .pm-accordion { border-top: 0; }
.pm-trade-faq .pm-accordion summary { font-size: 15px; line-height: 24px; padding: 18px 0; }
.pm-trade-faq .pm-accordion__body { font-size: 14px; line-height: 24px; color: var(--pm-muted); padding: 0 0 18px; max-width: 44rem; }
.pm-trade-faq .pm-accordion summary .ms { font-size: 22px; }
.pm-trade-faq .ms-when-open, .pm-trade-faq details[open] .ms-when-closed { display: none; }
.pm-trade-faq details[open] .ms-when-open { display: inline-block; }
.pm-trade-faq .pm-accordion details[open] summary .ms { transform: none; }

/* Dark sample band */
.pm-sample-band { position: relative; margin-top: 56px; border-radius: var(--pm-radius-panel); overflow: hidden; color: var(--pm-white); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; padding: 48px; isolation: isolate; }
.pm-sample-band__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.pm-sample-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(28, 27, 27, 0.55) 0%, rgba(28, 27, 27, 0.88) 100%); }
.pm-sample-band__eyebrow { font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); margin: 0 0 8px; }
.pm-sample-band h2 { font-family: var(--pm-serif); font-size: 28px; line-height: 34px; font-weight: 500; color: var(--pm-white); margin: 0 0 10px; }
.pm-sample-band p.pm-sample-band__text { font-size: 14px; line-height: 22px; color: rgba(255, 255, 255, 0.82); margin: 0 0 20px; max-width: 30rem; }
.pm-swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pm-swatches li { display: flex; flex-direction: column; gap: 6px; }
.pm-swatches img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--pm-radius); border: 1px solid rgba(255, 255, 255, 0.16); background: #2a2828; display: block; }
.pm-swatches span { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); text-align: center; }

/* How it works + downloads */
.pm-trade-lower { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.pm-trade-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.pm-trade-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid var(--pm-line); }
.pm-trade-steps__n { font-family: var(--pm-serif); font-size: 28px; line-height: 28px; color: var(--pm-red); }
.pm-trade-steps h3 { font-size: 15px; line-height: 22px; color: var(--pm-ink); margin: 0 0 4px; font-weight: 600; }
.pm-trade-steps p { font-size: 14px; line-height: 22px; color: var(--pm-muted); margin: 0; }
.pm-downloads { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pm-body .pm-downloads a, .pm-downloads button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 12px 14px; background: var(--pm-page); border: 1px solid var(--pm-line-strong); border-radius: 8px; font: inherit; font-size: 14px; color: var(--pm-ink); cursor: pointer; text-align: left; transition: border-color 0.2s ease, color 0.2s ease; }
.pm-body .pm-downloads a:hover, .pm-downloads button:hover { border-color: var(--pm-red); color: var(--pm-red); }
.pm-downloads a:focus-visible, .pm-downloads button:focus-visible { outline: 2px solid var(--pm-red); outline-offset: 2px; }
.pm-downloads .ms { color: var(--pm-red); font-size: 20px; }

/* Sample modal color checkboxes */
.pm-sample-colors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; border: 0; margin: 0; padding: 0; min-width: 0; }
.pm-sample-colors legend { font-size: 13px; line-height: 19px; font-weight: 600; color: var(--pm-ink); margin: 0 0 10px; padding: 0; }
.pm-sample-color { position: relative; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.pm-sample-color input { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; accent-color: var(--pm-red); z-index: 1; }
.pm-sample-color img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--pm-radius); border: 2px solid transparent; display: block; transition: border-color 0.2s ease; }
.pm-sample-color input:checked ~ img { border-color: var(--pm-red); }
.pm-sample-color input:focus-visible ~ img { outline: 2px solid var(--pm-red); outline-offset: 2px; }
.pm-sample-color span { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pm-muted); text-align: center; }
.pm-modal__body .pm-form-grid { margin-top: 24px; }

@media (max-width: 1100px) {
    .pm-sample-band, .pm-trade-lower { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
    .pm-sample-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pm-signed .pm-btn { margin-left: 0; }
}
/* Phones (design isTrade at 390px): every block one column, 20px apart; sample card shows its
   swatches 2 across on top (data-m="swatches"), then the copy and a full-width button. */
@media (max-width: 900px) {
    .pm-page-body:has(> .pm-trade-lower) { padding-bottom: 112px; }
    .pm-trade-benefits { margin-bottom: 56px; }
    .pm-page-body:has(> .pm-trade-lower) > .pm-main-aside { gap: 20px; }
    .pm-form-panel { padding: 24px 20px; }
    .pm-sample-band { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; padding: 20px 20px 28px; }
    .pm-sample-band > div { padding: 2px 8px 0; }
    .pm-swatches { order: -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .pm-swatches li { gap: 6px; }
    .pm-swatches li > span, .pm-sample-band__eyebrow { line-height: normal; }
    .pm-trade-lower { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; }
    .pm-trade-lower > .pm-box { padding: 28px; }
    .pm-trade-steps { grid-template-columns: minmax(0, 1fr); }
    /* Design benefit icon sits in a 35px line box (normal line height), so each card is 171px. */
    .pm-trade-benefits .pm-feature > .ms { display: block; height: 35px; line-height: 34px; }
    /* Partner sign in: 22px remember row (16px box, 3px/4px margins, 8px gap), normal-height links. */
    .pm-signin__row { align-items: center; }
    .pm-signin__row .pm-check { margin: 0; gap: 8px; line-height: normal; }
    .pm-signin__row .pm-check input { width: 16px; height: 16px; margin: 3px 3px 3px 4px; }
    .pm-signin__row a, .pm-signin__alt { line-height: normal; }
    /* FAQ: 62px closed rows (26px icon line), answer text ends 18px above the rule. */
    .pm-trade-faq summary .ms { line-height: normal; }
    .pm-trade-faq .pm-accordion__body > p:last-child { margin-bottom: 0; }
    .pm-trade-main .pm-fields--caps .pm-field > span:first-child, .pm-page-body .pm-form-panel .pm-fields--caps .pm-field > span:first-child { line-height: normal; }
    /* Lower boxes: 15px labels, steps start 4px under the label, 50px download rows. */
    .pm-trade-lower .pm-box__title { line-height: normal; }
    .pm-trade-lower .pm-box__title:has(+ .pm-trade-steps) { margin-bottom: 4px; }
    .pm-trade-lower .pm-downloads a, .pm-trade-lower .pm-downloads button, .pm-trade-lower .pm-downloads .ms { line-height: normal; }
}
