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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #000000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 */
.site-header {
    background: #000000;
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
    border-bottom: 1px solid #898989;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.site-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.site-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-item {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item:hover {
    color: #FF0000;
}

.submenu {
    display: none;
    position: absolute;
    background: #1a1a1a;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
    border-radius: 5px;
    padding: 0.5rem 0;
    min-width: 150px;
    top: 100%;
    left: 0;
    z-index: 1000;
    border: 1px solid #898989;
}

.nav-item:hover .submenu {
    display: block;
}

.submenu .nav-item {
    color: #ffffff;
    display: block;
    padding: 0.5rem 1rem;
    margin: 0;
}

.submenu .nav-item:hover {
    background: #FF0000;
    color: #ffffff;
    opacity: 1;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle:hover {
    color: #FF0000;
}

/* 슬라이더 */
.slider-section {
    margin-bottom: 2rem;
}

.slider-container {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

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

.slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 2rem;
}

.slide-content h2 {
    font-size: 2rem;
    margin: 0;
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.slider-btn {
    background: rgba(255,0,0,0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.slider-btn:hover {
    background: #FF0000;
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #FF0000;
    transform: scale(1.2);
}

/* 검색 및 필터 */
.search-filter {
    background: #1a1a1a;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(255, 0, 0, 0.2);
    border: 1px solid #898989;
}

.search-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 1px solid #898989;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
    background: #000000;
    color: #ffffff;
}

.search-input::placeholder {
    color: #898989;
}

.search-input:focus {
    outline: none;
    border-color: #FF0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2);
}

.search-form select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
}

/* 버튼 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #FF0000;
    color: #ffffff;
    border: none;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #cc0000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4);
}

.btn-secondary {
    background: #898989;
    color: #ffffff;
    border: none;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #6a6a6a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(137, 137, 137, 0.4);
}

/* 콘텐츠 레이아웃 */
.content-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.category-sidebar {
    order: 1;
}

.products-section {
    order: 2;
}

.category-sidebar {
    background: #1a1a1a;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(255, 0, 0, 0.2);
    border: 1px solid #898989;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.category-sidebar h3 {
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #898989;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.25rem;
}

.category-item {
    position: relative;
}

.category-header-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-toggle {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1.2rem;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.category-toggle:hover {
    color: #FF0000;
    background: #2a2a2a;
    border-radius: 3px;
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.2s;
    font-weight: bold;
    font-size: 1rem;
}

.category-list a {
    display: block;
    padding: 0.625rem 0.75rem;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
    flex: 1;
}

.category-header-item > a {
    flex: 1;
}

.category-list a:hover {
    background: #2a2a2a;
    color: #FF0000;
}

.category-list a.active {
    background: #FF0000;
    color: #ffffff;
    font-weight: 500;
}

.sub-category {
    list-style: none;
    margin-left: 1.5rem;
    margin-top: 0.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    opacity: 0;
}

.sub-category.expanded {
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.3s ease-in, opacity 0.2s ease-in;
}

.sub-category li {
    margin-bottom: 0.25rem;
}

.sub-category a {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    padding-left: 1rem;
}

.sub-category .sub-category {
    margin-left: 1rem;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.category-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.category-header h2 {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 600;
    margin: 0;
}

.product-count {
    color: #898989;
    font-size: 0.9rem;
    font-weight: normal;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-controls label {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #898989;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #000000;
    color: #ffffff;
    cursor: pointer;
    transition: border-color 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.sort-select:focus {
    outline: none;
    border-color: #FF0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2);
}

/* 상품 그리드 */
.products-section {
    margin: 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(255, 0, 0, 0.2);
    border: 1px solid #898989;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
    border-color: #FF0000;
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f0f0f0;
}

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

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #898989;
    border: 1px solid #898989;
}

.no-image.large {
    min-height: 400px;
}

.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-category {
    display: inline-block;
    background: #898989;
    color: #ffffff;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    align-self: flex-start;
}

.product-description {
    color: #898989;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #898989;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FF0000;
    letter-spacing: -0.5px;
}

/* 상품 상세 페이지 */
.breadcrumb {
    margin: 2rem 0 1rem;
    color: #898989;
}

.breadcrumb a {
    color: #FF0000;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.2);
    border: 1px solid #898989;
    margin: 2rem 0;
}

.product-detail-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-detail-image img {
    width: 100%;
    border-radius: 10px;
}

/* 상품 이미지 슬라이더 */
.product-image-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
}

.slider-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.slider-main-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slider-main-item.active {
    opacity: 1;
}

.slider-main-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.product-image-slider .slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.product-image-slider .slider-btn {
    pointer-events: all;
    background: rgba(255,0,0,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.4);
}

.product-image-slider .slider-btn:hover {
    background: #FF0000;
    transform: scale(1.1);
}

/* 썸네일 이미지 */
.product-image-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border: 2px solid #898989;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.6;
    background: #1a1a1a;
}

.thumbnail-item:hover {
    opacity: 0.8;
    transform: scale(1.05);
    border-color: #FF0000;
}

.thumbnail-item.active {
    border-color: #FF0000;
    border-width: 3px;
    opacity: 1;
}

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

.product-detail-info h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.product-price-large {
    font-size: 2.5rem;
    font-weight: bold;
    color: #FF0000;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.purchase-btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    margin-left: 1rem;
}

.compatibility-file {
    margin: 1rem 0 1.5rem 0;
}

/* 탭 섹션 */
.product-tabs-section {
    margin-top: 3rem;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #898989;
    overflow: hidden;
}

.product-tabs {
    display: flex;
    border-bottom: 1px solid #898989;
    background: #000000;
}

.tab-button {
    flex: 1;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: #898989;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    position: relative;
}

.tab-button:hover {
    color: #ffffff;
    background: #1a1a1a;
}

.tab-button.active {
    color: #FF0000;
    border-bottom-color: #FF0000;
    background: #1a1a1a;
}

.tab-content {
    padding: 2rem;
    min-height: 300px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.youtube-embed {
    width: 100%;
}

.youtube-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #898989;
    background: #000000;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.product-description-content {
    line-height: 1.8;
    color: #333333;
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    min-height: 200px;
}

.product-description-content p {
    margin-bottom: 1rem;
    color: #333333;
}

.product-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}

.product-description-content h1,
.product-description-content h2,
.product-description-content h3,
.product-description-content h4,
.product-description-content h5,
.product-description-content h6 {
    color: #333333;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.product-description-content ul,
.product-description-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.product-description-content li {
    color: #333333;
    margin-bottom: 0.5rem;
}

.product-description-content a {
    color: #FF0000;
    text-decoration: underline;
}

.product-description-content a:hover {
    color: #cc0000;
}

.product-description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.product-description-content table td,
.product-description-content table th {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    color: #333333;
}

.product-description-content table th {
    background: #f8f9fa;
    font-weight: 600;
}

.product-description-content blockquote {
    border-left: 4px solid #FF0000;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666666;
    font-style: italic;
}

.product-description-content code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

.product-description-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid #dee2e6;
}

.product-description-content pre code {
    background: transparent;
    padding: 0;
    color: #333333;
}

.product-actions {
    margin-top: 2rem;
}

.no-products {
    text-align: center;
    padding: 4rem 2rem;
    background: #1a1a1a;
    border-radius: 10px;
    color: #898989;
    border: 1px solid #898989;
}

/* 푸터 */
.site-footer {
    background: #000000;
    color: #898989;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #898989;
    font-size: 0.875rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #898989;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav .nav-item {
        width: 100%;
        padding: 0.5rem 0;
        color: #ffffff;
    }
    
    .submenu {
        position: static;
        display: block;
        background: #1a1a1a;
        margin-top: 0.5rem;
        margin-left: 1rem;
        border-radius: 4px;
        border: 1px solid #898989;
    }
    
    .submenu .nav-item {
        color: #ffffff;
    }
    
    .slider-wrapper {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 1.5rem;
    }
    
    .content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .category-sidebar {
        order: 2;
        position: static;
        margin-top: 1rem;
        margin-bottom: 0;
    }
    
    .products-section {
        order: 1;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .sort-controls {
        width: 100%;
    }
    
    .sort-form {
        width: 100%;
    }
    
    .sort-select {
        flex: 1;
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .product-image-thumbnails {
        justify-content: center;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .search-form .btn {
        width: 100%;
    }
    
    .purchase-btn {
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .product-price-large {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: 1px solid #898989;
        border-right: none;
        text-align: left;
    }
    
    .tab-button.active {
        border-bottom-color: #FF0000;
        border-right: 3px solid #FF0000;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    .youtube-container {
        padding-bottom: 56.25%;
    }
}

