@charset "utf-8";

.header-top-logo img {width:138px;}

/*  최상단 라인 메뉴 */
.header-top-line {width:100%;height:40px;background:#3A3A3A;font-size:12px;}
.header-top-line .inner {width:100%;margin:0 auto;display:flex;align-items: center;justify-content: space-between;box-sizing: border-box;max-width:100%;}
.header-top-line .inner .header-top-menu {align-items: center;display:flex;height:40px;justify-content: center;gap:20px;}
.header-top-line .inner .header-top-menu li a {color:#eee;}
.header-top-line .inner .header-top-account li a {color:#eee;}
.header-top-line .inner .header-top-account {align-items: center;display:flex;height:40px;justify-content: center;gap:20px;}
@media screen and (max-width: 1300px) {.header-top-line .inner {padding:0 15px !important;}}
/*  상단 메뉴 */
.header-top {width: 100%;background: #fff;}
.header-top a {text-decoration: none;color: inherit;}
.header-top ul {list-style: none;margin: 0;padding: 0;}
.header-top button {border: none;background: none;cursor: pointer;padding: 0;}
.header-top-inner {margin: 0 auto;padding-top:20px;padding-bottom:20px;display: flex;align-items: center;gap: 30px;}
/* Logo */
.header-top-logo a {display: flex;flex-direction: column;gap: 2px;}
.header-top-logo .logo-main {font-size: 28px;font-weight:800;color: #333;}
.header-top-logo .logo-mall {color: #4B99FF;font-weight:800;}
.header-top-logo .logo-sub {font-size: 13px;color: #676767;letter-spacing: -0.3px;}
/* Search */
.header-top-search {flex: 1;max-width: 500px;position: relative;}
.header-top-search input {width: 100%;height: 48px;padding: 0 50px 0 20px;border-radius: 24px;font-size: 14px;outline: none;background:#f9f9f9;border:solid 1px #f7f7f7;cursor: pointer;}
.header-top-search input::placeholder {color: #999;}
.header-top-search .search-btn {position: absolute;right: 10px;top: 50%;transform: translateY(-50%);width: 36px;height: 36px;display: flex;align-items: center;justify-content: center;color: #666;font-size: 18px;z-index: 2;}
/* Search Popup */
.search-popup {position: absolute;top: 100%;left:210px;z-index: 10000;display: none;width:560px;}
.search-popup.active {display: block;overflow-y:auto;}
.search-popup .close-popup {position:absolute;right:20px;top:12px;font-size:30px;}
.search-popup-content {background: #fff;border-radius: 16px;padding: 30px 30px 80px 30px;overflow: hidden;border: 1px solid #e5e5e5;position: relative;display: flex;flex-direction: column;}
.search-popup-header {display: none;align-items: center;gap: 12px;padding-bottom: 20px;margin-bottom: 20px;border-bottom: 1px solid #e5e5e5;}
.search-popup-header .back-btn,.search-popup-header .cart-btn {width: 40px;height: 40px;display: flex;align-items: center;justify-content: center;background: none;border: none;color: #333;font-size: 20px;cursor: pointer;flex-shrink: 0;}
.search-popup-header .back-btn:hover,.search-popup-header .cart-btn:hover {color: #4B99FF;}
.search-popup-header .popup-search-input {flex: 1;position: relative;}
.search-popup-header .popup-search-input input {width: 100%;height: 44px;padding: 0 45px 0 16px;border-radius: 22px;font-size: 14px;outline: none;background: #f9f9f9;border: solid 1px #e5e5e5;}
.search-popup-header .popup-search-input input::placeholder {color: #999;}
.search-popup-header .popup-search-btn {position: absolute;right: 8px;top: 50%;transform: translateY(-50%);width: 32px;height: 32px;display: flex;align-items: center;justify-content: center;background: none;border: none;color: #666;font-size: 16px;cursor: pointer;}
.search-section {margin-bottom: 20px;flex-shrink: 0;}
.section-header {display: flex;align-items: center;justify-content: space-between;}
.section-title {font-size: 16px;font-weight: 700;color: #333;margin: 0 0 8px 0;}
.update-time {font-size: 13px;color: #999;}
.update-time i {margin-right:3px;}
.period-info {font-size: 13px;color: #999;}
.period-info i {margin-right:3px;}
.search-tags {display: flex;gap: 8px;overflow-x: auto;overflow-y: hidden;white-space: nowrap;padding-bottom: 5px;}
/* 스크롤바 스타일 수정 */
.search-tags::-webkit-scrollbar {
    height: 4px !important; /* 6px -> 3px */
}

.search-tags::-webkit-scrollbar-track {
    background: transparent !important; /* 또는 #f9f9f9 */
    border-radius: 1px !important;
}

.search-tags::-webkit-scrollbar-thumb {
    background: #ddd !important; /* 더 연한 색 */
    border-radius: 2px !important;
}

.search-tags::-webkit-scrollbar-thumb:hover {
    background: #bbb !important;
}
.tag-item {padding: 8px 16px;background: #f5f5f5;border-radius: 20px;font-size: 14px;color: #666;text-decoration: none;transition: all 0.2s;flex-shrink: 0;}
.tag-item:hover {background: #4B99FF;color: #fff;}
.clear-all {font-size: 13px;color: #999;background: none;border: none;cursor: pointer;padding: 0;}
.clear-all i {margin-right:3px;}
.clear-all:hover {color: #333;}
.recent-keywords {display: flex;gap: 8px;overflow-x: auto;overflow-y: hidden;white-space: nowrap;padding-bottom: 5px;}
.recent-keywords::-webkit-scrollbar {
    height: 4px !important; /* 6px -> 3px */
}

.recent-keywords::-webkit-scrollbar-track {
    background: transparent !important; /* 또는 #f9f9f9 */
    border-radius: 2px !important;
}

.recent-keywords::-webkit-scrollbar-thumb {
    background: #ddd !important; /* 더 연한 색 */
    border-radius: 1px !important;
}

.recent-keywords::-webkit-scrollbar-thumb:hover {
    background: #bbb !important;
}

.keyword-tag {display: flex;align-items: center;gap: 6px;padding: 8px 12px;background: #fff;border: 1px solid #e5e5e5;border-radius: 20px;font-size: 14px;color: #333;flex-shrink: 0;}
.keyword-tag .remove-btn {background: none;border: none;color: #999;font-size: 18px;cursor: pointer;padding: 0;line-height: 1;}
.keyword-tag .remove-btn:hover {color: #333;}
.realtime-keywords {display: flex;flex-direction: column;gap:10px 20px;max-height: 200px;overflow-y: auto;}
.keyword-row {display: grid;grid-template-columns: repeat(2, 1fr);gap: 20px;}
.keyword-item {display: flex;align-items: center;gap: 10px;}
.keyword-item .rank {font-size: 14px;min-width: 20px;color:#111;}
.keyword-item .text {font-size: 14px;color: #666;}
.keyword-item i {margin-left:auto;}
.rank-up {color: #ff4444;font-size: 12px;}
.rank-down {color: #4444ff;font-size: 12px;}
.best-products {display: grid; grid-template-columns:2fr 1fr;max-height:180px;overflow-y: auto;overflow-x:hidden;gap:0px 20px;}
.best-products::-webkit-scrollbar {
    height: 2px !important; /* 6px -> 3px */
}

.best-products::-webkit-scrollbar-track {
    background: transparent !important; /* 또는 #f9f9f9 */
    border-radius: 2px !important;
}

.best-products::-webkit-scrollbar-thumb {
    background: #ddd !important; /* 더 연한 색 */
    border-radius: 1px !important;
}

.best-products::-webkit-scrollbar-thumb:hover {
    background: #bbb !important;
}

.product-item {display: flex;align-items: center;gap: 10px;padding: 8px 0;}
.product-item .rank {font-size: 14px;color: #111;min-width: 20px;flex-shrink: 0;}
.product-item .text {font-size: 13px;color: #666;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;flex: 1;}
.search-footer {display: flex;align-items: center;justify-content: space-between;padding: 15px 30px;border-top: 1px solid #e5e5e5;background: #fff;position: absolute;bottom: 0;left: 0;right: 0;border-radius: 0 0 16px 16px;}
.toggle-label {display: flex;align-items: center;gap: 10px;font-size: 14px;color: #666;cursor: pointer;}
.toggle-label input[type="checkbox"] {display: none;}
.toggle-switch {width: 44px;height: 24px;background: #ddd;border-radius: 12px;position: relative;transition: background 0.3s;}
.toggle-switch::after {content: '';position: absolute;width: 20px;height: 20px;background: #fff;border-radius: 50%;top: 2px;left: 2px;transition: left 0.3s;}
.toggle-label input[type="checkbox"]:checked + .toggle-switch {background: #FF6B35;}
.toggle-label input[type="checkbox"]:checked + .toggle-switch::after {left: 22px;}
.close-popup {padding: 8px 20px;background: #f5f5f5;border: none;border-radius: 20px;font-size: 14px;color: #666;cursor: pointer;transition: all 0.2s;}
.close-popup:hover {color: #111;}
.search-tags::-webkit-scrollbar,.recent-keywords::-webkit-scrollbar {height: 6px;}
.search-tags::-webkit-scrollbar-track,.recent-keywords::-webkit-scrollbar-track {background: #f5f5f5;border-radius: 3px;}
.search-tags::-webkit-scrollbar-thumb,.recent-keywords::-webkit-scrollbar-thumb {background: #ccc;border-radius: 3px;}
.search-tags::-webkit-scrollbar-thumb:hover,.recent-keywords::-webkit-scrollbar-thumb:hover {background: #999;}
.realtime-keywords::-webkit-scrollbar,.best-products::-webkit-scrollbar {width: 6px;}
.realtime-keywords::-webkit-scrollbar-track,.best-products::-webkit-scrollbar-track {background: #f5f5f5;border-radius: 3px;}
.realtime-keywords::-webkit-scrollbar-thumb,.best-products::-webkit-scrollbar-thumb {background: #ccc;border-radius: 3px;}
.realtime-keywords::-webkit-scrollbar-thumb:hover,.best-products::-webkit-scrollbar-thumb:hover {background: #999;}
/* Ranking */
.header-top-ranking {display: flex;align-items: center;gap: 10px;padding: 8px 12px;background: #fff;border-radius: 20px;min-width: 160px;height: 48px;}
.header-top-ranking .ranking-number {font-size: 13px;font-weight: 700;color: #232323;flex-shrink: 0;min-width: 24px;text-align: center;}
.header-top-ranking .ranking-keyword {flex: 1;overflow: hidden;position: relative;height: 26px;line-height:26px;}
.header-top-ranking .keyword-item {position: absolute;left: 0;top: 0;width: 100%;display: flex;align-items: center;gap: 6px;opacity: 0;transform: translateY(30px);transition: all 0.5s ease;text-decoration: none;color: inherit;width:120px;}
.header-top-ranking .keyword-item.active {opacity: 1;transform: translateY(0);}
.header-top-ranking .keyword-item:hover .keyword-text {color: #4B99FF;}
.header-top-ranking .keyword-text {font-size: 14px;color: #333;font-weight: 500;transition: color 0.2s;}
.header-top-ranking .rank-arrow {font-size: 10px;flex-shrink: 0;}
.header-top-ranking .rank-arrow.up {color: #c33636;margin-left:auto;}
.header-top-ranking .rank-arrow.down {color: #3b3bdd;margin-left:auto;}
.header-top-ranking .rank-arrow.same {color: #aaa;margin-left:auto;}
/* Icons */
.header-top-icons {display: flex;align-items: center;gap: 12px;margin-left: auto;}
.header-top-icons .icon-link {width: 40px;height: 40px;display: flex;align-items: center;justify-content: center;color: #3A3A3A;transition: color 0.2s;font-size: 28px;}
.header-top-icons .icon-link:hover {color: #4B99FF;}
.header-top-icons .cart-link {position: relative;}
.header-top-icons .cart-badge {position: absolute;top: -2px;right: -2px;background: #4B99FF;color: #fff;font-size: 11px;font-weight: 700;width: 18px;height: 18px;border-radius: 50%;display: flex;align-items: center;justify-content: center;}
/* Navigation */
.header-top-nav {width: 100%;background: #fff;transition: all 0.3s ease;z-index:100;}
.header-top-nav .nav-inner {margin: 0 auto;display: flex;align-items: center;gap: 0;height: 60px;}
.header-top-nav .nav-hamburger {width: 40px;height: 40px;border-radius: 50%;background: #4B99FF;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 5px;padding: 0;flex-shrink: 0;transition: background 0.2s;margin-right: 20px;cursor:pointer;}
.header-top-nav .nav-hamburger:hover {background: #1d70dd;}
.header-top-nav .nav-hamburger span {width: 20px;height: 2px;background: #fff;border-radius: 2px;transition: all 0.3s;}
.header-top-nav .menu-toggle {width: 32px;height: 32px;display: none;flex-direction: column;justify-content: center;gap: 6px;padding: 4px;}
.header-top-nav .menu-toggle span {width: 100%;height: 2px;background: #333;border-radius: 2px;}
.header-top-nav .nav-menu {display: flex;align-items: center;gap: 40px;}
.header-top-nav .nav-menu-right {display: flex;align-items: center;gap: 30px;margin-left: auto;}
.header-top-nav .nav-menu li,.header-top-nav .nav-menu-right li {position: relative;}
.header-top-nav .nav-menu a,.header-top-nav .nav-menu-right a {font-size: 16px;font-weight: 500;color: #333;padding: 12px 0;display: block;transition: color 0.2s;}
.header-top-nav .nav-menu a:hover,.header-top-nav .nav-menu-right a:hover {color: #4B99FF;}
.header-top-nav .nav-menu a.active {color: #4B99FF;font-weight: 700;}
.header-top-nav .nav-menu a.active::after {content: '';position: absolute;bottom: 0;left: 0;right: 0;height: 3px;background: #4B99FF;border-radius: 2px 2px 0 0;}

/* mobile category 고정 스타일 */
.mobile_category {
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile_category.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
    margin-top:0px;
    z-index:99;
}

.header-top-nav.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #f9f9f9; /* 원래 배경색 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body.has-fixed-header {
    padding-top: 60px; /* header-top-nav 높이만큼 */
}


/* Responsive */
@media screen and (max-width: 1200px) {
    .header-top-inner {padding: 15px 20px;gap: 20px;}
    .header-top-nav .nav-inner {padding: 0 20px;}
    .header-top-nav .nav-menu {gap: 30px;}
    .header-top-nav .nav-menu-right {gap: 20px;}
    .header-top-ranking {min-width: 150px;}
}
@media screen and (max-width: 992px) {
    .header-top-search {max-width: 350px;}
    .header-top-ranking {display: none;}
    .header-top-nav .nav-menu {gap: 20px;}
    .header-top-nav .nav-menu a,.header-top-nav .nav-menu-right a {font-size: 15px;}
}

@media screen and (max-width: 700px) {
    .header-top-inner {flex-wrap: wrap;}
    .header-top-search {order: 3;flex: 1 1 100%;max-width: 100%;margin-top: 10px;}
    .header-top-nav .menu-toggle {display: flex;}
    .header-top-nav .nav-menu,.header-top-nav .nav-menu-right {display: none;}
    .header-top-nav .nav-menu a,.header-top-nav .nav-menu-right a {font-size: 14px;}

    .search-popup {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin-top: 0 !important;
        max-width: 100% !important;
        z-index: 99999 !important;
    }

    .search-popup.active {
        display: block;
        overflow-y: hidden !important;
        overflow-x: hidden !important;
    }

    .search-popup-content {
        border-radius: 0 !important;
        padding: 15px 15px 100px 15px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;
        border: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        box-shadow: none !important;
    }

    .best-products {
        padding-bottom: 20px !important;
        display:block;

    }

    .search-popup-header {
        display: flex !important;
        /* position: sticky 제거 */
        /* top: 0 제거 */
        background: #fff;
        /* z-index: 10 제거 */
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .search-footer {
        border-radius: 0 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 100 !important;
        padding: 20px 15px !important;
    }

    .search-section {
        margin-bottom: 20px;
    }

    .search-tags::-webkit-scrollbar {
        height: 2px !important;
    }

    .recent-keywords::-webkit-scrollbar {
        height: 2px !important;
    }

    .search-popup .close-popup {display:none;}
}

@media screen and (max-width: 480px) {
    .header-top-logo .logo-main {font-size: 24px;}
    .header-top-icons {gap: 8px;}
    .header-top-icons .icon-link {width: 36px;height: 36px;font-size: 20px;}
}
/* 모바일 팝업 열릴 때 body 스크롤 방지 */
body.no-scroll {overflow: hidden;position: fixed;width: 100%;height: 100%;}

/* 양쪽 메뉴 */
/* 왼쪽 고정 배너 스타일 */
.fixed_left_banner {
    position: fixed;
    left:50%;
    margin-left:-850px;
    top: 240px; /* 또는 원하는 픽셀 값 */
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 110px;
}

.if_main .fixed_left_banner {top:780px;}

.fixed_left_banner.is_fixed {
    position: fixed;
    top: 20px; /* 고정될 때의 상단 여백 */
}

.fixed_left_banner.is_bottom {
    position: absolute;
    top: auto;
    bottom: 0; /* 푸터 도달 시 */
}


.fixed_left_banner .banner_item {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.fixed_left_banner .banner_item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fixed_left_banner .banner_item a {
    display: block;
    text-decoration: none;
}

.fixed_left_banner .banner_item img {
    width: 100%;
    height: auto;
    display: block;
}

.fixed_right_menu {
    position: fixed;
    top:780px;
    left:50%;
    margin-left:750px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 110px;
}

.fixed_right_menu.is_fixed {
    position: fixed;
    top: 20px; /* 고정될 때의 상단 여백 */
}

.fixed_right_menu.is_bottom {
    position: absolute;
    top: auto;
    bottom: 0; /* 푸터 도달 시 */
}

.fixed_right_menu .quick_menu_item {
    width: 64px;
    height: 64px;
    transition: all 0.3s ease;
}

.fixed_right_menu .line {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.fixed_right_menu .quick_menu_item:hover {

    border-color: #ff6b35;
}

.fixed_right_menu .quick_menu_item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #333;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    padding: 8px 4px;
}

.fixed_right_menu .quick_menu_item .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    color: #666;
}

.fixed_right_menu .quick_menu_item:hover .icon {
    color: #ff6b35;
}

.fixed_right_menu .quick_menu_item span {
    font-size: 11px;
    font-weight: 500;
    color: #333;
}

/* TOP 버튼 특별 스타일 */
.fixed_right_menu .quick_menu_item.top_btn {
    background: #ff6b35;
    border-color: #ff6b35;
}

.fixed_right_menu .quick_menu_item.top_btn a {
    color: #fff;
}

.fixed_right_menu .quick_menu_item.top_btn span {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.fixed_right_menu .quick_menu_item.top_btn:hover {
    background: #ff5722;
    border-color: #ff5722;
}

/* AI 챗봇 특별 스타일 */
.fixed_right_menu .quick_menu_item.ai_chatbot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    border-color: #ff5252;
}

.fixed_right_menu .quick_menu_item.ai_chatbot a {
    color: #fff;
}

.fixed_right_menu .quick_menu_item.ai_chatbot .icon {
    color: #fff;
}

.fixed_right_menu .quick_menu_item.ai_chatbot span {
    color: #fff;
}

.fixed_right_menu .quick_menu_item.ai_chatbot:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e64545 100%);
}

/* 반응형 - 화면이 작을 때 숨김 */
@media screen and (max-width: 1400px) {
    .fixed_left_banner,
    .fixed_right_menu {
        display: none;
    }
}

/* 스크롤에 따른 효과 (선택사항) */
@media screen and (min-width: 1401px) {
    .fixed_left_banner {
        animation: fadeInLeft 0.5s ease;
    }

    .fixed_right_menu {
        animation: fadeInRight 0.5s ease;
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate(calc(-50vw - 20px), -50%);
    }
    to {
        opacity: 1;
        transform: translate(calc(-50vw + 20px), -50%);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate(calc(50vw + 20px), -50%);
    }
    to {
        opacity: 1;
        transform: translate(calc(50vw - 20px), -50%);
    }
}


/* Swiper 로딩 공통 스타일 */
.swiper-container-wrapper {
    position: relative;
    min-height: 300px;
}

.swiper-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
}

.swiper-loading.hide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 스피너 스타일 */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.swiper-target {
    opacity: 0 !important;
    transition: opacity 0.3s ease;
}

.swiper-target.swiper-initialized {
    opacity: 1 !important;
}


/* Swiper 초기 숨김 */
.swiper-with-loading {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.swiper-with-loading.swiper-initialized {
    opacity: 1;
}
