﻿
#menu-control,
#search-control {
    display: none;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
}

@media screen and (max-width: 767px) {
    #menu-control:checked ~ header > nav {
        right: 0;
    }
    #menu-control:checked ~ header > nav > .menu-link > .link-box {
        right: calc((100vw - 200px) / 2);
    }

    header {
        width: 100%;
        height: 70px;
        background-color: #800e13;
        box-sizing: border-box;
        position: fixed;
        top: 0px;
        left: 0px;
        z-index: 3;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    header > .menu-btn {
        width: 32px;
        height: 20px;
        display: block;
        position: fixed;
        top: 25px;
        right: 20px;
        z-index: 4;
    }
    
    header > .menu-btn > span {
        width: 32px;
        height: 3px;
        background-color: #ffffff;
        display: block;
        position: absolute;
        left: 0;
        transition: 0.4s;
    }

    header > .menu-btn > span:nth-child(1) {
        top: 0px;
    }

    header > .menu-btn > span:nth-child(2) {
        top: 8.5px;
    }

    header > .menu-btn > span:nth-child(3) {
        top: 17px;
    }

    #menu-control:checked ~ header > .menu-btn > span:nth-child(1) {
        width: 30px;
        top: 12px;
        left: 0px;
        transform: translateY(-6px) rotate(45deg);
    }

    #menu-control:checked ~ header > .menu-btn > span:nth-child(2) {
        transform: scaleX(0);
    }

    #menu-control:checked ~ header > .menu-btn > span:nth-child(3) {
        width: 30px;
        top: 0px;
        left: 0px;
        transform: translateY(6px) rotate(-45deg);
    }

    /* ---------------------------------------------------------------------------------------------------- */

    header nav {
        width: 100vw;
        height: calc(100vh - 70px);
        background-color: #e50044;
        overflow-x: hidden;
        overflow-y: auto;
        position: fixed;
        top: 70px;
        right: -100%;
        transition: right 0.5s;
        z-index: 3;
    }

    header nav a {
        box-sizing: border-box;
        color: #ffffff;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        font-size: 18px;
        font-weight: 700;
        letter-spacing: 2px;
    }
    header > nav a:link { color: #ffffff; }
    header > nav a:hover { color: #ffffff; }
    header > nav a:active { color: #ffffff; }

    header > nav a > img,
    header > nav a > span {
        pointer-events: none;
    }

    header > nav button {
        background-color: rgba(0, 0, 0, 0);
    }

    header > nav > .menu-logo {
        position: fixed;
        top: 15px;
        left: 20px;
        z-index: 4;
    }

    header > nav > .menu-logo > a > img {
        height: 40px;
    }

    header nav > ul.menu {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        margin-top: 40px;
    }

    header > nav > ul.menu > li {
        
    }

    header nav > ul.menu > li > a {
        letter-spacing: 2px;
        padding: 20px;
        position: relative;
    }

    header nav > ul.menu > li > button {
        letter-spacing: 2px;
        padding: 20px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    header > nav > .menu-link {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
        position: fixed;
        top: 18px;
        right: 67px;
        z-index: 4;
    }

    header > nav > .menu-link > .link-box {
        width: 200px;
        height: 40px;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 578px;
        right: calc(-1 * (((100vw - 200px) / 2) + 200px));
        z-index: 4;
        transition: right 0.5s;
    }

    header > nav > .menu-link > .link-box > .search-box {
        width: 100%;
        height: 100%;
    }

    header > nav > .menu-link > .link-box > .search-box > form {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    header > nav > .menu-link > .link-box > .search-box > form > .search-input {
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        border: 1px solid #ffffff;
        border-radius: 4px;
        box-sizing: border-box;
        color: #737373;
        font-size: 16px;
        font-weight: 700;
        outline: none;
        padding: 5px 10px;
    }

    header > nav > .menu-link > .link-box > .search-box > form > .search-input::placeholder {
        color: #737373;
        font-size: 16px;
        font-weight: 700;
    }

    header > nav > .menu-link > .link-box > .search-box > .search-close-btn {
        display: none;
    }

    header > nav > .menu-link > .link-box > .search-btn {
        display: none;
    }
}

@media screen and (min-width: 768px) {
    header {
        width: 100%;
        height: 90px;
        background-color: #800e13;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0px;
        left: 0px;
        z-index: 3;
    }
    
    header .menu-btn { display: none; }

    /* ---------------------------------------------------------------------------------------------------- */

    header > nav {
        max-width: var(--page-max-width);
        width: var(--page-width);
        height: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    header > nav a {
        box-sizing: border-box;
        color: #ffffff;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 2px;
    }
    header > nav a:link { color: #ffffff; }
    header > nav a:hover { color: #ffffff; }
    header > nav a:active { color: #ffffff; }

    header > nav a > img,
    header > nav a > span {
        pointer-events: none;
    }

    header > nav button {
        background-color: rgba(0, 0, 0, 0);
    }

    header > nav button > img,
    header > nav button > span {
        pointer-events: none;
    }

    header > nav > .menu-logo > a {
        padding: 0px 12.5px;
    }

    header > nav > ul.menu {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
        position: relative;
    }

    header > nav > ul.menu > li {
        
    }

    header > nav > ul.menu > li > a {
        padding: 8px 10px;
    }

    header > nav > ul.menu > li > button {
        letter-spacing: 2px;
        padding: 8px 10px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    header > nav > .menu-link {
        width: 151px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 30px;
    }

    header > nav > .menu-link > .link-box {
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    header > nav > .menu-link > .link-box > .search-box {
        width: 0px;
        position: relative;
    }

    header > nav > .menu-link > .link-box > .search-box > form {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    header > nav > .menu-link > .link-box > .search-box > form > .search-input {
        width: 100%;
        height: 40px;
        background-color: rgba(0, 0, 0, 0);
        border: none;
        border-radius: 4px;
        box-sizing: border-box;
        color: #ffffff;
        font-size: 16px;
        font-weight: 700;
        outline: none;
        padding: 0px;
    }

    header > nav > .menu-link > .link-box > .search-box > form > .search-input::placeholder {
        color: #ffffff;
        font-size: 16px;
        font-weight: 700;
    }

    header > nav > .menu-link > .link-box > .search-box > .search-close-btn {
        cursor: pointer;
        display: none;
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
    }

    header > nav > .menu-link > .link-box > .search-box > .search-close-btn > i {
        color: #ffffff;
        font-size: 20px;
    }

    header > nav > .menu-link > .link-box > .search-btn {
        cursor: pointer;
    }

    header > nav > .menu-link > .link-box > .search-btn > img {
        pointer-events: none;
    }

    #search-control:checked ~ header > nav > .menu-link > .link-box > .search-box {
        width: 200px;
        transition: all 0.5s;
    }

    #search-control:checked ~ header > nav > .menu-link > .link-box > .search-box > form > .search-input {
        border: 1px solid #ffffff;
        padding: 5px 10px;
    }

    #search-control:checked ~ header > nav > .menu-link > .link-box > .search-box > .search-close-btn {
        display: block;
    }

    #search-control:checked ~ header > nav > .menu-link > .link-box > .search-btn {
        display: none;
    }

    header > nav > .menu-link > .shop-btn,
    header > nav > .menu-link > .member-btn {
        display: none;
    }
}
