/* ===========================================================================
   result-cards.css
   Shared `.rcard*` result-card styles used by /search-results and /universal-fit
   so both pages render identical cards. Page-specific chrome (container, tabs,
   pagination, empty state, etc.) still lives inline in each controller.
   =========================================================================== */

/* === RESULT CARD ===
   2-up grid on desktop, 1-up on mobile. Mirrors the product-page design
   language at compact scale: dark hero strip + white body + footer. */
.rcard {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.rcard:hover { border-color: #007cc3; box-shadow: 0 4px 14px rgba(14,28,36,0.08); }

/* Dark hero strip. Mirrors the product-detail-page hero pattern:
     row 1. Partno + line label inline on left | MAP + price inline on right
     row 2. Vehicle context (when YMM search) below the identity
   Overall dimensions removed (they're in the Core Size cell of the spec
   grid below). */
.rcard-hero {
    background: #0e1c24; padding: 14px 18px; color: #fff;
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
}
.rcard-hero-left { flex: 1; min-width: 0; }
.rcard-identity { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rcard-partno { font-family: 'Teko', sans-serif; font-size: 28px; font-weight: 900; line-height: 1; color: #fff; }
.rcard-line { font-family: 'Teko', sans-serif; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #60b8f0; line-height: 1; }
/* Vehicle context: plain text on its own row, only in YMM searches. Search
   modes are mutually exclusive. Partno/free-text/universal searches don't
   have vehicle context. */
.rcard-vehicle { margin-top: 6px; font-size: 12px; color: #c8d4e1; font-weight: 500; line-height: 1.2; }
.rcard-price-block { display: inline-flex; align-items: baseline; gap: 6px; flex-shrink: 0; }
.rcard-price-label { font-family: 'Teko', sans-serif; font-size: 10px; font-weight: 700; color: #7a90a8; letter-spacing: 0.15em; text-transform: uppercase; line-height: 1; }
.rcard-price { font-family: 'Teko', sans-serif; font-size: 22px; font-weight: 800; color: #60b8f0; line-height: 1; white-space: nowrap; }

.rcard-badges {
    display: flex; gap: 6px; flex-wrap: wrap;
    padding: 10px 18px; background: #0e1c24;
    border-top: 1px solid rgba(255,255,255,0.10);
}
.rcard-badge {
    font-family: 'Teko', sans-serif; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 4px 10px; border-radius: 4px; line-height: 1;
    background: rgba(0,124,195,0.18); color: #60b8f0;
    border: 1px solid rgba(0,124,195,0.45);
}

/* Staff-only pricing + stock strip. Bright red border is the site-wide
   "this is internal data" signal. Sits between the badges row and the
   body so staff see pricing/stock at a glance without scanning the whole
   card. */
.staff-strip {
    display: flex; gap: 0;
    background: #fff5f5;
    border-top: 2px solid #dc2626;
    border-bottom: 2px solid #dc2626;
}
.staff-cell {
    flex: 1 1 0; min-width: 0;
    padding: 8px 14px;
    display: flex; flex-direction: column; gap: 2px;
    border-right: 1px solid rgba(220,38,38,0.30);
}
.staff-cell:last-child { border-right: none; }
.staff-cell.is-stock { flex: 1.6 1 0; }
.staff-cell .label {
    font-family: 'Teko', sans-serif; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em; color: #dc2626;
    line-height: 1;
}
.staff-cell .value {
    font-family: 'Teko', sans-serif; font-size: 19px; font-weight: 600;
    color: #0e1c24; line-height: 1.15;
}
.staff-cell .stock-fresh {
    display: block;
    font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 500;
    color: #7a90a8; letter-spacing: 0.02em;
    margin-top: 1px;
}

/* Body */
.rcard-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
/* Top row: square 1:1 image (left) + summary/application (right). All
   catalog images are 1:1 so the window is square. No letterboxing. */
.rcard-top { display: flex; gap: 14px; align-items: flex-start; }
/* Clickable image: links to the same /products/X page as the
   "Full Details" button at the bottom of the card. Customers
   intuitively click the photo for more info, so wire that up. */
.rcard-img {
    width: 160px; height: 160px;
    background: #f7f9fb; border: 1px solid #edf0f5; border-radius: 6px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #9bb1c7; font-size: 52px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.rcard-img:hover { border-color: #007cc3; box-shadow: 0 2px 8px rgba(0,124,195,0.15); transform: translateY(-1px); }
.rcard-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.15s; }
.rcard-img:hover img { transform: scale(1.03); }
.rcard-top-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rcard-summary { font-size: 13px; color: #4a5568; line-height: 1.5; }
/* Notes: surfaces the unified_data qualifiers/notes column. Red italic
   so it gets noticed. */
.rcard-notes { font-size: 12px; color: #b91c1c; font-weight: 600; font-style: italic; line-height: 1.4; }
/* Est. Max HP: dedicated row with subtle blue tint + accent stripe to
   create separation, kept compact (18px Griffin-blue value). */
.rcard-hp {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 6px 10px;
    background: rgba(0,124,195,0.06);
    border-left: 3px solid #007cc3;
    border-radius: 0 4px 4px 0;
}
.rcard-hp .label { font-family: 'Teko', sans-serif; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #7a90a8; line-height: 1; }
.rcard-hp .value { font-family: 'Teko', sans-serif; font-size: 18px; font-weight: 800; color: #007cc3; line-height: 1; }

/* Key Specs box: small Teko header + 2-col label/value grid below.
   Header label mirrors the prominent Key Specs card on the detail page
   in miniature so the search card reads as the at-a-glance summary it
   is. Cells follow sales hierarchy (Dimensions → Configuration →
   Cooling → Transmission). Application sits as a full-width inline
   label/value row beneath the grid (last in hierarchy). */
.rcard-specs { background: #f7f9fb; border-radius: 6px; padding: 10px 14px; }
.rcard-specs-head { font-family: 'Teko', sans-serif; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #0e1c24; border-bottom: 1px solid #cbd5e0; padding-bottom: 6px; margin-bottom: 8px; }
.rcard-specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.rcard-spec { display: flex; flex-direction: column; padding: 4px 0; border-bottom: 1px solid #edf0f5; font-size: 13px; }
.rcard-specs-grid > .rcard-spec:nth-last-child(-n+2) { border-bottom: 0; }
.rcard-spec .k { font-family: 'Teko', sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #7a90a8; line-height: 1; margin-bottom: 3px; }
.rcard-spec .v { color: #0e1c24; font-weight: 600; line-height: 1.2; }
/* Application sits below the 2-col grid, full-width, label-LEFT-of-value
   (mirrors the detail page's full-width Application row pattern). */
.rcard-spec-fw { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0 0; margin-top: 6px; border-top: 1px solid #edf0f5; font-size: 13px; }
.rcard-spec-fw .k { font-family: 'Teko', sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #7a90a8; line-height: 1; flex-shrink: 0; }
.rcard-spec-fw .v { color: #0e1c24; font-weight: 600; line-height: 1.2; text-align: right; }

/* Footer: combo cross-link (left) + Full Details CTA (right) */
.rcard-footer {
    margin-top: auto;
    padding: 12px 18px;
    background: #f7f9fb;
    border-top: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}
/* Cross-sell pill: visually mirrors the prominent CU upsell card on the
   detail page in miniature. Brand-blue accent, whole pill clickable.
   Direction icon flips depending on whether we're upselling (radiator →
   combo) or downselling (combo → radiator-only). */
.rcard-cross { display: flex; align-items: center; }
.rcard-cross-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px;
    background: rgba(0,124,195,0.08); border: 1px solid rgba(0,124,195,0.35);
    text-decoration: none; line-height: 1; transition: all 0.15s;
}
.rcard-cross-pill:hover { background: #007cc3; border-color: #007cc3; text-decoration: none; }
.rcard-cross-pill:hover .rcard-cross-lbl,
.rcard-cross-pill:hover .rcard-cross-pn,
.rcard-cross-pill:hover i { color: #fff; }
.rcard-cross-pill i { font-size: 13px; color: #007cc3; }
.rcard-cross-lbl { font-family: 'Teko', sans-serif; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #005a8e; }
.rcard-cross-pn { font-family: 'Teko', sans-serif; font-size: 14px; font-weight: 700; color: #0e1c24; letter-spacing: 0.02em; }
.rcard-details {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: #007cc3; color: #fff; border-radius: 6px;
    font-family: 'Teko', sans-serif; font-size: 14px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    text-decoration: none; line-height: 1;
}
.rcard-details:hover { background: #005a8e; color: #fff; text-decoration: none; }

/* Truck-freight chip in footer (legacy, optional) */
.rcard-foot-badge {
    font-family: 'Teko', sans-serif; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 3px 8px; border-radius: 4px;
    background: rgba(160,94,0,0.10); color: #a05e00; border: 1px solid rgba(160,94,0,0.30);
}

/* Mobile: smaller image, single column */
@media (max-width: 768px) {
    .rcard-grid { grid-template-columns: 1fr !important; }
    .rcard-hero { padding: 12px 14px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .rcard-body { padding: 12px 14px; }
    .rcard-footer { padding: 10px 14px; }
}
@media (max-width: 480px) {
    .rcard-img { width: 120px; height: 120px; font-size: 40px; }
}
