/* ==========================================================================
   RMCA Schedule — [rmca_schedule] shortcode
   Motorcycle-grade card grid. Dark, bold, high-contrast.
   ========================================================================== */

/* ── Grid layout ─────────────────────────────────────────────────────────── */
.rmca-schedule {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(3, 1fr);
    margin: 32px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rmca-schedule--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .rmca-schedule,
    .rmca-schedule--cols-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 580px) {
    .rmca-schedule,
    .rmca-schedule--cols-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ── Card shell ──────────────────────────────────────────────────────────── */
.rmca-card {
    position: relative;
    background: #16191e;
    border: 1px solid #34383f;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.rmca-card:hover {
    border-color: #e8000d;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.55);
}

.rmca-card--past {
    opacity: 0.55;
    pointer-events: auto;
}

.rmca-card--past:hover {
    transform: none;
    border-color: #34383f;
    box-shadow: none;
}

/* ── Badge ───────────────────────────────────────────────────────────────── */
.rmca-card__badge {
    position: absolute;
    bottom: 10px;          /* bottom of image — clear of any title graphics */
    left: 14px;
    z-index: 2;
    padding: 3px 9px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #e8000d;
    color: #fff;
    line-height: 1.5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.rmca-card__badge--testday {
    background: #e08800;
    color: #fff;
}

.rmca-card__badge--trackday {
    background: #7b3fb5;   /* purple — distinct from test day orange */
    color: #fff;
}

.rmca-card__badge--licence,
.rmca-card__badge--school {
    background: #1a5fa8;
}

.rmca-card__badge--fullseason {
    background: #1a6b3a;
}

.rmca-card__badge--vip {
    background: #8b6914;   /* gold — prestige, not a racing category */
    color: #fff;
}

/* ── Image ───────────────────────────────────────────────────────────────── */
.rmca-card__image-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0d0f12;
}

.rmca-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

/* Gradient at bottom of image so card body content doesn't float in mid-air */
.rmca-card__image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(to bottom, transparent, #16191e);
    pointer-events: none;
}

.rmca-card:hover .rmca-card__image {
    transform: scale(1.04);
}

.rmca-card__past-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ── Body ────────────────────────────────────────────────────────────────── */
.rmca-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}

/* ── Title ───────────────────────────────────────────────────────────────── */
.rmca-card__title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-align: left !important;   /* theme may centre headings — override */
}

.rmca-card__title a,
.rmca-card__title a:link,
.rmca-card__title a:visited {
    color: #ff2d2d !important;     /* !important — Colibri overrides link colour */
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.rmca-card__title a:hover,
.rmca-card__title a:focus {
    color: #ffffff !important;
}

/* ── Meta lines ──────────────────────────────────────────────────────────── */
.rmca-card__meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #c8cdd5;       /* was #9aa0aa — now legible */
    line-height: 1.4;
    margin-bottom: 5px;
}

.rmca-card__meta svg {
    width: 13px;
    height: 13px;
    fill: #e8000d;         /* red icons — clear, on-brand, visible */
    flex-shrink: 0;
    opacity: 0.9;
}

/* ── Divider between meta and description/footer ─────────────────────────── */
.rmca-card__divider {
    border: none;
    border-top: 1px solid #2e3238;
    margin: 12px 0;
}

/* ── Description ─────────────────────────────────────────────────────────── */
.rmca-card__description {
    margin: 0 0 12px;
    font-size: 13px;
    color: #b0b6bf;        /* was #868c96 — bumped up significantly */
    line-height: 1.6;
}

/* ── Footer: price + CTA ─────────────────────────────────────────────────── */
.rmca-card__footer {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    border-top: 1px solid #2e3238;
}

/* ── Price group — always two rows: FROM row (or blank), then main price ──── */
.rmca-card__price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
}

/* Top row: FROM label + strikethrough — fixed height whether present or not */
.rmca-card__price-context {
    height: 18px;           /* always occupies this space — keeps price on same line */
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.rmca-price__from {
    font-size: 9px;
    font-weight: 800;
    color: #aab0ba;        /* more visible than before */
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.rmca-price--was {
    font-size: 12px;
    font-weight: 500;
    color: #6a7280;
    text-decoration: line-through;
}

/* ── Price ───────────────────────────────────────────────────────────────── */
.rmca-card__price {
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.rmca-price {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

/* WooCommerce injects currency symbol spans — target them */
.rmca-price .woocommerce-Price-amount,
.rmca-price bdi {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.rmca-price--eb {
    color: #ffffff;
}

.rmca-card__eb-badge {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #3dd678;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* EB notice in meta section — clock icon + green text */
.rmca-card__meta--eb {
    color: #3dd678;
    font-weight: 700;
}

.rmca-card__meta--eb svg {
    fill: #3dd678;
}

/* ── CTA button ──────────────────────────────────────────────────────────── */
.rmca-card__cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: #e8000d;
    color: #fff !important;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 3px;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.1s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(232,0,13,0.35);
}

.rmca-card__cta:hover {
    background: #c40009;
    transform: translateY(-1px);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(232,0,13,0.45);
}

.rmca-card__cta--disabled {
    background: transparent;
    border: 1px solid #34383f;
    color: #5a6170 !important;
    cursor: default;
    font-size: 11px;
    box-shadow: none;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.rmca-schedule-empty {
    color: #8a9199;
    font-style: italic;
    padding: 24px 0;
}

/* ── Accessibility: respect prefers-reduced-motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .rmca-card,
    .rmca-card__image,
    .rmca-card__cta {
        transition: none;
    }
    .rmca-card:hover {
        transform: none;
    }
    .rmca-card:hover .rmca-card__image {
        transform: none;
    }
}

/* ── Schedule banner ─────────────────────────────────────────────────────── */
.rmca-schedule-banner {
    width: 100%;
    margin-bottom: 32px;
    border-radius: 4px;
    overflow: hidden;
    line-height: 0;
}
.rmca-schedule-banner__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ── Swag section ────────────────────────────────────────────────────────── */
.rmca-swag-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #e0e0e0;
}
.rmca-swag-section__title {
    font-size: 22px;
    font-weight: 700;
    color: #11233a;
    margin: 0 0 24px;
}
.rmca-swag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}
.rmca-swag-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.18s, transform 0.18s;
    background: #fff;
}
.rmca-swag-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.rmca-swag-card__image-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f6f6f6;
}
.rmca-swag-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s;
}
.rmca-swag-card:hover .rmca-swag-card__image {
    transform: scale(1.04);
}
.rmca-swag-card__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.rmca-swag-card__name {
    font-size: 14px;
    font-weight: 600;
    color: #11233a;
    line-height: 1.3;
}
.rmca-swag-card__price {
    font-size: 14px;
    color: #B71111;
    font-weight: 600;
}
.rmca-swag-card__cta {
    font-size: 12px;
    color: #888;
    margin-top: auto;
    padding-top: 8px;
}
@media (max-width: 600px) {
    .rmca-swag-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}


