/**
 * SZGOING 车牌识别摄像头产品展示网站 - 主样式表
 * 现代科技风格，蓝色主题
 */

/* ==================== CSS 变量 ==================== */
:root {
    /* 主色调 */
    --primary: #1a3a5c;
    --primary-light: #2c5282;
    --primary-dark: #0f2744;
    
    /* 强调色 */
    --accent: #3498db;
    --accent-light: #5dade2;
    --accent-dark: #2980b9;
    
    /* 功能色 */
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    
    /* 中性色 */
    --dark: #2c3e50;
    --gray-dark: #7f8c8d;
    --gray: #95a5a6;
    --gray-light: #ecf0f1;
    --light: #f8f9fa;
    --white: #ffffff;
    
    /* 背景色 */
    --bg-primary: #f0f4f8;
    --bg-gradient: linear-gradient(135deg, #1a3a5c 0%, #2c5282 50%, #3498db 100%);
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 12px 35px rgba(0, 0, 0, 0.25);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    /* 过渡 */
    --transition: all 0.3s ease;
    
    /* 字体 */
    --font-primary: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--bg-primary);
    min-height: 100vh;
}

/* ==================== 排版 ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

/* ==================== 布局容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.navbar-brand img {
    height: 40px;
}

.navbar-brand:hover {
    color: var(--primary-light);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.navbar-menu a {
    color: var(--dark);
    font-weight: 500;
    padding: 8px 15px;
    border-radius: var(--radius-md);
    position: relative;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--accent);
    background: rgba(52, 152, 219, 0.1);
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 80%;
}

/* 搜索按钮 */
.navbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-toggle {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.search-toggle:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* ==================== 搜索框 ==================== */
.search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--accent-dark);
}

/* ==================== 页面头部 ==================== */
.page-header {
    background: var(--bg-gradient);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    background-size: 150px;
    opacity: 0.5;
}

.page-header h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* ==================== 产品网格 ==================== */
.products-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.section-title p {
    color: var(--gray-dark);
    font-size: 1.1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* ==================== 产品卡片 ==================== */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.product-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
}

.product-card:hover .product-card-image img {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: var(--white);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.product-card-body {
    padding: 20px;
}

.product-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary);
    line-height: 1.4;
}

.product-card-title a {
    color: inherit;
}

.product-card-title a:hover {
    color: var(--accent);
}

.product-card-desc {
    color: var(--gray-dark);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 15px;
}

.product-card-footer {
    display: flex;
    gap: 10px;
}

.product-card-btn {
    flex: 1;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
}

.product-card-btn-primary {
    background: var(--accent);
    color: var(--white);
}

.product-card-btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.product-card-btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.product-card-btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

/* ==================== 产品详情页 ==================== */
.product-detail {
    padding: 60px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    margin-bottom: 60px;
    align-items: start;
}

@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr 320px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* 产品详情页图片 - WordPress 风格布局 */
.product-gallery {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 15px;
    align-items: start;
}

/* 主图区域 */
.product-gallery-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--white);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

.product-gallery-main:hover {
    box-shadow: var(--shadow-hover);
}

.product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
}

/* Zoom hint overlay */
.zoom-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.product-gallery-main:hover .zoom-hint {
    opacity: 1;
}

/* 缩略图网格 - 垂直排列在右侧 */
.product-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.product-gallery-thumb:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-gallery-thumb.active {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.product-gallery-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 响应式布局 - 移动端 */
@media (max-width: 768px) {
    .product-gallery {
        grid-template-columns: 1fr;
    }
    
    .product-gallery-thumbs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .product-gallery-thumb {
        width: 70px;
        flex-shrink: 0;
    }
}

/* 通用响应式图片样式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 产品详情页单图模式 */
.product-detail-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--white);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
}

/* Responsive lightbox */
@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
        padding: 10px 15px;
    }
    
    .lightbox-next {
        right: 10px;
        padding: 10px 15px;
    }
    
    .lightbox-counter {
        font-size: 0.9rem;
    }
}

.product-detail-info h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 20px;
}

.product-detail-desc {
    font-size: 1.1rem;
    color: var(--gray-dark);
    margin-bottom: 30px;
    line-height: 1.8;
}

.product-detail-specs {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.product-detail-specs h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.specs-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.specs-item:last-child {
    border-bottom: none;
}

.specs-label {
    font-weight: 600;
    color: var(--dark);
}

.specs-value {
    color: var(--gray-dark);
}

.product-detail-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--primary);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

/* ==================== 相关产品 ==================== */
.related-products {
    margin-top: 60px;
}

.related-products h3 {
    margin-bottom: 30px;
}

/* ==================== 搜索结果页面 ==================== */
.search-results {
    padding: 60px 0;
    min-height: 60vh;
}

.search-results-header {
    margin-bottom: 40px;
}

.search-results-header h2 {
    margin-bottom: 10px;
}

.search-results-count {
    color: var(--gray-dark);
    font-size: 1.1rem;
}

.search-results-count strong {
    color: var(--accent);
}

/* 无结果状态 */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    font-size: 5rem;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.no-results h3 {
    color: var(--gray-dark);
    margin-bottom: 15px;
}

.no-results p {
    color: var(--gray);
    margin-bottom: 25px;
}

/* ==================== 关于/联系页面 ==================== */
.about-section,
.contact-section {
    padding: 60px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text h2 {
    margin-bottom: 20px;
}

.about-text p {
    color: var(--gray-dark);
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 联系信息 */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-info-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-info-icon {
    width: 70px;
    height: 70px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--accent);
}

.contact-info-card h4 {
    margin-bottom: 10px;
}

.contact-info-card p {
    color: var(--gray-dark);
    margin: 0;
}

/* 联系表单 */
.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 600px;
    margin: 40px auto 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0 30px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col p {
    opacity: 0.9;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    opacity: 0.8;
}

/* ==================== 后台管理样式 ==================== */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--primary);
    color: var(--white);
    padding: 30px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 0 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.admin-sidebar-header h2 {
    color: var(--white);
    font-size: 1.4rem;
}

.admin-sidebar-menu {
    list-style: none;
}

.admin-sidebar-menu li {
    margin-bottom: 5px;
}

.admin-sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.admin-sidebar-menu a:hover,
.admin-sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--accent);
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: var(--bg-primary);
}

.admin-header {
    background: var(--white);
    padding: 20px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.admin-card h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.admin-table th {
    background: var(--gray-light);
    font-weight: 600;
    color: var(--primary);
}

.admin-table tr:hover {
    background: rgba(52, 152, 219, 0.03);
}

/* 表单样式 */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
    margin-bottom: 15px;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.form-control-lg {
    padding: 15px 20px;
    font-size: 1.1rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* 登录页面 */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
}

.login-card {
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* 设置面板 */
.settings-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--gray-light);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h4 {
    margin-bottom: 20px;
    color: var(--primary);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-light);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-weight: 500;
}

.setting-description {
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin-top: 5px;
}

/* 开关按钮 */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-light);
    transition: var(--transition);
    border-radius: 26px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-success {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success);
}

.status-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
}

.status-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
}

.status-info {
    background: rgba(52, 152, 219, 0.15);
    color: var(--info);
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }
.p-4 { padding: 40px; }
.p-5 { padding: 50px; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-none { display: none; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.gap-3 { gap: 30px; }

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }
    
    .navbar-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-md);
        padding: 20px;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--primary);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .page-header {
        padding: 50px 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .admin-main {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .product-detail-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ==================== 动画 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slideIn {
    animation: slideIn 0.5s ease forwards;
}

/* 延迟动画 */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ==================== 加载状态 ==================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== 提示消息 ==================== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: rgba(52, 152, 219, 0.15);
    color: var(--info);
    border-left: 4px solid var(--info);
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

/* ==================== 产品详情页 - 参考网站布局 ==================== */

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: var(--gray-dark);
}

.breadcrumb a {
    color: var(--accent);
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--accent-dark);
}

.breadcrumb-sep {
    margin: 0 10px;
    color: var(--gray);
}

.breadcrumb-current {
    color: var(--dark);
}

/* 主产品区域 - 左右布局 */
.product-main-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 50px;
    margin-bottom: 60px;
    align-items: start;
}

@media (max-width: 992px) {
    .product-main-wrapper {
        grid-template-columns: 1fr 350px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .product-main-wrapper {
        grid-template-columns: 1fr;
    }
}

/* 左侧图片列 */
.product-image-column {
    position: sticky;
    top: 100px;
}

/* 主图 */
.product-main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease;
}

.product-main-image:hover {
    box-shadow: var(--shadow-lg);
}

.product-main-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-main-image:hover img {
    transform: scale(1.02);
}

/* 放大图标 */
.image-zoom-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-main-image:hover .image-zoom-icon {
    opacity: 1;
}

/* 缩略图列表 - 水平排列 */
.product-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-thumbnail:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-thumbnail.active {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.product-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 右侧产品信息 */
.product-info-column {
    padding-top: 10px;
}

.product-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.3;
}

.product-description {
    font-size: 1.05rem;
    color: var(--gray-dark);
    line-height: 1.7;
    margin-bottom: 30px;
}

/* 产品规格 */
.product-specs {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.product-specs h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
    color: var(--primary);
}

.specs-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.specs-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-light);
}

.specs-row:last-child {
    border-bottom: none;
}

.specs-label {
    font-weight: 600;
    color: var(--dark);
    flex-shrink: 0;
}

.specs-value {
    color: var(--gray-dark);
    text-align: right;
}

/* 操作按钮 */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-lg {
    padding: 18px 35px;
    font-size: 1.1rem;
}

/* 产品详细描述 */
.product-description-full {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.product-description-full h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
    color: var(--primary);
}

.description-content {
    line-height: 1.8;
    color: var(--gray-dark);
}

/* SEO 信息 */
.seo-info {
    margin-top: 30px;
    padding: 15px 20px;
    background: var(--gray-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--gray-dark);
}

/* 灯箱样式 */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-container img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s;
    line-height: 1;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.8rem;
    padding: 20px 25px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: var(--radius-md);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-counter {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 20px;
    border-radius: 20px;
}

@media (max-width: 992px) {
    .lightbox-prev {
        left: 10px;
        padding: 15px 20px;
    }
    
    .lightbox-next {
        right: 10px;
        padding: 15px 20px;
    }
}

/* 相关产品区域 */
.related-products-section {
    padding: 60px 0;
    background: var(--white);
    margin-top: 40px;
}

.related-products-section .section-title {
    margin-bottom: 40px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
}

.related-product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.related-product-card a {
    display: block;
    text-decoration: none;
}

.related-product-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.related-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 15px;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.05);
}

.related-product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 15px 15px 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-product-desc {
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin: 0 15px 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== 打印样式 ==================== */
@media print {
    .navbar,
    .footer,
    .admin-sidebar,
    .btn {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
    }
}
