/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #0066ff;
    --secondary-color: #00d4ff;
    --accent-color: #7b2cbf;
    --dark-bg: #0a0e27;
    --light-bg: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-bg);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    position: relative; /* 确保不裁剪子元素 */
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: visible; /* 允许移动端菜单完整显示 */
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    max-width: 100%;
    overflow: visible; /* 允许购物车徽章显示完整 */
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    will-change: transform;
}

.logo-image:hover {
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 4px 8px rgba(0, 102, 255, 0.3));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 1.8rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.logo .tagline {
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: -5px;
    font-weight: 400;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-2);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 10px; /* 给徽章留出空间 */
    margin-right: -10px; /* 补偿 padding */
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: 2px; /* 调整位置确保可见 */
    right: 2px;
    background: var(--gradient-3);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    z-index: 10; /* 确保在最上层 */
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1002; /* 高于菜单 */
    position: relative; /* 确保 z-index 生效 */
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* 移动端购物车图标 */
.mobile-cart-icon {
    display: none;
    position: relative;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-right: 15px;
    text-decoration: none;
    padding: 10px; /* 给徽章留出空间 */
    z-index: 1002; /* 与汉堡菜单同级 */
}

.mobile-cart-icon:hover {
    transform: scale(1.1);
}

.mobile-cart-icon .cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--gradient-3);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    z-index: 10;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 100px 20px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('./iamge/image3.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    z-index: 1; /* 低于导航栏 */
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-50px) rotate(180deg); }
}

.hero-content {
    max-width: 700px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease 0.2s backwards;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Buttons ===== */
.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-2);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== Section Styles ===== */
section {
    padding: 100px 0;
    position: relative; /* 确保 z-index 生效 */
    z-index: 1; /* 低于导航栏 */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* ===== Features Section ===== */
.features {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Products Section ===== */
.products {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* 响应式布局 */
@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--gradient-3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.product-badge.new {
    background: var(--gradient-2);
}

.product-badge.educational {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.product-badge.trending {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.product-info {
    padding: 2rem;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.product-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.product-specs {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.product-specs span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    background: #f5f7fa;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.product-specs span:hover {
    background: #e4e9f2;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-specs i {
    color: var(--primary-color);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 1.2rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-info .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.8rem;
}

/* ===== Product Configurations ===== */
.product-configurations {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.config-option {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #e4e9f2;
    transition: all 0.3s ease;
}

.config-option:last-child {
    margin-bottom: 0;
}

.config-option input[type="radio"] {
    display: none;
}

.config-option input[type="radio"]:checked + label {
    color: var(--primary-color);
    font-weight: 600;
}

.config-option input[type="radio"]:checked ~ .quantity-selector {
    opacity: 1;
    pointer-events: auto;
}

.config-option label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.config-option label:hover {
    background: #f5f7fa;
}

.config-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.config-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 60px;
    height: 36px;
    border: 2px solid #e4e9f2;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.qty-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Remove number input spinners */
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* ===== About Section ===== */
.about {
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.company-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-light);
    margin-top: 0.5rem;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* ===== Testimonials ===== */
.testimonials {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.testimonials .section-title {
    color: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stars {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author h4 {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.testimonial-author p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ===== Contact Section ===== */
.contact {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    border-radius: 50%;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 15px 20px;
    border: 2px solid #e4e9f2;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== Notice Section ===== */
.notice-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    border-top: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.notice-content {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.notice-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.notice-item:last-child {
    margin-bottom: 0;
}

.notice-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 102, 255, 0.1);
}

.notice-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.notice-item p {
    flex: 1;
    margin: 0;
    line-height: 1.8;
    color: #333;
    font-size: 1rem;
}

/* ===== Footer ===== */
.footer {
    background: #0a0e27;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 8px;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    cursor: pointer;
}

.footer-logo:hover {
    transform: scale(1.08) translateY(-4px);
    filter: drop-shadow(0 6px 12px rgba(0, 102, 255, 0.4));
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.5rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    color: #333;
    background: white;
}

.newsletter-form input::placeholder {
    color: #999;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-form .btn {
    padding: 12px 24px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
}

/* ===== Modal Styles ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 3rem;
    border-radius: 20px;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-dark);
}

.modal-content h2 {
    margin-bottom: 2rem;
    color: var(--text-dark);
}

#cartItems {
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f5f7fa;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.cart-item-info h4 {
    margin-bottom: 0.5rem;
}

.cart-item-info p {
    color: var(--text-light);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.quantity-btn:hover {
    background: var(--accent-color);
}

.remove-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background: #ee5a6f;
}

.cart-total {
    text-align: right;
    padding: 1.5rem 0;
    border-top: 2px solid #e4e9f2;
}

.cart-total h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
}

#checkoutForm input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e4e9f2;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-family: inherit;
}

#checkoutForm textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e4e9f2;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

#checkoutForm input:focus,
#checkoutForm textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

#checkoutForm h3 {
    margin: 1.5rem 0 1rem;
    color: var(--text-dark);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkout-total {
    text-align: right;
    padding: 1.5rem 0;
    border-top: 2px solid #e4e9f2;
    margin-top: 1rem;
}

/* ===== Payment Methods ===== */
.checkout-modal-content {
    max-width: 650px;
}

.checkout-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

#checkoutItems {
    margin-bottom: 1rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e4e9f2;
}

.checkout-item:last-child {
    border-bottom: none;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.payment-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 2px solid #e4e9f2;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method-btn i {
    font-size: 2rem;
    color: #666;
}

.payment-method-btn span {
    font-weight: 600;
    color: #333;
}

.payment-method-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 255, 0.1);
}

.payment-method-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
}

.payment-method-btn.active i {
    color: var(--primary-color);
}

.payment-section {
    display: none;
    margin-top: 1.5rem;
}

.payment-section.active {
    display: block;
}

.btn-large {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.payment-note {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
}

#paypal-button-container {
    margin-top: 1rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    /* 防止页面水平滚动 */
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .navbar {
        padding: 0;
        z-index: 1000 !important; /* 确保导航栏在中间层 */
    }
    
    .nav-wrapper {
        padding: 1rem 15px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    /* 移动端：桌面端购物车隐藏 */
    .desktop-cart {
        display: none !important;
    }
    
    /* 移动端：移动端购物车显示 */
    .mobile-cart-icon {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white !important; /* 强制白色背景，防止浏览器暗色模式干扰 */
        width: 100%;
        min-height: 400px; /* 确保有足够高度显示所有菜单项 */
        max-height: calc(100vh - 70px); /* 不超过屏幕高度 */
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        overflow-y: auto; /* 内容过多时可滚动 */
        overflow-x: hidden; /* 防止水平滚动 */
        z-index: 1001 !important; /* 强制高于 navbar (1000) 和 hero (1) */
        -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
    }

    .nav-menu.active {
        left: 0;
    }
    
    /* 强制菜单链接样式，防止浏览器暗色模式干扰 */
    .nav-menu li {
        width: 100%;
        margin: 0;
        list-style: none;
    }
    
    .nav-menu .nav-link {
        color: #333 !important; /* 强制深灰色文字 */
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        background: transparent;
    }
    
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background: rgba(0, 102, 255, 0.05); /* 浅蓝色背景 */
        color: #0066ff !important;
    }

    .hamburger {
        display: flex;
    }

    .logo-image {
        height: 40px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo .tagline {
        font-size: 0.6rem;
    }

    /* Optimize mobile logo spacing */
    .logo {
        gap: 8px;
    }

    .logo-image:hover {
        transform: scale(1.03);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Hero background optimization for tablets */
    .hero {
        background-attachment: scroll;
        z-index: 1 !important; /* 强制确保低于导航菜单 */
    }
    
    /* 确保所有 section 都在菜单下方 */
    section {
        z-index: 1 !important;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .company-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .modal-content {
        margin: 10% 20px;
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    /* Hero background optimization for mobile */
    .hero {
        min-height: 100vh;
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
        z-index: 1 !important; /* 强制确保低于导航菜单 */
    }
    
    /* 确保所有 section 都在菜单下方 */
    section {
        z-index: 1 !important;
    }

    .btn {
        width: 100%;
    }

    .logo-image {
        height: 35px;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .footer-logo {
        height: 50px;
    }

    /* Mobile optimizations */
    .logo {
        gap: 6px;
    }

    .logo-text {
        line-height: 1.3;
    }

    /* Disable hover effects on mobile */
    .logo:hover {
        transform: none;
    }

    .logo-image:hover,
    .footer-logo:hover {
        transform: none;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }
}

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Preload and Performance Optimization ===== */
.logo-image,
.footer-logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Lazy loading placeholder */
.logo-image[loading="lazy"],
.footer-logo[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Page Loader ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    pointer-events: all; /* 加载时阻止操作 */
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* 隐藏后允许点击穿透 */
}

.loader-content {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.loader-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 4px solid #e4e9f2;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===== Scroll Progress Bar ===== */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    z-index: 10000;
    transition: width 0.1s ease;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.4);
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 102, 255, 0.5);
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top i {
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-3px);
}

/* ===== Selection ===== */
::selection {
    background: var(--primary-color);
    color: white;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* ===== Notice Section Responsive ===== */
@media (max-width: 768px) {
    .notice-section {
        padding: 60px 0;
    }

    .notice-content {
        padding: 30px 20px;
    }

    .notice-item {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .notice-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .notice-item p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .notice-section {
        padding: 40px 0;
    }

    .notice-content {
        padding: 20px 15px;
    }

    .notice-item {
        padding: 12px;
    }

    .notice-item p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    /* Payment Methods Responsive */
    .payment-methods {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .payment-method-btn {
        padding: 1rem;
    }
    
    .payment-method-btn i {
        font-size: 1.5rem;
    }
}

/* ===== 浏览器暗色模式强制覆盖（Via/微米浏览器等） ===== */
@media (prefers-color-scheme: dark) {
    /* 强制白色背景，覆盖浏览器暗色模式 */
    body {
        background: white !important;
        color: #1a1a1a !important;
    }
    
    .navbar {
        background: rgba(255, 255, 255, 0.95) !important;
    }
    
    .nav-menu {
        background: white !important;
        color: #1a1a1a !important;
    }
    
    .nav-link {
        color: #333 !important;
    }
    
    section {
        background: white !important;
    }
    
    .hero {
        color: white !important; /* Hero 区文字保持白色 */
    }
}

/* 移动端浏览器特定修复（Via/微米/UC 等） */
@media (max-width: 968px) {
    /* 强制移动端菜单样式 */
    .nav-menu {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    .nav-menu li,
    .nav-menu li a,
    .nav-menu .nav-link {
        background-color: transparent !important;
        color: #333333 !important;
    }
}

/* ===== Font Awesome 图标加载失败后备方案 ===== */
/* 如果 Font Awesome 未加载，显示 Emoji 后备图标 */
.cart-icon-text {
    display: none;
    font-size: 1.5rem;
}

/* 检测 Font Awesome 是否加载 */
@supports not (font-family: "Font Awesome 6 Free") {
    .cart-icon i,
    .mobile-cart-icon i {
        display: none !important;
    }
    
    .cart-icon-text {
        display: inline !important;
    }
}

/* Via/微米浏览器特定修复 */
@media (max-width: 968px) {
    /* 如果图标不显示，强制显示 Emoji */
    .cart-icon:not(:has(.fas))::before,
    .mobile-cart-icon:not(:has(.fas))::before {
        content: "🛒";
        font-size: 1.5rem;
    }
}
