/* @import "tailwindcss"; */

/*
  1. Use a more-intuitive box-sizing model.
*/
*, *::before, *::after {
    box-sizing: border-box;
}
/*
2. Remove default margin
*/
* {
    margin: 0;
}
/*
Typographic tweaks!
3. Add accessible line-height
4. Improve text rendering
*/
body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
/*
5. Improve media defaults
*/
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}
/*
6. Remove built-in form typography styles
*/
input, button, textarea, select {
    font: inherit;
}
/*
7. Avoid text overflows
*/
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}
/*
8. Create a root stacking context
*/
#root, #__next {
    isolation: isolate;
}

:root {
    --wrap-w: 1440px;
    --cpw-white: #FFFFFF;
    --cpw-black: #000000;
    --cpw-orange: #FF8137;
    --cpw-yellow: #FFCD05;
    --cpw-grey: #455064;
    --cpw-dark-blue: #111F30;
    --cp-sm: 640px;
    --cp-md: 768px;
    --cp-lg: 1024px;
}

html {
    font-size: 16px;
}

body {
    font-family: "Inter",sans-serif;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cpw-wrap h2 {
    font-family: "Inter Tight", sans-serif;
    font-size: clamp(2rem, 0.9583rem + 2.6042vw, 2.4rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--cpw-black);
    margin-bottom: 2rem;
}

.cpw-section-wrap {
    max-width: var(--wrap-w);
    margin: 0 auto 4rem;
}




/* Hero */
.cpw-hero {
    position: relative;
    min-height: 645px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: 4rem;

    .cpw-hero-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;

        /* Overlay dimmer */
        &::after {
            content: "";
            position: absolute;
            inset: 0;
            background-color: rgba(17, 31, 48, 0);
            z-index: 2;
            pointer-events: none;
        }

        img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: right center;

            &.cpw-hero-blueprint {
                opacity: 0.15;
                object-position: center;
            }
        }
    }

    .cpw-hero-content {
        position: relative;
        z-index: 2;
        max-width: var(--wrap-w);
        margin: 0 auto;
        width: 100%;
        display: flex;
        align-items: center;

        .cpw-hero-text {
            flex: 1;
            max-width: 900px;
            padding: 0 1rem 0 0;

            h1 {
                font-family: "Inter Tight", sans-serif;
                font-size: clamp(1.875rem, -1.25rem + 7.8125vw, 3.75rem);
                font-weight: 600;
                color: var(--cpw-white);
                line-height: 1.3;
                font-style: italic;
                margin: 0 0 2rem;

                span {
                    display: block;
                    color: var(--cpw-orange);
                }
            }

            p {
                font-size: clamp(1rem, -0.6667rem + 4.1667vw, 1.7rem);
                font-weight: 400;
                font-style: italic;
                color: var(--cpw-white);
                margin-bottom: 3rem;

                span {
                    display: block;
                }
            }
        }
    }
    
.cpw-hero-buttons {
    display: flex;
    gap: 1.5rem;

    a {
        background-color: var(--cpw-yellow);
        color: #333333;
        padding: 0.8125rem 1rem;
        border-radius: 4px;
        text-decoration: none;
        font-size: 1.25rem;
        font-weight: 700;
        text-align: center;
        width: 206px;

        &.cpw-hero-login {
            background-color: var(--cpw-white);
        }
    }
}

}

/* Popular Parts */
.cpw-popular-parts {

    .cpw-popular-parts-content {

        .cpw-popular-parts-header {
            margin-bottom: 2rem;

            h2 {
                margin-bottom: 0;
            }

            p {
                font-family: "Inter Tight", sans-serif;
                font-size: clamp(1rem, 0.375rem + 1.5625vw, 1.375rem);
                font-weight: 500;
                color: var(--cpw-black);
    
                span {
                    font-weight: 700;
                }
            }

        }

        ul {
            display: grid;
            grid-template-columns: repeat(8, minmax(0, 1fr));
            gap: 1.5rem;
            list-style: none;
            margin: 0;
            padding: 0;

            li {
                display: flex;
                align-items: flex-start;
                gap: 1rem;

                a {
                    text-decoration: none;
                    
                    > div {
                        border-radius: 4px;
                        border: 1px solid #D4D4D6;
                        padding: 0.5rem;
                        margin-bottom: 1rem;

                        img {
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                            display: inline-block;
                        }
                    }

                    span {
                        font-size: 1.125rem;
                        font-weight: 600;
                        color: var(--cpw-black);
                        text-align: center;
                        display: block;
                        margin-bottom: 1rem;
                    }
                }
            }
        
            
        }
        

    }

    
}

/* Banners */
.cpw-banner {

    .cpw-banner-content {
        max-width: var(--wrap-w);
        margin: 0 auto;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: inline-block;
            border-radius: 4px;
        }
    }
}

/* Top Brands */
.cpw-top-brands {

    .cpw-top-brands-content {
        max-width: var(--wrap-w);
        margin: 0 auto;

        ul {
            display: grid;
            grid-template-columns: repeat(8, minmax(0, 1fr));
            gap: 1.5rem;
            list-style: none;
            margin: 0;
            padding: 0;

            li {
                display: flex;
                align-items: center;
                justify-content: center;
                list-style: none;
                background-color: #F7F7F7;
                border-radius: 4px;
                padding: 0.625rem 20px;

                a {

                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        display: block;
                    }
                }
            }
        }
    }
    
}

/* Operation Video */
.cpw-operation-video {

    .cpw-video-operation-content {
        max-width: var(--wrap-w);
        margin: 0 auto;
        display: flex;
        border-radius: 4px;
        overflow: hidden;

        .cpw-video-operation-description {
            flex: 0 0 45%;
        }

        .cpw-video-operation-video {
            flex: 1;
        }

        .cpw-video-operation-description {
            background-color: var(--cpw-grey);
            padding: 3rem;
            display: flex;
            align-items: center;

            > div {

                h3 {
                    font-family: "Inter Tight", sans-serif;
                    font-size: clamp(1.5rem, 1.25rem + 1.5625vw, 2.625rem);
                    font-weight: 600;
                    font-style: italic;
                    line-height: 1.3;
                    color: var(--cpw-white);
                    margin-bottom: 3rem;
                }
    
                p {
                    font-size: 1.375rem;
                    font-weight: 400;
                    color: var(--cpw-white);
                }

            }

            
        }

        .cpw-whole-operation-video {
            position: relative;

            .cpw-video-play-overlay {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                z-index: 2;
                opacity: 0;
                visibility: hidden;
                pointer-events: none;
                transition: opacity 300ms ease;

                img.cpw-video-operation-controls {
                    width: 90px;
                    height: 90px;
                    cursor: pointer;
                    pointer-events: auto;
                }
            }

            video {
                width: 100%;
                height: 100%;
                object-fit: cover;
                display: block;
            }

            /* Show overlay when paused, or on hover while playing */
            &.is-paused .cpw-video-play-overlay {
                opacity: 1;
                visibility: visible;
                pointer-events: auto;
            }
            &.is-playing.is-hovering .cpw-video-play-overlay {
                opacity: 1;
                visibility: visible;
                pointer-events: auto;
            }

            /* Toggle which control icon is visible */
            &.is-paused .cpw-video-operation-play-icon { display: inline-block; }
            &.is-paused .cpw-video-operation-pause-icon { display: none; }
            &.is-playing .cpw-video-operation-play-icon { display: none; }
            &.is-playing .cpw-video-operation-pause-icon { display: inline-block; }
        }
    }
}

/* Staff and Service */
.cpw-staff-service {

    .cpw-staff-service-content {
        
        .cpw-staff-service-item {
            display: flex;
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 1rem;

            > div {
                flex: 0 0 30%;
            }

            > div:last-child {
                flex: 1;
                display: flex;
                align-items: center;
                justify-content: center;
                background-color: var(--cpw-grey);
                padding: 2rem;

                > div {
                    max-width: 500px;

                    img {
                        margin: 0 auto 1.5rem;
                    }

                    blockquote {
                        font-family: "Inter Tight", sans-serif;
                        font-size: clamp(1.375rem, 1.0625rem + 0.7813vw, 1.5625rem);
                        font-weight: 400;
                        font-style: italic;
                        color: var(--cpw-white);
                        text-align: center;
                        margin-bottom: 2rem;
                    }

                    .cpw-staff-service-item-author {
                        border-top: 1px solid var(--cpw-white);
                        padding-top: 0.7rem;
                        display: table;
                        margin: 0 auto;
                        text-align: center;

                        span {
                            font-family: "Inter", sans-serif;
                            font-size: clamp(1rem, 0.7917rem + 0.5208vw, 1.125rem);
                            font-weight: 500;
                            font-style: italic;
                            color: var(--cpw-white);
                            text-align: center;
                            color: var(--cpw-orange);
    
                            &:last-child {
                                color: var(--cpw-white);
                            }
                        }

                    }
                    
                }
                
            }

            img {
                max-width: 587px;
                height: auto;
                object-fit: cover;
            }
            
        }

        .cpw-staff-service-item-gallery {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            column-gap: 1rem;
            max-width: var(--wrap-w);
            margin: 0 auto;

            img {
                width: auto;
                max-height: 625px;
                border-radius: 4px;
                object-fit: cover;
                display: block;
            }
        }

    }
}

/* Map Operations */
.cpw-map-operations {

    .cpw-map-operations-content {
        background-color: var(--cpw-dark-blue);
        border-radius: 4px;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
    }

    

}

/* Create Account Banner */
.cpw-bottom-banner {

    .cpw-bottom-banner-content {
        max-width: var(--wrap-w);
        margin: 0 auto;
        border-radius: 4px;
        overflow: hidden;
    }

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

}


/* Responsive */
@media (max-width: 1500px) {
    
    .cpw-hero {
        padding: 0 1rem;
    }
    .cpw-popular-parts,
    .cpw-banner,
    .cpw-top-brands,
    .cpw-operation-video,
    .cpw-staff-service,
    .cpw-map-operations,
    .cpw-bottom-banner {
        margin: 0 1rem 2rem;
    }

}


@media (max-width: 1415px) {
    
    .cpw-hero {
        .cpw-hero-image {
            &::after {
                background-color: rgba(17, 31, 48, 0.45);
            }
        }
    }

}

@media (max-width: 1024px) {
    
    .cpw-operation-video {
        .cpw-video-operation-content {
            .cpw-video-operation-description {
                padding: 2rem;

                > div {
                    h3 {
                        margin-bottom: 2rem;
                    }
                }

            }
        }
    }

}

@media (max-width: 1080px) {
    
    /* Popular Parts */
    .cpw-popular-parts {

        .cpw-popular-parts-content {

            ul {
                display: flex;
                gap: 0.5rem;
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scroll-snap-type: x mandatory;
                scroll-behavior: smooth;

                li {
                    min-width: 180px;
                    scroll-snap-align: start;
                }

            }
        }
    }

    /* Top Brands */
    .cpw-top-brands {

        .cpw-top-brands-content {

            ul {
                display: flex;
                gap: 0.5rem;
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scroll-snap-type: x mandatory;
                scroll-behavior: smooth;

                li {
                    min-width: 185px;
                    scroll-snap-align: start;
                    /* flex: 0 0 auto; */
                }
            }
        }

    }

}

@media (max-width: 976px) {
    

    .cpw-staff-service {
        & .cpw-staff-service-content {
            .cpw-staff-service-item {
                flex-direction: column;

                img {
                    max-width: 100%;
                }
            }
        }
    }
    

}

@media (max-width: 940px){

    

}

@media (max-width: 845px) {

    .cpw-hero {

        .cpw-hero-content {
            
    
            .cpw-hero-text {
                
    
                h1 {
                    
                    
    
                    span {
                        display: inline;
                    }
                }
    
                p {
    
                    span {
                        
                    }
                }
            }
        }

    }

}


@media (max-width: 640px) {

    .cpw-popular-parts,
    .cpw-banner,
    .cpw-top-brands,
    .cpw-operation-video,
    .cpw-staff-service,
    .cpw-map-operations,
    .cpw-bottom-banner {
        margin: 0 1rem 2rem !important;
    }



    /* Hero */
    .cpw-hero {
        min-height: 530px;
        margin-bottom: 2rem;

        .cpw-hero-image {
            img {
                object-position: unset;
            }
        }
        
        .cpw-hero-content {
    
            .cpw-hero-text {
                padding: 0;
    
                h1 {
                    text-align: center;
    
                    span {
                    }
                }
    
                p {
                    text-align: center;
                    margin-bottom: 2rem;

                    span {
                        display: inline;
                    }
                }
            }
        }

        .cpw-hero-buttons {
            flex-direction: column;
            align-items: center;
            gap: 1rem;

            a {
                
            }
        }

    }

    /* Operation Video */
    .cpw-operation-video {

        .cpw-video-operation-content {
            flex-direction: column;

            .cpw-video-operation-description {
                padding: 2rem;

                > div {
    
                    h3 {
                        margin-bottom: 2rem;
                    }
        
                    p {
                    }
    
                }
                
            }

        }
    }

    /* Staff and Service */
    .cpw-staff-service {

        .cpw-staff-service-content {
            
            .cpw-staff-service-item {
                flex-direction: column;

                > div:last-child {
    
                    > div {
    
                        img {
                        }
    
                        blockquote {
                        }
    
                        .cpw-staff-service-item-author {
    
                            span {
        
                                &:last-child {
                                }
                            }
    
                        }
                        
                    }
                    
                }

                img {
                    max-width: 100%;
                }
            }

            .cpw-staff-service-item-gallery {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
            
        }
    }

    /* Map Operations */
    .cpw-map-operations {

        .cpw-map-operations-content {
            overflow: hidden;
            height: 320px;

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                transform: scale(1);
                transform-origin: center center;
            }
        }

    }

}

@media (max-width: 360px) {
    
    .cpw-operation-video {
        .cpw-video-operation-content {
            .cpw-video-operation-description {
                padding: 1rem;
            }
        }
    }

}

/* ========================================
   TEMPORARY LEGACY CSS - TO BE REMOVED
   ========================================
   This section contains legacy CSS for #cpw-account
   that was copied from main.css for compatibility.
   This should be removed once the new design system
   is fully implemented and tested.
   ======================================== */

/* Create Account Section - Legacy */
#cpw-account {
    color: #fff;
    text-align: center;
    margin: 0 20px 50px 20px;
}

#cpw-account h4 {
    font-size: 54px;
    font-style: italic;
}

@media only screen and (max-width: 1023px) {
    #cpw-account h4 {
        font-size: 36px;
    }
}

@media only screen and (max-width: 767px) {
    #cpw-account h4 {
        font-size: 24px;
    }
}

#cpw-account .wrap {
    padding: 40px;
    border-radius: 36px;
    background: var(--cpw-orange);
}

#cpw-account span {
    display: block;
    font-size: 30px;
}

#cpw-account span:nth-child(2) {
    margin-bottom: 50px;
}

@media only screen and (max-width: 1023px) {
    #cpw-account span {
        font-size: 22px;
    }
}

@media only screen and (max-width: 767px) {
    #cpw-account span {
        font-size: 16px;
    }
}

#cpw-account button {
    border: 0;
    color: #fff;
    padding: 20px 50px;
    border-radius: 40px;
    background: rgba(0, 0, 0, 0);
}

@media only screen and (max-width: 1023px) {
    #cpw-account button {
        padding: 20px 46px;
    }
}

#cpw-account button.cpw-createAcct {
    font-size: 36px;
    font-weight: bold;
    background: var(--cpw-grey);
}

@media only screen and (max-width: 1023px) {
    #cpw-account button.cpw-createAcct {
        font-size: 20px;
    }
}

#cpw-account button.cpw-inquiry {
    font-size: 30px;
}

@media only screen and (max-width: 1023px) {
    #cpw-account button.cpw-inquiry {
        font-size: 18px;
    }
}