/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    padding: 0;
}

.hamburger-menu svg {
    width: 24px;
    height: 24px;
    stroke: #1a1a1a;
}

/* 햄버거 체크박스 숨기기 */
#hamburger-toggle {
    display: none;
}

/* 사이드 메뉴 오버레이 */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

/* 체크박스 체크 시 오버레이 표시 */
#hamburger-toggle:checked ~ .side-menu-overlay {
    opacity: 1;
    visibility: visible;
}

/* 사이드 메뉴 패널 */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1500;
    transition: left 0.3s ease;
    overflow-y: auto;
}

/* 체크박스 체크 시 사이드 메뉴 열기 */
#hamburger-toggle:checked ~ .side-menu {
    left: 0;
}

.side-menu-header {
    padding: 24px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.side-menu-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 0.5px;
}

.side-menu-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.side-menu-close:hover {
    color: #1a1a1a;
}

/* 로그인/회원가입 버튼 영역 */
.side-menu-auth {
    padding: 20px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.btn-side-login,
.btn-side-signup {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-side-login {
    background: #fff;
    color: var(--lq-accent-primary);
    border: 1.5px solid var(--lq-accent-primary);
}

.btn-side-login:hover {
    background: var(--lq-accent-primary-light);
}

.btn-side-signup {
    background: var(--lq-accent-primary);
    color: #fff;
    border: 1.5px solid var(--lq-accent-primary);
}

.btn-side-signup:hover {
    background: var(--lq-accent-primary-dark);
    border-color: var(--lq-accent-primary-dark);
}

.side-menu-nav {
    padding: 20px 0;
}

.side-menu-nav a {
    display: block;
    padding: 16px 20px;
    color: #555;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.side-menu-nav a:hover {
    background: #faf8f8;
    color: var(--lq-accent-primary);
    border-left-color: var(--lq-accent-primary);
}

.side-menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0px 0;
}

/* Logo */
.logo {
    margin-right: 30px;
    flex-shrink: 0;
}

.logo a {
    display: block;
    line-height: 0;
}

.logo img {
    height: 32px;
    width: auto;
    display: block;
}

/* Main Navigation */
.main-nav {
    display: flex; 
    flex: 1;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-size: 15px;
    font-weight: 500;
    padding: 29px 20px;
    display: inline-block;
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.main-nav a:hover {
    color: var(--lq-accent-primary);
}

.main-nav a.active {
    color: #1a1a1a;
    font-weight: 700;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--lq-accent-primary);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    border: 1px solid #e8e8e8;
    border-radius: 24px;
    overflow: hidden;
    background: #faf8f8;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: var(--lq-accent-primary);
    background: #fff;
    box-shadow: 0 2px 8px rgba(217, 96, 59, 0.12);
}

.search-box input {
    border: none;
    outline: none;
    padding: 10px 16px;
    font-size: 14px;
    width: 220px;
    background: transparent;
}

.search-box input::placeholder {
    color: #999;
}

.btn-search {
    padding: 10px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.3s;
}

.btn-search:hover {
    color: var(--lq-accent-primary);
}

/* Header Icons */
.header-icons {
    display: flex; 
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    border-radius: 50%;
    transition: all 0.3s;
    flex-shrink: 0;
    position: relative;
}

.icon-btn:hover {
    background: var(--lq-accent-primary-light);
    color: var(--lq-accent-primary);
}

.btn-icon {
    stroke: currentColor;
}

/* Mobile Search Button - 숨김 (기본) */
.mobile-search-btn {
    display: none;
}

/* Mobile Search Bar Toggle */
#mobile-search-toggle {
    display: none;
}

/* Mobile Search Bar */
.mobile-search-bar {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 16px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 999;
}

.mobile-search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 1400px;
    margin: 0 auto;
}

.mobile-search-input {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid #e8e8e8;
    border-radius: 24px;
    overflow: hidden;
    background: #faf8f8;
}

.mobile-search-input input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 16px;
    font-size: 14px;
    background: transparent;
}

.mobile-search-input input::placeholder {
    color: #999;
}

.mobile-search-submit {
    padding: 10px 16px;
    background: var(--lq-accent-primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.mobile-search-submit:hover {
    background: var(--lq-accent-primary-dark);
}

.mobile-search-close {
    width: 36px;
    height: 36px;
    background: #faf8f8;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
    transition: all 0.3s;
}

.mobile-search-close:hover {
    background: #e8e8e8;
    color: #1a1a1a;
}

/* Show mobile search bar when checkbox is checked */
#mobile-search-toggle:checked ~ .header .mobile-search-bar {
    display: block;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #df5337;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

/* 장바구니 토글 체크박스 숨기기 */
#cart-toggle {
    display: none;
}

/* 최근 본 상품 토글 체크박스 숨기기 */
#recent-toggle {
    display: none;
}

/* 장바구니 패널 */
.cart-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: #fff; 
    z-index: 1500;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-header {
    padding: 24px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.cart-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #faf8f8;
    border-radius: 12px;
    margin-bottom: 16px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.cart-item-option {
    font-size: 12px;
    color: #666;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--lq-accent-primary);
    margin-top: 4px;
}

.cart-item-remove {
    align-self: flex-start;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s;
}

.cart-item-remove:hover {
    color: #df5337;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.cart-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cart-empty-icon svg {
    width:50px;
}

.cart-empty-text {
    font-size: 15px;
}

.cart-footer {
    border-top: 1px solid #f0f0f0;
    padding: 20px;
    background: #fff;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 16px;
}

.cart-total-label {
    font-weight: 600;
    color: #555;
}

.cart-total-price {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-cart-checkout,
.btn-cart-view {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-block;
}

.btn-cart-checkout {
    background: var(--lq-accent-primary);
    color: #fff;
}

.btn-cart-checkout:hover {
    background: var(--lq-accent-primary-dark);

}

.btn-cart-view {
    background: #fff;
    color: var(--lq-accent-primary);
    border: 2px solid var(--lq-accent-primary);
}

.btn-cart-view:hover {
    background: var(--lq-accent-primary-light);
}

/* 장바구니 오버레이 */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

/* 체크박스 체크 시 장바구니 열기 */
#cart-toggle:checked ~ .cart-panel {
    right: 0;
}

#cart-toggle:checked ~ .cart-overlay {
    opacity: 1;
    visibility: visible;
}

/* 최근 본 상품 오버레이 */
.recent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

/* 체크박스 체크 시 최근 본 상품 열기 */
#recent-toggle:checked ~ .recent-panel {
    right: 0;
}

#recent-toggle:checked ~ .recent-overlay {
    opacity: 1;
    visibility: visible;
}

/* 최근 본 상품 패널 */
.recent-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: #fff; 
    z-index: 1500;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.recent-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recent-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.recent-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-clear-all {
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 18px 20px 12px;
    text-align: right;
    width: 100%;
    transition: color 0.3s;
}

.btn-clear-all:hover {
    color: #df5337;
}

.recent-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.recent-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #faf8f8;
    border-radius: 12px;
    margin-bottom: 16px;
    transition: all 0.3s;
    position: relative;
}

.recent-item:hover {
    background: var(--lq-accent-primary-light);
}

.recent-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    cursor: pointer;
}

.recent-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.recent-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.recent-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--lq-accent-primary);
    margin-top: 4px;
}

.recent-item-remove {
    align-self: flex-start;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s;
}

.recent-item-remove:hover {
    color: #df5337;
}

.recent-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.recent-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
    display: none;
}

.recent-empty-text {
    font-size: 15px;
}

/* Category Navigation */
.category-nav {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 80px;
    z-index: 999;
}

.category-tabs {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    flex-shrink: 0;
}

.category-tab:hover {
    color: var(--lq-accent-primary);
    background: #faf8f8;
}

.category-tab.active {
    color: var(--lq-accent-primary);
    font-weight: 700;
    border-bottom-color: var(--lq-accent-primary);
}

/* Responsive */
@media (max-width: 1200px) { 
    
}

@media (max-width: 1024px) {
    .header-container {
        padding: 0 16px;
        height: 70px;
    }
    
    .logo {
        margin-right: 15px;
    }
    
    .logo img {
        height: 25px;
    }
    
    .main-nav a {
        font-size: 14px;
    }
    
    .search-box input {
        width: 150px;
        font-size: 13px;
    }
    
    .header-right {
        gap: 12px;
    }
    
    .category-nav {
        top: 70px;
    }


    .main-nav a {
        font-size: 13px;
        padding: 26px 10px;
    }
    

}


@media (max-width: 800px) {
    .header-container {
        height: 60px;
        justify-content: center;
        position: relative;
        padding: 0 16px;
    }
    
    /* Hamburger Menu - Show */
    .hamburger-menu {
        display: flex;
        position: absolute;
        left: 16px;
    }
    
    /* Logo - Center */
    .logo {
        margin: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        justify-content: flex-start;
    }
    
    .logo img {
        height: 26px;
    }
    
    /* Hide Main Nav */
    .main-nav {
        display: none;
    }
    
    /* Search Box - Hide */
    .search-box {
        display: none;
    }
    
    /* Header Icons - Right */
    .header-icons {
        gap: 0px;
        position: absolute;
        right: 16px;
    }
    
    /* 프로필 아이콘 숨기기 */
    .icon-btn.profile-btn {
        display: none;
    }
    
    /* 모바일 검색 버튼 보이기 */
    .mobile-search-btn {
        display: flex;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
    }
    
    .category-tabs {
        padding: 0 16px;
    }
    
    .category-tab {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    /* 장바구니 패널 모바일 */
    .cart-panel,
    .recent-panel {
        width: 100%;
        right: -100%;
    }

    .cart-badge {
        width: 15px;
        height: 15px;
    }
    
    /* 모바일 검색바 위치 조정 */
    .mobile-search-bar {
        top: 60px;
    }
    
    /* Category Nav 위치 조정 (검색바가 열렸을 때) */
    #mobile-search-toggle:checked ~ .category-nav {
        top: 118px;
    }
    
    .category-nav {
        top: 60px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 12px;
    }
    
    .hamburger-menu {
        left: 12px;
        width: 36px;
        height: 36px;
    }
    
    .logo img {
        height: 22px;
    }
    
    .header-icons {
        gap: 0px;
        right: 12px;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
    }
    
    .category-tab {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .cart-item,
    .recent-item {
        padding: 12px;
    }
    
    .cart-item-image,
    .recent-item-image {
        width: 60px;
        height: 60px;
    }
    
    .mobile-search-bar {
        padding: 12px;
    }
    
    .mobile-search-submit {
        padding: 10px 12px;
        font-size: 13px;
    }
}
