/*Font*/

@font-face {
    font-family: "MyFont";
    src: url("../font/B Koodak Bold_0.ttf") format("woff2");
}


/*Reset*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: rgb(249 249 253);
    color: #1f1f2e;
    font-family: Arial, Helvetica, sans-serif;

}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

img {
    width: 50px;
    height: 50px;
}


/*Header*/

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #ffffff;
}

.header_content {
    min-height: 72px;
    width: min(1750px, calc(100% - 60px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin: 0 auto;
}


/*Logo*/

.header_logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6236d9;
    font-size: 30px;
    font-weight: bolder;
}

.header_logo i {
    color: #6236d9;
    font-size: 25px;
}


/*Navigation*/

.navigation {
    display: flex;
    align-items: center;
    gap: 35px;
    font-family: "MyFont";
}

.nav_link {
    color: #77778a;
    font-size: 18px;
    font-weight: bold;
    transition: 0.2s;
}

.nav_link:hover {
    color: #6236d9;
}

.nav_link:active {
    color: #6236d9;
    font-weight: bold;
}


/*Header User Section*/

.header_social {
    display: flex;
    align-items: center;
    gap: 16px;
    direction: rtl;
}

.icon-button {
    border: none;
    background: transparent;
    font-size: 18px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "MyFont", serif;
    font-size: 18px;
    font-weight: bold;
}

.user-profile span {
    /*padding: 0 10px;*/
    color: rgb(98, 54, 217);
    font-size: 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    border-radius: 50%;
}


/*Main Layout*/

.main_Page,
.main_page {
    width: 100%;
    height: calc(100dvh - 73px);
    overflow: auto;
}

.main_content {
    width: min(1750px, calc(100% - 60px));
    margin: 10px auto;
    direction: rtl;
    font-family: "MyFont";
    font-size: 19px;
}


/*Titles*/

h1 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 25px;
    background-color: #6236d9;
    color: white;
    border-radius: 10px;
}

/*p {*/
/*    margin: 0 25px;*/
/*    color: #77778a;*/
/*}*/

/*Responsive*/

@media (max-width: 1000px) {

    .header_content {
        gap: 15px;
    }

    .navigation {
        gap: 20px;
    }

}


@media (max-width: 700px) {

    .header_content {
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .navigation {
        order: 3;

        width: 100%;

        justify-content: center;
        flex-wrap: wrap;

        gap: 15px;
    }

}

/* Shared mobile layout */
@media (max-width: 700px) {
    .header_content,
    .main_content {
        width: calc(100% - 24px);
    }

    .header_content {
        gap: 10px;
    }

    .header_logo {
        font-size: 24px;
    }

    .navigation {
        gap: 10px 16px;
    }

    .nav_link {
        font-size: 15px;
    }

    .user-profile span {
        font-size: 16px;
    }

    h1 {
        min-height: 54px;
        margin: 0;
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 25px;
    }

    h1 .product-button,
    h1 .search_input {
        position: static;
    }

    h1 .product-button {
        width: auto;
        min-width: 145px;
        padding: 0 12px;
        order: 2;
    }

    h1 .search_input {
        width: 100%;
        margin: 2px 0 0;
        order: 3;
    }

    h1 #iii {
        display: none;
    }
}

@media (max-width: 430px) {
    .user-profile span {
        display: none;
    }

    .navigation {
        justify-content: flex-start;
    }
}

/* Responsive refinement - shared layout */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

.header_content,
.main_content {
    min-width: 0;
}

@media (max-width: 1200px) {
    .header_content,
    .main_content {
        width: calc(100% - 32px);
    }

    .header_content {
        gap: 18px;
    }

    .navigation {
        gap: 18px;
    }

    .nav_link {
        font-size: 16px;
    }
}

@media (max-width: 900px) {
    .header_content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 10px 0 8px;
    }

    .header_logo {
        justify-self: start;
    }

    .header_social {
        justify-self: end;
    }

    .header .icon-button {
        position: static;
        width: 40px;
        height: 40px;
        padding: 0;
    }

    .navigation {
        grid-column: 1 / -1;
        order: 3;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 2px 0 6px;
        overflow-x: auto;
        scrollbar-width: thin;
        overscroll-behavior-inline: contain;
    }

    .nav_link {
        flex: 0 0 auto;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        padding: 6px 11px;
        border-radius: 8px;
        background-color: transparent;
    }

    .main_Page,
    .main_page {
        height: auto;
        min-height: calc(100dvh - 120px);
        overflow: visible;
    }

    h1 {
        margin-inline: 0;
    }
}

@media (max-width: 700px) {
    .header_content,
    .main_content {
        width: calc(100% - 20px);
    }

    .header_content {
        gap: 8px 12px;
    }

    .header_logo {
        font-size: 23px;
    }

    .header_logo i {
        font-size: 21px;
    }

    .user-profile {
        font-size: 15px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .main_content {
        margin-top: 8px;
        font-size: 16px;
    }

    h1 {
        min-height: 0;
        padding: 10px;
        row-gap: 10px;
        border-radius: 9px;
        font-size: 24px;
        line-height: 1.4;
    }

    h1 .product-button,
    h1 .search_input {
        min-height: 42px;
        margin: 0;
        font-size: 15px;
    }

    h1 .product-button {
        flex: 1 1 145px;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    h1 .product-button i,
    h1 .product-button #iiii {
        position: static !important;
        margin: 0;
    }

    h1 .search_input {
        flex: 1 1 100%;
        padding-inline: 12px;
    }

    h1 #ii,
    h1 #iii {
        display: none;
    }
}

@media (max-width: 430px) {
    .header_social {
        gap: 4px;
    }

    .navigation {
        margin-inline: -2px;
    }

    .nav_link {
        font-size: 14px;
    }

    h1 {
        font-size: 22px;
    }
}
