/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.nav-logo a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo i {
    font-size: 2rem;
    color: #ffd700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #ffd700;
}

.nav-link.active {
    color: #ffd700;
}

.nav-dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 8px;
    top: 100%;
    left: 0;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* 添加一个透明的区域来保持hover状态 */
    padding-top: 10px;
    /* 增加延迟，防止菜单消失太快 */
    transition-delay: 0.1s;
}

.nav-dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

/* 添加一个透明的区域来连接父元素和子菜单 */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    height: 40px;
    background: transparent;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    color: #1e3c72;
}

.admin-link {
    background: #ffd700;
    color: #1e3c72 !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.admin-link:hover {
    background: #ffed4e;
    color: #1e3c72 !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    color: #fff;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 6rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.hero-content {
    flex: 1;
    max-width: 650px;
    padding-right: 3rem;
    padding-left: 2rem;
}

.hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #ffd700;
    color: #1e3c72;
}

.btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #1e3c72;
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    text-align: center;
    max-width: 550px;
    padding-left: 2rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    object-fit: cover;
    max-height: 500px;
}

/* 产品分类样式 */
.categories {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e3c72;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.category-icon i {
    font-size: 2rem;
    color: #ffd700;
}

.category-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.category-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.category-link {
    color: #1e3c72;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #ffd700;
}

/* 产品网格样式 */
.featured-products {
    padding: 80px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

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

.product-image {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    filter: brightness(0.95) contrast(1.05) saturate(1.1);
    max-width: 100%;
    max-height: 100%;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    filter: brightness(1.05) contrast(1.1) saturate(1.2);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1e3c72;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 1rem;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.product-features li {
    padding: 0.25rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.product-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn-view {
    background: #1e3c72;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.btn-view:hover {
    background: #2a5298;
}

/* 关于我们样式 */
.about-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #1e3c72;
}

.about-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-item i {
    font-size: 1.5rem;
    color: #ffd700;
    margin-top: 0.25rem;
}

.feature-item h4 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

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

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* 联系信息样式 */
.contact-info {
    padding: 60px 0;
    background: #1e3c72;
    color: #fff;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-item {
    text-align: center;
    padding: 2rem;
}

.contact-item i {
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 1rem;
}

.contact-item h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.contact-item p {
    opacity: 0.9;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    font-family: 'Oswald', sans-serif;
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffd700;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: #ffd700;
    color: #2c3e50;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    text-align: center;
    color: #bdc3c7;
}

/* 产品详情页样式 */
.product-detail {
    padding: 120px 0 80px;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.product-detail-image {
    position: relative;
}

.product-detail-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.product-detail-info h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 1.5rem;
}

.product-detail-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.product-specifications {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.product-specifications h3 {
    font-family: 'Oswald', sans-serif;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: #1e3c72;
}

.spec-value {
    color: #666;
}

/* 管理后台样式 */
.admin-panel {
    padding: 120px 0 80px;
    background: #f8f9fa;
    min-height: 100vh;
}

.admin-header {
    background: #1e3c72;
    color: #fff;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    text-align: center;
}

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

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
}

.admin-tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    transition: color 0.3s ease;
    border-bottom: 3px solid transparent;
}

.admin-tab.active {
    color: #1e3c72;
    border-bottom-color: #1e3c72;
}

.admin-form {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e3c72;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3c72;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-submit {
    background: #28a745;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #218838;
}

.products-table {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.products-table table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th,
.products-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.products-table th {
    background: #1e3c72;
    color: #fff;
    font-weight: 600;
}

.products-table tr:hover {
    background: #f8f9fa;
}

.product-image-small {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    transition: background 0.3s ease;
}

.btn-edit {
    background: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background: #e0a800;
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #1e3c72;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero .container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .hero-image {
        max-width: 100%;
        order: -1;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .products-table {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
} 