/* ==========================================================================
   LA Precast Mantels — shared content-page components and forms
   Used by resources, about, forms, cart/checkout/account pages.
   Page-specific rules go in assets/css/pages/<page>.css (pushed per view).
   ========================================================================== */

.pm-page-body { padding-top: 56px; padding-bottom: 96px; }
.pm-page-body--tight { padding-top: 24px; }
.pm-block + .pm-block { margin-top: 56px; }
.pm-h2-sub { font-family: var(--pm-serif); font-size: 28px; line-height: 36px; font-weight: 500; color: var(--pm-ink); margin: 0 0 20px; }
.pm-text { font-size: 16px; line-height: 28px; color: var(--pm-body); margin: 0 0 16px; }
.pm-text:last-child { margin-bottom: 0; }
.pm-small { font-size: 14px; line-height: 22px; color: var(--pm-muted); margin: 0; }

/* Two-column: content + aside (design uses 7fr / 5fr) */
.pm-main-aside { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.pm-main-aside--wide { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.pm-aside { display: flex; flex-direction: column; gap: 20px; }

/* Feature cards row */
.pm-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pm-features--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pm-feature { background: var(--pm-band); border: 1px solid var(--pm-line); border-radius: var(--pm-radius-card); padding: 24px; }
.pm-feature > .ms { color: var(--pm-red); font-size: 28px; }
.pm-feature h3 { font-size: 17px; line-height: 24px; color: var(--pm-ink); margin: 12px 0 6px; font-weight: 600; }
.pm-feature p { font-size: 14px; line-height: 22px; color: var(--pm-muted); margin: 0; }

/* Numbered step rows */
.pm-numbered { border: 1px solid var(--pm-line); border-radius: var(--pm-radius-panel); overflow: hidden; margin: 0; padding: 0; list-style: none; }
.pm-numbered li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--pm-line); background: var(--pm-white); }
.pm-numbered li:last-child { border-bottom: 0; }
.pm-numbered__n { font-family: var(--pm-serif); font-size: 30px; line-height: 30px; color: var(--pm-red); }
.pm-numbered h3, .pm-numbered h4 { font-size: 16px; line-height: 24px; color: var(--pm-ink); margin: 0 0 4px; font-weight: 600; }
.pm-numbered p { font-size: 14px; line-height: 22px; color: var(--pm-muted); margin: 0; }

/* Bullet list with icons */
.pm-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pm-checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 15px; line-height: 24px; color: var(--pm-body); }
.pm-checklist .ms { font-size: 20px; color: var(--pm-red); margin-top: 2px; }
.pm-checklist--muted .ms { color: var(--pm-muted); }

/* Callout / notice */
.pm-callout { display: flex; gap: 14px; align-items: flex-start; margin-top: 24px; background: var(--pm-band); border: 1px solid rgba(237, 28, 36, 0.3); border-radius: var(--pm-radius-card); padding: 20px 24px; }
.pm-callout > .ms { color: var(--pm-red); font-size: 24px; flex: 0 0 auto; }
.pm-callout p { font-size: 14px; line-height: 22px; color: var(--pm-ink); margin: 0; }

/* Aside boxes */
.pm-box { background: var(--pm-band); border: 1px solid var(--pm-line); border-radius: var(--pm-radius-panel); padding: 28px; }
.pm-box--white { background: var(--pm-white); }
.pm-box__title { font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: var(--pm-ink); margin: 0 0 4px; }
.pm-box h3.pm-serif { font-size: 22px; line-height: 28px; margin: 0 0 8px; }
.pm-facts { display: flex; flex-direction: column; margin: 0; }
.pm-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--pm-line); }
.pm-facts dt { font-size: 14px; color: var(--pm-muted); font-weight: 400; }
.pm-facts dd { font-size: 14px; color: var(--pm-ink); font-weight: 600; text-align: right; margin: 0; }
.pm-contact-lines { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pm-contact-lines li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--pm-muted); }
.pm-contact-lines .ms { color: var(--pm-red); font-size: 18px; }
.pm-body .pm-contact-lines a { color: var(--pm-muted); }
.pm-body .pm-contact-lines a:hover { color: var(--pm-red); }

/* Red CTA card */
.pm-body .pm-cta-card { display: block; background: var(--pm-red); border-radius: var(--pm-radius-panel); padding: 28px; color: var(--pm-white); transition: background-color 0.2s ease, transform 0.25s var(--pm-ease); }
.pm-body .pm-cta-card:hover { background: var(--pm-red-hover); color: var(--pm-white); transform: translateY(-2px); }
.pm-cta-card h3 { font-family: var(--pm-serif); font-size: 26px; line-height: 34px; margin: 0 0 8px; font-weight: 500; color: var(--pm-white); }
.pm-cta-card p { font-size: 14px; line-height: 22px; margin: 0 0 20px; opacity: 0.92; }
.pm-cta-card__btn { display: inline-flex; align-items: center; gap: 8px; background: var(--pm-white); color: var(--pm-red); padding: 12px 22px; border-radius: var(--pm-radius); font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; }
.pm-cta-card--navy { background: var(--pm-navy); }
.pm-body .pm-cta-card--navy:hover { background: var(--pm-navy-deep); }

/* Accordion (FAQ) */
.pm-accordion { border-top: 1px solid var(--pm-line); }
.pm-accordion details { border-bottom: 1px solid var(--pm-line); }
.pm-accordion summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none; font-size: 17px; line-height: 26px; font-weight: 600; color: var(--pm-ink); }
.pm-accordion summary::-webkit-details-marker { display: none; }
.pm-accordion summary:hover { color: var(--pm-red); }
.pm-accordion summary:focus-visible { outline: 2px solid var(--pm-red); outline-offset: 4px; }
.pm-accordion summary .ms { color: var(--pm-red); transition: transform 0.2s ease; }
.pm-accordion details[open] summary .ms { transform: rotate(45deg); }
.pm-accordion__body { padding: 0 48px 24px 0; font-size: 15px; line-height: 26px; color: var(--pm-body); }
.pm-accordion__body p { margin: 0 0 12px; }

/* Pills (category filters on FAQ/blog) */
.pm-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; }
.pm-body .pm-pill { font-family: inherit; display: inline-block; padding: 8px 16px; border: 1px solid var(--pm-line-strong); border-radius: 9999px; font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: var(--pm-muted); background: transparent; cursor: pointer; }
.pm-body .pm-pill:hover { border-color: var(--pm-red); color: var(--pm-red); }
.pm-body .pm-pill[aria-pressed="true"], .pm-body .pm-pill[aria-current] { background: var(--pm-red); border-color: var(--pm-red); color: var(--pm-white); }

/* --- Forms --------------------------------------------------------------- */
.pm-form { margin: 0; }
.pm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.pm-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pm-span-2 { grid-column: span 2; }
.pm-span-all { grid-column: 1 / -1; }
.pm-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pm-field > span, .pm-field__label { font-size: 13px; line-height: 19px; font-weight: 600; color: var(--pm-ink); }
.pm-field .pm-req { color: var(--pm-red); margin-left: 2px; }
.pm-field input, .pm-field textarea, .pm-field select {
    width: 100%; background: var(--pm-white); border: 1px solid var(--pm-line-strong); border-radius: var(--pm-radius);
    padding: 11px 13px; font-size: 15px; line-height: 22px; color: var(--pm-ink); outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pm-field select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%23585f65'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
.pm-field textarea { resize: vertical; min-height: 110px; }
.pm-field input:focus, .pm-field textarea:focus, .pm-field select:focus { border-color: var(--pm-red); box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.1); }
.pm-field.is-invalid input, .pm-field.is-invalid textarea, .pm-field.is-invalid select { border-color: var(--pm-red); }
.pm-field__error { font-size: 12px; line-height: 16px; color: var(--pm-red); }
.pm-field__hint { font-size: 12px; line-height: 16px; color: var(--pm-muted); }
.pm-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 22px; color: var(--pm-body); cursor: pointer; }
.pm-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pm-red); flex: 0 0 auto; }
.pm-upload { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px dashed var(--pm-line-strong); border-radius: var(--pm-radius-card); background: var(--pm-white); cursor: pointer; transition: border-color 0.2s ease, background-color 0.2s ease; }
.pm-upload:hover, .pm-upload:focus-within { border-color: var(--pm-red); background: var(--pm-page); }
.pm-upload > .ms { font-size: 28px; color: var(--pm-red); }
.pm-upload input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pm-upload strong { display: block; font-size: 14px; color: var(--pm-ink); }
.pm-upload small { font-size: 12px; color: var(--pm-muted); }
/* Upload box + chosen files list (personal order, measuring page, product page measurements). */
.pm-po-upload { margin-top: 20px; position: relative; padding: 24px; background: var(--pm-page); }
.pm-po-files { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pm-po-files li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--pm-band); border: 1px solid var(--pm-line); border-radius: 9999px; font-size: 13px; color: var(--pm-ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-po-files .ms { font-size: 16px; color: var(--pm-red); }
.pm-po-files__warn { color: var(--pm-red); font-size: 12px; margin-top: 8px; }
.pm-po-files li.is-pending { color: var(--pm-muted); }
.pm-po-files li.is-failed { border-color: var(--pm-red); }
.pm-po-files__name { overflow: hidden; text-overflow: ellipsis; }
.pm-po-files__remove { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: -2px -6px -2px 2px; padding: 0; border: 0; border-radius: 9999px; background: transparent; color: var(--pm-muted); cursor: pointer; flex: 0 0 auto; }
.pm-po-files__remove:hover, .pm-po-files__remove:focus-visible { background: var(--pm-red-soft); color: var(--pm-red); }
.pm-po-files__remove .ms { font-size: 16px; color: inherit; }
.pm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pm-form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.pm-alert { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-radius: var(--pm-radius-card); font-size: 14px; line-height: 22px; margin: 0 0 24px; }
.pm-alert .ms { font-size: 22px; flex: 0 0 auto; }
.pm-alert--success { background: #eef8f1; border: 1px solid #b7e0c3; color: #1f5e33; }
.pm-alert--success .ms { color: #1f7a3d; }
.pm-alert--error { background: #fdf0f0; border: 1px solid rgba(237, 28, 36, 0.35); color: #8a1016; }
.pm-alert--error .ms { color: var(--pm-red); }
.pm-alert ul { margin: 4px 0 0; padding-left: 18px; }

/* Media helpers */
.pm-media { border-radius: var(--pm-radius-panel); overflow: hidden; background: var(--pm-well); }
.pm-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-ratio-4-3 { aspect-ratio: 4 / 3; }
.pm-ratio-3-2 { aspect-ratio: 3 / 2; }
.pm-ratio-1 { aspect-ratio: 1 / 1; }

@media (max-width: 1100px) {
    .pm-main-aside, .pm-main-aside--wide { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .pm-features--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones (design mobile block, max-width 900px): one item per row, content + aside
   stacked 20px apart, card buttons full width / 52px. */
@media (max-width: 900px) {
    .pm-page-body { padding-bottom: 112px; } /* section 56 + the design's main 56 */
    .pm-main-aside, .pm-main-aside--wide { gap: 20px; }
    .pm-features, .pm-features--4, .pm-form-grid, .pm-form-grid--3 { grid-template-columns: minmax(0, 1fr); }
    .pm-span-2 { grid-column: auto; }
    .pm-accordion__body { padding-right: 0; }
    .pm-facts dt, .pm-facts dd { line-height: normal; }
    .pm-cta-card__btn { display: flex; justify-content: center; width: 100%; min-height: 52px; padding-top: 0; padding-bottom: 0; }

    /* Content pages (shipping, care, warranty, FAQ, measuring): design metrics. Card icons sit
       inline in a 16px/normal line, 12px box labels use line-height normal, and every step row
       keeps its bottom rule inside the bordered list. */
    :is(.pm-page--shipping, .pm-page--care) .pm-feature { font-size: 16px; line-height: normal; }
    :is(.pm-page--shipping, .pm-page--care) .pm-feature > .ms { display: inline; line-height: normal; }
    :is(.pm-page--shipping, .pm-page--care, .pm-page--warranty, .pm-page--faq, .pm-page--measuring) .pm-box__title { line-height: normal; }
    .pm-page--shipping .pm-numbered li:last-child { border-bottom: 1px solid var(--pm-line); }
}
@media (max-width: 640px) {
    .pm-page-body { padding-top: 32px; }
}
/* Shipping page: the design pads main sections 20px at any width up to 900px. */
@media (max-width: 900px) {
    main.pm-page--shipping { --pm-gutter: 20px; }
}
