/* 헤더 기본 */
header {
    top: 0;
    left: 0;
    position: fixed;
    width: 100%;
    height: 50px;
    display: flex;
    background-color: var(--basic-white);
    padding: 0 40px;
    z-index: 999;
}

header > nav {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: space-between;
}

/* 공통 UL/LI */
header > nav > ul {
    height: 100%;
    display: flex;
    align-items: center;
    list-style: none;
}

header > nav > ul > li {
    height: 100%;
    padding: 0 5px;
    display: flex;
    align-items: center;
}

/* 왼쪽 섹션 로고 */
header > nav > ul.left-section > li {
    padding: 0;
    position: relative;
}

header > nav > ul.left-section > li > a {
    padding-left: 0;
}


/*header > nav > ul.left-section > li > a > .logo-img {*/
/*    width: 100px;*/
/*}*/

header > nav > ul.left-section > li > a > svg.logo {
    width: 100px;
    height: auto;
}

/* 상품 리스트 메뉴 */
header > nav > ul.product-list-section {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

header > nav > ul.product-list-section > li {
    position: relative; /* 부모 기준 */
    padding: 0 10px; /* 좌우 여백 */
    margin: 0 10px; /* 메뉴 간 간격 */
}

header > nav > ul.product-list-section > li > a {
    text-decoration: none;
    color: black;
    line-height: 50px;
    display: block;
}

header > nav > ul.product-list-section > li:hover > a {
    color: var(--basic-red);
}

/* 드롭박스 (서브 메뉴) - 중앙 정렬 */
header > nav > ul.product-list-section > li > ul {
    display: none;
    position: absolute;
    top: 50px;
    left: 50%; /* 부모 메뉴 기준 중앙 */
    transform: translateX(-50%); /* 정확히 가운데 */
    background-color: #eee;
    min-width: 150px;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 1000;
}

header > nav > ul.product-list-section > li:hover > ul {
    display: block;
}

header > nav > ul.product-list-section > li > ul > li {
    width: 150px;
    text-align: center;
}

header > nav > ul.product-list-section > li > ul > li > a {
    display: block;
    line-height: 40px;
    text-decoration: none;
    color: black;
}

header > nav > ul.product-list-section > li > ul > li > a:hover {
    color: blue;
}

/* 오른쪽 섹션 */
header > nav > ul.right-section {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

header > nav > ul.right-section > li {
    margin-left: 10px;
    display: flex;
    align-items: center;
}

/* 검색 버튼 */
header > nav > ul.right-section .search-btn {
    cursor: pointer;
}

/* 검색 입력창 */
header > nav > ul.right-section > li.search-input-container {
    display: none;
    align-items: center;
    height: 25px;
    border: 1px solid var(--basic-black);
    background-color: var(--basic-white);
    padding: 0 5px;
}

header > nav > ul.right-section .search-input {
    border: none;
    height: 100%;
    background-color: unset;
}

/* 카트 */
header > nav > ul.right-section .cart-container {
}

header > nav > .right-section > .login-container > a,
header > nav > .right-section > .logout-container button {
    border: none;

    &:hover {
        color: var(--basic-red);
    }
}

header > nav > .right-section .cart-container {
    position: relative;
}

header > nav > ul.right-section .cart-container .cart-alert {

}

/*헤더 카트 알림*/
header > nav > .right-section .cart-container .cart-alert {
    position: absolute;
    top: 10px;
    left: 15px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--basic-red);
    color: var(--basic-white);
    font-size: 12px;
}

@keyframes pulse-effect {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
}

.cart-alert.pulse {
    display: flex;
    animation: pulse-effect 0.5s ease-in-out;
}

/* 로그인, 로그아웃, 마이페이지 */

header > nav > ul.right-section .login-container a:hover,
header > nav > ul.right-section .logout-container button:hover,
header > nav > ul.right-section .my-page-container a:hover {
    color: var(--basic-red);
}

/* 선택된 메뉴 강조 */

.product-list-section > li.selected a {
    color: var(--basic-red);
}


/*관리자 초기화 버튼*/

header > nav > .right-section button.admin-reset-button {
    background-color: unset;
    height: 25px;
    padding: 5px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    color: var(--basic-red);
    cursor: pointer;

    &:hover {
        color: var(--basic-white);
        background: var(--basic-red);
    }
}

