/* ======================================================================
   TEIN - tein.cfm (brand page), tein.tab.cfm (vehicle-page tab),
   tein.vehicle.tab.cfm (brand-page results), includes/tein.fitments.cfm (PDP).
   Namespaced .tein- (checked free 2026-09-10; .ts- is taken by the typeahead,
   see the Turbosmart notes). Brand colour: TEIN green #00a650, dark #0e1a14.
   ====================================================================== */

/* ---- Intro (vehicle-page tab) -------------------------------------- */
.tein-intro {
    text-align: center;
    margin: 8px auto 0;
}
.tein-logo-wrap {
    display: inline-block;
    background: #ffffff;
    padding: 14px 26px;
    border-radius: 8px;
    margin: 30px auto;
}
.tein-logo {
    display: block;
    max-height: 54px;
    width: auto;
    max-width: 100%;
}
.tein-intro p {
    color: #555;
    font-size: 1rem;
    margin: 0 auto 8px;
    max-width: 760px;
}

/* ---- Hero (brand page) --------------------------------------------- */
.tein-hero {
    background-color: #0e1a14;
    background-image:
        radial-gradient(circle at 30% 40%, rgba(0,166,80,0.32) 0%, rgba(0,0,0,0) 60%),
        linear-gradient(rgba(8,16,12,0.55), rgba(8,16,12,0.85)),
        url('../images/suppliers/Tein/tein-hero.jpg');
    background-size: auto, auto, cover;
    background-position: center, center, center;
    background-repeat: no-repeat;
    text-align: center;
    padding: 9vh 24px;
    margin-top: 24px;
}
/* Admin-uploaded hero: the wrapper (.brand-hero-band--photo, rules in
   css/brand.hero.band.css) paints wash + photo, so the inner hero goes clear.
   Below 768px that stylesheet moves the photo onto the CHILD, which it expects
   to be .brand-hero -- ours is .tein-hero, so the same move is repeated here
   with the same custom properties. */
.brand-hero-band--photo > .tein-hero--photo {
    background: none;
    margin-top: 0;
}
.tein-band.brand-hero-band--photo { margin-top: 24px; margin-bottom: 0; }
.tein-hero--ink-dark h1 { color: #11171f; }
.tein-hero--ink-dark p  { color: #2f3b34; }
@media only screen and (max-width: 767px) {
    .brand-hero-band--photo > .tein-hero--photo {
        background-color: var(--hero-base, #11171f);
        background-image: var(--hero-wash, none), var(--hero-image, none);
        background-size: auto, cover;
        background-position: 0 0, var(--hero-pos, center center);
        background-repeat: no-repeat, no-repeat;
    }
}
.tein-hero-logo {
    width: 100%;
    max-width: 380px;
    height: auto;
    margin: 0 auto;
    display: block;
}
.tein-hero h1 {
    color: #fff;
    font-size: 1.75rem;
    margin: 0;
}
.tein-hero p {
    color: #d5e3da;
    max-width: 760px;
    margin: 14px auto 0;
    font-size: 1.0625rem;
}

/* ---- Series tiles (brand page) ------------------------------------- */
.tein-series-head {
    margin: 40px 0 0;
}
.tein-series-head h2 {
    margin: 0 0 4px;
    font-size: 1.6rem;
}
.tein-series-head p {
    color: #555;
    margin: 0 0 16px;
    font-size: 1rem;
}
.tein-usecase {
    margin: 22px 0 0;
}
.tein-usecase:not(:first-of-type) {
    margin-top: 64px;
}
.tein-usecase h3 {
    font-size: 1.125rem;
    margin: 0 0 10px;
    color: #0e1a14;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.tein-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}
.tein-tile {
    flex: 1 1 260px;
    max-width: 360px;
    background: #fff;
    border: 1px solid #dfe5e1;
    border-left: 5px solid #00a650;
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .15s ease;
}
.tein-tile:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
/* Optional range photo (Octane_Product_Ranges.HeroImage, tein.005). Fixed 4:3
   frame, photo contained, pulled out to the card edges (minus the green left
   rule) so it reads as the card's header. TEIN's series shots are dark studio
   photos, so the frame keeps a white backing rather than inheriting one. */
.tein-tile-img {
    display: block;
    aspect-ratio: 4 / 3;
    margin: -14px -16px 12px -16px;
    background: #fff;
    border-bottom: 1px solid #dfe5e1;
    border-radius: 0 8px 0 0;
    overflow: hidden;
}
.tein-tile-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
}
.tein-tile-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: #0e1a14;
    margin-bottom: 2px;
}
.tein-tile-type {
    font-size: 0.875rem;
    color: #00843f;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 8px;
}
.tein-tile-blurb {
    font-size: 0.9375rem;
    color: #555;
    line-height: 1.4;
    flex: 1 1 auto;
}
.tein-tile-count {
    margin-top: 10px;
    font-size: 0.875rem;
    color: #666;
}

/* ---- Vehicle selector (brand page) --------------------------------- */
.tein-selector {
    padding: 1.25rem;
    background-color: #0e1a14;
    box-sizing: border-box;
    margin-top: 0;            /* sits flush under the hero: one dark surface, as brand.cfm does */
}
.tein-selector-title {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 0.25rem;
}
.tein-selector-sub {
    color: #b9cbc0;
    font-size: 0.9375rem;
    margin: 0 0 1rem;
}
.tein-selector-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}
.tein-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 180px;
    min-width: 150px;
}
.tein-field--wide { flex: 2 1 320px; }
.tein-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #cfe0d5;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tein-field select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 0.4rem;
    border: 1px solid #cbd5e1;
    font-size: 1rem;      /* 16px: matches the site input scale and stops iOS zooming */
    line-height: 1.4;
    background: #fff;
    box-sizing: border-box;
}
.tein-field select:disabled {
    background-color: #e5e7eb;
    border-color: #d1d5db;
    color: #6b7280;
}
.tein-field--button { flex: 0 0 auto; }
.tein-field--button button {
    padding: 0.65rem 1.6rem;
    font-size: 1rem;
    font-weight: 700;
    border: 0;
    border-radius: 0.4rem;
    background: #00a650;
    color: #fff;
    cursor: pointer;
}
.tein-field--button button:disabled {
    background: #6b7280;
    cursor: not-allowed;
}
.tein-status {
    display: none;
    margin-top: 0.75rem;
    color: #cfe0d5;
    font-size: 0.9375rem;
}
.tein-status--error { color: #ffb4a8; }

.tein-loading, .tein-error {
    text-align: center;
    padding: 30px 0;
    font-size: 1rem;
    color: #555;
}
/* the browse grid's loading state: tall enough that swapping a full grid for
   the spinner does not collapse the page under the reader's scroll position */
.tein-loading--block {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0e1a14;
}
.tein-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid #d5e3da;
    border-top-color: #00a650;
    animation: tein-spin .8s linear infinite;
}
@keyframes tein-spin { to { transform: rotate(360deg); } }

/* ---- Vehicle result heading (brand-page selector results) ----------- */
.tein-vehhead {
    text-align: center;
    margin: 28px auto 4px;
}
.tein-vehhead h2 {
    margin: 0 auto 2px;
    color: #0e1a14;
    font-size: 1.8rem;
    line-height: 1.15;
}
.tein-vehspec {
    color: #00843f;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 auto 6px;
}
.tein-market {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 2px 7px;
    border-radius: 4px;
    background: #eef2f0;
    color: #3d4a43;
    border: 1px solid #d5ddd8;
    vertical-align: middle;
}
.tein-market--gbr { background: #e6f6ec; color: #0b6b34; border-color: #b9e2c8; }
.tein-note {
    max-width: 760px;
    margin: 10px auto 0;
    padding: 10px 14px;
    background: #fff6e5;
    border: 1px solid #f0d9a8;
    border-radius: 6px;
    font-size: 0.9375rem;
    color: #6b4e12;
}

/* ---- Category sections + grid -------------------------------------- */
.tein-section {
    margin: 30px 24px 0;
}
.tein-section h3 {
    font-size: 1.25rem;
    margin: 0 0 4px;
    color: #0e1a14;
    border-bottom: 2px solid #00a650;
    display: inline-block;
    padding-bottom: 2px;
}
.tein-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 16px 0 8px;
}
.tein-card {
    flex: 1 0 calc(25% - 20px);
    max-width: calc((100% - 60px) / 4);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
}
.tein-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.tein-card > a {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px;
    text-decoration: none;
    color: inherit;
}
.tein-image {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.tein-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
/* only a 60px micro rendition exists: show it at 2x, never stretched to the box */
.tein-image img.is-tiny { max-width: 120px; max-height: 120px; }
.tein-badge-row {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.tein-badge {
    display: inline-block;
    background: #00a650;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 4px;
}
.tein-ptype {
    display: inline-block;
    background: #eef4f0;
    color: #0e1a14;
    border: 1px solid #cfe0d5;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 2px 8px;
    border-radius: 4px;
}
.tein-titles { margin-bottom: 8px; }
.tein-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #0e1a14;
}
.tein-partnumber {
    font-size: 0.9375rem;
    color: #666;
    margin-top: 3px;
}
/* the published spring rate / drop for THIS vehicle, on the card */
.tein-spec {
    font-size: 0.875rem;
    color: #3d4a43;
    background: #f4f7f5;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 10px;
    line-height: 1.4;
}
.tein-spec span { white-space: nowrap; }
.tein-remark {
    font-size: 0.8125rem;
    color: #8a5a00;
    margin: -4px 0 10px;
    line-height: 1.35;
}
.tein-stock {
    font-size: 0.9375rem;
    margin: 0 0 10px;
}
.tein-card .price-container { margin-top: auto; }

/* ---- Browse head (brand page) -------------------------------------- */
.tein-browse-head {
    margin: 48px 0 0;
    padding-top: 28px;
    border-top: 1px solid #e2e2e2;
}

/* ---- PDP: fitment table + EDFC cross-sell (includes/tein.fitments.cfm) --
   These rules are ALSO emitted inline by the include, because the PDP loads
   as an AJAX fragment where a <link> is not guaranteed to load. Kept here so
   the two stay side by side when edited. */
.tein-fit-wrap { overflow-x: auto; }
.tein-fit {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.tein-fit th, .tein-fit td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}
.tein-fit th {
    background: #f4f7f5;
    font-weight: 600;
    white-space: nowrap;
}
.tein-fit td.num { white-space: nowrap; }
.tein-keyfig { margin: 0 0 14px; }
.tein-keyfig table { border-collapse: collapse; width: 100%; max-width: 560px; font-size: 1rem; }
.tein-keyfig th, .tein-keyfig td { padding: 7px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.tein-keyfig th { font-weight: 600; width: 55%; background: #f4f7f5; }
.tein-keyfig th small { display: block; font-weight: 400; font-size: .8125rem; color: #666; }
.tein-keyfig td { font-weight: 700; white-space: nowrap; }
.tein-fit-more {
    font-size: 0.9375rem;
    color: #555;
    margin: 8px 0 0;
}
.tein-edfc {
    margin: 18px 0 0;
    padding: 12px 14px;
    border: 1px solid #b9e2c8;
    background: #f1faf4;
    border-radius: 8px;
}
.tein-edfc h4 {
    margin: 0 0 6px;
    font-size: 1.0625rem;
    color: #0b6b34;
}
.tein-edfc ul { margin: 6px 0 0 18px; padding: 0; }
.tein-edfc li { margin: 2px 0; }

/* ---- Responsive ---------------------------------------------------- */
@media (max-width: 1200px) {
    .tein-card { flex-basis: calc(33.333% - 20px); max-width: calc((100% - 40px) / 3); }
}
@media (max-width: 900px) {
    .tein-card { flex-basis: calc(50% - 20px); max-width: calc((100% - 20px) / 2); }
}
@media (max-width: 600px) {
    .tein-section { margin: 24px 12px 0; }
    .tein-card { flex-basis: 100%; max-width: 100%; }
    .tein-hero { padding: 6vh 16px; }
}
