/* =========================================================
   COWAY RENTAL HEADER
   shop.head.php 전용
========================================================= */

.coway-top-promo,
#coway-header,
#coway-header * {
    box-sizing: border-box;
}

.coway-top-promo {
    position: relative;
    z-index: 31;
    background: #0c97df;
    color: #fff;
}

.coway-top-promo .wrap,
#coway-header .wrap {
    width: min(1450px, calc(100% - 40px));
    margin: 0 auto;
}

.coway-top-promo__inner {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 64px;
    gap: 28px;
}

.coway-top-promo__inner > strong {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 25px;
    background: #fff;
    color: #0c86d1;
    font-size: 14px;
    font-weight: 700;
}

.coway-top-promo__inner > span {
    font-size: 14px;
    font-weight: 500;
}

.coway-top-promo__inner > a {
    margin-left: auto;
    padding: 7px 16px;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
}

.coway-top-close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 29px;
    line-height: 30px;
    cursor: pointer;
}


/* =========================================================
   HEADER MAIN
========================================================= */

.coway-hd {
    position: relative;
    z-index: 30;
    width: 100%;
    background: #fff;
}

#coway-header {
    position: relative;
    width: 100%;
    background: #fff;
}

.coway-head-main {
    display: flex;
    align-items: center;
    min-height: 112px;
    gap: 50px;
}

.coway-logo {
    display: block;
    flex: 0 0 auto;
}

.coway-logo img {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
}


/* 검색 */
.coway-search {
    display: flex;
    width: 420px;
    height: 48px;
    overflow: hidden;
    border: 1px solid #1594e6;
    border-radius: 3px;
    background: #fff;
}

.coway-search input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border: 0 !important;
    outline: 0;
    background: #fff;
    color: #333;
    font-size: 14px;
}

.coway-search input::placeholder {
    color: #999;
}

.coway-search button {
    flex: 0 0 62px;
    width: 62px;
    height: 47px;
    padding: 0;
    border: 0;
    background: #1594e6;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}


/* 우측 메뉴 */
/* =========================================================
   HEADER UTIL MENU
   사은품 / 카드혜택 / 공지사항
========================================================= */

.coway-head-util {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    white-space: nowrap;
}


/* 일반 유틸 메뉴 */
.coway-head-util > a:not(.coway-tel) {
    position: relative;

    display: inline-flex;
    height: 36px;

    align-items: center;
    justify-content: center;

    padding: 0 14px;

    border: 1px solid transparent;
    border-radius: 18px;

    background: #fff;

    color: #444;

    font-size: 13px;
    font-weight: 600;

    line-height: 1;

    text-decoration: none;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}


/* 메뉴 사이 작은 구분점 */
.coway-head-util > a:not(.coway-tel):not(:last-of-type)::after {
    position: absolute;

    right: -5px;
    top: 50%;

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: #d6dade;

    content: "";

    transform: translateY(-50%);
}


/* hover */
.coway-head-util > a:not(.coway-tel):hover {
    border-color: #cfeaf8;

    background: #f4fbff;

    color: #0d91de;

    transform: translateY(-1px);
}


/* =========================================================
   사은품 메뉴 강조
========================================================= */

.coway-head-util > a:first-child {
    padding: 0 17px;

    border: 1px solid #159ade;
    border-radius: 18px;

    background: #159ade;

    color: #fff;

    font-weight: 700;

    box-shadow: 0 3px 8px rgba(21, 154, 222, .15);
}

.coway-head-util > a:first-child:hover {
    border-color: #087bd1;

    background: #087bd1;

    color: #fff;

    transform: translateY(-1px);

    box-shadow: 0 5px 12px rgba(21, 154, 222, .22);
}


/* 카드혜택 / 공지사항 */
.coway-head-util > a:nth-child(2),
.coway-head-util > a:nth-child(3) {
    border-color: transparent;

    background: transparent;

    color: #444;

    font-weight: 600;

    box-shadow: none;
}

.coway-head-util > a:nth-child(2):hover,
.coway-head-util > a:nth-child(3):hover {
    border-color: #d9edf9;

    background: #f5fbff;

    color: #087bd1;

    box-shadow: none;
}


/* =========================================================
   고객센터
========================================================= */

.coway-tel {
    position: relative;

    display: flex;
    flex-direction: column;

    margin-left: 14px;
    padding-left: 22px;

    color: #0b78c8;

    text-decoration: none;

    line-height: 1.15;
}


/* 고객센터 왼쪽 세로 구분선 */
.coway-tel::before {
    position: absolute;

    top: 50%;
    left: 0;

    width: 1px;
    height: 34px;

    background: #e2e6e9;

    content: "";

    transform: translateY(-50%);
}


.coway-tel b {
    margin-bottom: 3px;

    color: #087bd1;

    font-size: 11px;
    font-weight: 700;
}


.coway-tel strong {
    color: #087bd1;

    font-size: 24px;
    font-weight: 800;

    line-height: 1;

    letter-spacing: -1px;
}

/* =========================================================
   GNB
========================================================= */

.coway-gnb {
    position: relative;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #e6e6e6;
    background: #fff;
}

.coway-gnb__inner {
    display: grid;
    grid-template-columns: 210px repeat(6, minmax(0, 1fr));
    align-items: stretch;
    height: 58px;
}

.coway-gnb__inner > a,
.coway-all-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: #222;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.coway-gnb__inner > a {
    position: relative;
}

.coway-gnb__inner > a:after {
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 3px;
    background: #0d91de;
    content: "";
    transform: translateX(-50%);
    transition: width .2s ease;
}

.coway-gnb__inner > a:hover {
    color: #0d91de;
}

.coway-gnb__inner > a:hover:after {
    width: 70%;
}

.coway-all-menu {
    gap: 9px;
    padding: 0 18px;
    border: 0;
    background: #0d91de;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.coway-all-menu i {
    font-size: 18px;
}

.coway-all-menu.is-open {
    background: #087dc1;
}


/* =========================================================
   MEGA MENU
========================================================= */

.coway-mega-menu {
    display: none;
    position: absolute;
    top: 58px;
    right: 0;
    left: 0;
    z-index: 100;
    padding: 30px 0 34px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 15px 30px rgba(0,0,0,.08);
}

.coway-mega-menu.open {
    display: block;
}

.coway-mega-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
}

.coway-mega-grid > div {
    min-height: 190px;
    padding: 0 28px;
    border-right: 1px solid #eee;
}

.coway-mega-grid > div:first-child {
    padding-left: 20px;
}

.coway-mega-grid > div:last-child {
    border-right: 0;
}

.coway-mega-grid b {
    display: block;
    margin-bottom: 14px;
}

.coway-mega-grid b a {
    color: #0c84d0;
    font-size: 18px;
    font-weight: 700;
}

.coway-mega-grid a {
    display: block;
    padding: 6px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}

.coway-mega-grid a:hover {
    color: #0c84d0;
}


/* 기존 영카트 #hd 스타일 영향 방지 */
#hd.coway-hd {
    min-width: 0;
    border: 0;
}

#hd.coway-hd:after {
    display: none;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .coway-head-main {
        gap: 28px;
    }

    .coway-logo img {
        width: 175px;
    }

    .coway-search {
        width: 350px;
    }

    .coway-head-util {
        gap: 18px;
    }

    .coway-head-util > a:not(.coway-tel) {
        display: none;
    }

    .coway-gnb__inner {
        grid-template-columns: 190px repeat(6, minmax(0, 1fr));
    }

    .coway-gnb__inner > a {
        font-size: 14px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 900px) {

    .coway-top-promo .wrap,
    #coway-header .wrap {
        width: min(1450px, calc(100% - 24px));
    }

    .coway-top-promo__inner {
        min-height: 0;
        padding: 10px 40px 10px 0;
        gap: 8px 12px;
        flex-wrap: wrap;
    }

    .coway-top-promo__inner > strong {
        min-height: 30px;
        padding: 0 12px;
        font-size: 12px;
    }

    .coway-top-promo__inner > span {
        font-size: 12px;
    }

    .coway-top-promo__inner > a {
        margin-left: 0;
        padding: 5px 10px;
        font-size: 11px;
    }

    .coway-top-close {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
    }

    .coway-head-main {
        min-height: 0;
        padding: 18px 0;
        gap: 18px;
        flex-wrap: wrap;
    }

    .coway-logo img {
        width: 160px;
    }

    .coway-head-util {
        margin-left: auto;
    }

    .coway-tel strong {
        font-size: 20px;
    }

    .coway-search {
        order: 3;
        width: 100%;
        height: 46px;
    }

    .coway-search input {
        height: 44px;
    }

    .coway-search button {
        height: 45px;
    }

    .coway-gnb__inner {
        display: block;
        height: 52px;
    }

    .coway-all-menu {
        width: 100%;
        height: 52px;
    }

    .coway-gnb__inner > a {
        display: none;
    }

    .coway-mega-menu {
        top: 52px;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        padding: 22px 0;
    }

    .coway-mega-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coway-mega-grid > div {
        min-height: 0;
        padding: 18px 20px;
        border-right: 0;
        border-bottom: 1px solid #eee;
    }

    .coway-mega-grid > div:first-child {
        padding-left: 20px;
    }
}


@media (max-width: 560px) {

    .coway-top-promo__inner > span {
        flex: 1 1 calc(100% - 120px);
    }

    .coway-top-promo__inner > a {
        display: none;
    }

    .coway-logo img {
        width: 145px;
    }

    .coway-tel b {
        font-size: 11px;
    }

    .coway-tel strong {
        font-size: 18px;
    }

    .coway-mega-grid {
        grid-template-columns: 1fr 1fr;
    }

    .coway-mega-grid b a {
        font-size: 16px;
    }

    .coway-mega-grid a {
        font-size: 13px;
    }
}

/* =========================================================
   DYNAMIC SHOP CATEGORY GNB
   g5_shop_category 1차/2차 자동 출력
========================================================= */

.coway-gnb__inner {
    display: flex;
    align-items: stretch;
    height: 58px;
}

.coway-all-category-wrap {
    position: relative;
    flex: 0 0 210px;
}

.coway-all-category-wrap .coway-all-menu {
    width: 100%;
    height: 58px;
}

.coway-gnb-categories {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: stretch;
}

.coway-gnb-item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    align-items: stretch;
    justify-content: center;
}

.coway-gnb-link {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
    height: 58px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    overflow: hidden;
    color: #222;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coway-gnb-link:after {
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 3px;
    background: #0d91de;
    content: "";
    transform: translateX(-50%);
    transition: width .2s ease;
}

.coway-gnb-item:hover > .coway-gnb-link,
.coway-gnb-item.is-hover > .coway-gnb-link {
    color: #0d91de;
}

.coway-gnb-item:hover > .coway-gnb-link:after,
.coway-gnb-item.is-hover > .coway-gnb-link:after {
    width: 70%;
}

/* 1차 메뉴별 2차 드롭다운 */
.coway-gnb-sub {
    visibility: hidden;
    position: absolute;
    top: 58px;
    left: 50%;
    z-index: 130;
    min-width: 190px;
    padding-top: 8px;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    pointer-events: none;
}

.coway-gnb-sub__inner {
    overflow: hidden;
    padding: 9px 0;
    border: 1px solid #e3e7ea;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

.coway-gnb-sub a {
    display: block;
    padding: 9px 18px;
    color: #555;
    font-size: 14px;
    line-height: 1.35;
    white-space: nowrap;
}

.coway-gnb-sub a:hover {
    background: #f2f8fc;
    color: #0d91de;
}

.coway-gnb-item:hover .coway-gnb-sub,
.coway-gnb-item.is-hover .coway-gnb-sub {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

/* 전체 카테고리 메가메뉴는 등록된 1차메뉴 수에 맞춰 자동 배치 */
.coway-mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0;
}

.coway-mega-column {
    min-width: 0;
    min-height: 165px;
    padding: 0 25px 20px;
    border-right: 1px solid #eee;
}

.coway-mega-column:last-child {
    border-right: 0;
}

.coway-mega-column b {
    display: block;
    margin-bottom: 12px;
}

.coway-mega-column b a {
    color: #0c84d0;
    font-size: 17px;
    font-weight: 700;
}

.coway-mega-column > a {
    display: block;
    padding: 6px 0;
    color: #555;
    font-size: 14px;
}

.coway-mega-column > a:hover {
    color: #0c84d0;
}

.coway-mega-empty {
    display: block;
    padding-top: 5px;
    color: #aaa;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .coway-all-category-wrap {
        flex-basis: 190px;
    }

    .coway-gnb-link {
        padding: 0 7px;
        font-size: 14px;
    }
}

@media (max-width: 900px) {
    .coway-gnb__inner {
        display: block;
        height: 52px;
    }

    .coway-all-category-wrap {
        width: 100%;
        height: 52px;
    }

    .coway-all-category-wrap .coway-all-menu {
        height: 52px;
    }

    .coway-gnb-categories {
        display: none;
    }

    .coway-mega-menu {
        top: 52px;
    }

    .coway-mega-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coway-mega-column {
        min-height: 0;
        padding: 18px 20px;
        border-right: 0;
        border-bottom: 1px solid #eee;
    }
}

@media (max-width: 560px) {
    .coway-mega-grid {
        grid-template-columns: 1fr 1fr;
    }

    .coway-mega-column {
        padding: 16px 14px;
    }

    .coway-mega-column b a {
        font-size: 15px;
    }

    .coway-mega-column > a {
        font-size: 12px;
    }
}

/* =========================================================
   PC GNB STICKY
   - 901px 이상에서만 적용
   - 스크롤 시 메뉴(GNB)만 화면 상단 고정
========================================================= */
@media (min-width: 901px) {

    .coway-gnb.is-fixed {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1500;
        width: 100%;
        box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    }

    /* GNB가 fixed 되면서 빠지는 58px 높이를 보정 */
    #coway-header.coway-gnb-fixed {
        padding-bottom: 58px;
    }

    /* 고정 상태에서도 전체/2차 메뉴가 GNB 아래에 정상 표시 */
    .coway-gnb.is-fixed .coway-mega-menu {
        top: 58px;
    }
}
/* =========================================================
   BOARD TITLE
   게시판 상단 제목
========================================================= */

.coway-board-title {
    width: min(1450px, calc(100% - 40px));
    margin: 0 auto;
    padding: 55px 0 42px;
    text-align: center;
}

.coway-board-title h2 {
    position: relative;

    display: inline-block;

    margin: 0;
    padding: 0 0 18px;

    color: #222;

    font-size: 34px;
    font-weight: 700;

    line-height: 1.3;
    letter-spacing: -1.2px;
}

/* 제목 아래 코웨이 블루 포인트 */
.coway-board-title h2:after {
    position: absolute;

    bottom: 0;
    left: 50%;

    width: 42px;
    height: 3px;

    border-radius: 2px;

    background: #159ade;

    content: "";

    transform: translateX(-50%);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .coway-board-title {
        width: calc(100% - 30px);

        padding: 32px 0 28px;
    }

    .coway-board-title h2 {
        padding-bottom: 13px;

        font-size: 25px;

        letter-spacing: -.8px;
    }

    .coway-board-title h2:after {
        width: 32px;
        height: 2px;
    }
}