@use "../abstracts/variables" as vars;

/* ===========================
   Header 3
   =========================== */
.header3 {
    width: 100%;
    position: relative;
    z-index: 1000;

    // Top Bar (Blue)
    &__top {
        background-color: vars.$color-primary; // Blue
        padding: vars.rem(12) 0;
        position: relative;
        z-index: 2;

        @media (max-width: 991px) {
            display: none; // Simplified mobile header
        }

        .container {
            position: relative;
        }

        &-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .social-links {
            display: flex;
            gap: vars.rem(20);

            a {
                color: vars.$color-white;
                font-size: vars.rem(14);
                transition: all 0.3s;

                &:hover {
                    opacity: 0.7;
                }
            }
        }

        .nav-links {
            ul {
                display: flex;
                gap: vars.rem(30);
                margin: 0;
                padding: 0;
                list-style: none;

                li {
                    a {
                        color: vars.$color-white;
                        font-size: vars.rem(13);
                        font-weight: 700;
                        text-transform: uppercase;
                        text-decoration: none;
                        letter-spacing: 0.05em;
                        transition: all 0.3s;

                        &:hover {
                            opacity: 0.7;
                        }
                    }
                }
            }
        }

        .login-btn {
            color: vars.$color-white;
            font-size: vars.rem(13);
            font-weight: 700;
            text-transform: uppercase;
            text-decoration: none;
            letter-spacing: 0.05em;
            transition: all 0.3s;

            &:hover {
                opacity: 0.7;
            }
        }
    }

    // Main Header (Dark)
    &__main {
        background-color: #1A1926; // Dark grey-black
        padding: vars.rem(20) 0;
        position: relative;

        @media (max-width: 991px) {
            padding: vars.rem(15) 0;
        }

        .container {
            position: relative;
        }
    }

    // Logo Container (White Box)
    &__logo-box {
        position: absolute;
        top: vars.rem(-0); // Overlap top bar
        left: 0;
        border-radius: vars.rem(100); // Pill-like
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        z-index: 5;
        min-width: vars.rem(220);
        display: flex;
        align-items: center;
        justify-content: center;

        @media (max-width: 991px) {
            position: relative;
            top: 0;
            padding: vars.rem(10) vars.rem(20);
            min-width: auto;
        }

        img {
            max-width: vars.rem(150);
            display: block;
        }
    }

    // Contact Info Row
    &__contact {
        display: flex;
        align-items: center;
        gap: vars.rem(40);
        margin-left: vars.rem(250); // Make space for logo box

        @media (max-width: 1400px) {
            margin-left: vars.rem(230);
            gap: vars.rem(20);
        }

        @media (max-width: 991px) {
            display: none;
        }

        &-item {
            display: flex;
            align-items: center;
            gap: vars.rem(12);

            .icon {
                width: vars.rem(35);
                height: vars.rem(35);
                background-color: rgba(255, 255, 255, 0.1);
                color: vars.$color-primary;
                border: 1px solid rgba(0, 115, 230, 0.3);
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: vars.rem(14);
            }

            .text {
                color: vars.$color-white;
                font-size: vars.rem(14);
                font-weight: 500;
            }
        }
    }

    // Right Side: Search & Cart
    &__right {
        display: flex;
        align-items: center;
        gap: vars.rem(20);
        justify-content: flex-end;

        @media (max-width: 991px) {
            flex-grow: 1;
        }
    }

    // Search Bar
    &__search {
        background-color: vars.$color-white;
        border-radius: vars.rem(50);
        padding: vars.rem(5);
        display: flex;
        align-items: center;
        min-width: vars.rem(300);

        @media (max-width: 1199px) {
            min-width: vars.rem(220);
        }

        @media (max-width: 575px) {
            display: none;
        }

        input {
            background: transparent;
            border: none;
            padding: vars.rem(10) vars.rem(20);
            font-size: vars.rem(14);
            outline: none;
            width: 100%;

            &::placeholder {
                color: #9DA6AE;
            }
        }

        .icon-search {
            margin-left: vars.rem(15);
            color: vars.$color-heading;
        }

        .search-btn {
            background-color: vars.$color-primary;
            color: vars.$color-white;
            border: none;
            border-radius: vars.rem(30);
            padding: vars.rem(10) vars.rem(25);
            font-size: vars.rem(13);
            font-weight: 700;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            gap: vars.rem(8);
            transition: all 0.3s;

            &:hover {
                background-color: vars.$color-black;
            }
        }
    }

    // Cart icon
    &__cart {
        width: vars.rem(48);
        height: vars.rem(48);
        background-color: rgba(255, 255, 255, 0.1);
        color: vars.$color-white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: all 0.3s;

        &:hover {
            background-color: vars.$color-primary;
        }
    }

    // Mobile Trigger
    &__mobile-trigger {
        background: none;
        border: none;
        color: vars.$color-white;
        font-size: vars.rem(24);
        padding: 0;
        display: none;

        @media (max-width: 991px) {
            display: block;
        }
    }
}