/* ==========================================================
   OTHER PAGE (/Other)
   Loaded only by Views/Other/Index.cshtml via ~/bundles/other-css, after pages/product.css
   (title and page dots shared by every product category).
   ========================================================== */

/* ---- PARTS: the old site's striped yellow bar from the left edge, the title over its gap ---- */
.other-bar {
    position: relative;
    height: 58px;
    margin: 32px 0 0;
    background-image: var(--other-bar);
    background-repeat: no-repeat;
    background-position: left center;
    /* Stretched across the page as on the old site, but never narrower than 1100px so the stripes keep their shape on phones. */
    background-size: max(100%, 1100px) 100%;
}

.other-bar__text {
    position: absolute;
    top: 50%;
    left: max(15%, 165px);
    color: #f0c70d;
    font-family: "Sui Generis", Arial, sans-serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 3px;
    transform: translateY(-50%);
}

/* ---- A page of parts with arrows at the sides and dots below ---- */
.other-parts {
    scroll-margin-top: var(--nav-h);
}

.other-parts__inner {
    max-width: 1200px;
    margin: 48px auto 0;
    padding: 0 64px;
}

.other-parts__stage {
    position: relative;
}

.other-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.other-grid[hidden] {
    display: none;
}

.other-grid > li {
    display: flex;
}

/* The old site's grey rounded card: the part on top, its number and name below (long names wrap, never overlap). */
.other-part {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px 20px;
    border-radius: 10px;
    color: #111;
    font-family: "Sui Generis", Arial, sans-serif;
    text-align: center;
    text-decoration: none;
    background-color: #ccc;
}

/* 3:2 transparent cut-outs; width 100% because the 640px file is larger than the card. */
.other-part__img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.other-part__no {
    margin-top: 14px;
    font-size: 15px;
    letter-spacing: 1px;
}

.other-part__name {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0.5px;
    overflow-wrap: anywhere;
}

.other-part:hover .other-part__img,
.other-part:focus-visible .other-part__img {
    transform: scale(1.08);
}

.other-part:hover,
.other-part:focus-visible {
    color: #6b5d00;
}

.other-part:focus-visible {
    outline: 3px solid #ffed00;
    outline-offset: 3px;
}

/* The old site's thin chevrons beside the page. */
.other-parts__arrow {
    position: absolute;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    color: #555;
    font-size: 34px;
    background: none;
    transform: translateY(-50%);
    cursor: pointer;
}

.other-parts__arrow--prev {
    left: -60px;
}

.other-parts__arrow--next {
    right: -60px;
}

.other-parts__arrow:hover {
    color: #111;
}

.other-parts__arrow:focus-visible {
    outline: 3px solid #ffed00;
}

/* ==========================================================
   Other: responsive
   ========================================================== */
@media (max-width: 991.98px) {
    .other-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .other-bar {
        height: 44px;
        margin-top: 24px;
    }

    .other-bar__text {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .other-parts__inner {
        margin-top: 56px;
        padding: 0 24px;
    }

    /* Phones: two across, swipe or tap the arrows above the page. */
    .other-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .other-part {
        padding: 12px 8px 14px;
    }

    .other-part__no {
        margin-top: 10px;
        font-size: 13px;
    }

    .other-part__name {
        font-size: 11px;
        letter-spacing: 0;
    }

    .other-parts__arrow {
        top: -44px;
        width: 36px;
        height: 36px;
        font-size: 24px;
        transform: none;
    }

    .other-parts__arrow--prev {
        left: -8px;
    }

    .other-parts__arrow--next {
        right: -8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .other-part__img {
        transition: none;
    }

    .other-part:hover .other-part__img,
    .other-part:focus-visible .other-part__img {
        transform: none;
    }
}
