/* raceandrally.nz — base site stylesheet
   Plain CSS, no framework/build step (matches TG's no-Composer/no-framework approach).
   Placeholder visual styling — easy to reskin once real branding/content comes in Phase 5. */

:root {
    --rr-black: #14161a;
    --rr-red: #c8102e;
    --rr-red-dark: #9c0c23;
    --rr-white: #ffffff;
    --rr-grey-light: #f4f4f5;
    --rr-grey-mid: #d8d9dc;
    --rr-grey-text: #55585e;
    --rr-radius: 4px;
    --rr-max-width: 1200px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--rr-black);
    background: var(--rr-white);
    line-height: 1.5;
}

a { color: var(--rr-red); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.rr-container {
    max-width: var(--rr-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---------- Header / top nav ---------- */

.rr-header {
    background: var(--rr-black);
    color: var(--rr-white);
}

.rr-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    max-width: var(--rr-max-width);
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rr-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rr-white);
    letter-spacing: 0.02em;
}
.rr-logo span { color: var(--rr-red); }
.rr-logo:hover { text-decoration: none; opacity: 0.9; }

.rr-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    align-items: center;
}

.rr-nav a {
    color: var(--rr-white);
    font-size: 0.95rem;
}
.rr-nav a:hover { color: var(--rr-red); text-decoration: none; }

.rr-nav__cart {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--rr-red);
    color: var(--rr-white) !important;
    padding: 0.35rem 0.75rem;
    border-radius: var(--rr-radius);
}
.rr-nav__cart:hover { background: var(--rr-red-dark); }

/* ---------- Flash / notice messages ---------- */

.rr-notice {
    max-width: var(--rr-max-width);
    margin: 1rem auto 0;
    padding: 0 1rem;
}
.rr-notice__box {
    padding: 0.75rem 1rem;
    border-radius: var(--rr-radius);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.rr-notice__box--success { background: #e6f6ec; border: 1px solid #3fa860; color: #235c37; }
.rr-notice__box--error { background: #fdeceb; border: 1px solid var(--rr-red); color: var(--rr-red-dark); }
.rr-notice__box--info { background: var(--rr-grey-light); border: 1px solid var(--rr-grey-mid); color: var(--rr-grey-text); }

/* ---------- Page layout ---------- */

.rr-page {
    max-width: var(--rr-max-width);
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.rr-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 2rem;
    align-items: start;
}


/* ---------- Shop sidebar ---------- */

.rr-sidebar h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rr-grey-text);
    margin: 0 0 0.5rem;
}
.rr-sidebar ul { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.rr-sidebar a {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 5px;
    color: var(--rr-black);
    font-size: 0.95rem;
}
.rr-sidebar a:hover { background: var(--rr-grey-light); color: var(--rr-black); text-decoration: none; }
.rr-sidebar a.rr-active, .rr-sidebar a.rr-active:hover { background: var(--rr-black); color: #fff; font-weight: 600; }
.rr-sidebar__mobile { display: none; border: 1px solid var(--rr-grey-mid); border-radius: 6px; }
.rr-sidebar__mobile summary {
    display: flex; justify-content: space-between; align-items: center; list-style: none;
    background: var(--rr-grey-light); border-radius: 6px; padding: .8rem 1rem; font-weight: 700; cursor: pointer;
}
.rr-sidebar__mobile summary::-webkit-details-marker { display: none; }
.rr-sidebar__chev { font-size: 1.3rem; line-height: 1; transition: transform .15s; }
.rr-sidebar__mobile[open] .rr-sidebar__chev { transform: rotate(180deg); }
.rr-sidebar__in { padding: .8rem .6rem 0; }
@media (max-width: 900px) {
    .rr-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .rr-layout > * { min-width: 0; }
    .rr-sidebar__full { display: none; }
    .rr-sidebar__mobile { display: block; }
}

/* ---------- Listing bar / pagination ---------- */

.sd-title { margin: 0 0 .8rem; font-size: 2rem; }
.sd-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sd-bar__cnt { color: var(--rr-grey-text); }
.sd-bar select, .sd-per select { padding: .55rem .7rem; border: 1px solid var(--rr-grey-mid); border-radius: 5px; font: inherit; background: #fff; }
.sd-pgr { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.8rem; }
.sd-pg { display: flex; gap: .4rem; flex-wrap: wrap; }
.sd-pg a { border: 1px solid var(--rr-grey-mid); border-radius: 5px; padding: .5rem .85rem; color: var(--rr-black); }
.sd-pg a.on { background: var(--rr-black); color: #fff; border-color: var(--rr-black); }
.sd-per { color: var(--rr-grey-text); }
.sd-per select { margin: 0 .3rem; }
@media (max-width: 900px) { .sd-title { font-size: 1.6rem; } }
@media (max-width: 600px) {
    .rr-product-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
    .rr-card { padding: .6rem; }
}

/* ---------- Product grid / cards ---------- */

.rr-hero {
    background: var(--rr-grey-light);
    border-radius: var(--rr-radius);
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
}
.rr-hero h1 { margin: 0 0 0.4rem; font-size: 1.6rem; }
.rr-hero p { margin: 0; color: var(--rr-grey-text); }

.rr-section-title {
    font-size: 1.2rem;
    margin: 0 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--rr-black);
    display: inline-block;
}

.rr-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 0 0 2rem;
}

.rr-card {
    border: 1px solid var(--rr-grey-mid);
    border-radius: var(--rr-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: var(--rr-white);
}

.rr-card__image {
    background: var(--rr-grey-light);
    border-radius: var(--rr-radius);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rr-grey-text);
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}
/* Photos always fit fully inside the box (never overflow onto the text); white photo backgrounds blend into the grey box */
.rr-card__image img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

.rr-card__name { font-weight: 600; font-size: 0.95rem; color: var(--rr-black); }
.rr-card__name:hover { color: var(--rr-red); }

.rr-price {
    font-weight: 700;
    font-size: 1rem;
}
.rr-price--special { color: var(--rr-red); }
.rr-price__was {
    text-decoration: line-through;
    color: var(--rr-grey-text);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 0.4rem;
}

.rr-badge {
    display: inline-block;
    background: var(--rr-red);
    color: var(--rr-white);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: var(--rr-radius);
    align-self: flex-start;
}

/* ---------- Buttons / forms ---------- */

.rr-btn {
    display: inline-block;
    background: var(--rr-red);
    color: var(--rr-white);
    border: none;
    padding: 0.6rem 1.1rem;
    border-radius: var(--rr-radius);
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
}
.rr-btn:hover { background: var(--rr-red-dark); color: var(--rr-white); text-decoration: none; }
.rr-btn--secondary { background: var(--rr-black); }
.rr-btn--secondary:hover { background: #000; }
.rr-btn--outline { background: transparent; color: var(--rr-black); border: 1px solid var(--rr-grey-mid); }
.rr-btn--outline:hover { color: var(--rr-red); border-color: var(--rr-red); background: transparent; }
.rr-btn:disabled { background: var(--rr-grey-mid); cursor: not-allowed; }

.rr-form-group { margin-bottom: 1rem; }
.rr-form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; }
.rr-form-group input,
.rr-form-group select,
.rr-form-group textarea {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--rr-grey-mid);
    border-radius: var(--rr-radius);
    font-size: 0.95rem;
    font-family: inherit;
}
.rr-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .rr-form-row { grid-template-columns: 1fr; } }

table.rr-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
table.rr-table th, table.rr-table td {
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--rr-grey-mid);
    font-size: 0.95rem;
}
table.rr-table th { font-size: 0.8rem; text-transform: uppercase; color: var(--rr-grey-text); }

/* ---------- Footer ---------- */

.rr-footer {
    background: var(--rr-black);
    color: var(--rr-grey-mid);
    margin-top: 3rem;
}
.rr-footer__inner {
    max-width: var(--rr-max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    font-size: 0.9rem;
}
.rr-footer a { color: var(--rr-grey-mid); }
.rr-footer a:hover { color: var(--rr-white); }
.rr-footer__col h4 { color: var(--rr-white); font-size: 0.85rem; text-transform: uppercase; margin: 0 0 0.6rem; }
.rr-footer__bottom {
    text-align: center;
    font-size: 0.8rem;
    padding: 1rem;
    border-top: 1px solid #2a2d33;
    color: #8a8d93;
}

/* ---------- Dialogs (signup nudge, address-confirm) ---------- */

dialog.rr-dialog {
    border: none;
    border-radius: var(--rr-radius);
    padding: 1.5rem;
    width: min(480px, 92vw);
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
dialog.rr-dialog::backdrop { background: rgba(0,0,0,0.4); }
.rr-row-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Category landing page blurb (Phase 4b, 16 Sept 2026) — the admin-side
   description/image fields (Phase 2 third amendment) finally rendered on
   the public category.php page itself. */
.rr-category-blurb { margin: 0 0 1.25rem; color: var(--rr-grey-text); max-width: 70ch; }

/* About Us — affiliation logos: centred grid of equal cells, stacks on mobile */
.rr-affiliations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 1.5rem auto 0;
}
.rr-affiliations__item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid var(--rr-grey-mid);
    border-radius: 6px;
}
.rr-affiliations__item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.rr-affiliations__item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Full-width photo banner (Services) */
.rr-banner {
    width: 100%;
    height: 320px;
    overflow: hidden;
}
.rr-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    max-width: none;
}
@media (max-width: 600px) {
    .rr-banner { height: 200px; }
}

/* Vehicle Hire listings */
.rr-hire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}
.rr-hire-item { margin: 0; }
.rr-hire-item img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--rr-radius);
    display: block;
}
.rr-hire-item figcaption {
    margin-top: 0.75rem;
    font-weight: 600;
}

/* Contact page: form beside details, stacks on mobile */
.rr-contact {
    display: grid;
    grid-template-columns: minmax(0, 480px) minmax(220px, 1fr);
    gap: 2.5rem;
    align-items: start;
    margin-top: 1.5rem;
}
.rr-contact__details p { margin: 0; line-height: 1.8; }
@media (max-width: 780px) {
    .rr-contact { grid-template-columns: 1fr; gap: 1.5rem; }
}
.rr-photo-credit {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--rr-grey-text);
}

/* Contact banner: keep the car in frame when cropped */
.rr-banner--contact img { object-position: center 92%; }

/* About banner crop */
.rr-banner--about img { object-position: center 50%; }

/* ---------- Membership page ---------- */
.rr-lead { font-size: 1.15rem; font-weight: 600; }
.rr-steps { max-width: 640px; padding-left: 1.25rem; line-height: 1.7; }
.rr-hint { font-weight: 400; color: var(--rr-grey-text); font-size: 0.85rem; }

.rr-membership-cta {
    background: var(--rr-grey-light);
    border-radius: var(--rr-radius);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2.5rem;
    max-width: 640px;
}
.rr-membership-cta p { margin: 0 0 0.9rem; }
.rr-membership-cta p:last-child { margin-bottom: 0; }
.rr-membership-upload { max-width: 480px; margin-top: 1rem; }

/* Members' cars carousel: centred car, neighbours scroll either side */
.rr-carousel { position: relative; margin: 1rem 0 0; }
.rr-carousel__track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.5rem calc(50% - 160px);
    scrollbar-width: none;
}
.rr-carousel__track::-webkit-scrollbar { display: none; }
.rr-carousel__item {
    flex: 0 0 320px;
    margin: 0;
    scroll-snap-align: center;
    opacity: 0.45;
    transform: scale(0.88);
    transition: opacity 0.25s, transform 0.25s;
    cursor: pointer;
}
.rr-carousel__item.is-active { opacity: 1; transform: scale(1); }
.rr-carousel__item img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--rr-radius);
    display: block;
}
.rr-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.rr-carousel__nav--prev { left: 0.5rem; }
.rr-carousel__nav--next { right: 0.5rem; }
.rr-carousel__caption { text-align: center; max-width: 640px; margin: 0.75rem auto 2.5rem; min-height: 4.5rem; }
.rr-carousel__caption-title { display: block; font-size: 1.05rem; }
.rr-carousel__caption-blurb { margin: 0.35rem 0 0; color: var(--rr-grey-text); }
@media (max-width: 600px) {
    .rr-carousel__track { padding: 0.5rem calc(50% - 130px); }
    .rr-carousel__item { flex-basis: 260px; }
}

/* Sponsorships: one per row, alternating photo left / right */
.rr-sponsors { display: flex; flex-direction: column; gap: 2rem; margin-top: 1rem; }
.rr-sponsor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}
.rr-sponsor:nth-child(even) .rr-sponsor__image { order: 2; }
.rr-sponsor__image img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--rr-radius);
    display: block;
}
.rr-sponsor__image:empty { display: none; }
.rr-sponsor__text h3 { margin: 0.5rem 0 0.6rem; font-size: 1.35rem; }
.rr-sponsor__text p { margin: 0; line-height: 1.7; }
@media (max-width: 700px) {
    .rr-sponsor { grid-template-columns: 1fr; gap: 1rem; }
    .rr-sponsor:nth-child(even) .rr-sponsor__image { order: 0; }
}

/* Members' Cars caption: driver / race # / category line */
.rr-carousel__caption-meta { display: block; color: var(--rr-grey-text, #666); font-size: 0.9rem; margin-top: 0.15rem; }

/* Show/hide password toggle (assets/js/password-toggle.js) */
.rr-pw-wrap { position: relative; display: block; }
.rr-pw-wrap input { padding-right: 4.2rem; }
.rr-pw-toggle { position: absolute; top: 50%; right: 0.5rem; transform: translateY(-50%); background: none; border: 0; padding: 0.25rem 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--rr-red, #c8102e); cursor: pointer; }

/* Sponsorship blurbs: larger reading size */
.rr-sponsor__text p { font-size: 1.1rem; line-height: 1.6; }
.rr-banner--membership img { object-position: center 55%; }

/* My Account membership panel: car photo top right on desktop */
.rr-account-membership { max-width: 900px; }
.rr-account-membership__photo { display: block; width: 100%; max-width: 360px; border-radius: 6px; margin-bottom: 0.9rem; }
@media (min-width: 700px) {
    .rr-account-membership__photo { float: right; width: 320px; margin: 0 0 0.75rem 1.5rem; }
}

/* My Account: address book */
.rr-address-list { display: grid; gap: 0.75rem; }
.rr-address-card { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem 1rem; border: 1px solid #ddd; border-radius: 6px; padding: 0.9rem 1rem; }
.rr-address-card__actions { display: flex; flex-direction: column; gap: 0.4rem; }
@media (max-width: 600px) { .rr-address-card { grid-template-columns: 1fr; } .rr-address-card__actions { flex-direction: row; flex-wrap: wrap; } }

/* My Account: orders */
.rr-orders { margin-bottom: 1.5rem; }
.rr-order { border: 1px solid var(--rr-border, #ddd); border-radius: 6px; margin-bottom: .6rem; background: #fff; }
.rr-order__summary { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .8rem 1rem; cursor: pointer; align-items: center; }
@media (min-width: 700px) { .rr-order__summary { grid-template-columns: 8rem 8rem 1fr auto; } }
.rr-order__id { font-weight: 700; }
.rr-order__date { color: var(--rr-grey-text, #666); }
.rr-order__status { font-size: .85rem; font-weight: 600; }
.rr-order__status--shipped, .rr-order__status--completed { color: #1a7f37; }
.rr-order__status--cancelled, .rr-order__status--failed, .rr-order__status--refunded { color: #b3261e; }
.rr-order__total { text-align: right; font-weight: 600; }
.rr-order__body { padding: 0 1rem 1rem; }
.rr-order__totals, .rr-order__address, .rr-order__tracking { margin: .4rem 0; }
.rr-order__actions { margin-top: .8rem; }

/* Checkbox + text on one line, box to the left */
label.rr-check { display: flex; align-items: center; gap: .5rem; font-weight: normal; }
label.rr-check input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 0; }


/* ==========================================================================
   Site header / login pop-up / footer (30 Sept 2026 redesign)
   ========================================================================== */
.hd { background: #14151a; color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.hd a { color: #fff; }
.hd a:hover { text-decoration: none; }
.hd__wrap { max-width: var(--rr-max-width); margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; padding: .9rem 1rem; }
.hd__logo { font-size: 1.9rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.hd__logo span { color: var(--rr-red); }
.hd__nav { display: flex; gap: 1.4rem; flex: 1; justify-content: center; }
.hd__nav a { opacity: .92; padding: .3rem 0; }
.hd__nav a:hover { opacity: 1; text-decoration: underline; text-decoration-color: var(--rr-red); text-underline-offset: 6px; }
.hd__icons { display: flex; gap: .3rem; align-items: center; }
.hd__ib { position: relative; background: none; border: 0; color: #fff; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; padding: 0; }
.hd__ib:hover { background: rgba(255,255,255,.1); }
.hd svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hd__ib em { position: absolute; top: 3px; right: 1px; background: var(--rr-red); color: #fff; font-style: normal; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.hd__menu { display: none; background: none; border: 0; color: #fff; font: inherit; font-weight: 600; align-items: center; gap: .5rem; height: 44px; padding: 0; cursor: pointer; }
.hd__menu svg { width: 28px; height: 28px; }
.hd__search { display: none; background: #0d0e12; border-top: 1px solid #2a2c33; }
.hd__search.open { display: block; }
.hd__search form { max-width: var(--rr-max-width); margin: 0 auto; display: flex; gap: .6rem; padding: .8rem 1rem; }
.hd__search input { flex: 1; padding: .7rem .9rem; border: 0; border-radius: 4px; font: inherit; }
.hd__search button { background: var(--rr-red); color: #fff; border: 0; border-radius: 4px; padding: 0 1.2rem; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 860px) {
    .hd { top: calc(-1 * (11.2vw + 1.5rem)); }
    .hd__wrap { flex-wrap: wrap; gap: 0; padding: .8rem 1rem .4rem; }
    .hd__logo { width: 100%; font-size: 11.2vw; text-align: center; padding: .2rem 0 .5rem; }
    .hd__menu { display: flex; order: 2; }
    .hd__icons { order: 3; margin-left: auto; }
    .hd__nav { order: 4; display: none; flex: 0 0 100%; width: 100%; flex-direction: column; gap: 0; margin-top: .4rem; border-top: 1px solid #2a2c33; max-height: calc(100vh - 80px); overflow-y: auto; }
    .hd__nav.open { display: flex; }
    .hd__nav a { padding: 1rem .2rem; border-bottom: 1px solid #2a2c33; font-size: 1.1rem; opacity: 1; }
}

.lg { border: 0; border-radius: 8px; padding: 1.6rem 1.6rem 1.2rem; width: min(400px, 92vw); color: #14151a; position: fixed; top: 12vh; margin: 0 auto; }
.lg::backdrop { background: rgba(0,0,0,.6); }
.lg h2 { margin: 0 0 1rem; }
.lg label { display: block; font-weight: 600; margin-bottom: .8rem; font-size: .95rem; }
.lg input { display: block; width: 100%; margin-top: .3rem; padding: .7rem; border: 1px solid #bbb; border-radius: 4px; font: inherit; }
.lg__btn { width: 100%; background: var(--rr-red); color: #fff; border: 0; border-radius: 4px; padding: .8rem; font: inherit; font-weight: 700; cursor: pointer; }
.lg__btn:hover { background: var(--rr-red-dark); }
.lg__line { text-align: center; margin: .9rem 0 0; font-size: .95rem; }
.lg__x { position: absolute; top: .4rem; right: .6rem; margin: 0; }
.lg__x button { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: #555; }

.ft { background: var(--rr-black); color: #999; padding: 2.2rem 0; }
.ft__wrap { max-width: var(--rr-max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; padding: 0 1rem; }
.ft__links { display: flex; gap: .6rem 1.8rem; flex-wrap: wrap; }
.ft a { color: #ddd; }
.ft a:hover { color: #fff; text-decoration: underline; }
.ft__right { display: flex; align-items: center; gap: 1rem; }
.ft__so { display: flex; color: #ddd; }
.ft__so svg { width: 24px; height: 24px; fill: currentColor; }
.ft__so svg.ig { fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 700px) {
    .ft__wrap { flex-direction: column; align-items: flex-start; }
    .ft__links { flex-direction: column; gap: .9rem; }
}

/* ==========================================================================
   Home page (30 Sept 2026)
   ========================================================================== */
.hm-hero { position: relative; height: 510px; overflow: hidden; background: #14161a; color: #fff; }
.hm-hero .bg { position: absolute; inset: 0; background-size: auto 100%; background-repeat: no-repeat; background-position: right center; opacity: 0; transition: opacity 1.4s ease; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 35%); mask-image: linear-gradient(90deg, transparent 0, #000 35%); }
.hm-hero .bg.on { opacity: 1; }
.hm-hero .bg.rally { background-image: url(/assets/img/hero-rally-flip.jpg); }
.hm-hero .bg.race { background-image: url(/assets/img/hero-track-1.jpg); }
.hm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,22,26,.88) 0%, rgba(20,22,26,.55) 45%, rgba(20,22,26,.1) 80%); }
.hm-hero__in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: var(--rr-max-width); margin: 0 auto; padding: 0 1rem; }
.hm-hero h1 { margin: 0; text-transform: uppercase; font-weight: 900; line-height: .9; font-size: clamp(3rem, 9.2vw, 7.4rem); letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0,0,0,.45); position: relative; }
.hm-hero h1 .w { display: block; transition: opacity 1s ease, transform 1s ease; }
.hm-hero h1 .w.off { opacity: 0; transform: translateY(10px); position: absolute; left: 0; top: 0; pointer-events: none; }
.hm-hero h1 b { color: var(--rr-red); display: block; }
.hm-hero h1 .l1 span { display: inline; }
.hm-hero .hm-btn { align-self: flex-start; margin-top: 1.1rem; }
@media (min-width: 701px) {
    /* heading stays put; button sits centred in the space below it (equal gap above and below) */
    .hm-hero__in { justify-content: flex-start; }
    .hm-hero h1 { margin-top: 115px; }
    .hm-hero .hm-btn { margin-top: auto; margin-bottom: auto; }
}
@media (max-width: 700px) {
    .hm-hero { height: 450px; }
    .hm-hero h1 { font-size: 17vw; line-height: .88; }
    .hm-hero h1 .l1 span { display: block; }
    .hm-hero .bg { background-size: auto 62%; background-position: right top; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 62%); mask-image: linear-gradient(180deg, #000 30%, transparent 62%); }
    .hm-hero::after { background: linear-gradient(180deg, rgba(20,22,26,0) 25%, rgba(20,22,26,.85) 70%); }
    .hm-hero__in { justify-content: flex-end; padding-bottom: 1.3rem; }
    .hm-hero .hm-btn { margin-top: .8rem; padding: .65rem 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .hm-hero h1 .w.off { transform: none; } }

.hm-btn { display: inline-block; background: var(--rr-red); color: #fff; padding: .8rem 1.5rem; border-radius: 4px; font-weight: 700; }
.hm-btn:hover { background: var(--rr-red-dark); color: #fff; text-decoration: none; }
.hm-btn--dark { background: var(--rr-black); }
.hm-btn--dark:hover { background: #000; }
.hm-sec { padding: 1.75rem 0; }
.hm-wrap { max-width: var(--rr-max-width); margin: 0 auto; padding: 0 1rem; }
.hm-sh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.hm-sh h2 { margin: 0; font-size: 1.7rem; }
.hm-sh a { font-weight: 700; }
.hm-cw { position: relative; }
.hm-track { -webkit-overflow-scrolling: touch; display: flex; gap: 1rem; overflow-x: auto; padding: .2rem .1rem; scrollbar-width: none; }
.hm-track::-webkit-scrollbar { display: none; }
.hm-track > .rr-card, .hm-track > .hm-car { flex: 0 0 calc((100% - 3rem) / 4); }
.hm-car { border: 1px solid var(--rr-grey-mid); border-radius: 6px; overflow: hidden; background: #fff; color: var(--rr-black); }
.hm-car:hover { text-decoration: none; }
.hm-car__photo { aspect-ratio: 4/3; background-size: cover; background-position: center; }
.hm-car__b { padding: .8rem; }
.hm-car__n { font-weight: 600; }
.hm-car__m { color: var(--rr-grey-text); font-size: .9rem; }
.hm-ar { position: absolute; top: 38%; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #14161a; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; opacity: .9; }
.hm-ar.l { left: -14px; } .hm-ar.r { right: -14px; }
.hm-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.hm-tile { display: flex; align-items: center; justify-content: center; min-height: 150px; border-radius: 8px; background-size: cover; background-position: center; position: relative; color: #fff; overflow: hidden; }
.hm-tile::before { content: ""; position: absolute; inset: 0; background: rgba(20,22,26,.55); transition: background .2s; }
.hm-tile:hover::before { background: rgba(200,16,46,.6); }
.hm-tile:hover { text-decoration: none; color: #fff; }
.hm-tile span { position: relative; font-size: 1.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.hm-cats { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 4.75rem; gap: .7rem; }
.hm-cat { display: flex; align-items: center; justify-content: center; border: 1px solid var(--rr-black); border-radius: 6px; padding: .4rem .6rem; text-align: center; font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--rr-black); color: #fff; transition: .15s; }
.hm-cat:hover { background: var(--rr-red); color: #fff; border-color: var(--rr-red); text-decoration: none; }
.hm-band { background: var(--rr-red); color: #fff; }
.hm-band__in { max-width: var(--rr-max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 2.2rem 1rem; }
.hm-band h2 { margin: 0 0 .4rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hm-band p { margin: 0; font-size: 1.1rem; max-width: 40rem; }
.hm-cars { background: var(--rr-grey-light); }
/* Narrower screens: names may wrap to 3 lines, so all buttons share the tallest row's height instead of a fixed one */
@media (max-width: 1100px) {
    .hm-cats { grid-auto-rows: 1fr; }
    .hm-cat { padding: 1rem .6rem; }
}
@media (max-width: 900px) {
    .hm-track > .rr-card, .hm-track > .hm-car { flex-basis: calc((100% - 1rem) / 2.2); }
    .hm-cats { grid-template-columns: repeat(2, 1fr); }
    .hm-ar { display: none; }
}
@media (max-width: 700px) {
    .hm-tiles { grid-template-columns: 1fr; }
    .hm-tile { min-height: 100px; }
    .hm-sh h2 { font-size: 1.4rem; }
    .hm-band .hm-btn { width: 100%; text-align: center; }
}

/* Search type-ahead dropdown (2 Oct 2026) */
.hd__search form, .rr-page form[action="/search.php"] { position: relative; }
.ss { position: absolute; z-index: 60; background: #fff; color: #111; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.3); overflow: hidden; text-align: left; }
.ss[hidden] { display: none; }
.ss__cats { padding: .55rem .8rem; font-size: .85rem; border-bottom: 1px solid #e6e6e6; color: #555; }
.ss__cats a { color: var(--rr-red); margin-right: .6rem; font-weight: 600; text-decoration: none; }
.ss__item { display: flex; align-items: center; gap: .7rem; padding: .5rem .8rem; color: #111; text-decoration: none; border-bottom: 1px solid #f0f0f0; }
.ss__item img, .ss__noimg { width: 44px; height: 44px; object-fit: contain; background: #f3f3f3; border-radius: 4px; flex: none; }
.ss__name { flex: 1; font-size: .95rem; line-height: 1.25; }
.ss__price { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.ss a.ss__on, .ss__item:hover { background: #f5f5f5; }
.ss__all { display: block; padding: .65rem .8rem; background: #111; color: #fff; text-align: center; text-decoration: none; font-weight: 600; font-size: .9rem; }
.ss a.ss__all.ss__on, .ss__all:hover { background: var(--rr-red); }
.ss__none { padding: .8rem; color: #555; font-size: .9rem; }
.ss .ss__item, .ss .ss__name, .ss .ss__price { color: #111; }
.ss .ss__cats a { color: var(--rr-red); }
.ss .ss__all { color: #fff; }

/* Product page: image beside details; stacked on phones (2 Oct 2026) */
.rr-product-top { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 2rem; }
@media (max-width: 700px) { .rr-product-top { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }

/* Cart table stacks into cards on phones (2 Oct 2026) */
@media (max-width: 640px) {
    table.rr-cart-table, .rr-cart-table tbody, .rr-cart-table tr, .rr-cart-table td { display: block; width: 100%; }
    .rr-cart-table thead { display: none; }
    .rr-cart-table tr { border: 1px solid var(--rr-grey-mid); border-radius: 6px; padding: .4rem .8rem; margin-bottom: .8rem; }
    .rr-cart-table td { border: 0; padding: .35rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
    .rr-cart-table td:first-child { display: block; font-weight: 600; }
    .rr-cart-table td[data-label]::before { content: attr(data-label); color: var(--rr-grey-text); font-size: .85rem; }
}

/* Autosave status line (3 Oct 2026) */
.rr-autosave-status { font-size: 0.85rem; color: var(--rr-grey-text, #666); min-height: 1.3em; margin-bottom: 0.5rem; }
.rr-autosave-status--saving, .rr-autosave-status--pending { color: #8a6d00; }
.rr-autosave-status--saved { color: #235c37; }
.rr-autosave-status--error { color: var(--rr-red); font-weight: 600; }
.rr-autosave-error { display: block; color: var(--rr-red); font-size: 0.8rem; margin-top: 0.2rem; }
.rr-confirm__msg { white-space: pre-line; margin: 0 0 1.25rem; }
.rr-btn--danger { background: var(--rr-red); border-color: var(--rr-red); color: #fff; }

/* Account dropdown (header) */
.hd__acct { position: relative; }
.hd__acct > summary { list-style: none; }
.hd__acct > summary::-webkit-details-marker { display: none; }
.hd__acct-menu { position: absolute; right: 0; top: 100%; min-width: 170px; background: #fff; color: #111; border: 1px solid var(--rr-border, #ddd); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: .3rem; z-index: 60; }
.hd__acct-menu a, .hd__acct-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .6rem .8rem; font: inherit; color: #111; text-decoration: none; border-radius: 6px; cursor: pointer; }
.hd__acct-menu a:hover, .hd__acct-menu button:hover { background: #f2f2f2; }
.hd__acct-menu form { margin: 0; }
/* Order thank-you / my orders */
.rr-order--new { border-color: #1a7f37; box-shadow: 0 0 0 2px rgba(26,127,55,.2); }
.rr-thanks { background: #eef8f0; border: 1px solid #1a7f37; border-radius: 8px; padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.rr-thanks h2 { margin: 0 0 .3rem; }

/* Two-column splits (log in / create account, checkout): stack on phones */
.rr-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.rr-split--checkout { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 700px) { .rr-split, .rr-split--checkout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
