/* Mobile Menu Visibility */
@media (max-width: 1199px) {
    .header .header-menu.-is-el-visible {
        opacity: 1;
        pointer-events: auto;
    }
    
    .header .header-menu.-is-el-visible .header-menu__content {
        transform: none;
    }
    
    .header .header-menu__content {
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }
    
    .header .header-menu .mobile-bg {
        position: fixed;
        top: 0;
        left: 0;
        max-width: calc(100vw - 80px);
        width: 60vw;
        height: 100vh;
        z-index: -1;
        background-color: white;
    }
    
    .header .header-menu-bg {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: rgba(24, 24, 26, 0.7);
        z-index: -2;
    }
}

@media (max-width: 767px) {
    .header .header-menu .mobile-bg {
        width: 80vw;
    }
}

@media (max-width: 575px) {
    .header .header-menu .mobile-bg {
        width: calc(100vw - 60px);
        max-width: 100%;
    }
}

/* Search Background */
.header .header-search__bg {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 8;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 24, 26, 0.7);
}

/* Desktop Menu - Show on large screens */
@media (min-width: 1200px) {
    .menu.js-navList {
        display: block !important;
    }
    
    .mobileMenu {
        display: none !important;
    }
    
    .mobile-footer {
        display: none !important;
    }
}

/* Mobile Menu Styles - Show on small screens */
@media (max-width: 1199px) {
    .menu.js-navList {
        display: none !important;
    }
    
    .mobileMenu {
        padding: 16px 20px;
        width: 100%;
        display: flex;
        flex-direction: column;
        flex: 1;
        box-sizing: border-box;
        overflow-y: auto;
        row-gap: 15px;
        margin-top: 0;
    }
    
    /* Mobile Footer - Fixed at bottom */
    .mobile-footer {
        flex-shrink: 0;
        margin-top: auto;
    }
}

.mobileMenu .link {
    padding: 6px 7px;
    font-size: 17px;
    transition: 0.3s;
    margin: 4px 0px;
    color: var(--color-dark-1);
    text-decoration: none;
    display: block;
}

.mobileMenu .link:hover {
    background-color: #fcfcfc;
}

.mobileMenu i {
    transition: 0.4s;
}

.mobileMenu i.active {
    transform: rotate(90deg);
}

.mobileMenu .submenuOne {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.mobileMenu .submenuOne > .title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 7px;
    cursor: pointer;
}

.mobileMenu .submenuOne > .title span {
    font-size: 19px;
    font-weight: 500;
}

.mobileMenu .submenuOne > .toggle {
    display: flex;
    flex-direction: column;
    padding: 0px 7px;
    row-gap: 2px;
    height: 0px;
    overflow: hidden;
    opacity: 0;
    transition: 0.3s;
}

.mobileMenu .submenuOne > .toggle.active {
    height: fit-content;
    opacity: 1;
}

.mobileMenu .submenuTwo {
    display: flex;
    flex-direction: column;
    padding: 1px 7px;
}

.mobileMenu .submenuTwo > .title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 7px;
    cursor: pointer;
}

.mobileMenu .submenuTwo > .title span {
    font-size: 17px;
    font-weight: 500;
}

.mobileMenu .submenuTwo > .toggle {
    display: flex;
    flex-direction: column;
    padding: 6px 7px;
    height: 0px;
    overflow: hidden;
    opacity: 0;
    transition: 0.3s;
}

.mobileMenu .submenuTwo > .toggle.active {
    height: fit-content;
    opacity: 1;
}

.mobile-menu-item-has-children {
    position: relative;
}

.mobile-menu-item-has-children > a {
    padding-right: 50px;
}

.mobile-menu__toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    transition: all 0.3s;
}

.mobile-menu__toggle:hover {
    color: #6440fb;
}

.mobile-menu__toggle.is-active {
    transform: rotate(180deg);
}

.mobile-menu__subnav {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

.mobile-menu__subnav li a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.mobile-menu__subnav li a:hover {
    color: #6440fb;
    padding-left: 45px;
}

.mobile-menu__buttons {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
}

.mobile-menu__buttons .button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.mobile-menu__buttons .button.-md {
    background-color: #f0f0f0;
    color: #333;
}

.mobile-menu__buttons .button.-md:hover {
    background-color: #e0e0e0;
}

.mobile-menu__buttons .button.-purple-1 {
    background-color: #6440fb;
    color: #fff;
}

.mobile-menu__buttons .button.-purple-1:hover {
    background-color: #5230e8;
}

/* Prevent body scroll when menu is open */
body.overflow-hidden {
    overflow: hidden;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: #333;
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Header Menu Fixes - Let main.css handle most styling */
/* Just add some supplementary styles if needed */

/* Mobile Menu Additional Styles */
.menu__nav.-list-hidden {
    display: none !important;
}

.subnav.-is-active {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (max-width: 1199px) {
    .header-menu.-is-active {
        transform: translateX(0) !important;
    }
    
    .header-menu.-is-active .js-mobile-bg {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Toggle element visibility class - Match original */
.toggle-element {
    transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 0;
    pointer-events: none;
}

.toggle-element.-is-el-visible {
    z-index: 25;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

/* Mega Menu List Items - Fix text color */
.header .header-menu .mega__list a {
    color: var(--color-dark-1) !important;
}

.header .header-menu .mega__list a:hover {
    color: var(--color-purple-1) !important;
}

/* Cart Product Count Badge */
.cartProductCount {
    position: absolute;
    transform: translateX(17px) translateY(-17px);
    height: 20px;
    min-width: 20px;
    width: auto;
    padding: 0 4px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background-color: crimson;
    color: white;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Cart Dropdown Positioning */
.js-cart-toggle {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    transform: translateY(20px);
}

.js-cart-toggle.-is-el-visible {
    z-index: 25;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

.header-cart {
    min-width: 450px;
    box-shadow: 0px 25px 70px 0px rgba(1, 33, 58, 0.07);
}

@media (max-width: 575px) {
    .header-cart {
        position: fixed;
        top: 80px;
        right: 0;
        left: 0;
        width: 100vw;
        min-width: 100vw;
    }
}

/* Header Search Overlay */
.header-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    overflow-y: auto;
}



.header-search__field input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
}



/* Swiper Pagination Styles */
.swiper-pagination-categories {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.swiper-pagination-categories .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: #d1d5db;
    opacity: 1;
    border-radius: 50%;
    transition: all 0.3s;
    cursor: pointer;
}

.swiper-pagination-categories .swiper-pagination-bullet-active {
    background-color: var(--color-purple-1, #6440fb);
    width: 24px;
    border-radius: 4px;
}

/* Worksheet Tabs Styles */
.tabs__button {
    font-size: 15px;
    font-weight: 400;
    color: var(--color-dark-1, #1e293b);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.tabs__button:hover {
    color: var(--color-purple-1, #6440fb);
}

.tabs__button.tabActive {
    color: var(--color-purple-1, #6440fb) !important;
    font-weight: 500 !important;
}

/* Pills style tabs - with background */
.tabs.-pills .tabs__button:hover {
    background: var(--color-light-3, #f5f5f5);
}

.tabs.-pills .tabs__button.tabActive {
    background-color: var(--color-purple-3, #f3e8ff) !important;
}

/* Search Layer - Remove input background */
.header .header-search__field input {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #EDEDED !important;
}

.header .header-search__field input:focus {
    border-bottom: 1px solid var(--color-dark-1) !important;
}

/* Worksheet Card Styles */
.worksheet-item {
    transition: opacity 0.3s, transform 0.3s;
}

/* Accordion Styles - Match Original */
.accordion__content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.2s ease-out;
}

.accordion__content__inner {
    /* padding-top: 20px; */
}

.accordion__button {
    cursor: pointer;
    border: none;
    outline: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transition: 0.4s;
}

.accordion__icon > *:nth-child(1) {
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: none;
    opacity: 1;
}

.accordion__icon > *:nth-child(2) {
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: rotate(90deg);
    opacity: 0;
}

.accordion__item.is-active .accordion__icon > *:nth-child(1) {
    transform: rotate(90deg);
    opacity: 0;
}

.accordion__item.is-active .accordion__icon > *:nth-child(2) {
    transform: none;
    opacity: 1;
}

/* Checkbox/Radio Label Cursor */
.sidebar-checkbox__item.cursor {
    cursor: pointer;
}

.sidebar-checkbox__item label {
    cursor: pointer;
    width: 100%;
    margin-bottom: 0;
}

/* Show More Button Styles */
.show-more__content {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

.show-more__button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

/* Video Modal Styles */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.video-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.video-modal__content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 10000;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.video-modal.is-visible .video-modal__content {
    transform: scale(1);
}

.video-modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.video-modal__close:hover {
    background: #f1f1f1;
    transform: rotate(90deg);
}

.video-modal__close i {
    font-size: 18px;
}

.video-modal__body {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.video-modal__body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .video-modal__content {
        width: 95%;
    }
    
    .video-modal__close {
        top: -35px;
        width: 32px;
        height: 32px;
    }
}

/* Custom Dropdown Styles - Match Original */
.dropdown {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 8px;
}

.dropdown__button {
    height: 50px;
    border-radius: 8px;
    background-color: var(--color-light-3);
    padding: 12px 16px;
}

.dropdown .icon {
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dropdown.-is-dd-active .icon {
    transform: rotate(180deg);
}

.toggle-element {
    transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 0;
    pointer-events: none;
}

.toggle-element.-down {
    transform: translateY(20px);
}

.toggle-element.-is-el-visible {
    z-index: 25;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

.toggle-element.-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    padding: 10px;
    background-color: white;
    box-shadow: 0px 25px 70px rgba(1, 33, 58, 0.07);
    min-width: 180px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateX(-50%);
}

.js-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.js-dropdown-list > div {
    margin-bottom: 0;
    padding-top: 5px;
    padding-bottom: 5px;
}

.js-dropdown-list > div:last-child {
    margin-bottom: 0;
}

.js-dropdown-link {
    color: var(--color-dark-1);
    transition: color 0.2s;
}

.js-dropdown-link:hover {
    color: var(--color-purple-1);
}

.js-dropdown-link.activeMenu {
    color: var(--color-purple-1);
    font-weight: 500;
}

/* Mypage Dropdown Styles */
.header-menu__dropdown {
    position: relative;
}

.header-menu__dropdown .header-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    box-shadow: 0px 25px 70px rgba(1, 33, 58, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.header-menu__dropdown:hover .header-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-menu__dropdown .header-dropdown a {
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-menu__dropdown .header-dropdown a:hover {
    background-color: #f7f7f7;
    color: var(--color-purple-1);
}

/* 필수 필드 에러 상태 스타일 */
input.err, textarea.err, select.err {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 0 0.1rem rgba(220, 53, 69, 0.25) !important;
}

input.err:focus, textarea.err:focus, select.err:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    outline: none !important;
}

/* 폼 컨트롤 클래스에도 적용 */
.form-control.err {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 0 0.1rem rgba(220, 53, 69, 0.25) !important;
}

.form-control.err:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    outline: none !important;
}

/* 알림 뱃지 스타일 */
.notification-badge-header {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #e67e22;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notification-badge {
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 1px 4px;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ─── 소셜 로그인 버튼 ─────────────────────────────────────────── */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    padding: 0 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.social-btn:hover { opacity: 0.88; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* 카카오 */
.kakao-btn {
    background-color: #FEE500;
    color: #191919 !important;
}
/* 네이버 */
.naver-btn {
    background-color: #03C75A;
    color: #fff !important;
}

/* 소셜 아이콘 */
.social-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}
.kakao-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5C6.201 2.5 1.5 6.3 1.5 10.9c0 2.958 1.9 5.554 4.78 7.07L5.1 21.5l4.42-2.9c.8.12 1.63.18 2.48.18 5.799 0 10.5-3.8 10.5-8.4S17.799 2.5 12 2.5z' fill='%23191919'/%3E%3Ccircle cx='8.5' cy='11' r='1.2' fill='%23FEE500'/%3E%3Ccircle cx='12' cy='11' r='1.2' fill='%23FEE500'/%3E%3Ccircle cx='15.5' cy='11' r='1.2' fill='%23FEE500'/%3E%3C/svg%3E");
}
.naver-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' rx='4' fill='%2303C75A'/%3E%3Cpath d='M7 7h3l3 5.5V7h3v10h-3l-3-5.5V17H7V7z' fill='white'/%3E%3C/svg%3E");
}

