/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

/* 头部 */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: #666;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

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

.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-right .welcome {
    margin-right: 15px;
    color: #666;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: #fff;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

/* 轮播图 */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.banner-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

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

/* 区块标题 */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: #333;
}

/* 产品分类 */
.categories {
    padding: 60px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-item {
    background: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.category-name {
    font-size: 16px;
    font-weight: bold;
}

/* 产品区块 */
.products-section {
    padding: 60px 0;
}

.products-section.bg-light {
    background: #f8f9fa;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

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

.product-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

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

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
}

.badge-hot {
    background: #ff4757;
}

.badge-recommend {
    background: #ffa502;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-desc {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 20px;
    color: #ff4757;
    font-weight: bold;
}

.product-original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
}

.product-sales {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

/* 特性区块 */
.features {
    padding: 60px 0;
    background: #fff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-item h3 {
    margin-bottom: 10px;
}

.feature-item p {
    color: #666;
}

/* 页脚 */
.footer {
    background: #333;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 20px;
}

.footer-section a {
    color: #999;
    text-decoration: none;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
}

/* 面包屑 */
.breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    color: #666;
}

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

.breadcrumb span {
    color: #999;
}

/* 授权查询 */
.search-section {
    padding: 60px 0;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.search-box {
    max-width: 500px;
    margin: 0 auto 40px;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.search-result {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.search-result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.search-result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.result-message {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.result-details {
    text-align: left;
    margin-top: 20px;
}

.detail-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.detail-item .label {
    font-weight: bold;
}

.detail-item .highlight {
    color: #007bff;
    font-weight: bold;
}

/* 说明步骤 */
.instructions {
    padding: 60px 0;
    background: #fff;
}

.instruction-steps {
    max-width: 800px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.step-num {
    width: 50px;
    height: 50px;
    background: #007bff;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 10px;
}

.step-content p {
    color: #666;
}

/* 认证页面 */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.auth-form {
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-actions a {
    color: #666;
    text-decoration: none;
}

.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-footer p {
    color: #666;
    margin-bottom: 10px;
}

.auth-footer a {
    color: #007bff;
    text-decoration: none;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.checkbox input {
    width: auto;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

/* 产品详情 */
.product-detail {
    padding: 40px 0;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.product-gallery {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.main-image img {
    width: 100%;
    border-radius: 8px;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    overflow-x: auto;
}

.thumbnail-list img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.thumbnail-list img.active,
.thumbnail-list img:hover {
    opacity: 1;
}

.product-info .product-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.product-code {
    color: #666;
    margin-bottom: 20px;
}

.product-price-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-price-box > div {
    margin-bottom: 10px;
}

.current-price .price {
    font-size: 28px;
    color: #ff4757;
    font-weight: bold;
}

.product-description,
.product-features {
    margin-bottom: 20px;
}

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

.product-features li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #007bff;
}

.product-details-tabs {
    margin-top: 40px;
}

.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 15px 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    border-bottom-color: #007bff;
    color: #007bff;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 会员中心 */
.user-center {
    padding: 40px 0;
}

.user-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.user-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.user-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

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

.user-name {
    font-size: 18px;
    font-weight: bold;
    margin: 15px 0 10px;
}

.user-level .vip-badge {
    background: #ffa502;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.user-level .normal-badge {
    background: #e0e0e0;
    color: #666;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.user-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.user-nav a:hover,
.user-nav a.active {
    background: #f0f0f0;
    color: #007bff;
}

.user-nav .icon {
    font-size: 20px;
}

.user-main {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
}

.user-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.user-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

.user-card .card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.user-card .card-label {
    font-size: 14px;
    opacity: 0.9;
}

.user-card .card-value {
    font-size: 24px;
    font-weight: bold;
    margin-top: 5px;
}

.user-card .card-link {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
}

.vip-info {
    background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.vip-icon {
    font-size: 48px;
}

.recent-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header a {
    color: #007bff;
    text-decoration: none;
}

.order-list,
.auth-list {
    background: #f8f9fa;
    border-radius: 8px;
}

.order-item,
.auth-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.order-item:last-child,
.auth-item:last-child {
    border-bottom: none;
}

.order-info .order-no {
    font-weight: bold;
    margin-bottom: 5px;
}

.order-info .order-product {
    color: #666;
}

.order-info .order-time {
    color: #999;
    font-size: 12px;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.status.success {
    background: #d4edda;
    color: #155724;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
}

.status.pending {
    background: #fff3cd;
    color: #856404;
}

.status.cancelled {
    background: #e0e0e0;
    color: #666;
}

.auth-code {
    font-weight: bold;
    font-family: monospace;
}

.auth-expire {
    color: #999;
    font-size: 12px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #f0f0f0;
}

.pagination span.current {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

/* 响应式 */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid,
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .user-layout,
    .product-detail-content {
        grid-template-columns: 1fr;
    }
    
    .user-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav {
        flex-wrap: wrap;
        gap: 15px;
        font-size: 14px;
    }
}
