/* 기본 리셋 및 폰트 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 터치 이벤트 최적화 */
html {
    touch-action: manipulation;
}

/* 스크롤 성능 최적화 */
* {
    -webkit-overflow-scrolling: touch;
}

/* iframe 터치 최적화 */
iframe {
    touch-action: manipulation;
}

/* 버튼 및 인터랙티브 요소 터치 최적화 */
button, a, .btn, .category-btn, .unified-category-btn {
    touch-action: manipulation;
}

/* 스크롤 가능한 컨테이너 최적화 */
.products-grid, .post-grid, .youtube-grid {
    touch-action: pan-y pinch-zoom;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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


@media (max-width: 1200px) {
    .page-header .container {
        padding-left: 0;
        padding-right: 0;
    }
}


/* 헤더 스타일 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    padding: 1rem 0;
}

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

.nav-logo h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffd700;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* 메인 콘텐츠 */
main {
    margin-top: 70px;
    margin-bottom: 50px;
}

/* 히어로 섹션 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 100px 20px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: #ffd700;
    color: #333;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* 섹션 공통 스타일 */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.8rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 제품 섹션 */
.products {
    padding: 20px 0 40px 0;
    background: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

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

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

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 6/4;
    overflow: hidden;
}

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

/* 제품 유튜브 썸네일 스타일 */
.product-youtube-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.product-youtube-thumbnail iframe {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.product-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.product-youtube-thumbnail:hover .product-thumbnail-overlay {
    opacity: 1;
}

.product-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.product-overlay-content i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.product-overlay-content span {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-price {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.current-price {
    color: #667eea;
    font-weight: 700;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.discount-badge {
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.view-details-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* 제품 상세 모달 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.product-detail-image {
    max-width: 500px;
    width: 100%;
    border-radius: 10px;
    margin: 0 auto;
}

.product-detail-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.product-detail-price {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-detail-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.link-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-right: 1rem;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.link-button.secondary {
    background: #6c757d;
    color: white;
}

.link-button.secondary:hover {
    background: #5a6268;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.buy-button {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.buy-button:hover {
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.youtube-embed {
    margin-top: 1.5rem;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
}

/* 유튜브 섹션 */
.youtube {
    padding: 40px 0;
    background: white;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.youtube-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.youtube-item:hover {
    transform: translateY(-5px);
}

.youtube-thumbnail {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.youtube-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.youtube-item:hover .youtube-play-overlay {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}



.youtube-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #999;
}

.youtube-info {
    padding: 1rem;
}

.youtube-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.youtube-description {
    color: #666;
    font-size: 0.9rem;
}

/* 블로그 섹션 */
.post {
    padding: 40px 0;
    background: #f8f9fa;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.post-image {
    position: relative;
    padding: 15px 15px 0;
    height: 230px;
}

.post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* 블로그 유튜브 썸네일 스타일 */
.post-youtube-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.post-youtube-thumbnail iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    pointer-events: none;
}

.post-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
}

.post-youtube-thumbnail:hover .post-thumbnail-overlay {
    opacity: 1;
}

.post-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.post-overlay-content i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.post-overlay-content span {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.post-content {
    padding: 15px 20px 20px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.post-date {
    color: #999;
    font-size: 0.85rem;
}

.post-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 0.9rem;
}

.read-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 블로그 상세 모달 */
.post-detail {
    line-height: 1.8;
}

.post-detail h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.post-detail .post-meta {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.post-detail .post-content {
    color: #444;
    line-height: 1.8;
}

.post-detail-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.post-detail-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

.post-detail-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.post-tag {
    background: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-detail-image {
    margin: 2rem 0;
    text-align: center;
}

.post-detail-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-features, .product-specifications {
    margin: 1.5rem 0;
}

.product-features h4, .product-specifications h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.5rem;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.product-specifications table {
    width: 100%;
    border-collapse: collapse;
}

.product-specifications td {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.product-specifications td:first-child {
    font-weight: 600;
    color: #333;
    width: 40%;
}

.product-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}


.product-video h4 {
    margin-bottom: 1rem;
    color: #333;
}

.post-detail .post-content p {
    margin-bottom: 1rem;
}

.post-detail .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

/* 푸터 */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    opacity: 0.8;
}

/* 반응형 디자인 */
/* 태블릿 - 2개 컬럼 */
@media (max-width: 1024px) and (min-width: 769px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* 모바일 - 1개 컬럼 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #667eea;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }



    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .youtube-grid {
        grid-template-columns: 1fr;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }





    .product-detail-container {
        margin: 0 0.5rem;
    }

    .product-detail-image img {
        max-width: 100%;
    }

    .hero {
        padding: 60px 15px;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .page-header {
        height: 60px;
        padding: 12px 15px;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
    }

    .products, .youtube, .post {
        padding: 20px 0;
    }
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card, .youtube-item, .post-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* 스크롤 스무스 */
html {
    scroll-behavior: smooth;
}

/* 페이지 헤더 */
.page-header {
    color: #333;
    text-align: left;
    height: 70px;
    padding: 15px 20px;
    margin-top: 70px;
    box-sizing: border-box;
}

.page-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0;
    font-weight: 700;
    text-align: left;
}

.page-header p {
    display: none;
}

/* 검색 및 필터 섹션 */
.search-filter-section {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.search-filter-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.search-group {
    flex: 1;
    max-width: 400px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: #5a6fd8;
    transform: translateY(-50%) scale(1.05);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    min-width: 120px;
}

/* 페이지네이션 */
.pagination {
    margin-top: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.pagination-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 40px;
}

.pagination-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 검색 결과 없음 */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-results h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

/* 채널 정보 */
.channel-info {
    background: #f8f9fa;
    padding: 3rem 0;
    margin-top: 3rem;
}

.channel-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.channel-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    overflow: hidden; /* 이미지가 원형으로 잘리도록 */
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.channel-details h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.channel-details p {
    color: #666;
    margin-bottom: 1rem;
}

.channel-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.channel-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.subscribe-btn {
    background: #ff0000;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.subscribe-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

/* 인기 태그 */
.popular-tags {
    background: white;
    padding: 3rem 0;
    margin-top: 3rem;
}

.popular-tags h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.tags-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tag {
    background: #f0f0f0;
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #667eea;
    color: white;
}

.tag-active {
    background: #667eea !important;
    color: white !important;
    animation: tagPulse 0.6s ease-in-out;
    transform: scale(1.05);
}

@keyframes tagPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1.05); }
}

/* 카테고리 버튼 */
.category-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.category-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* =========================
   통합 필터 섹션 공통 스타일
   ========================= */

/* 메인 컨테이너 */
.unified-filter-section {
    margin-bottom: 0.5rem;
}

.unified-filter-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* 좌측 카테고리 섹션 */
.unified-category-section {
    flex: 1;
    min-width: 300px;
}



.unified-category-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.unified-category-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
}

.unified-category-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.unified-category-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* 우측 검색 섹션 */
.unified-search-section {
    flex: 0 0 250px;
    max-width: 250px;
}



.unified-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.unified-search-box input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: white;
}

.unified-search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.unified-search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unified-search-box button:hover {
    background: #5a6fd8;
    transform: translateY(-50%) scale(1.05);
}

.unified-clear-btn {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.unified-clear-btn:hover {
    background: #5a6268;
}



/* 더보기 버튼 */
.view-more-container {
    text-align: center;
    margin-top: 2rem;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.view-more-btn i {
    transition: transform 0.3s ease;
}

.view-more-btn:hover i {
    transform: translateX(5px);
}

/* 카테고리 섹션 */
.category-section {
    background: #f8f9fa;
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
}

/* 활성 네비게이션 링크 */
.nav-link.active {
    color: #ffd700 !important;
    font-weight: 600;
}

/* 반응형 디자인 추가 */
@media (max-width: 768px) {
    .page-header {
        height: 65px;
        padding: 14px 18px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .search-filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-group {
        max-width: none;
    }
    
    .filter-group {
        justify-content: center;
    }
    
    .channel-card {
        flex-direction: column;
        text-align: center;
    }
    
    .channel-stats {
        justify-content: center;
    }
    
    .tags-container {
        gap: 0.5rem;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .category-buttons {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .view-more-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .product-detail-content {
        padding: 1rem;
    }
    
    .product-detail-title {
        font-size: 2rem;
    }

    .product-detail-container {
        margin: 0 1rem;
    }
    
    .post-detail-content {
        padding: 1rem;
    }
    
    .post-detail-title {
        font-size: 2rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 제품 상세 페이지 */
.product-detail-section {
    padding: 1rem 0;
    margin-top: 80px;
}

.product-detail-section ul {
    list-style: none;
    padding: 0;
}

.product-detail-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
}

.product-detail-section li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.product-detail-section h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 2rem 0;
}



.product-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.product-detail-header {
    margin-bottom: 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: #5a6fd8;
    transform: translateX(-5px);
}

.product-detail-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.product-detail-header-info {
    margin-bottom: 2rem;
}

.product-detail-category {
    margin-bottom: 1rem;
}

.category-badge {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 1rem 0;
    line-height: 1.2;
}

.product-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.product-detail-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-detail-image {
    margin: 0 0 2rem 0;
    text-align: center;
}

.product-detail-image img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.product-detail-body {
    line-height: 1.8;
    color: #333;
}

.product-detail-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 2rem;
}

.product-detail-full-description {
    margin: 3rem 0;
}





.product-detail-full-description h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 2rem 0 1rem 0;
}

.product-detail-full-description h5:first-child {
    margin-top: 0;
}

.product-detail-full-description p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1.5rem;
}



.product-detail-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.product-features, .product-specifications {
    margin: 2rem 0;
}

.product-features h4, .product-specifications h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
}

.product-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.product-specifications table {
    width: 100%;
    border-collapse: collapse;
}

.product-specifications td {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
}

.product-specifications td:first-child {
    font-weight: 600;
    color: #333;
    width: 40%;
}

.common-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.ali-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #ff6b35;
    color: white;
}

.ali-button:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

.product-video {
    margin: 3rem 0;
}

.product-video h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
}

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

/* 블로그 상세 페이지 */
.post-detail-section {
    padding: 2rem 0;
    margin-top: 80px;
}
@media screen and (max-width: 768px) {
    .post-detail-section {
        padding: 0.5rem 0;
    }
}
.post-detail-container {
    max-width: 800px;
    margin: 0 auto;
}


.post-detail-content {
    background: white;
    border-radius: 12px;
}

.post-detail-header-info {
    margin-bottom: 2rem;
}

.post-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 1rem 0;
    line-height: 1.2;
}

.post-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.post-detail-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-detail-image {
    margin: 2rem 0;
    text-align: center;
}

.post-detail-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-detail-body {
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-detail-body h2, .post-detail-body h3, .post-detail-body h4 {
    color: #333;
    margin: 2rem 0 1rem 0;
}

.post-detail-body p {
    margin-bottom: 1.5rem;
}

.post-detail-body ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-detail-body li {
    margin-bottom: 0.5rem;
}

.post-detail-tags {
    margin: 2rem 0;
}

.post-detail-tags h4 {
    margin-bottom: 1rem;
    color: #333;
}

.post-detail-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.post-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.share-button, .bookmark-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.share-button:hover, .bookmark-button:hover {
    background: #667eea;
    color: white;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.prev-post, .next-post {
    flex: 1;
}

.prev-post a, .next-post a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.prev-post a:hover, .next-post a:hover {
    color: #5a6fd8;
}

.next-post a {
    justify-content: flex-end;
}

/* 에러 컨테이너 */
.error-container {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.error-container i {
    font-size: 4rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.error-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.error-container p {
    margin-bottom: 2rem;
}

/* API 로딩 및 에러 스타일 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    grid-column: 1 / -1; /* 그리드에서 전체 너비 차지 */
    width: 100%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* 에러 액션 버튼 */
.error-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.retry-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* 제품이 없을 때 스타일 */
.no-products, .no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    grid-column: 1 / -1;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.no-products i, .no-results i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.no-products h3, .no-results h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.no-products p, .no-results p {
    color: #7f8c8d;
    max-width: 400px;
}

/* 관련 제품 스타일 */
.related-products-section {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 2px solid #ecf0f1;
}

.related-products-section h3 {
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
    font-size: 1.8rem;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.related-product-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.related-product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.related-product-info h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.related-product-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 페이지네이션 정보 스타일 */
.pagination-info {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 제품 액션 버튼 스타일 개선 */
.product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.buy-link-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.buy-link-btn:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #e8851b 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* 제품 소개 및 카테고리 스타일 */
.product-intro {
    font-size: 1.1rem;
    color: #666;
    margin: 15px 0;
    line-height: 1.6;
}

.product-category {
    margin: 15px 0;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.category-label {
    font-weight: 600;
    color: #333;
}

/* 태그 스타일 */
.product-tags, .post-tags {
    margin: 20px 0;
}

.product-tags h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.tags-container, .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 블로그 카드 내 태그 스타일 */
.post-card .post-tags {
    margin-top: 10px;
}

.post-card .post-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
}

.post-card .post-tags .post-tag:nth-child(n+4) {
    display: none; /* 3개까지만 표시 */
}

.product-tag, .post-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.product-tag:hover, .post-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    cursor: pointer;
}

/* 블로그 상세페이지 태그 */
.post-detail-tags {
    margin: 15px 0;
}

.post-detail-tags .post-tag {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
}

.post-detail-tags .post-tag:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* 이전글/다음글 네비게이션 스타일 */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0 20px 0;
    padding: 25px 0;
    border-top: 1px solid #e9ecef;
}

.post-nav-prev, .post-nav-next {
    min-height: 80px;
}

.post-nav-link {
    display: block;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #e9ecef;
}

.post-nav-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border-color: transparent;
}

.post-prev-link {
    text-align: left;
}

.post-next-link {
    text-align: right;
}

.post-nav-direction {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.7;
}

.post-prev-link .post-nav-direction {
    justify-content: flex-start;
    gap: 5px;
}

.post-next-link .post-nav-direction {
    justify-content: flex-end;
    gap: 5px;
}

.post-nav-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-nav-placeholder {
    height: 80px;
}

/* 관련 포스트 스타일 */
.related-posts-section {
    margin-top: 20px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.related-posts-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.category-note {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

.related-post-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
    border-color: #667eea;
}

.related-post-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 15px;
}

.related-post-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-date {
    color: #999;
    font-size: 0.8rem;
}


/* 유튜브 컨테이너 */
.youtube-container, .post-detail-youtube .youtube-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 20px 0;
}

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

/* 블로그 상세페이지 스타일 */
.post-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.post-detail-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.post-detail-header-info {
    margin-bottom: 25px;
}

.post-detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin: 15px 0;
}

.post-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.post-detail-date {
    color: #666;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-detail-excerpt {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #667eea;
}

.post-detail-excerpt p {
    margin: 0;
    font-size: 1.1rem;
    color: #495057;
    line-height: 1.6;
}

.post-detail-image {
    margin: 25px 0;
    text-align: center;
}

.post-detail-image img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.post-detail-youtube {
    margin: 30px 0;
}

.post-detail-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin: 30px 0;
}

.post-detail-body h2, 
.post-detail-body h3, 
.post-detail-body h4 {
    margin: 30px 0 15px;
    color: #333;
}

.post-detail-body h2 {
    font-size: 1.6rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.post-detail-body h3 {
    font-size: 1.4rem;
    color: #667eea;
}

.post-detail-body h4 {
    font-size: 1.2rem;
}

.post-detail-body p {
    margin: 15px 0;
}

.post-detail-body ul, 
.post-detail-body ol {
    margin: 15px 0;
    padding-left: 25px;
}

.post-detail-body li {
    margin: 8px 0;
}

.post-detail-footer {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid #f1f3f4;
}

.post-detail-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

/* 버튼 스타일 */
.btn-back, .btn-share, .btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.btn-back {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-back:hover {
    background: #e9ecef;
    color: #343a40;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-share {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-share:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-retry {
    background: #28a745;
    color: white;
}

.btn-retry:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* 에러 및 로딩 컨테이너 스타일 */
.loading-container, .error-container {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error-container {
    color: #666;
}

.error-container h3 {
    color: #dc3545;
    margin: 15px 0;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* 개선된 back-button 스타일 */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 0;
    font-size: 0.95rem;
}

.back-button:hover {
    color: #5a6fd8;
    transform: translateX(-5px);
}

.back-button i {
    font-size: 0.9rem;
}

/* 제품 상세 페이지 액션 버튼들 */
.product-detail-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.purchase-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.purchase-link:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #e8851b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

/* 썸네일 위 구매 버튼 스타일 */
.product-detail-image-actions {
    text-align: left;
    margin: 20px 0;
}

.purchase-link-image {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.2);
}

.purchase-link-image:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #e8851b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* 제품 주요특징 스타일 */
.product-detail-features {
    margin: 25px 0;
}

.product-detail-features h4 {
    color: #333;
    margin: 0 0 15px 0;
}

.product-features {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.product-features li {
    position: relative;
    padding: 8px 0;
    padding-left: 20px;
    color: #555;
    line-height: 1.5;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 8px;
    color: #667eea;
    font-weight: bold;
    font-size: 1rem;
}

/* 제품 상세페이지 유튜브 스타일 */
.product-detail-youtube {
    margin: 25px 0;
}

.product-detail-youtube .youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-detail-youtube .youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 제품 목록에서 클릭 가능한 요소들 스타일 */
.product-description:hover {
    color: #667eea;
    transition: color 0.3s ease;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.share-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #693d99 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 관련 포스트의 유튜브 썸네일 스타일 */
.related-post-image .youtube-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.related-post-image .youtube-thumbnail iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.related-post-image .youtube-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.related-post-card:hover .youtube-overlay {
    background: rgba(255, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

/* 검색 기능 개선 스타일 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding-right: 80px; /* 버튼들을 위한 공간 확보 */
}

.clear-btn {
    position: absolute;
    right: 45px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.clear-btn:hover {
    color: #666;
}

.search-results-info {
    margin-top: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #666;
}

.search-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #999;
}

.no-results p {
    font-size: 1rem;
    margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .post-detail-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .post-detail-header,
    .post-detail-content {
        padding: 10px 20px 0px 20px;
    }
    
    .post-detail-title {
        font-size: 1.6rem;
    }
    
    .post-detail-actions {
        flex-direction: column;
    }
    
    .btn-back, .btn-share, .btn-retry {
        width: 100%;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .error-actions .btn-back,
    .error-actions .btn-retry {
        width: 200px;
    }
    
    /* 이전글/다음글 네비게이션 모바일 */
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0 15px 0;
        padding: 20px 0;
    }
    
    .post-nav-link {
        padding: 15px;
    }
    
    .post-nav-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .unified-filter-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .unified-category-section {
        min-width: 100%;
    }
    
    .unified-category-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        scrollbar-width: thin;
    }
    
    .unified-category-buttons::-webkit-scrollbar {
        height: 3px;
    }
    
    .unified-category-buttons::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    .unified-category-buttons::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 3px;
    }
    
    .unified-category-btn {
        flex-shrink: 0;
        min-width: auto;
        white-space: nowrap;
    }
    
    .unified-search-section {
        flex: 1;
        max-width: 100%;
    }
    
    .unified-category-buttons {
        gap: 0.5rem;
    }
    
    .unified-category-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .unified-search-box input {
        font-size: 16px; /* iOS 줌 방지 */
    }
}

/* 임베드 유튜브 목록 스타일 */
.youtube-item-embed {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.youtube-item-embed:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.youtube-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    background: #000;
}

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

.youtube-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    text-align: center;
}

.youtube-error i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.youtube-error p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.youtube-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.youtube-link:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
}

.youtube-content {
    padding: 1.5rem;
}

.youtube-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.youtube-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.youtube-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
    align-items: center;
}

.youtube-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.youtube-duration i,
.youtube-views i {
    color: #ff0000;
}

.youtube-original-link {
    color: #ff0000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.youtube-original-link:hover {
    color: #cc0000;
    text-decoration: none;
}

.youtube-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.youtube-tags .tag {
    background: #f8f9fa;
    color: #495057;
    padding: 0.3rem 0.8rem;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.youtube-tags .tag:hover {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
}

/* 기본 유튜브 그리드 레이아웃 (유튜브 전용 페이지용 - 1줄에 3개) */
.youtube-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* 메인페이지 유튜브 그리드 (3x2 = 6개) */
section#youtube .youtube-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* 메인페이지에서 유튜브 아이템 크기 조정 */
section#youtube .youtube-item-embed {
    margin-bottom: 0;
}

/* 메인페이지에서 유튜브 제목 크기 조정 */
section#youtube .youtube-title {
    font-size: 1.1rem;
    -webkit-line-clamp: 2;
}

/* 메인페이지에서 유튜브 설명 크기 조정 */
section#youtube .youtube-description {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
}

/* 반응형 디자인 */
/* 중간 화면 - 2개씩 표시 */
@media (max-width: 1199px) and (min-width: 768px) {
    /* 메인페이지는 중간 화면에서 2개씩 */
    section#youtube .youtube-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* 유튜브 전용 페이지는 중간 화면에서 2개씩 */
    .youtube-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* 작은 화면 - 1개씩 표시 */
@media (max-width: 767px) {
    /* 메인페이지는 모바일에서 1줄로 */
    section#youtube .youtube-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* 유튜브 전용 페이지는 모바일에서 1줄로 */
    .youtube-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .youtube-item-embed {
        margin-bottom: 0;
    }
    
    .youtube-content {
        padding: 1.2rem;
    }
    
    .youtube-title {
        font-size: 1.2rem;
    }
    
    .youtube-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .youtube-content {
        padding: 1rem;
    }
    
    .youtube-title {
        font-size: 1.1rem;
    }
    
    .youtube-description {
        font-size: 0.9rem;
    }
    
    .youtube-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .youtube-tags .tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
}

/* 임베드 유튜브 목록 스타일 끝 */

/* 무한 스크롤 관련 스타일 (제품용) */
.load-more-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.load-more-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.load-more-spinner p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

.infinite-scroll-end {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 1rem;
    text-align: center;
}

.infinite-scroll-end .end-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
}

.infinite-scroll-end .end-message i {
    font-size: 2.5rem;
    color: #4CAF50;
    background: white;
    padding: 1rem;
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.infinite-scroll-end .end-message p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .infinite-scroll-end .end-message {
        padding: 1.5rem 2rem;
        margin: 0 1rem;
    }
    
    .infinite-scroll-end .end-message i {
        font-size: 2rem;
        width: 3rem;
        height: 3rem;
    }
    
    .infinite-scroll-end .end-message p {
        font-size: 1rem;
    }
}

/* 카테고리 개수 표시 스타일 */
.category-count {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
    margin-left: 4px;
}

.unified-category-btn .category-count {
    opacity: 0.8;
}

.unified-category-btn.active .category-count {
    color: #fff;
    opacity: 1;
}

/* 위로 가기 버튼 스타일 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}
