/* 공통 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* 헤더 스타일 */
.header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-right a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

/* gap을 사용하므로 margin-right 제거 */

.header-right a:hover {
    color: #3498db;
}

/* 로그인 상태별 헤더 스타일 */
.auth-links {
    display: none; /* 기본적으로 숨김 */
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    flex-direction: row;
}

.auth-links.logged-in {
    display: none; /* 기본적으로 숨김 */
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    flex-direction: row;
}

.auth-links.logged-out {
    display: none; /* 기본적으로 숨김 */
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    flex-direction: row;
}

/* JavaScript에서 활성화될 때 */
.auth-links.active {
    display: flex !important;
}

.user-greeting {
    color: #3498db;
    font-weight: 500;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    display: inline;
    white-space: nowrap;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
}

.header-link:hover {
    color: #3498db;
    background-color: #f8f9fa;
}

.header-link svg {
    width: 16px;
    height: 16px;
}

.logout-link {
    color: #e74c3c !important;
}

.logout-link:hover {
    color: #c0392b !important;
    background-color: #fdf2f2;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    display: block;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

/* 카테고리 네비게이션 */
.category-nav {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: fixed;
    width: 100%;
    top: 80px;
    z-index: 999;
}

.category-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.category-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 80px;
    justify-content: center;
}

.category-list li {
    margin: 0;
    padding: 0;
    position: relative;
}

.category-list a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0 1.8rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: -0.3px;
    padding-top: 10px;
}

.category-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.category-list a:hover {
    color: #3498db;
}

.category-list a:hover::after {
    width: 100%;
}

.category-list li.active a {
    color: #3498db;
}

.category-list li.active a::after {
    width: 100%;
}

/* 메인 컨테이너 */
.main-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 120px;
}




.hero-section h1 {
    font-size: 4rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.8rem;
    opacity: 0.9;
    font-weight: 400;
}

/* 카테고리 섹션 */
.categories {
    margin-bottom: 3rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

/* 카테고리 섹션 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

/* 섹션 제목 */
.section-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

/* 신상품 섹션 */
.new-arrivals {
    margin-top: 3rem;
}

.new-arrivals-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .new-arrivals-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .new-arrivals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .new-arrivals-grid {
        grid-template-columns: 1fr;
    }
}



.category-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}



.category-content {
    padding: 20px;
}

.category-content h2 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.category-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 상품 그리드 */
/* 상품 그리드 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    padding: 0 0.1rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 250px;
    position: relative;
}

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

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.product-pv {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    align-items: center;
}

.product-discount {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
}

.pagination-btn:hover {
    background: #f8f9fa;
    color: #3498db;
    border-color: #3498db;
}

.pagination-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 푸터 스타일은 common.css에서 관리 */

/* 퀵메뉴 스타일은 common.css에서 관리 */

/* 모바일 스타일 */
.mobile-menu-btn, .mobile-search-btn, .bottom-app-bar {
    display: none;
}

#mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}

#mobile-nav-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    padding: 1rem;
}

#mobile-nav-menu.active {
    transform: translateX(0);
}

#mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-header {
    text-align: right;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

#mobile-nav-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

#mobile-nav-auth-links {
    padding: 0 1rem;
    margin-top: 1rem;
}

#mobile-nav-auth-links #before-login,
#mobile-nav-auth-links #after-login {
    display: flex;
    flex-direction: column;
}

#mobile-nav-auth-links a {
    display: block;
    padding: 0.8rem 0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
}

/* 모바일 메뉴 로그인 상태별 스타일 */
.mobile-user-info {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.mobile-user-greeting {
    color: #3498db;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.mobile-auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-auth-links.logged-in {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-auth-links.logged-out {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #333;
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-nav-link:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.mobile-nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mobile-nav-link.logout-link {
    color: #e74c3c;
    border: 1px solid #e74c3c;
    background-color: #fdf2f2;
}

.mobile-nav-link.logout-link:hover {
    background-color: #e74c3c;
    color: white;
}

.mobile-nav-category-links {
    padding: 1rem;
}

.mobile-nav-category-links h3 {
    margin: 1rem 0;
}

#mobile-nav-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mobile-nav-category-list li a {
    display: block;
    padding: 0.8rem 0;
    text-decoration: none;
    color: #555;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* 노트북 화면에서 카테고리 네비게이션 최적화 */
    .category-list a {
        font-size: 1rem;  /* 1.1rem에서 축소 */
        padding: 0 1.4rem;  /* 1.8rem에서 축소 */
        white-space: nowrap;  /* 1줄 강제 유지 */
        overflow: hidden;  /* 넘치는 텍스트 숨김 */
        text-overflow: ellipsis;  /* 말줄임표 처리 */
        max-width: 120px;  /* 최대 너비 제한 */
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* 기본 레이아웃 강제 적용 */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        position: relative !important;
    }
    
    /* 모든 컨테이너에 overflow-x 제어 */
    .header, .category-nav, .main-container, .hero-section, .categories, .products-grid {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* 헤더 모바일 스타일 강제 적용 */
    .header {
        box-shadow: none !important;
        border-bottom: 1px solid #e5e5e5 !important;
        height: 60px !important;
        position: fixed !important;
        top: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
    }
    
    .header-container {
        height: 60px !important;
        padding: 0 1rem !important;
        justify-content: space-between !important;
        align-items: center !important;
        max-width: 100% !important;
    }
    
    .header-right {
        display: none !important;
    }
    
    .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .logo img {
        height: 28px !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-around !important;
        width: 24px !important;
        height: 24px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        padding: 0 !important;
        z-index: 10 !important;
    }
    
    .mobile-menu-btn span {
        width: 24px !important;
        height: 2px !important;
        background: #333 !important;
    }

    .mobile-search-btn {
        display: block !important;
        text-decoration: none !important;
        color: #333 !important;
    }

    /* 카테고리 네비게이션 모바일에서 숨김 */
    .category-nav {
        display: none !important;
    }
    
    .category-list {
        height: 50px !important;
        justify-content: flex-start !important;
        padding: 0 1rem !important;
    }
    
    .category-list a {
        height: 50px !important;
        font-size: 1rem !important;
        padding: 0 1.2rem !important;
        white-space: nowrap !important;
    }

    /* 메인 컨테이너 모바일 스타일 */
    .main-container {
        margin-top: 60px !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* 히어로 섹션 모바일 스타일 */
    .hero-section {
        height: 400px !important;
        margin-top: 0 !important;
        margin-bottom: 2rem !important;
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    


    /* PC 전용 요소 숨김 */
    .quick-menu {
        display: none !important;
    }
    
    /* 모바일 푸터 스타일 */
    .footer {
        padding: 2rem 1rem 1rem !important;
        margin-top: 2rem !important;
        margin-bottom: 60px !important; /* 하단 앱바 높이만큼 여백 */
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    .footer-section h3 {
        font-size: 1rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .footer-section ul li a,
    .footer-section p {
        font-size: 0.85rem !important;
    }

    /* 모바일 하단 앱바 */
    .bottom-app-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        background: #fff !important;
        border-top: 1px solid #e5e5e5 !important;
        z-index: 1000 !important;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1) !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        height: 60px !important;
        padding: 0 !important;
        margin: 0 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .bottom-app-bar-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        color: #666 !important;
        font-size: 0.8rem !important;
        font-weight: 500 !important;
        padding: 0.5rem 0 !important;
        flex: 1 !important;
        transition: color 0.3s ease !important;
        min-width: 0 !important;
    }
    
    .bottom-app-bar-item .icon {
        margin-bottom: 0.2rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .bottom-app-bar-item .icon svg {
        width: 20px !important;
        height: 20px !important;
        stroke: currentColor !important;
    }
    
    .bottom-app-bar-item:hover {
        color: #3498db !important;
    }
    
    .bottom-app-bar-item.active {
        color: #3498db !important;
    }
    
    .bottom-app-bar-item.active .icon svg {
        stroke: #3498db !important;
    }
    
    /* 카테고리 카드 모바일 스타일 */
    .categories {
        padding: 0 0.5rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .categories-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    .category-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 6px rgba(0,0,0,0.08) !important;
        background: #fff !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        overflow: hidden !important;
    }
    

    
    .category-content {
        padding: 0.3rem 0 !important;
        height: auto !important;
        min-height: unset !important;
        display: block !important;
        text-align: center !important;
    }
    
    .category-content h2 {
        font-size: 0.9rem !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }
    
    .category-content p {
        display: none !important;
    }
    

    
    /* 상품 그리드 모바일 스타일 */
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 0 0.5rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    

    
    .product-card {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .product-desc {
        font-size: 0.85rem !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.3 !important;
        max-height: 2.6em !important;
        margin-bottom: 0.2em !important;
    }
    
    .product-pv {
        font-size: 0.8rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.1em !important;
        margin-bottom: 0.2em !important;
    }
    
    .product-pv span {
        font-size: 0.8rem !important;
        margin-left: 0 !important;
    }
    

}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
} 

/* 카테고리 페이지 스타일 - category.css로 이동됨 */

.category-products {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.category-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-products {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.error-message {
    text-align: center;
    padding: 3rem;
    color: #e74c3c;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .category-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .category-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
} 

/* 카테고리 섹션 - index3.html 스타일 적용 */
.categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

@media (max-width: 1200px) {
    .categories {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 1rem;
    }
}
@media (max-width: 768px) {
    .categories {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        padding: 0 0.5rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    max-width: 100%;
    margin: 0;
}
.category-card:hover {
    transform: translateY(-5px);
}
/* 홈페이지 카테고리 이미지 스타일 - home.css에서 관리 */
/* 홈페이지 모바일 카테고리 이미지 스타일 - home.css에서 관리 */
.category-content {
    padding: 2rem;
    text-align: center;
    background: white;
    border-top: 1px solid #e5e5e5;
    position: relative;
    z-index: 1;
}
@media (max-width: 768px) {
    .category-content {
        padding: 0.3rem 0 !important;
        height: auto !important;
        min-height: unset !important;
        display: block !important;
        text-align: center !important;
        background: white !important;
        border-top: 1px solid #e5e5e5 !important;
        position: relative !important;
        z-index: 1 !important;
    }
}
.category-content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    .category-content h2 {
        font-size: 0.9rem !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }
}
.category-content p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}
@media (max-width: 768px) {
    .category-content p {
        display: none !important;
    }
}

/* 카테고리 모달 스타일 */
.category-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.category-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.category-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.category-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.category-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.category-modal-close:hover {
    background: #e5e5e5;
}

.category-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.modal-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.modal-category-item:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.modal-category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.modal-category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-category-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: #333;
}

.no-categories {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.error-message {
    text-align: center;
    color: #e74c3c;
    padding: 2rem;
}

/* 모바일 검색 모달 스타일 */
.mobile-search-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    overflow: hidden;
}

.mobile-search-modal.active {
    transform: translateY(0);
}

.mobile-search-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.mobile-search-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.mobile-search-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.mobile-search-close:hover {
    background-color: #e5e5e5;
}

.mobile-search-close svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.mobile-search-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.mobile-search-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.mobile-search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.mobile-search-input:focus {
    border-color: #3498db;
}

.mobile-search-submit {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #3498db;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.mobile-search-submit:hover {
    background: #2980b9;
}

.mobile-search-submit svg {
    width: 16px;
    height: 16px;
    color: white;
}

.mobile-search-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-search-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-search-filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
}

.mobile-search-select {
    padding: 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.mobile-search-select:focus {
    border-color: #3498db;
}

/* 모바일에서만 표시 */
@media (min-width: 769px) {
    .mobile-search-modal {
        display: none;
    }
} 