/* CSS 变量定义 */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-gray: #1f2937;
    --light-gray: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-light: #6b7280;
    --white: #ffffff;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-btn {
    position: relative;
    font-size: 20px;
    color: var(--text-color);
    transition: var(--transition);
}

.cart-btn:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: var(--white);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.login-btn:hover {
    background: var(--primary-dark);
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 80px 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

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

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

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-icon {
    font-size: 200px;
    opacity: 0.3;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
}

/* 特性区域 */
.features {
    padding: 60px 0;
    background: var(--light-gray);
}

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

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.feature-card i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.feature-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* 产品区域 */
.products {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--dark-gray);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.product-image {
    position: relative;
    height: 200px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-image i {
    font-size: 60px;
    color: var(--border-color);
}

.product-info {
    padding: 20px;
}

.product-info h4 {
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.product-info p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 页脚 */
footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

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

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

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

/* LOGO上传样式 */
.logo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.logo-preview {
    position: relative;
    width: 300px;
    height: 90px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.logo-preview:hover {
    border-color: var(--primary-color);
    background: #fff;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #999;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.logo-placeholder i {
    font-size: 32px;
    color: var(--primary-color);
}

.logo-placeholder span {
    font-size: 14px;
}

.logo-upload-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* 前端LOGO显示样式 */
.nav-brand img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    margin-right: 8px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand i {
    font-size: 24px;
    color: var(--primary-color);
}

.nav-brand span {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-gray);
}

/* PDF相关样式 */
.product-pdf-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
}

.product-pdf-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.pdf-icon {
    font-size: 40px;
    color: #e74c3c;
}

.pdf-error {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.pdf-error i {
    font-size: 32px;
    color: #ffc107;
    flex-shrink: 0;
}

.pdf-error-content h5 {
    margin: 0 0 5px 0;
    color: #856404;
}

.pdf-error-content p {
    margin: 5px 0;
    font-size: 14px;
    color: #856404;
}

.pdf-error-hint {
    font-style: italic;
    font-size: 13px;
    margin-top: 8px !important;
}

.pdf-no-images {
    padding: 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

.pdf-no-images p {
    margin: 0;
    font-size: 14px;
    color: #0d47a1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-details h5 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
}

.pdf-details p {
    margin: 3px 0;
    font-size: 14px;
    color: var(--dark-gray);
}

.pdf-images-preview {
    margin-top: 20px;
}

.pdf-images-preview h6 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 16px;
}

.pdf-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.pdf-image-item {
    position: relative;
    cursor: pointer;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.pdf-image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.pdf-image-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    opacity: 0;
    transition: var(--transition);
}

.pdf-image-item:hover .image-overlay {
    opacity: 1;
}

/* 图片预览模态框 */
.image-preview-modal {
    max-width: 800px;
    width: 90%;
}

.image-preview-modal .modal-body {
    text-align: center;
}

.image-preview-modal h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.image-preview-modal img {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* 页脚补充样式 */
.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* 关于我们 */
#about {
    padding: 60px 0;
    background: var(--light-gray);
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 15px;
}

/* 联系我们 */
#contact {
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.contact-info h3,
.contact-form h3 {
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-item i {
    font-size: 24px;
    color: var(--primary-color);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        gap: 15px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-icon {
        font-size: 120px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

/* 产品详情模态框 */
.product-detail-content {
    max-width: 900px;
    width: 95%;
}

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

.product-detail-image {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.product-detail-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.product-detail-info h2 {
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.product-category {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

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

.product-rating i {
    color: #fbbf24;
}

.rating-score {
    font-weight: 600;
    margin-left: 5px;
}

.rating-count {
    color: var(--text-light);
    font-size: 14px;
}

.product-price-large {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 数量选择器 */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-selector label {
    font-weight: 500;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--border-radius);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--light-gray);
}

.quantity-controls input {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
}

/* 产品操作按钮 */
.product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #475569;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background: var(--light-gray);
}

.btn-block {
    width: 100%;
}

/* 用户评价 */
.product-reviews {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.product-reviews h4 {
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.review-item {
    padding: 15px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
}

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

.review-user {
    font-weight: 600;
}

.review-date {
    color: var(--text-light);
    font-size: 12px;
}

.review-rating i {
    color: #fbbf24;
    font-size: 14px;
}

.review-content {
    color: var(--text-color);
    line-height: 1.6;
}

/* 购物车侧边栏 */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--white);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
    margin: 0;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--light-gray);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
}

.total-price {
    font-weight: 700;
    color: var(--primary-color);
}

/* 遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
}

.overlay.active {
    display: block;
}

/* 响应式 - 产品详情 */
@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .product-detail-image {
        min-height: 200px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}/* Updated: Mon Mar  9 10:41:55 PM CST 2026 */
