
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background-light);
    color: var(--text-primary);
    line-height: 1.6;
}


.header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}


/* 详情页特有样式 */
.detail-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.detail-header {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.template-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.template-title-wrap h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.template-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.preview-section {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.main-preview {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.preview-image {
    width: 100%;
    height: 800px;
    position: relative;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #666;
}

.preview-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.preview-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-button:hover {
    background: var(--hover-color);
    color: var(--primary-color);
}

.purchase-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 2rem;
}

.price-tag {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.price-tag small {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.purchase-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.purchase-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.feature-list {
    list-style: none;
    margin-top: 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
}

.detail-tabs {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    padding: 1rem 2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
}

.tab-button.active {
    color: var(--primary-color);
    font-weight: 500;
}

.tab-button.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    padding: 2rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 500;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.thumbnail {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail.active {
    border-color: var(--primary-color);
}

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

@media (max-width: 1024px) {
    .preview-section {
        grid-template-columns: 1fr;
    }

    .purchase-card {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .preview-image {
        height: 600px;
    }

    .template-title-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .template-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .tab-button {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .detail-header {
        padding: 1.5rem;
    }
}

.tab-content > div {
    display: none;
}

.tab-content > div.active {
    display: block;
}



.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.tabs-header {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

/* 预览图集样式 */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.thumbnail {
    padding: 8px;
    background-color: #f3f4f6;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.thumbnail:hover {
    transform: translateY(-2px);
}

.thumbnail img {
    width: 100%;
    height: auto;
}

/* 详情表格样式 */
.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: 500;
    margin-bottom: 4px;
}

.detail-value {
    color: #666;
}

/* related */
.related-templates {
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

.section-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 0 auto;
}

.template-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.template-image {
    position: relative;
    padding-top: 66.67%;
    overflow: hidden;
}

.template-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.template-card:hover .template-overlay {
    opacity: 1;
}

.preview-btn {
    padding: 8px 20px;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    background: #f0f0f0;
}

.template-info {
    padding: 15px;
}

.template-info h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #333;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.price {
    color: #ff6b6b;
    font-weight: 500;
}

.downloads {
    color: #666;
}

@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .template-info h3 {
        font-size: 14px;
    }
    
    .template-meta {
        font-size: 12px;
    }
}