/* ==========================================================
   OEM | ODM PAGE
   Loaded only by Views/OemOdm/Index.cshtml via ~/bundles/oem-css.
   Site-wide components stay in style.css / mobile_style.css.
   ========================================================== */

/* ---- Intro ---- */
.oem-intro__quote {
    max-width: 1100px;
    margin: 0 auto;
    color: #dcbc6e;
    font-size: 28px;
    font-style: italic;
    line-height: 1.4;
    text-align: center;
}

.oem-intro {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
}

/* "OEM & ODM" artwork, right-aligned so the diamond at its top-right corner sits beside the first paragraph. */
.oem-intro__aside {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.oem-intro__title {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
}

.oem-intro__text p {
    margin: 0 0 20px;
    color: #333;
    font-size: 16px;
    line-height: 1.7;
}

/* ---- Product tabs ---- */
.oem-products__title {
    font-size: 32px;
}

.oem-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 4vw, 64px);
    padding: 10px; /* room for the active tab's corner marks */
}

.oem-tab {
    position: relative;
    padding: 12px 8px;
    border: 1px solid #111;
    color: #fff;
    font-family: "Sui Generis", Arial, sans-serif;
    font-size: clamp(16px, 1.6vw, 22px);
    line-height: 1.2;
    letter-spacing: 0.5px;
    background-color: #555;
    cursor: pointer;
}

.oem-tab.is-active {
    color: #111;
    background-color: #fff;
}

/* Corner marks around the active tab. */
.oem-tab.is-active::before {
    position: absolute;
    inset: -10px;
    background:
        linear-gradient(#777, #777) left top / 12px 1px no-repeat,
        linear-gradient(#777, #777) left top / 1px 12px no-repeat,
        linear-gradient(#777, #777) right top / 12px 1px no-repeat,
        linear-gradient(#777, #777) right top / 1px 12px no-repeat,
        linear-gradient(#777, #777) left bottom / 12px 1px no-repeat,
        linear-gradient(#777, #777) left bottom / 1px 12px no-repeat,
        linear-gradient(#777, #777) right bottom / 12px 1px no-repeat,
        linear-gradient(#777, #777) right bottom / 1px 12px no-repeat;
    content: "";
    pointer-events: none;
}

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

/* ---- Product panels ---- */
.oem-products {
    display: grid;
    grid-template-columns: 3fr 2fr; /* wider text graphic so its small print stays legible */
    gap: 32px;
    align-items: center;
}

/* Every product's image is in the page (so switching is instant) but only .is-active is shown.
   Inactive ones are lifted out of the flow so the box always takes the active image's height. */
.oem-swap {
    position: relative;
}

.oem-swap__item {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    visibility: hidden;
}

.oem-swap__item.is-active {
    position: relative;
    visibility: visible;
}

.oem-banner {
    background-color: #a9a9a9;
}

/* Phone gallery: a product's three photos stacked in one 3:2 frame; fun.js (data-cycle) moves .is-active
   on every second. The next photo fades in on top, and the previous one only hides once it is covered. */
.oem-cycle {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background-color: #a9a9a9;
}

.oem-cycle__item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0s linear 0.3s;
}

.oem-cycle__item.is-active {
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ==========================================================
   OEM | ODM page: responsive
   ========================================================== */
@media (max-width: 991.98px) {
    .oem-intro {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .oem-intro__aside {
        justify-content: center;
    }

    .oem-intro__title {
        max-width: 280px;
    }

    /* Stacked: 3D render first, then the text graphic. */
    .oem-products {
        grid-template-columns: 1fr;
    }

    .oem-products__model {
        order: -1;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 767.98px) {
    .oem-intro__quote {
        font-size: 18px;
    }

    .oem-intro__text p {
        font-size: 15px;
    }

    .oem-products__title {
        font-size: 24px;
    }

    .oem-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .oem-tab {
        font-size: 14px;
    }
}

/* The gallery still changes photos, just without the fade. */
@media (prefers-reduced-motion: reduce) {
    .oem-cycle__item,
    .oem-cycle__item.is-active {
        transition: none;
    }
}
