/* ============================================================
   Monrovia Press — shared site styles
   Loaded by every page after pico.min.css
   ============================================================ */


/* ── Fonts ────────────────────────────────────────────────────
   IBM Plex Serif (SIL OFL, see assets/fonts/ibm-plex-serif/OFL.txt), Latin subset, self-hosted. */
@font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/assets/fonts/ibm-plex-serif/ibm-plex-serif-latin-400-normal.woff2) format("woff2");
}
@font-face {
    font-family: "IBM Plex Serif";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url(/assets/fonts/ibm-plex-serif/ibm-plex-serif-latin-400-italic.woff2) format("woff2");
}
@font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/assets/fonts/ibm-plex-serif/ibm-plex-serif-latin-500-normal.woff2) format("woff2");
}
@font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(/assets/fonts/ibm-plex-serif/ibm-plex-serif-latin-600-normal.woff2) format("woff2");
}
@font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/assets/fonts/ibm-plex-serif/ibm-plex-serif-latin-700-normal.woff2) format("woff2");
}


/* ── Theme variables ─────────────────────────────────────────
   All colors flow through these vars so the site follows the OS
   color scheme (Pico handles its own vars the same way). */
:root {
    --pico-font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
    --mp-text: #1a1a1a;
    --mp-muted: #6c757d;
    --mp-muted-strong: #495057;
    --mp-strong: #343a40;
    --mp-border: #dee2e6;
    --mp-border-strong: #ced4da;
    --mp-border-hover: #adb5bd;
    --mp-surface: #f8f9fa;
    --mp-rule: #f1f3f5;
    --mp-btn-dark-bg: #212529;
    --mp-btn-dark-bg-hover: #343a40;
    --mp-btn-dark-color: #fff;
    --mp-status-ok-bg: #d1e7dd;
    --mp-status-ok-color: #0f5132;
    --mp-status-err-bg: #f8d7da;
    --mp-status-err-color: #842029;
    --mp-tag-screw-bg: #cfe2ff;
    --mp-tag-screw-color: #084298;
}

@media (prefers-color-scheme: dark) {
    :root {
        --mp-text: #d5d8dc;
        --mp-muted: #9aa0a6;
        --mp-muted-strong: #b7bdc4;
        --mp-strong: #ced4da;
        --mp-border: #3a424b;
        --mp-border-strong: #495057;
        --mp-border-hover: #6c757d;
        --mp-surface: #22262b;
        --mp-rule: #2d3339;
        --mp-btn-dark-bg: #e9ecef;
        --mp-btn-dark-bg-hover: #f8f9fa;
        --mp-btn-dark-color: #212529;
        --mp-status-ok-bg: #0f3323;
        --mp-status-ok-color: #8ce0b5;
        --mp-status-err-bg: #3c1118;
        --mp-status-err-color: #f1aeb5;
        --mp-tag-screw-bg: #1e3a5f;
        --mp-tag-screw-color: #9ec5fe;
    }
}


/* ── Reset / Pico overrides ────────────────────────────────── */
html {
    font-size: 17px;
    scrollbar-gutter: stable;
}

/* Pico sets --pico-font-family-sans-serif; keep its defaults but
   clamp the content width to xl (1320px) via the .site-wrap helper. */
body {
    color: var(--mp-text);
}

/* Remove Pico's default <a> color decoration on nav/cards */
a {
    text-decoration: none;
}

/* ── Layout helpers ─────────────────────────────────────────── */
.site-wrap {
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* Simple two-column grid used on product detail pages */
.row-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 992px) {
    .row-2col {
        grid-template-columns: 7fr 5fr;
    }
}

/* Simple two-column grid used on hardware/tools section */
.row-2col-md {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .row-2col-md {
        grid-template-columns: 7fr 5fr;
    }
}

/* Product grid: 1 col → 2 col → 3 col */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Guide list stack */
.guide-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 600px;
}


/* ── Site header ────────────────────────────────────────────── */
.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.875rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color, var(--mp-border));
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    font-size: 2rem;
    white-space: nowrap;
}
.site-logo img {
    height: 36px;
    width: auto;
}

/* Nav items are .btn links (see header.njk): btn-dark = current page, btn-outline = others */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav li {
    list-style: none;
    margin: 0;
}
.site-nav .btn {
    padding: 0.3rem 0.8rem;
}
@media (max-width: 420px) {
    .site-nav {
        gap: 0.25rem;
    }
    .site-nav .btn {
        padding-inline: 0.55rem;
    }
}

/* Hamburger: on small screens (with JS) the nav collapses behind .nav-toggle; nav.js toggles .nav-open */
.site-header .nav-toggle {
    display: none;
    margin: 0;
    padding: 0.3rem 0.5rem;
}
.nav-toggle .nav-x,
.nav-toggle[aria-expanded="true"] .nav-bars {
    display: none;
}
.nav-toggle[aria-expanded="true"] .nav-x {
    display: inline;
}
@media (max-width: 700px) {
    .js .site-header .nav-toggle {
        display: inline-flex;
    }
    .js .site-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        margin-top: 0.75rem;
    }
    .js .site-header.nav-open .site-nav {
        display: flex;
    }
    .js .site-nav .btn {
        width: 100%;
    }
}


/* ── Site footer ────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--pico-muted-border-color, var(--mp-border));
    padding-block: 1.25rem;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--pico-muted-color, var(--mp-muted));
}
.site-footer p {
    color: inherit;
    margin-bottom: 0.5rem;
}
.site-footer a {
    color: inherit;
}
.site-footer a:hover {
    text-decoration: underline;
}


/* ── Shared: eyebrow label ─────────────────────────────────── */
.eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--mp-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}


/* ── Shared: page-title block ───────────────────────────────── */
.page-title-block {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color, var(--mp-border));
}
.page-title-block h1 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}
.page-title-block .lead {
    color: var(--mp-muted);
    font-size: 1rem;
    margin: 0;
}


/* ── Shared: btn ────────────────────────────────────────────── */
/* Pico provides <button> styles. We add .btn for <a> tags. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
}
.btn-dark {
    background: var(--mp-btn-dark-bg);
    color: var(--mp-btn-dark-color);
    border-color: var(--mp-btn-dark-bg);
}
.btn-dark:hover {
    background: var(--mp-btn-dark-bg-hover);
    border-color: var(--mp-btn-dark-bg-hover);
    color: var(--mp-btn-dark-color);
}
.btn-outline {
    background: transparent;
    color: var(--mp-muted);
    border-color: var(--mp-border-strong);
}
.btn-outline:hover {
    background: var(--mp-surface);
    color: var(--mp-muted-strong);
}


/* ── Shared: badge ──────────────────────────────────────────── */
.badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--mp-border);
    background: var(--mp-surface);
    color: var(--mp-muted-strong);
}


/* ── Shared: breadcrumb ─────────────────────────────────────── */
.breadcrumb {
    /* Pico's `nav li` padding (and the matching negative margin on the list) read these */
    --pico-nav-element-spacing-vertical: 0px;
    --pico-nav-element-spacing-horizontal: 0px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    font-size: 0.85rem;
    color: var(--mp-muted);
}
.breadcrumb li + li::before {
    content: "/";
    margin-right: 0.25rem;
    color: var(--mp-border-strong);
}
.breadcrumb a {
    color: var(--mp-muted);
}
.breadcrumb a:hover {
    color: var(--mp-muted-strong);
}


/* ── index.html ─────────────────────────────────────────────── */
/* Path is relative to this CSS file at assets/dist/css/ */
.press-header {
    background-image: url(../../images/proof-press.jpg);
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.press-header-inner {
    padding: 4rem 2rem;
    text-align: center;
    color: #fff;
}
.press-header-inner h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #fff;
}
.press-header-inner p {
    font-size: 1.1rem;
    margin: 0;
    color: rgba(255,255,255,0.9);
}

.home-body {
    padding: 1rem 0 3rem;
}
.home-body p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--mp-text);
    margin-bottom: 1.5rem;
}
.about-photo {
    float: right;
    width: 260px;
    height: auto;
    margin: 0.35rem 0 1rem 2rem;
    border-radius: 8px;
}
@media (max-width: 600px) {
    .about-photo {
        float: none;
        display: block;
        width: min(100%, 320px);
        margin: 0 auto 1.5rem;
    }
}


/* ── contact.html form ────────────────────────────────────── */
.contact-form {
    max-width: 480px;
}
.hp {
    position: absolute;
    left: -9999px;
}
.form-status {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
.form-status:target {
    display: block;
}
.form-status-ok {
    background: var(--mp-status-ok-bg);
    color: var(--mp-status-ok-color);
}
.form-status-err {
    background: var(--mp-status-err-bg);
    color: var(--mp-status-err-color);
}


/* ── policies.html ─────────────────────────────────────────── */
.policy-body {
    max-width: 46rem;
}


/* ── products.html ──────────────────────────────────────────── */
.product-card {
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover {
    border-color: var(--mp-border-hover);
}

.product-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--mp-surface);
    border-bottom: 1px solid var(--mp-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}
.product-img-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-category {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mp-muted);
    margin-bottom: 4px;
}
.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}
.product-title a {
    color: inherit;
}
.product-desc {
    font-size: 0.875rem;
    color: var(--mp-muted-strong);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--mp-border);
}
.product-price {
    font-size: 1.1rem;
    font-weight: 600;
}
.product-shipping {
    font-size: 0.75rem;
    color: var(--mp-muted);
    margin-top: 2px;
}


/* ── support.html ───────────────────────────────────────────── */
.guide-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}
.guide-card:hover {
    border-color: var(--mp-border-hover);
    background: var(--mp-surface);
    color: inherit;
}
.guide-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.guide-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 2px;
}
.guide-meta {
    font-size: 0.8rem;
    color: var(--mp-muted);
    margin: 0;
}
.guide-arrow {
    margin-left: auto;
    color: var(--mp-border-hover);
    flex-shrink: 0;
}


/* ── support/wrx-install.html ───────────────────────────────── */
.hw-img-slot {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 6px;
    border: 1px dashed var(--mp-border-strong);
    background: var(--mp-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    overflow: hidden;
}
.hw-img-slot img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}

.hw-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mp-border);
}
.hw-item:last-child { border-bottom: none; }
.hw-name { font-size: 0.9rem; margin: 0 0 3px; }

.step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mp-muted);
    margin-top: 2px;
}
.step-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mp-muted);
    margin: 0 0 4px;
}
.step-text {
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
}
.step-img-slot {
    margin: 12px 0 0 42px;
    width: calc(100% - 42px);
    min-height: 200px;
    border-radius: 8px;
    border: 1px dashed var(--mp-border-strong);
    background: var(--mp-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}
.step-img-slot img {
    max-width: 800px;
    width: 100%;
    height: auto;
    display: block;
}
.step-divider {
    height: 1px;
    background: var(--mp-border);
    margin: 1rem 0 1rem 42px;
}
.step-row {
    display: flex;
    gap: 0.75rem;
}
.step-body {
    flex: 1;
}

.tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 9px;
    border-radius: 20px;
    margin-top: 6px;
}
.tag-screw { background: var(--mp-tag-screw-bg); color: var(--mp-tag-screw-color); }

/* Box with border+padding used in hw section */
.inset-box {
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    padding: 1rem;
}


/* ── products/ detail pages ─────────────────────────────────── */
.pd-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.pd-main-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    border: 1px solid var(--mp-border);
    overflow: hidden;
    background: var(--mp-surface);
}
.pd-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pd-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--mp-border);
    background: var(--mp-surface);
    color: var(--mp-text);
    opacity: 0.85;
    cursor: pointer;
    transition: opacity 0.15s;
}
.pd-arrow:hover,
.pd-arrow:focus-visible {
    opacity: 1;
}
.pd-prev { left: 0.6rem; }
.pd-next { right: 0.6rem; }
.pd-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pd-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    border: 2px solid var(--mp-border);
    overflow: hidden;
    cursor: pointer;
    background: var(--mp-surface);
    padding: 0;
    transition: border-color 0.15s;
}
.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pd-thumb:hover,
.pd-thumb.active {
    border-color: var(--mp-strong);
}

.pd-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pd-price {
    font-size: 1.7rem;
    font-weight: 600;
    line-height: 1.1;
}
.pd-shipping-note {
    font-size: 0.8rem;
    color: var(--mp-muted);
    margin-top: 3px;
}

.pd-section {
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--mp-border);
}
.pd-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mp-muted);
    margin-bottom: 1rem;
}
.pd-desc {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--mp-muted-strong);
}

.pd-specs {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: collapse;
}
.pd-specs th {
    font-weight: 500;
    color: var(--mp-muted);
    padding: 0.55rem 1.5rem 0.55rem 0;
    width: 38%;
    vertical-align: top;
    border-bottom: 1px solid var(--mp-rule);
}
.pd-specs td {
    padding: 0.55rem 0;
    color: var(--mp-text);
    border-bottom: 1px solid var(--mp-rule);
}
.pd-specs tr:last-child th,
.pd-specs tr:last-child td {
    border-bottom: none;
}

/* PayPal JS SDK hosted button: the NCP dashboard attaches a full product card
   (hero image, title, description) that duplicates what our product page already
   shows. Hide those so only the variant/quantity selectors and checkout buttons
   remain — clean and consistent across products. */
[id^="paypal-container-"] [id^="hero-container-"],
[id^="paypal-container-"] [id^="hero-img-"],
[id^="paypal-container-"] .item-header,
[id^="paypal-container-"] .item-description {
    display: none !important;
}


/* ── Print styles (wrx-install.html) ───────────────────────── */
@media print {
    .site-header,
    .site-footer,
    .no-print {
        display: none !important;
    }

    main {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-wrap {
        max-width: none !important;
        padding: 0 !important;
    }

    .row-2col-md {
        display: block !important;
    }

    h1 { font-size: 24pt !important; margin-top: 0 !important; }
    .lead { font-size: 14pt !important; }
    .eyebrow { font-size: 10pt !important; color: #333 !important; }

    .hw-item {
        page-break-inside: avoid;
        border-bottom: 1px solid #eee !important;
    }
    .hw-img-slot {
        border: 1px solid #ddd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .step {
        page-break-inside: avoid;
        margin-bottom: 2rem !important;
    }
    .step-img-slot {
        min-height: auto !important;
        border: 1px solid #ddd !important;
        margin-left: 0 !important;
        width: 100% !important;
    }
    .step-img-slot img {
        max-height: 4in;
        object-fit: contain;
    }
    .step-num {
        background: #eee !important;
        border: 1px solid #ccc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .step-divider {
        display: none !important;
    }

    .tag-screw { background: #cfe2ff !important; color: #084298 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    .inset-box { border-color: #eee !important; }
}
