@import url("../fonts-6febca5377d0f04b794c26d612630a20.css");
@import url("header-e7f98d02f53d2c9beecb9e78d64127bf.css");
@import url("footer-78213966b3d77c8ea241daae6997b69a.css");
@import url("Product/list-41191df48b9e64cfd739dd22fdb26393.css");
@import url("Product/details-1db21782d180f8eac2a54ba325261b19.css");
@import url("Store/details-39d39d22c6e944b71f0d1166b8a1c5c2.css");

:root {
    --primary-25: #F2F3F8;
    --primary-50: #E9EBF1;
    --primary-100: #D3D8E3;
    --primary-200: #ABB4C9;
    --primary-300: #7E8CAE;
    --primary-400: #59688C;
    --primary-500: #3F4963;

    --primary: var(--primary-500);

    --red-100: #FED6D7;
    --red-500: #FC3A3F;

    --blue-100: #D5E1FB;
    --blue-500: #2563EB;

    --green-100: #D0F7EB;
    --green-500: #2DB98D;

    --grey-100: #FCFCFC;
    --grey-200: #F7F7F7;
    --grey-300: #F5F5F5;
    --grey-400: #F0F0F0;
    --grey-500: #EDEDED;

    --tertiary: #FFFFFF;

    --transition-default: .2s ease-in-out;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: inherit;
}

html {
    font-family: var(--app-main-font);
    font-size: var(--app-font-size-normal);
    color: var(--primary);
    scrollbar-width: thin;
    overflow-x: clip;
}

body {
    min-height: 100svh;
    overflow-x: clip;

    &::-webkit-scrollbar-track {
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
        background-color: var(--primary-25);
    }

    &::-webkit-scrollbar {
        width: 6px;
        background-color: var(--primary-25);
    }

    &::-webkit-scrollbar-thumb {
        background-color: var(--primary);
        border-radius: 16px;
    }

    &::-webkit-scrollbar-button {
        display: none
    }
}

:where(button, a, input, textarea, ul, ol, select) {
    font-family: inherit;
    appearance: none;
    box-shadow: none;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    list-style: none;
}

:where(*) {
    outline: 1px solid transparent;
    outline-offset: 1px;
}

:where(button) {
    cursor: pointer;
}

:where(a) {
    text-decoration: none;
}

:where(img) {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    user-select: none;
}

.divider {
    width: 100%;
    height: 1px;
    background-color: var(--primary-100);
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 84px;
    padding-right: 84px;

    @media screen and (max-width: 992px) {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.desktop {
    display: block;

    @media screen and (max-width: 767px) {
        display: none !important;
    }
}

.mobile {
    display: block;

    @media screen and (min-width: 768px) {
        display: none !important;
    }
}

/*****************/
/* Shared styles */
/*****************/

.overlay {
    display: flex;
    max-width: 400px;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    z-index: 110;
    opacity: 0;
    pointer-events: none;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 32px 0 rgba(34, 34, 34, 0.06);
    transition: .3s ease-in-out;

    &.active {
        opacity: 1;
        pointer-events: all;
    }

    .overlay-header {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 32px;

        h2 {
            color: var(--primary);
            font-size: 20px;
            font-style: normal;
            font-weight: 600;
            line-height: normal;
            letter-spacing: -0.4px;
        }

        p {
            color: var(--primary-400);
            font-size: 14px;
            font-weight: 400;
            letter-spacing: -0.28px;
        }

        .close-overlay {
            position: absolute;
            top: 16px;
            right: 16px;
            cursor: pointer;
            width: 20px;
            height: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: var(--transition-default);

            &:hover {
                opacity: .7;
            }

            svg {
                width: 100%;
                height: 100%;
            }

            @media screen and (max-width: 768px) {
                width: 24px;
                height: 24px;

                svg path {
                    stroke-width: 1px;
                }
            }
        }
    }
}

.backdrop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background-color: rgba(34, 34, 34, 0);
    pointer-events: none;
    transition: .4s ease-in-out;

    &.active {
        background-color: rgba(34, 34, 34, 0.12);
        pointer-events: all;

        @media screen and (max-width: 768px) {
            background-color: rgba(34, 34, 34, 0.32);
        }
    }
}

.btn {
    display: flex;
    min-height: 40px;
    max-height: 40px;
    padding: 12px 16px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: -0.28px;
    white-space: nowrap;
    user-select: none;
    outline: 1px solid transparent;
    outline-offset: 3px;
    transition: var(--transition-default);

    &:hover {
        opacity: .7;
    }

    &:focus, &:focus-visible {
        box-shadow: none;
        outline-color: var(--primary-400);
    }

    &.primary {
        background-color: var(--primary);
        color: var(--tertiary);

        &:hover {
            opacity: 1;
            background-color: var(--primary-400);
        }
    }

    &:disabled {
        pointer-events: none;
        background: var(--grey-200);
        color: var(--primary-200);
    }

    &.see-map {
        @media screen and (min-width: 768px) {
            margin-right: 0.5rem;
        }
    }
}

.select-wrapper {
    display: flex;
    position: relative;
    align-items: stretch;
    gap: 8px;
    min-height: 40px;
    max-height: 40px;
    border: 1px solid var(--primary-100);
    border-radius: 8px;
    width: fit-content;
    user-select: none;
    cursor: pointer;
    padding: 0 16px;
    outline: 3px solid transparent;
    transition: var(--transition-default);

    &::after {
        content: '';
        min-width: 16px;
        min-height: 16px;
        pointer-events: none;
        background-repeat: no-repeat;
        background-position: center;
        background-image: url("../../images/shop/chevron-bottom-4e241071e204bc3203987fd3128f1f9b.svg");
        transition: var(--transition-default);
    }

    &:hover {
        border-color: var(--primary-200);
    }

    &:focus, &:focus-within {
        outline-color: var(--primary-50);
    }

    &.active {
        border-color: var(--primary-200);

        &:after {
            scale: 1 -1;
        }

        .options-container {
            pointer-events: all;
            opacity: 1;
            translate: 0;
        }
    }

    &.options-1 {
        pointer-events: none;
        &:after {
            display: none;
        }
    }

    .custom-select {
        display: flex;
        align-items: center;
        width: 100%;
        font-size: 16px;
        font-weight: 400;
        letter-spacing: -0.32px;
    }

    .options-container {
        pointer-events: none;
        opacity: 0;
        position: absolute;
        top: calc(100% + 8px);
        padding: 16px;
        left: 0;
        right: 0;
        background-color: #fff;
        z-index: 110;
        cursor: initial;
        max-height: 223px;
        min-width: fit-content;
        overflow-y: auto;
        border-radius: 8px;
        outline: 1px solid var(--primary-50);
        outline-offset: 0;
        box-shadow: 0 4px 32px 0 rgba(34, 34, 34, 0.06);
        transition: .15s ease-in-out;
        scrollbar-width: thin;
        scrollbar-gutter: stable;

        &::-webkit-scrollbar-track {
            -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
            background-color: var(--grey-200);
        }

        &::-webkit-scrollbar {
            width: 10px;
            background-color: var(--grey-200);
        }

        &::-webkit-scrollbar-thumb {
            background-color: var(--primary-25);
            border: 2px solid #555555;
        }

        .option {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            width: 100%;
            min-width: fit-content;
            cursor: pointer;
            transition: var(--transition-default);
            height: 48px;
            padding: 8px 16px;
            font-size: 16px;
            font-weight: 400;
            letter-spacing: -0.32px;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            color: var(--primary);
            position: relative;

            &:hover, &:focus, &:focus-visible {
                background-color: var(--grey-200);
            }

            &:after {
                content: '';
                min-width: 16px;
                max-width: 16px;
                min-height: 16px;
                max-height: 16px;
                border-radius: 99px;
                background-color: white;
                outline: 1px solid var(--primary);
                outline-offset: -2px;
                transition: var(--transition-default);

                @media screen and (max-width: 768px) {
                    min-width: 18px;
                    max-width: 18px;
                    min-height: 18px;
                    max-height: 18px;
                }
            }

            &.active {
                background-color: var(--grey-300);
                pointer-events: none;

                &:after {
                    outline: 4px solid var(--blue-500);
                    outline-offset: -4px;

                    @media screen and (max-width: 768px) {
                        outline: 5px solid var(--blue-500);
                        outline-offset: -5px;
                    }
                }
            }

            @media screen and (min-width: 768px) {
                border-radius: 8px;
            }
        }
    }

    .mobile-header {
        display: none;
        justify-content: space-between;
        align-items: center;
        padding: 16px;
        border-bottom: 1px solid var(--primary-50);
        background-color: var(--grey-100);
        font-size: 20px;
        font-weight: 600;
        letter-spacing: -0.4px;
    }

    select {
        inset: 0;
        opacity: 0;
        position: absolute;
        pointer-events: none;
    }

    @media screen and (max-width: 768px) {

        &.active:before {
            background-color: rgba(34, 34, 34, 0.32);
            pointer-events: all;
        }

        &:before {
            content: '';
            position: fixed;
            z-index: 109;
            width: 100%;
            height: 100%;
            inset: 0;
            background-color: rgba(34, 34, 34, 0);
            pointer-events: none;
            transition: .4s ease-in-out;
        }

        .options-container {
            position: fixed;
            top: unset;
            bottom: 0;
            left: 0;
            padding: 0;
            translate: 0 100px;
            width: 100%;
            height: auto;
            border-radius: 20px 20px 0 0;
            max-height: calc(70vh + 61px);

            .mobile-header {
                display: flex;

                .close {
                    display: flex;
                    justify-content: center;
                    align-items: center;

                    svg {
                        width: 28px;
                        height: 28px;
                    }
                }
            }

            .options {
                max-height: 70vh;
                overflow-y: auto;
                scrollbar-width: thin;
                padding-bottom: 40px;

                .option {
                    margin: 0 auto;
                    width: calc(100% - 32px);
                    background-color: transparent !important;

                    &:not(:last-child) {
                        border-bottom: 1px solid var(--primary-50);
                    }
                }
            }

            .btn-container {
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 16px;
                margin-top: 24px;
                border-top: 1px solid var(--primary-50);

                .btn {
                    width: 100%;
                }
            }
        }
    }
}

.input-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    position: relative;
    margin-bottom: 24px;

    &:has(input:focus) label, &:has(input:focus-visible) label {
        color: var(--blue-500);
    }

    label {
        color: var(--primary);
        font-size: 14px;
        font-weight: 600;
        letter-spacing: -0.28px;
        background-color: white;
        position: absolute;
        top: 0;
        left: 0;
        translate: 16px -50%;
        padding: 4px;
        transition: var(--transition-default);

        @media screen and (max-width: 768px) {
            font-size: 12px;
            letter-spacing: -0.24px;
        }
    }

    input {
        width: 100%;
        min-height: 56px;
        max-height: 56px;
        padding: 16px;
        color: var(--primary);
        border: 1px solid var(--primary-100);
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: normal;
        border-radius: 8px;
        letter-spacing: -0.28px;
        outline: 3px solid transparent;
        outline-offset: 0;
        transition: var(--transition-default);

        &:hover {
            border-color: var(--primary-400);
        }

        &:focus, &:focus-visible {
            border-color: var(--blue-500);
            outline-color: var(--blue-100);
        }

        &::placeholder {
            color: var(--primary-200);
        }

        @media screen and (max-width: 767px) {
            font-size: 12px;
            letter-spacing: -0.24px;
        }
    }

    &:after {
        content: '';
        background-image: url("../../images/shop/edit-855fb2279dee9b851c6eb56e291db54f.svg");
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        color: var(--primary);
        pointer-events: none;
    }
}

.product-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fill, minmax(294px, 1fr));

    @media screen and (max-width: 1024px) {
        grid-template-columns: repeat(3, 1fr);
    }

    @media screen and (max-width: 768px) {
        grid-template-columns: repeat(2, minmax(40%, 1fr));
        gap: 8px;
    }

    .product-card {
        border-radius: 8px;
        border: 1px solid var(--primary-50);
        overflow: hidden;

        &:hover img, &:focus img, &:focus-visible img {
            scale: 1.1;
        }

        .product-image {
            position: relative;
            display: block;
            width: 100%;
            height: 384px;
            overflow: clip;

            @media screen and (max-width: 640px) {
                height: 216px
            }

            img {
                will-change: scale;
                transition: .3s ease-in-out;
            }

            .tag {
                position: absolute;
                bottom: 12px;
                left: 12px;
                display: flex;
                align-items: center;
                gap: 12px;
                max-height: 24px;
                min-height: 24px;
                font-size: 12px;
                font-style: normal;
                font-weight: 400;
                letter-spacing: -0.24px;
                border-radius: 4px;
                padding: 12px;
                user-select: none;
                background-color: var(--primary);
                color: var(--tertiary);
            }
        }

        .product-content {
            padding: 12px;

            .brand {
                font-size: 12px;
                font-weight: 400;
                letter-spacing: -0.24px;
                color: var(--primary-400);
                margin-bottom: 4px;
                white-space: nowrap;
                overflow: clip;
                text-overflow: ellipsis;
            }

            .name {
                font-size: 14px;
                font-weight: 600;
                letter-spacing: -0.28px;
                color: var(--primary);
                margin-bottom: 12px;
                white-space: nowrap;
                overflow: clip;
                text-overflow: ellipsis;

                @media screen and (max-width: 767px) {
                    margin-bottom: 8px;
                }
            }

            .prices {
                display: flex;
                align-items: center;
                gap: 8px;

                .selling {
                    color: var(--primary-500);
                    font-size: 16px;
                    font-style: normal;
                    font-weight: 600;
                    line-height: normal;
                    letter-spacing: -0.32px;

                    @media screen and (max-width: 767px) {
                        font-size: 14px;
                    }
                }

                .original {
                    color: var(--primary-400);
                    font-size: 14px;
                    font-style: normal;
                    font-weight: 400;
                    line-height: normal;
                    letter-spacing: -0.28px;
                    text-decoration: line-through;

                    @media screen and (max-width: 767px) {
                        font-size: 12px;
                    }
                }
            }
        }
    }
}
