/* ==========================================================================
   LA Precast Mantels — home, catalog and product page
   Depends on tokens in precast.css.
   ========================================================================== */

/* --- Product card -------------------------------------------------------- */
.pm-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; row-gap: 40px; }
.pm-card { display: block; text-decoration: none; }
.pm-card__media { position: relative; overflow: hidden; background: var(--pm-band); margin-bottom: 14px; aspect-ratio: 1 / 1; }
.pm-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.45s ease; }
.pm-card__img--alt { opacity: 0; }
.pm-card:hover .pm-card__img--main.has-alt, .pm-card:focus-visible .pm-card__img--main.has-alt { opacity: 0; }
.pm-card:hover .pm-card__img--alt, .pm-card:focus-visible .pm-card__img--alt { opacity: 1; }
.pm-card:focus-visible { outline: 2px solid var(--pm-red); outline-offset: 4px; }
.pm-tag { position: absolute; top: 8px; z-index: 10; padding: 4px 8px; font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: var(--pm-white); }
.pm-tag--sale { left: 8px; background: var(--pm-red); }
.pm-tag--new { right: 8px; background: var(--pm-navy); }
.pm-card__body { text-align: center; }
.pm-card__name { font-size: 15px; line-height: 22px; color: var(--pm-ink); margin: 0 0 6px; font-weight: 400; }
.pm-price { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pm-price__was { color: var(--pm-muted); text-decoration: line-through; font-size: 14px; }
.pm-price__now { color: var(--pm-red); font-weight: 700; font-size: 16px; }

/* --- Home ---------------------------------------------------------------- */
.pm-hero { position: relative; min-height: 720px; display: flex; align-items: center; overflow: hidden; background: var(--pm-band); padding: 120px 0; }
.pm-hero__bg { position: absolute; inset: 0; z-index: 0; }
.pm-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.pm-hero__bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(252, 249, 248, 0.96) 0%, rgba(252, 249, 248, 0.88) 42%, rgba(252, 249, 248, 0.35) 72%, rgba(252, 249, 248, 0.1) 100%);
}
.pm-hero__content { position: relative; z-index: 10; max-width: 46rem; display: flex; flex-direction: column; }
.pm-hero__eyebrow { margin-bottom: 22px; }
.pm-hero h1 { font-family: var(--pm-serif); font-size: clamp(38px, 4.3vw, 62px); line-height: 1.13; letter-spacing: -0.02em; font-weight: 500; color: var(--pm-ink); margin: 0 0 28px; text-wrap: pretty; }
.pm-hero__text { font-size: 18px; line-height: 30px; color: var(--pm-body); max-width: 40rem; margin: 0 0 36px; }
.pm-hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.pm-hero__facts { display: flex; align-items: center; gap: 16px 32px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.pm-hero__facts li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; color: var(--pm-ink); }
.pm-hero__facts .ms { font-size: 22px; color: var(--pm-red); }
.pm-reveal { animation: pm-rise 0.8s var(--pm-ease) both; }
.pm-reveal:nth-child(2) { animation-delay: 0.06s; }
.pm-reveal:nth-child(3) { animation-delay: 0.12s; }
.pm-reveal:nth-child(4) { animation-delay: 0.18s; }
.pm-reveal:nth-child(5) { animation-delay: 0.24s; }
@keyframes pm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.pm-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 40px; }

.pm-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.pm-style-card { position: relative; display: block; overflow: hidden; border-radius: var(--pm-radius-card); background: var(--pm-band); aspect-ratio: 4 / 5; }
.pm-style-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.pm-style-card:hover .pm-style-card__img, .pm-style-card:focus-visible .pm-style-card__img { transform: scale(1.04); }
.pm-style-card__shade {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 32px;
    background: linear-gradient(to top, rgba(10, 36, 64, 0.82) 0%, rgba(10, 36, 64, 0.1) 55%, transparent 100%);
}
.pm-style-card h3 { font-family: var(--pm-serif); font-size: 30px; line-height: 38px; font-weight: 500; color: var(--pm-white); margin: 0 0 8px; }
.pm-style-card p { font-size: 14px; line-height: 22px; color: rgba(255, 255, 255, 0.78); margin: 0 0 14px; }
.pm-style-card .pm-link-arrow { color: var(--pm-white); }

.pm-band { margin-top: var(--pm-section); background: var(--pm-navy); padding: 88px 0; }
.pm-band__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.pm-band h2 { font-family: var(--pm-serif); font-size: clamp(30px, 3.1vw, 44px); line-height: 1.18; font-weight: 500; color: var(--pm-white); margin: 0 0 20px; text-wrap: pretty; }
.pm-band p:not(.pm-eyebrow) { font-size: 16px; line-height: 28px; color: rgba(255, 255, 255, 0.72); margin: 0 0 32px; }
.pm-band__media { border-radius: var(--pm-radius-panel); overflow: hidden; background: var(--pm-navy-deep); aspect-ratio: 16 / 10; }
.pm-band__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pm-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 44px; }
.pm-body .pm-step {
    display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--pm-band);
    border: 1px solid var(--pm-line); border-radius: var(--pm-radius-card);
    transition: border-color 0.2s ease, transform 0.25s var(--pm-ease), box-shadow 0.25s ease;
}
.pm-body .pm-step:hover { border-color: var(--pm-red); transform: translateY(-3px); box-shadow: 0 12px 24px rgba(28, 27, 27, 0.06); }
.pm-step__icon { width: 44px; height: 44px; border-radius: 9999px; background: var(--pm-red); color: var(--pm-white); display: flex; align-items: center; justify-content: center; }
.pm-step__icon .ms { font-size: 22px; }
.pm-step__num { font-size: 11px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: var(--pm-muted); margin: 0; }
.pm-step p:last-child { font-size: 15px; line-height: 24px; color: var(--pm-body); margin: 0; }

.pm-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.pm-split__media { border-radius: var(--pm-radius-panel); overflow: hidden; background: var(--pm-well); aspect-ratio: 5 / 4; }
.pm-split__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-values { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 32px; padding: 0; list-style: none; }
.pm-values li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; }
.pm-values .ms { font-size: 22px; color: var(--pm-red); }
.pm-values strong { display: block; font-size: 15px; line-height: 22px; color: var(--pm-ink); font-weight: 600; margin-bottom: 3px; }
.pm-values span:not(.ms) { font-size: 14px; line-height: 21px; color: var(--pm-muted); }
.pm-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.pm-duo { display: grid; grid-template-columns: 7fr 5fr; gap: 24px; }
.pm-body .pm-duo__card { position: relative; overflow: hidden; border-radius: var(--pm-radius-panel); padding: 56px; min-height: 20rem; display: flex; flex-direction: column; justify-content: center; transition: border-color 0.2s ease, transform 0.25s var(--pm-ease); }
.pm-duo__card:hover { transform: translateY(-3px); }
.pm-duo__card--navy { background: var(--pm-navy); }
.pm-duo__card--light { background: var(--pm-band); border: 1px solid var(--pm-line); }
.pm-duo__card--light:hover { border-color: var(--pm-red); }
.pm-duo__card h2 { font-family: var(--pm-serif); font-weight: 500; margin: 0 0 16px; }
.pm-duo__card--navy h2 { font-size: clamp(28px, 2.7vw, 38px); line-height: 1.2; color: var(--pm-white); max-width: 28rem; }
.pm-duo__card--light h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.24; color: var(--pm-ink); }
.pm-duo__card p:not(.pm-eyebrow) { font-size: 16px; line-height: 26px; margin: 0 0 26px; max-width: 32rem; }
.pm-duo__card--navy p:not(.pm-eyebrow) { color: rgba(255, 255, 255, 0.72); }
.pm-duo__card--light p:not(.pm-eyebrow) { color: var(--pm-body); }
.pm-duo__card--navy .pm-link-arrow { color: var(--pm-white); }
.pm-duo__card--light .pm-link-arrow { color: var(--pm-red); }
.pm-duo__card .pm-eyebrow { margin-bottom: 16px; }
/* Red on navy is 3.4:1; a lighter red keeps the eyebrow above WCAG AA 4.5:1. */

.pm-usa { margin-top: var(--pm-section); background: var(--pm-band); border-top: 1px solid var(--pm-line-soft); border-bottom: 1px solid var(--pm-line-soft); padding: 88px 0; }
.pm-usa__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.pm-usa__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pm-stat { background: var(--pm-white); border: 1px solid var(--pm-line); border-radius: var(--pm-radius-card); padding: 26px; }
.pm-stat .ms { font-size: 26px; color: var(--pm-red); }
.pm-stat strong { display: block; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--pm-ink); margin: 14px 0 6px; }
.pm-stat p { font-size: 15px; line-height: 23px; color: var(--pm-body); margin: 0; }
.pm-copy + .pm-copy { margin-top: -8px; }

.pm-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.pm-post { display: flex; flex-direction: column; gap: 14px; }
.pm-post__media { border-radius: var(--pm-radius-card); overflow: hidden; background: var(--pm-well); aspect-ratio: 3 / 2; }
.pm-post__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.pm-post:hover .pm-post__media img { transform: scale(1.03); }
.pm-post h3 { font-family: var(--pm-serif); font-size: 24px; line-height: 32px; font-weight: 500; color: var(--pm-ink); margin: 0; text-wrap: pretty; }
.pm-post:hover h3 { color: var(--pm-red); }
.pm-post p { font-size: 15px; line-height: 24px; color: var(--pm-muted); margin: 0; }
.pm-home-end { padding-bottom: 120px; }

/* --- Catalog / listing --------------------------------------------------- */
.pm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid var(--pm-line); }
.pm-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pm-toolbar__label { font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: var(--pm-muted); white-space: nowrap; }
.pm-chip-menu { position: relative; }
.pm-chip-menu summary {
    display: flex; align-items: center; gap: 4px; list-style: none; cursor: pointer; white-space: nowrap;
    padding: 8px 16px; border-radius: 9999px; background: var(--pm-hover); color: var(--pm-ink);
    font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.pm-chip-menu summary::-webkit-details-marker { display: none; }
.pm-chip-menu summary .ms { font-size: 16px; transition: transform 0.2s ease; }
.pm-chip-menu[open] summary .ms { transform: rotate(180deg); }
.pm-chip-menu.is-active summary { background: var(--pm-red); color: var(--pm-white); }
.pm-chip-menu summary:focus-visible { outline: 2px solid var(--pm-red); outline-offset: 2px; }
.pm-chip-menu ul {
    position: absolute; left: 0; top: 100%; margin: 8px 0 0; z-index: 40; list-style: none; padding: 6px 0; min-width: 220px;
    background: var(--pm-page); border: 1px solid rgba(231, 189, 182, 0.6); border-radius: 8px; box-shadow: 0 12px 28px rgba(28, 27, 27, 0.14);
}
.pm-body .pm-chip-menu li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 14px; color: var(--pm-ink); white-space: nowrap; }
.pm-body .pm-chip-menu li a:hover { background: var(--pm-band); }
.pm-chip-menu li a .ms { font-size: 18px; color: var(--pm-red); visibility: hidden; }
.pm-chip-menu li a[aria-current] .ms { visibility: visible; }
.pm-body .pm-clear { font-size: 12px; letter-spacing: 0.1em; font-weight: 600; text-transform: uppercase; color: var(--pm-muted); text-decoration: underline; text-underline-offset: 4px; }
.pm-body .pm-clear:hover { color: var(--pm-red); }
.pm-sort { display: flex; align-items: center; gap: 8px; }
.pm-sort select { background: transparent; border: 0; color: var(--pm-ink); font-size: 16px; cursor: pointer; outline: none; padding: 4px; }
.pm-sort select:focus-visible { outline: 2px solid var(--pm-red); border-radius: 4px; }

.pm-empty { background: var(--pm-band); border: 1px solid var(--pm-line); border-radius: var(--pm-radius-panel); padding: 40px; text-align: center; }
.pm-empty > .ms { font-size: 40px; color: var(--pm-red); }
.pm-empty h2 { font-family: var(--pm-serif); font-size: 26px; line-height: 34px; font-weight: 500; margin: 12px 0 8px; }
.pm-empty p { font-size: 15px; line-height: 24px; color: var(--pm-body); margin: 0 0 22px; }

.pm-pager { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 48px; }
.pm-pager__range { font-size: 13px; letter-spacing: 0.04em; color: var(--pm-muted); margin: 0; }
.pm-pager ol { display: flex; justify-content: center; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pm-body .pm-pager a, .pm-pager span.pm-pager__cell {
    min-width: 40px; height: 40px; padding: 0 6px; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--pm-ink); background: transparent; transition: background-color 0.2s ease;
}
.pm-body .pm-pager a:hover { background: var(--pm-hover); color: var(--pm-ink); }
.pm-pager [aria-current] { background: var(--pm-red) !important; color: var(--pm-white) !important; }
.pm-body .pm-pager .pm-pager__arrow { width: 40px; border: 1px solid var(--pm-line-strong); }
.pm-pager .is-disabled { opacity: 0.35; pointer-events: none; }
.pm-pager li.pm-pager__narrow { display: none; }

.pm-assist { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.pm-body .pm-assist a { background: var(--pm-band); padding: 24px; display: flex; align-items: center; gap: 20px; transition: background-color 0.2s ease; }
.pm-body .pm-assist a:hover { background: var(--pm-hover); }
.pm-assist__icon { width: 60px; height: 60px; border-radius: 9999px; background: var(--pm-red-tint); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pm-assist__icon .ms { color: var(--pm-red); font-size: 34px; }
.pm-assist h2 { font-size: 17px; color: var(--pm-ink); margin: 0 0 4px; font-weight: 500; }
.pm-assist p { font-size: 12px; line-height: 16px; color: var(--pm-muted); margin: 0; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1100px) {
    .pm-grid-4, .pm-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pm-band__grid, .pm-split, .pm-usa__grid, .pm-duo { grid-template-columns: 1fr; gap: 40px; }
    .pm-hero { min-height: 560px; padding: 88px 0; }
}
@media (max-width: 640px) {
    .pm-grid-4 { column-gap: 12px; row-gap: 28px; }
    .pm-styles, .pm-steps, .pm-posts, .pm-assist, .pm-values, .pm-usa__stats { grid-template-columns: 1fr; }
    .pm-style-card { aspect-ratio: 4 / 3; }
    .pm-body .pm-duo__card { padding: 32px; min-height: 0; }
    .pm-band, .pm-usa { padding: 56px 0; }
    .pm-hero { padding: 64px 0; min-height: 0; }
    .pm-hero__text { font-size: 16px; line-height: 26px; }
    .pm-hero__bg::after { background: linear-gradient(180deg, rgba(252, 249, 248, 0.94) 0%, rgba(252, 249, 248, 0.86) 100%); }
    .pm-card__name { font-size: 14px; }
    .pm-toolbar { align-items: flex-start; }
}

/* --- Phones: design mobile system (≤900px, `data-m` rules of the handoff) --- */
@media (max-width: 900px) {
    .pm-section { padding-top: 56px; }
    .pm-section-head { row-gap: 32px; margin-bottom: 40px; }
    .pm-h2 { font-size: 34px; line-height: 40px; }
    .pm-h2--sm { font-size: 34px; line-height: 40px; margin-bottom: 20px; }

    /* Hero: stacked copy over a vertical scrim. */
    .pm-hero { min-height: 0; padding: 72px 0 56px; }
    .pm-hero__bg::after { background: linear-gradient(180deg, rgba(252, 249, 248, 0.94) 0%, rgba(252, 249, 248, 0.86) 60%, rgba(252, 249, 248, 0.7) 100%); }
    .pm-hero h1 { font-size: 38px; line-height: 44px; margin-bottom: 20px; }
    .pm-hero__text { font-size: 16px; line-height: 26px; margin-bottom: 28px; }
    .pm-hero__facts { flex-direction: column; align-items: flex-start; gap: 12px; }
    .pm-hero__facts li { min-height: 26px; }

    /* Product grids (home best sellers, shop, search): one card per row. */
    .pm-grid-4 { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .pm-card__name { font-size: 15px; }

    .pm-styles, .pm-steps, .pm-posts, .pm-values, .pm-usa__stats { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .pm-styles { margin-top: 40px; }
    .pm-style-card { aspect-ratio: 4 / 3; }
    .pm-style-card__shade { padding: 24px 20px; }
    .pm-band__grid, .pm-split, .pm-usa__grid, .pm-duo { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .pm-band, .pm-usa { margin-top: 56px; padding: 56px 0; }
    .pm-band h2 { font-size: 34px; line-height: 40px; }
    .pm-body .pm-duo__card { padding: 32px 24px; min-height: 0; }
    .pm-duo__card--navy h2 { font-size: 38px; line-height: 46px; }
    .pm-duo__card--light h2 { font-size: 34px; line-height: 42px; }
    .pm-actions { gap: 14px; }
    .pm-home-end { padding-bottom: 72px; }

    /* Pager: one compact row (neighbour pages drop out, see shop_pager). */
    .pm-pager ol { flex-wrap: nowrap; gap: 6px; }
    .pm-pager li.pm-pager__wide { display: none; }
    .pm-pager li.pm-pager__narrow { display: block; }
    .pm-assist { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 40px; }

    /* Design text without a line-height of its own renders at `normal`, not the
       inherited 1.5: eyebrows, step labels, sale tags, card prices, arrow links. */
    .pm-hero__eyebrow, .pm-band .pm-eyebrow, .pm-split .pm-eyebrow, .pm-duo__card .pm-eyebrow, .pm-usa .pm-eyebrow,
    .pm-step__num, .pm-tag, .pm-card .pm-price, .pm-link-arrow { line-height: normal; }
    .pm-link-arrow .ms { line-height: 1.22; }
    .pm-style-card .pm-link-arrow .ms { font-size: 16px; }
    /* Plain block eyebrows in the design (no inline-flex line box around them). */
    .pm-band .pm-eyebrow, .pm-split .pm-eyebrow { display: block; }
    .pm-usa .pm-copy + .pm-copy { margin-bottom: 30px; }
    .pm-stat .ms { display: block; height: 33px; line-height: 33px; }
    .pm-duo__card--light p:not(.pm-eyebrow) { max-width: none; }
}

/* --- Search results field ------------------------------------------------ */
.pm-search-field { position: relative; max-width: 40rem; margin: 0; }
.pm-search-field .ms { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--pm-muted); pointer-events: none; }
.pm-search-field input {
    width: 100%; background: var(--pm-white); border: 1px solid var(--pm-line-strong); border-radius: 8px;
    padding: 15px 16px 15px 48px; font-size: 16px; color: var(--pm-ink); outline: none; transition: border-color 0.2s ease;
}
.pm-search-field input:focus { border-color: var(--pm-red); }
