/* ==================== Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #2d3436;
    background: #ffffff;
    overflow-x: hidden;
}

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

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

/* ==================== Header ==================== */
.header {
    background: #193143;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #2d3436;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 15px;
    color: #636e72;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: #0984e3;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #0984e3;
    border-radius: 2px;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-icon {
    font-size: 20px;
}

.cart-count {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}



/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #b2bec3;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-nav.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-link {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    color: #2d3436;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.3s ease;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #0984e3;
}

.mobile-language-switch {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.mobile-lang-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #636e72;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-lang-btn.active {
    border-color: #0984e3;
    background: #f0f7ff;
    color: #0984e3;
}

/* ==================== Buttons ==================== */
.btn-primary {
    background: linear-gradient(135deg, #0984e3 0%, #0077cc 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 132, 227, 0.4);
}

.btn-secondary {
    background: white;
    color: #2d3436;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #dfe6e9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #0984e3;
    color: #0984e3;
}

/* ==================== Footer ==================== */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 60px 20px 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

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

.footer-logo .logo-icon {
    font-size: 28px;
}

.footer-logo .logo-text {
    color: white;
    font-size: 20px;
}

.footer-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-column h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #74b9ff;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.payment-methods {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.payment-icon {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.payment-icon.wechat {
    background: #07c160;
    color: white;
}

.payment-icon.alipay {
    background: #1677ff;
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== Section Titles ==================== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 32px;
    color: #2d3436;
    margin-bottom: 12px;
}

.section-title p {
    font-size: 16px;
    color: #636e72;
}

/* ==================== Responsive Styles ==================== */

/* Tablet */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Navigation Breakpoint */
@media (max-width: 900px) {
    .nav {
        display: none;
    }

    .language-switch {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .header {
        height: 60px;
    }

    .mobile-nav {
        top: 60px;
    }

    .logo-text {
        font-size: 18px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-links,
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .payment-methods {
        justify-content: center;
    }

    .section-title h2 {
        font-size: 26px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .logo-text {
        font-size: 16px;
    }

    .logo-icon {
        font-size: 24px;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .section-title p {
        font-size: 14px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        max-width: 280px;
    }

    .footer {
        padding: 40px 20px 20px;
    }

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

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover,
    .nav-link.active {
        color: #0984e3;
    }

    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Safe Area Insets for Modern Devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
    }

    .header {
        padding-top: env(safe-area-inset-top);
    }
}

/* Print Styles */
@media print {
    .header,
    .mobile-nav,
    .mobile-menu-toggle,
    .footer {
        display: none;
    }

    body {
        color: #000;
    }
}
