/* 
 * Brand Components Styles
 * 品牌相關頁面的專用樣式 - 統一設計系統風格
 */

/* 覆蓋全局 #container 寬度，讓品牌頁面使用 1200px */
body.brands-page #container,
body.brand-detail-page #container {
    width: 1200px !important;
    max-width: 1200px !important;
    padding: 70px 40px 40px 40px;
}

/* ==========================================================================
   Global Container Styles
   ========================================================================== */

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

/* ==========================================================================
   Brand List Page
   ========================================================================== */

.brands-container {
    background: #ffffff;
    min-height: 100vh;
}

.brands-page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 30px;
}

.brands-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 15px;
}

.brands-page-description {
    font-size: 1.1rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Brand Grid - 統一卡片設計 */
.brands-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin: 0;
    padding: 0;
}

.brand-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: block;
    text-decoration: none;
    color: inherit;
}

.brand-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    border-color: #8336D6;
}

.brand-logo-container {
    position: relative;
    width: 100%;
    height: 240px;
    background: #f8f9fa;
    overflow: hidden;
}

.brand-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brand-badges .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.badge-important { background-color: #ffc107; }
.badge-hot { background-color: #ff5722; }
.badge-partner { background-color: #4caf50; }

.brand-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 25px;
    background: white;
}

.brand-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #999999;
    font-size: 2rem;
}

.brand-card-content {
    padding: 20px;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333333;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Brand Filters - 統一標籤按鈕風格 */
.brand-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 0;
}

.filter-button {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: #666;
    text-decoration: none;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-button:hover,
.filter-button.active {
    color: #FF6B6B;
    border-color: #FF6B6B;
    background: rgba(255, 107, 107, 0.1);
    text-decoration: none;
    transform: translateY(-2px);
}

/* ==========================================================================
   Brand Detail Header - 簡化設計
   ========================================================================== */

.brand-detail-page {
    background: #ffffff;
    min-height: 100vh;
}

.brand-header-section {
    background: #ffffff;
    padding: 90px 0 40px 0;
    border-bottom: 1px solid #f0f0f0;
}

.brand-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.brand-header-row {
    display: flex;
    align-items: center;
    gap: 40px;
}

.brand-info {
    flex: 1;
}

.brand-logo-large {
    flex-shrink: 0;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333333;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.brand-badges {
    margin-top: 15px;
    margin-bottom: 20px;
}

/* 品牌詳細頁面的標籤樣式 - 覆蓋列表頁面的絕對定位 */
.brand-detail-page .brand-badges {
    position: static !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    display: block !important;
    flex-direction: row !important;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.brand-badges .badge {
    font-size: 0.875rem;
    padding: 6px 12px;
    border-radius: 15px;
    margin-right: 10px;
    margin-bottom: 8px;
    font-weight: 600;
    display: inline-block;
    color: white;
}

.brand-description {
    font-size: 1.1rem;
    color: #666666;
    margin: 0 0 20px 0;
    line-height: 1.7;
    max-width: 600px;
}

.brand-logo {
    max-width: 150px;
    max-height: 150px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    background: white;
    padding: 15px;
    object-fit: contain;
}

.brand-logo-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    font-size: 2rem;
}

/* ==========================================================================
   Brand Statistics - 統一卡片設計
   ========================================================================== */

.brand-stats-section {
    background: #ffffff;
    padding: 40px 0;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #8336D6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-content {
    text-align: left;
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333333;
    margin: 0 0 5px 0;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #666666;
    margin: 0;
    font-weight: 500;
}

/* ==========================================================================
   Brand Content Tabs - 統一標籤設計
   ========================================================================== */

.content-tabs-section {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 50px;
    z-index: 100;
}

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

.content-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.tab-link {
    padding: 20px 30px;
    text-decoration: none;
    color: #666666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-weight: 500;
    font-size: 1rem;
}

.tab-link:hover {
    text-decoration: none;
    color: #8336D6;
    background: rgba(131, 54, 214, 0.05);
}

.tab-link.active {
    color: #8336D6;
    border-bottom-color: #8336D6;
    background: rgba(131, 54, 214, 0.05);
}

.tab-icon {
    font-size: 1rem;
}

.tab-count {
    font-size: 0.875rem;
    background: #f8f9fa;
    color: #666666;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-link.active .tab-count {
    background: rgba(131, 54, 214, 0.1);
    color: #8336D6;
}

/* ==========================================================================
   Brand Content Area
   ========================================================================== */

.brand-content-section {
    background: #ffffff;
    padding: 40px 0 60px 0;
    min-height: 500px;
}

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

/* Social Links - 統一按鈕設計 */
.brand-social-section {
    background: #f8f9fa;
    padding: 30px 0;
    border-top: 1px solid #f0f0f0;
}

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

.social-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.social-label {
    font-weight: 600;
    color: #333333;
    margin-right: 10px;
    font-size: 1rem;
}

.social-link {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: #666666;
    text-decoration: none;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-link:hover {
    text-decoration: none;
    color: #8336D6;
    border-color: #8336D6;
    background: rgba(131, 54, 214, 0.1);
    transform: translateY(-2px);
}

.social-icon {
    font-size: 1rem;
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f8f9fa;
    color: #666666;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.back-button:hover {
    text-decoration: none;
    color: #8336D6;
    background: rgba(131, 54, 214, 0.05);
    border-color: #8336D6;
}

/* Content Grid - 統一內容網格 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.content-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.content-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.content-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.content-image-container {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    overflow: hidden;
    position: relative;
}

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

.content-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #999999;
    font-size: 2rem;
}

.content-info {
    padding: 20px;
}

.content-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.content-description {
    font-size: 0.875rem;
    color: #666666;
    margin: 0 0 15px 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.content-meta {
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
    color: #999999;
}

.content-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* No Content */
.no-content {
    text-align: center;
    padding: 60px 20px;
    color: #666666;
}

.no-content i {
    color: #dddddd;
}

.no-content h4 {
    color: #333333;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Pagination */
.pagination-center {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #f0f0f0;
}

/* ==========================================================================
   Responsive Brand Styles
   ========================================================================== */

@media (max-width: 1024px) {
    .brand-header-row {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .brand-title {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .brand-header-section {
        padding: 40px 0 30px 0;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .brand-description {
        font-size: 1.1rem;
    }
    
    .brand-logo {
        max-width: 120px;
        max-height: 120px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .content-tabs {
        padding: 0 15px;
    }
    
    .tab-link {
        padding: 20px 25px;
        font-size: 0.95rem;
    }
    
    .brands-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .brand-logo-container {
        height: 150px;
    }
    
    .social-links {
        flex-direction: column;
        align-items: stretch;
    }
    
    .social-link {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 1.8rem;
    }
    
    .brand-badges .badge {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin-right: 8px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-link {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    
    .tab-count {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
    .brands-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .brand-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-button {
        text-align: center;
        justify-content: center;
    }
}
