@charset "utf-8";

/* ==================================================
	메뉴뉴
================================================== */
header {
    position: fixed;
    width: 100%;
    background-color: var(--color-white);
/*    border-top: solid 2px var(--brand-color-main);*/
    z-index: 10;
    top: 0;
}

header .wrap {
    max-width: var(--px-base);
    margin: 0 auto;
}

@media(max-width:1460px){
    header .wrap {
		padding-left: var(--spacing);
		padding-right: var(--spacing);
    }
}


.top_banner {
    background: var(--brand-color-main);
    padding: var(--rem-15) 0;
}

.top_banner .txt_banner {
    text-align: center;
    color: var(--color-white);
}

.top .logo a {
    display: inline-block;
}

/*top*/
.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--rem-20) 0;
}

/*top. 검색창*/
.top .srch-wrap {
    display: flex;
    justify-content: space-between;
    width: 40%;
    min-width: 500px;
/*    min-height: 38px;*/
    border: 2px solid var(--brand-color-main);
    border-radius: 50px;
    -moz-border-radius: 50px;
    padding: 1rem 2rem 1rem 3rem;
    font-size: 0;
}

.top .srch-wrap input {
    display: block;
    width: 100%;
    border: 0 none;
    padding-right: 15px;
    color: var(--color-gray5);
    font-size: var(--rem-20);
}

.top .srch-wrap input::placeholder {
    color: var(--color-gray2);
}

.top .srch-wrap #dvSrhBtn {
    display: flex;
    align-items: center;
}

/* 개인메뉴 */
.personal_wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--rem-20);
}

ul.lnb {
    list-style: none;
    display: flex;
    align-items: flex-end;
    gap: 1rem
}

ul.lnb li {
    position: relative;
    font-size: var(--rem-16);
}

ul.lnb li:not(:last-child)::after {
    content: '';
    display: inline-block;
    background: var(--color-gray2);
    width: 1px;
    height: 1.2rem;
    margin-left: 1rem;
}

ul.lnb li {
    font-weight: var(--font-sb);
}


ul.lnb li a.on {
    color: var(--brand-color-main);
}

ul.personal-menu {
    /* display: grid; grid-template-columns: repeat(3, 1fr);*/
    display: flex;    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

ul.personal-menu a {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: solid 3px #fff;
}

ul.personal-menu a p {
    text-align: center;
    margin: 0;
    font-size: var(--rem-14);
}

ul.personal-menu .icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
}

ul.personal-menu .icon span.noti_count {
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    top: 0;
    right: 0;
    color: var(--color-white);
    font-size: var(--rem-14);
    font-weight: var(--font-md);
    width: var(--rem-25);
    height: var(--rem-25);
    z-index: 6;
}

ul.personal-menu .icon span.noti_count::after {
    position: absolute;
    content: '';
    top: 0;
    right: 0;
    border-radius: 50%;
    -moz-border-radius: 50%;
    background: var(--brand-color-main);
    border-radius: 50%;
    -moz-border-radius: 50%;
    font-size: var(--rem-14);
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* 모바일 CSS */
@media screen and (max-width: 1200px) {

    .logo img {
        height: 7.6rem;
    }

    /*top. 검색창*/
    .top .srch-wrap {
        min-width: 300px;
    }
}

/* 태블릿 (Tablet) */
@media screen and (max-width: 1100px) {

    .top .logo img {
        height: 6rem;
    }

    .top form {display: contents;}
    
    .top .srch-wrap {
        padding: 0.6rem 1.2rem;

    }

    .top .personal_wrap ul.lnb {
        display: none;
    }
    ul.personal-menu {
/*        grid-template-columns: repeat(2, 1fr);*/
    }

    header ul.personal-menu li.login{
        display: none;
    }

    header ul.personal-menu li p {
        display: none;
    }

    ul.personal-menu .icon span.noti_count {
        font-size: var(--rem-13);
        width: var(--rem-22);
        height: var(--rem-22);
        z-index: 6;
    }
}

/* 대형 모바일 (Large Mobile) */
@media screen and (max-width: 800px) {
    header .wrap {
        padding: 8px 1.2rem;
    }

    header .wrap.top {
        height: 7rem;
    }

    .top .logo img {
        height: 5rem;
    }

    .personal_wrap {
        gap: var(--rem-16);
    }

    .top .srch-wrap {
        padding: 0.2rem 1.2rem;
    }

    header ul.personal-menu {
        /*display: block;*/
        /* width: 112px; */
    }
    
    ul.personal-menu .icon {
        height: 28px;
    }

    ul.personal-menu .icon img {
        max-height: 26px;
        max-width: 28px;
        width: auto;
        height: auto;
    }

    .top .personal_wrap ul.lnb {display: none;}
}

/* 소형 모바일 (Small Mobile) */
@media screen and (max-width: 520px) {
    header .wrap.top {
        height: 5.8rem;
    }
    .top .logo img {
        height: 3.8rem;
    }
        
    .top .srch-wrap {
        min-width: 200px;   min-height: 28px;
        padding: 1px 1.2rem;
    }
    .top .srch-wrap input {
        padding-right: 12px;    
        font-size: var(--rem-16);
    }

    .top .srch-wrap #dvSrhBtn img{
        width: 16px;
    }
}


/* gnb */
.gnb {
    width: 100%;
    border-top: 1px solid var(--color-gray2);
    border-bottom: 1px solid var(--color-gray2);
}

.nav {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav>li {
    position: relative;
}

.nav>li.toggle-btn {
    padding: var(--rem-20) 0;
}

.nav>li>a {
    position: relative;
    display: flex;
    align-items: center;
    padding: var(--rem-15);
    text-decoration: none;
    color: var(--color-gray4);
    font-size: var(--rem-20);
    font-weight: var(--font-sb);
    transition: color 0.3s;
}
/*.nav>li>a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0px;
    left: calc(50% - 50%);
    background-color: var(--color-gray4);
    transition: width 0.3s;
}*/

.nav>li>a.on {
    color: var(--brand-color-main);
}

.nav>li>a.on::after {
    width: 100%;
}

.toggle-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.toggle-icon {
    width: 18px;
    height: 14px;
    position: relative;
    margin-right: 6px;
}

.toggle-icon span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--color-gray5);
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.toggle-icon span:nth-child(1) {
    top: 0px;
}

.toggle-icon span:nth-child(2) {
    top: 6px;
}

.toggle-icon span:nth-child(3) {
    top: 12px;
}

.toggle-btn.open .toggle-icon span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.toggle-btn.open .toggle-icon span:nth-child(2) {
    opacity: 0;
}

.toggle-btn.open .toggle-icon span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

.menu-text {
    color: var(--color-gray5);
    font-size: var(--rem-18);
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    padding: 1.5rem 0;
    background-color: var(--color-white);
    border: 1px solid var(--color-gray2);
    z-index: 1000;
    transition: max-height 0.3s ease-out;
}

.toggle-btn.open .submenu {
    display: block;
    max-height: 1000px;
}

.submenu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.submenu ul li {
    padding: 1rem var(--rem-20);
}

.submenu ul li:hover {
    background: var(--color-white2);
    transition: all 0.1s ease-in;
}

.submenu ul li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-gray4);
    font-size: var(--rem-18);
}

.submenu ul li a::before {
    content: '';
    display: inline-block;
    width: var(--rem-30);
    height: var(--rem-30);
    margin-right: 1rem;
}

.submenu ul li.all a::before {
    display: none;
}

.submenu ul li.rice a::before {
    background: url('../images/gnb/icon_rice.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.fruit a::before {
    background: url('../images/gnb/icon_fruit.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.seafood a::before {
    background: url('../images/gnb/icon_seafood.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.kimch a::before {
    background: url('../images/gnb/icon_kimch.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.processed a::before {
    background: url('../images/gnb/icon_process.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.ginseng a::before {
    background: url('../images/gnb/icon_ginseng.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.liquor a::before {
    background: url('../images/gnb/icon_liquor.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.home_app a::before {
    background: url('../images/gnb/icon_home_app.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.digital a::before {
    background: url('../images/gnb/icon_digital.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.living a::before {
    background: url('../images/gnb/icon_living.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.one a::before {
    background: url('../images/gnb/icon_one_liv.png') 50% 50% no-repeat;
    background-size: contain;
}

.submenu ul li.husbandry a::before {
    background: url('../images/gnb/icon_husbandry.png') 50% 50% no-repeat;
    background-size: contain;
}

.icon-nh {
    background: url('../images/gnb/nav-jdnh_logo.svg') 50% 50% no-repeat;
    background-size: contain;
    width: 160px;
    height: 36px;
    display: inline-block;
    text-indent: -9999px;
}
@media screen and (max-width: 1100px) {

    .nav>li>a {
        padding: var(--rem-15) var(--rem-13);
        font-size: var(--rem-19);
    }
}

/* 모바일 화면을 위한 미디어 쿼리 */
@media screen and (max-width: 900px) {

    header .wrap {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .toggle-btn {
        display: none;
        /* 햄버거 메뉴 숨기기 */
    }


    /* ✅ GNB 모바일 스와이프 추가 (세로 스크롤 방지) */
    #gnb {
/*        overflow-x: hidden;*/
        /* 가로 스크롤 방지 */
/*        overflow-y: hidden;*/
        /* 세로 스크롤 방지 */
/*        white-space: nowrap;*/
        /* 줄바꿈 방지 */
/*        scroll-snap-type: x mandatory;*/
/*        -webkit-overflow-scrolling: touch;*
        /* iOS 부드러운 스크롤 */
    }

    /*#gnb::-webkit-scrollbar {
        width: 6px;
    }

    #gnb::-webkit-scrollbar-track {
        background: #eee;
    }

    #gnb::-webkit-scrollbar-thumb {
        background: #ff5733;
        border-radius: 5px;
    }

    #gnb::-webkit-scrollbar-thumb:hover {
        background: #ff3300;
    }*/


    /* GNB 내부 항목 가로 배열 */
    #gnb .nav {
        display: flex;  flex-wrap: wrap;
        flex-direction: row;
        justify-content: center;
        justify-content: space-between;
        gap: 1px 6px;
        /* height: 3rem; *//* 메뉴 간격 */
    }

    #gnb .nav li {
        flex: 0 0 auto;
        /*scroll-snap-align: center;*//* 스크롤 시 중앙 정렬 */
    }

    .nav>li>a {
        /*display: flex;    justify-content: center;    align-items: center;
        height: 4.5rem;
        */
        padding: 0;
        font-size: var(--rem-18);
        }

    .nav {
        gap: var(--rem-50);
    }

    .nav>li {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    
    .icon-nh {
        width: 130px;   height: 30px;
    }
}

@media screen and (max-width: 480px) {
    .nav>li>a {
        padding: 1px 2px;
        font-size: var(--rem-16);
    }
    .nav>li>a::after {
        height: 2px;
        bottom: 0px;    left: calc(50% - 50%);
    }

    .icon-nh {
        width: 110px;   height: 28px;
    }
}

/* ==================================================
	모바일 카테고리
================================================== */
.mobile_menu div.mtop {
    background: linear-gradient(270deg, var(--brand-color-dmain) 0%, var(--brand-color-main) 100%);
}

.mobile_menu div.mtop .wrap {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 var(--rem-20);
}

.mobile_menu div.mtop h1 {
    font-family: var(--font-Elice); font-size: var(--rem-25);
    color: var(--color-white);
}

.icon_close {
    background: url('../images/gnb/icon_close.svg') 50% 50% no-repeat;
    width: var(--rem-20);
    height: var(--rem-20);
    display: block;
}

.mobile_menu .personal_wrap ul {
    background: var(--color-white);
    width: 100%;
    margin-bottom: 1rem;
}

.mobile_menu .personal_wrap {
    gap: 0;
    background: var(--color-gray2);
}

.mobile_menu .personal_wrap>ul.personal-menu {
    padding: 0 var(--rem-20);
}

.mobile_menu .personal_wrap>ul.personal-menu li a {
    padding: var(--rem-20) 0;
}

.mobile_menu .personal_wrap>ul.personal-menu .icon {
    height: 5rem;
}

.mobile_menu .personal_wrap>ul.personal-menu .icon img {
    width: 4rem;
}

.mobile_menu .personal_wrap>ul.personal-menu .icon span.noti_count {
    right: calc(50% - 3.5rem);
}

.mobile_menu .personal_wrap>ul.personal-menu a p {
    font-size: var(--rem-18);
}

.mobile_menu .personal_wrap>ul.lnb {
    display: grid;    grid-template-columns: repeat(2, 1fr);    gap: 0;
}

.mobile_menu .personal_wrap>ul.lnb li:after {
    display: none;
}

.mobile_menu .personal_wrap>ul.lnb li {
    text-align: center;
    font-size: var(--rem-20);
}

.mobile_menu .personal_wrap>ul.lnb li:first-child {
    border-right: 1px solid var(--color-gray2);
}

.mobile_menu .personal_wrap>ul.lnb li a {
    display: block;
    line-height: 6rem;
}

.mobile_menu .submenu {
    display: block;
    width: 100%;
    border: 0;
    position: relative;
    padding: 0;
}

.mobile_menu .submenu li {
    border-bottom: 1px solid var(--color-gray2);
    padding: 0;
}

.mobile_menu .submenu li a {
    position: relative;
    padding: var(--rem-15);
}

.mobile_menu .submenu li a::after {
    content: '';
    position: absolute;    display: block;
    top: calc(50% - 0.6rem);    right: var(--rem-15);
    background: url('../images/gnb/icon_arrow_right.svg') 50% 50% no-repeat;    background-size: contain;
    width: 1.8rem;    height: 1.2rem;
}


/* ==================================================
 모바일 하단 고정 메뉴
================================================== */

/* ✅ 모바일 하단 고정 메뉴 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--brand-color-main);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    height: 6rem;
    z-index: 1000;
}

/* 가로 정렬 */
.bottom-nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 아이콘 스타일 */
.bottom-nav li {
    flex: 1;
    text-align: center;
}

.bottom-nav li.icon a {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bottom-nav li.icon a::before {
    display: block;
    content: '';
    width: var(--rem-30);
    height: var(--rem-30);
}

.bottom-nav li.icon a span {
    display: none;
}

.bottom-nav li.icon.back a::before {
    background: url('../images/gnb/btm_icon_back.svg') 50% 50% no-repeat;
    background-size: contain;
}

.bottom-nav li.icon.home a::before {
    background: url('../images/gnb/btm_icon_home.svg') 50% 50% no-repeat;
    background-size: contain;
}


.bottom-nav li.icon.category a::before {
    background: url('../images/gnb/btm_icon_cat.svg') 50% 50% no-repeat;
    background-size: contain;
}


.bottom-nav li.icon.like a::before {
    background: url('../images/gnb/btm_icon_like.svg') 50% 50% no-repeat;
    background-size: contain;
}


.bottom-nav li.icon.user a::before {
    background: url('../images/gnb/btm_icon_mypage.svg') 50% 50% no-repeat;
    background-size: contain;
}


.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--color-white2);
    font-size: var(--rem-14);
    gap: 6px;
    height: 6rem;
    justify-content: center;
}

.bottom-nav a img {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

/* ✅ 데스크탑에서는 안 보이게 */
@media screen and (min-width: 901px) {
    .bottom-nav {
        display: none;
    }
}

/* ✅ 왼쪽에서 슬라이드하는 서브메뉴 */
#category-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease-in-out;
    z-index: 1100;
}

#category-menu.active {
    left: 0;
}

/* 닫기 버튼 */
#category-menu .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}