/* ==========================================================
   AIR SUSPENSION PAGES (/AirSuspension, series pages, Model List, Strength Calculation Sheet, Satisfied Customer)
   Loaded only by Views/AirSuspension/*.cshtml via ~/bundles/air-css, after pages/product.css
   (content blocks, photo lists, tables, link buttons, warranty notice and RELATED PRODUCTS shared by every category).
   ========================================================== */

/* ---- /AirSuspension: each series is its picture beside its name, the sides alternating (as on the old site) ---- */
.air-series {
    margin-top: 56px;
}

.air-series__item {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 24px;
    align-items: center;
    color: #111;
    text-decoration: none;
}

.air-series__item + .air-series__item {
    margin-top: 32px;
}

/* Every other series: the picture on the right. */
.air-series__item--reverse {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.air-series__item--reverse .air-series__media {
    order: 2;
}

.air-series__media {
    display: block;
}

/* 16:9 cut-outs (the reflections fade into the white page). */
.air-series__img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

/* The name at the outer edge, away from the picture. */
.air-series__name {
    font-family: "Sui Generis", Arial, sans-serif;
    font-size: 40px;
    line-height: 1.2;
    text-align: right;
    overflow-wrap: anywhere;
}

.air-series__item--reverse .air-series__name {
    text-align: left;
}

.air-series__name-text {
    padding: 0 4px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.air-series__item:hover .air-series__img,
.air-series__item:focus-visible .air-series__img {
    transform: scale(1.04);
}

/* The warranty notice's highlighter stroke under the name. */
.air-series__item:hover .air-series__name-text,
.air-series__item:focus-visible .air-series__name-text {
    background: linear-gradient(transparent 60%, #ffed00 60%);
}

.air-series__item:focus-visible {
    outline: 3px solid #ffed00;
    outline-offset: 4px;
}

/* ---- SATISFIED CUSTOMER banner at the bottom of /AirSuspension ---- */
.air-customer {
    margin-top: 72px;
}

.air-customer__title {
    margin: 0 0 16px;
    color: #111;
    font-family: "Sui Generis", Arial, sans-serif;
    font-size: 28px;
    font-weight: 400;
}

.air-customer__link {
    display: block;
    overflow: hidden;
}

.air-customer__img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.air-customer__link:hover .air-customer__img,
.air-customer__link:focus-visible .air-customer__img {
    transform: scale(1.03);
}

.air-customer__link:focus-visible {
    outline: 3px solid #ffed00;
    outline-offset: 3px;
}

/* ---- Series cards in the RELATED PRODUCTS carousel: the picture with the name below ---- */
.air-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #111;
    text-align: center;
    text-decoration: none;
}

.air-card__media {
    display: block;
    width: 100%;
    overflow: hidden;
}

.air-card__img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.2s;
}

.air-card__name {
    font-size: 16px;
    line-height: 1.3;
    transition: color 0.2s;
}

.air-card:hover .air-card__img,
.air-card:focus-visible .air-card__img {
    transform: scale(1.06);
}

.air-card:hover .air-card__name,
.air-card:focus-visible .air-card__name {
    color: #a18f00;
}

.air-card:focus-visible {
    outline: 3px solid #ffed00;
    outline-offset: 3px;
}

/* ---- Model List ---- */
.product-col--option { width: 84px; }

/* Below this the page is narrower than the table (see product.css). Leaves the MODEL column about 400px. */
.product-table--air {
    min-width: 1120px;
}

.product-table--air td:first-child {
    white-space: nowrap;
}

/* Legend colours: the YELLOW / GREEN rows of the table. */
.product-legend__code.is-no-stock { background-color: #ffff33; }

.air-legend__red {
    color: #d10000;
}

.air-legend__extra {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

/* ---- Strength calculation sheets: a coverflow (fun.js data-cycle, like the Patent certificates) ----
   Each sheet sits in a square box 40% of the width (upright and landscape A4 both fit); each step to the side moves
   it 55% of the box, shrinks it by 15% and fades it. Two on each side; the next one in is laid out (hidden) so its
   image has loaded. */
.air-sheets {
    position: relative;
}

.air-sheets__track {
    position: relative;
    overflow: hidden;
    padding-bottom: 44%;
}

.air-sheet {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: calc(10 - var(--distance, 0));
    display: none;
    align-items: center;
    justify-content: center;
    width: 40%;
    aspect-ratio: 1;
    opacity: calc(1 - var(--distance, 0) * 0.35);
    transform: translate(-50%, -50%) translateX(calc(var(--offset, 0) * 55%)) scale(calc(1 - var(--distance, 0) * 0.15));
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.air-sheet[data-cycle-distance="0"],
.air-sheet[data-cycle-distance="1"],
.air-sheet[data-cycle-distance="2"],
.air-sheet[data-cycle-distance="3"] {
    display: flex;
}

.air-sheet[data-cycle-distance="3"] {
    visibility: hidden;
}

.air-sheet.is-wrapping {
    transition: none;
}

/* The picture is the flex item itself, so the image fits the square box in its own proportions. */
.air-sheet picture {
    display: contents;
}

.air-sheet__img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    border: 1px solid #111;
    background-color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.air-sheet:focus-visible {
    outline: none;
}

.air-sheet:focus-visible .air-sheet__img {
    outline: 3px solid #ffed00;
    outline-offset: 2px;
}

.air-sheets__btn {
    position: absolute;
    top: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    background-color: rgba(17, 17, 17, 0.7);
    transform: translateY(-50%);
    cursor: pointer;
}

.air-sheets__btn--prev {
    left: 1%;
}

.air-sheets__btn--next {
    right: 1%;
}

.air-sheets__btn:hover {
    background-color: #111;
}

.air-sheets__btn:focus-visible {
    outline: 3px solid #ffed00;
    outline-offset: 2px;
}

/* ==========================================================
   Air Suspension: responsive
   ========================================================== */
@media (max-width: 991.98px) {
    .air-series__name {
        font-size: 30px;
    }
}

@media (max-width: 767.98px) {
    .air-series {
        margin-top: 40px;
    }

    /* Phones: the picture with the name centred below. */
    .air-series__item,
    .air-series__item--reverse {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .air-series__item--reverse .air-series__media {
        order: 0;
    }

    .air-series__name,
    .air-series__item--reverse .air-series__name {
        font-size: 24px;
        text-align: center;
    }

    .air-series__item + .air-series__item {
        margin-top: 28px;
    }

    .air-customer {
        margin-top: 48px;
    }

    .air-customer__title {
        font-size: 22px;
    }

    .air-card__name {
        font-size: 14px;
    }

    /* One sheet at a time, its neighbours peeking in at the sides. */
    .air-sheets__track {
        padding-bottom: 86%;
    }

    .air-sheet {
        width: 80%;
        transform: translate(-50%, -50%) translateX(calc(var(--offset, 0) * 62%)) scale(calc(1 - var(--distance, 0) * 0.15));
    }

    .air-sheet[data-cycle-distance="2"] {
        visibility: hidden;
    }

    .air-sheet[data-cycle-distance="3"] {
        display: none;
    }

    .air-sheets__btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .air-series__img,
    .air-customer__img,
    .air-card__img,
    .air-card__name,
    .air-sheet {
        transition: none;
    }

    .air-series__item:hover .air-series__img,
    .air-series__item:focus-visible .air-series__img,
    .air-customer__link:hover .air-customer__img,
    .air-customer__link:focus-visible .air-customer__img,
    .air-card:hover .air-card__img,
    .air-card:focus-visible .air-card__img {
        transform: none;
    }
}
