/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 4px;
}

/* Top Header */
.top-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
    font-size: 13px;
    display: none;
}

@media (min-width: 768px) {
    .top-header {
        display: block;
    }
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left span {
    color: #666;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.auth-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    color: #007bff;
}

/* Main Header */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(151, 164, 175, 0.1);
    position: relative;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    padding: 8px 0; /* 与全站header保持一致，避免子页头部过高 */
    position: relative;
    max-width: 1800px;
    margin: 0 auto;
    padding-left: 4px;
    padding-right: 4px;
}

.logo {
    flex-shrink: 0;
    margin-right: 30px;
}

.logo img {
    height: 100px; /* 统一Logo高度，避免子页过小 */
    width: auto;
}

/* Navigation */
.main-nav {
    flex: 1;
    display: none;
}

@media (min-width: 768px) {
    .main-nav {
        display: block;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 40px;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #007bff;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 230px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
}

/* Caret indicator next to text */
.nav-caret { margin-left: 6px; font-size: 12px; line-height: 1; opacity: .9; }

/* Support Info */
.support-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.support-info i {
    font-size: 24px;
    color: #666;
}

.support-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.support-text strong {
    font-size: 14px;
    color: #333;
}

.support-text span {
    font-size: 13px;
    color: #333;
    font-weight: 600;
}

.support-text small {
    font-size: 11px;
    color: #666;
}

/* Search Bar */
.search-bar {
    background-color: #000;
    padding: 15px 0;
}

.search-content {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 4px;
}

.categories-dropdown {
    position: relative;
}

.categories-btn {
    background: transparent;
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid #555;
}

.categories-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.categories-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.categories-dropdown:hover .categories-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.categories-menu a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s;
}

.categories-menu a:hover {
    background-color: #f8f9fa;
}

.search-input-container {
    flex: 1;
    display: flex;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px 0 0 25px;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background-color: #666;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #555;
}

.header-icons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section - 轮播图区域 */
.hero-section {
    width: 100vw;
    max-width: 100vw;
    min-width: 100vw;
    height: 500px;
    padding: 0;
    margin: 0 auto;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section .container {
    width: 100vw;
    max-width: 100vw;
    padding: 0;
    margin: 0;
}

.hero-carousel {
    position: relative;
    width: 100vw;
    height: 500px;
    max-width: 100vw;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-carousel-img {
    position: absolute;
    left: 0; 
    top: 0;
    width: 100vw;
    height: 500px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1;
}

.hero-carousel-img.active {
    opacity: 1;
    z-index: 2;
}

.hero-carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-indicator {
    width: 16px;
    height: 6px;
    border-radius: 3px;
    background: #fff;
    opacity: 0.5;
    transition: opacity 0.2s;
    cursor: pointer;
}

.hero-indicator.active {
    opacity: 1;
    background: #1976d2;
}

/* Footer */
.footer {
    background: #000;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: normal;
}

.contact-info p {
    margin-bottom: 10px;
    color: #ccc;
}

.address h4 {
    margin: 15px 0 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.address p {
    color: #aaa;
    line-height: 1.5;
    font-size: 13px;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-link {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: #555;
    border-radius: 4px;
    text-align: center;
    line-height: 35px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-link:hover {
    background: #666;
}

.security-badges {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #444;
    padding: 12px 15px;
    border-radius: 6px;
}

.badge i {
    font-size: 20px;
    color: #fff;
}

.badge strong {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
}

.badge p,
.badge small {
    color: #ccc;
    font-size: 11px;
    margin: 0;
}

.popular-parts h4 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.parts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.part-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #444;
    border-radius: 6px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.part-item:hover {
    background: #555;
}

.part-image {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.part-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.part-item span {
    font-size: 12px;
    color: #ccc;
    text-transform: uppercase;
}

.newsletter h4 {
    margin-bottom: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    outline: none;
    font-size: 13px;
}

.newsletter-btn {
    background-color: #666;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: background-color 0.3s;
}

.newsletter-btn:hover {
    background-color: #777;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    display: flex;
    align-items: center;
    gap: 15px;
}

.copyright span {
    color: #ccc;
    font-size: 13px;
}

.payment-methods {
    display: flex;
    gap: 8px;
}

.payment-methods i {
    font-size: 20px;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 1800px) {
    .container {
        max-width: 1400px;
        padding: 0 8px;
    }
    
    .header-content {
        max-width: 1400px;
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .search-content {
        max-width: 1400px;
        padding: 0 8px;
    }
}

@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
        padding: 0 12px;
    }
    
    .header-content {
        max-width: 1200px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .footer-links {
        justify-content: center;
        gap: 20px;
    }
    
    .search-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-input-container {
        order: 1;
    }
    
    .categories-dropdown {
        order: 2;
    }
    
    .header-icons {
        order: 3;
    }
}