/* 首頁樣式 */
#pages {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#main {
    width: 100%;
    margin-top: 20px;
}

/* 熱門品牌區塊 */
.brands-section {
    width: 100%;
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 12px;
    margin-bottom: 40px;
    text-align: center;
}

.brands-section h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
}

.brands-section .brand-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Banner 樣式 */
#banner {
    width: 100%;
    margin-bottom: 30px;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.slides {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: white;
    z-index: inherit;
}

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

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 40px 30px 20px;
    color: white;
}

.slide-content h3 {
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content .time {
    font-size: 14px;
    opacity: 0.9;
}

/* 導航按鈕 */
.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
    transform: translateY(-50%);
}

.slider-nav button {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
}

.slider-nav button:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* 圓點指示器 */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

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

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

/* 預設 banner */
.default-banner {
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.banner-content h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.banner-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-outline-white {
    border: 2px solid white;
    color: white;
    background: transparent;
}

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

/* 文章標籤 */
.nav-tabs {
    list-style: none;
    margin: 0 0 30px 0;
    padding: 0;
    display: flex;
    border-bottom: 2px solid #e9ecef;
}

.nav-tabs li {
    margin-right: 40px;
}

.nav-tabs a {
    display: block;
    padding: 15px 0;
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    font-size: 18px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs a.active,
.nav-tabs a:hover {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* 文章網格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

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

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

.article-item a {
    text-decoration: none;
    color: inherit;
}

.article-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.article-item:hover .article-image img {
    transform: scale(1.05);
}

.article-info {
    padding: 20px;
}

.article-info h4 {
    font-family: 'Noto Serif TC', serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: #333;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #6c757d;
}

.views {
    color: #007bff;
    font-weight: 500;
}

/* More 連結 */
.more {
    text-align: center;
    margin-top: 30px;
}

.more a {
    display: inline-block;
    padding: 12px 30px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.more a:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* 側邊欄樣式 */
.brands h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.brand-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.brand:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-decoration: none;
    color: #333;
}

.brand img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 8px;
    border-radius: 4px;
}

.brand-placeholder {
    width: 50px;
    height: 50px;
    background: #e9ecef;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 8px;
}

.brand span {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* 響應式設計 */
@media (max-width: 768px) {
    #pages {
        flex-direction: column;
        padding: 10px;
    }
    
    #main {
        width: 100%;
    }
    
    #sidebar {
        width: 100%;
        margin-top: 20px;
    }
    
    .banner-slider {
        height: 250px;
    }
    
    .slide-content h3 {
        font-size: 20px;
    }
    
    .banner-content h1 {
        font-size: 32px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .nav-tabs li {
        margin-right: 20px;
    }
    
    .brand-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .brand {
        padding: 10px;
    }
    
    .brand img,
    .brand-placeholder {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   搭配牆區塊樣式
   ========================================================================== */

.photos-section {
    width: 100%;
    background: white;
    padding: 40px 20px;
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.photos-section h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.photos-tabs .nav-tabs {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0 0 30px 0;
    padding: 0;
    border-bottom: 1px solid #eee;
}

.photos-tabs .nav-tabs li {
    margin: 0 20px;
}

.photos-tabs .nav-tabs a {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.photos-tabs .nav-tabs a:hover,
.photos-tabs .nav-tabs a.active {
    color: #8336D6;
    border-bottom-color: #8336D6;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.photo-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.photo-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.photo-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

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

.photo-item:hover .photo-image img {
    transform: scale(1.05);
}

.sex-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.sex-indicator.male {
    background: rgba(54, 162, 235, 0.8);
}

.sex-indicator.female {
    background: rgba(255, 99, 132, 0.8);
}

.photo-stats {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
}

.photo-stats span {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.photo-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.photo-info h4 {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    color: #333;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: left;
}

.photo-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.photo-meta .author {
    font-weight: 500;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 10px;
    color: #666;
}

.photo-meta .date {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
}

/* ==========================================================================
   達人排行榜區塊樣式
   ========================================================================== */

.influencers-section {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
    margin-bottom: 40px;
    border-radius: 12px;
    color: white;
}

.influencers-section h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: white;
    text-align: center;
}

.influencers-section .influencers-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
    padding: 0 !important;
    max-width: 800px !important;
    margin: 0 auto 30px auto !important;
}

.influencers-section .influencer-item {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 25px 20px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    position: relative !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    width: 100% !important;
}

.influencers-section .influencer-item:hover {
    transform: translateY(-6px) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.influencers-section .influencer-item a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-decoration: none !important;
    color: white !important;
    gap: 10px !important;
    text-align: center !important;
}

.influencers-section .rank-badge {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    z-index: 2 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

.influencers-section .rank-1 .rank-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #333 !important;
    font-size: 16px !important;
}

.influencers-section .rank-2 .rank-badge {
    background: linear-gradient(135deg, #C0C0C0, #808080) !important;
    color: #333 !important;
}

.influencers-section .rank-3 .rank-badge {
    background: linear-gradient(135deg, #CD7F32, #8B4513) !important;
    color: white !important;
}

.influencers-section .influencer-item:not(.rank-1):not(.rank-2):not(.rank-3) .rank-badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.influencers-section .influencer-avatar {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 3px solid rgba(255, 255, 255, 0.4) !important;
    position: relative !important;
    margin-bottom: 12px !important;
}

.influencers-section .influencer-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.influencers-section .avatar-placeholder {
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 20px !important;
    color: white !important;
}

.influencers-section .influencer-info {
    flex: 1 !important;
    text-align: center !important;
}

.influencers-section .influencer-info h4 {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 8px 0 5px 0 !important;
    color: white !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

.influencers-section .influencer-stats {
    font-size: 11px !important;
    opacity: 0.9 !important;
}

.influencer-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   響應式設計
   ========================================================================== */

@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .photos-tabs .nav-tabs {
        flex-direction: row;
        justify-content: center;
    }
    
    .photos-tabs .nav-tabs li {
        margin: 0 10px;
    }
    
    .influencers-section .influencers-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        max-width: 100% !important;
        padding: 0 10px !important;
    }
    
    .influencers-section .influencer-item {
        padding: 20px 15px !important;
    }
    
    .influencers-section .influencer-avatar {
        width: 55px !important;
        height: 55px !important;
        margin-bottom: 10px !important;
    }
    
    .influencers-section .influencer-info h4 {
        font-size: 14px !important;
    }
    
    .influencers-section .rank-badge {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
        top: -6px !important;
        right: -6px !important;
    }
}

@media (max-width: 480px) {
    .photos-grid {
        grid-template-columns: 1fr;
    }
    
    .photos-tabs .nav-tabs {
        margin: 0 0 20px 0;
    }
    
    .photos-tabs .nav-tabs a {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .influencers-section .influencers-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .influencers-section .influencer-item {
        max-width: 300px !important;
        margin: 0 auto !important;
    }
    
    .influencers-section .influencer-avatar {
        width: 60px !important;
        height: 60px !important;
    }
}
