/*
 Theme Name:   EV Mobility
 Theme URI:    http://example.com/ev-mobility/
 Description:  EV Mobility Child Theme for 电动出行品牌
 Author:       电动出行
 Author URI:   http://example.com
 Template:     storefront
 Version:      1.3.1
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         e-commerce, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, featured-images, full-width-template, threaded-comments, accessibility-ready, electric-vehicles
 Text Domain:  ev-mobility
*/

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

/* 去掉所有链接的焦点框 */
a:focus,
a:active,
button:focus,
button:active {
    outline: none !important;
    box-shadow: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Override Storefront styles */
.woocommerce-active .site-header {
    background-color: rgba(0, 0, 0, 0.9) !important;
    color: #fff !important;
    padding: 15px 0 !important;
    transition: all 0.3s ease !important;
    height: 80px;
    overflow: hidden;
}

.woocommerce-active .site-branding {
    color: #fff !important;
}

.woocommerce-active .site-branding a {
    color: #fff !important;
    transition: all 0.3s ease !important;
}

.woocommerce-active .site-branding a:hover {
    transform: scale(1.1) !important;
}

.woocommerce-active .main-navigation a {
    color: #fff !important;
    transition: color 0.3s ease !important;
}

.woocommerce-active .main-navigation a:hover {
    color: #0071e3 !important;
}

/* Ensure all headers are visible on front page */
.page-template-front-page .site-header,
.page-template-front-page .site-footer {
    display: block !important;
}

/* Custom Header Navigation */
.custom-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    color: #fff !important;
    z-index: 9999 !important;
    padding: 15px 0 !important;
    transition: all 0.3s ease !important;
    height: 80px !important;
    overflow: visible !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure header content is visible */
.header-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure navigation is visible */
.custom-header nav {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure nav-menu is visible */
.nav-menu {
    display: flex !important;
    list-style: none !important;
    gap: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: flex-end !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure nav-menu items are visible */
.nav-menu li {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure nav-menu links are visible */
.nav-menu li a {
    display: block !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
    padding: 10px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    outline: none !important;
    box-shadow: none !important;
}

.nav-menu li a:focus,
.nav-menu li a:active {
    outline: none !important;
    box-shadow: none !important;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-right: 0;
    padding: 0;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
    padding: 10px 0;
}

.nav-menu li a:hover {
    color: #0071e3;
}

/* Header hover animation - Only for specific navigation items */
.custom-header .nav-item-has-children:hover ~ .custom-header,
.custom-header:hover {
    background-color: #fff;
    color: #333;
    animation: header-expand 0.3s ease forwards;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header hover when hovering over nav items with children */
.nav-item-has-children:hover ~ .custom-header,
.custom-header:has(.nav-item-has-children:hover) {
    background-color: #fff;
    animation: header-expand 0.3s ease forwards;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 480px;
}

@keyframes header-expand {
    0% {
        height: 80px;
        background-color: rgba(0, 0, 0, 0.9);
    }
    100% {
        height: 480px;
        background-color: #fff;
    }
}

/* Change text color on hover for header */
.custom-header:has(.nav-item-has-children:hover) .logo,
.custom-header:has(.nav-item-has-children:hover) .nav-menu li a {
    color: #333;
}

.custom-header:has(.nav-item-has-children:hover) .nav-menu li a:hover {
    color: #0071e3;
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav-menu li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown li {
    margin-bottom: 10px;
}

.dropdown li:last-child {
    margin-bottom: 0;
}

.dropdown a {
    color: #666 !important;
    padding: 8px 0;
    font-size: 14px;
    display: block;
}

.dropdown a:hover {
    color: #0071e3 !important;
}

/* Extended Content for Navigation */
.extended-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    padding: 40px 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-menu li:hover .extended-content,
.nav-item-has-children:hover .extended-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Product extended content */
.product-extended {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    gap: 40px;
    flex-wrap: wrap;
}

.product-item {
    text-align: center;
    flex: 1;
    min-width: 250px;
}

.product-item img {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 10px;
}

.product-item h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

/* Explore extended content */
.explore-extended {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    gap: 60px;
    flex-wrap: wrap;
}

.explore-column {
    flex: 1;
    min-width: 200px;
}

.explore-column h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.explore-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.explore-column li {
    margin-bottom: 15px;
}

.explore-column a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.explore-column a:hover {
    color: #0071e3;
    text-decoration: underline;
}

/* Video Banner */
.video-banner {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #000;
    margin-top: 80px;
    padding-top: 0;
}

.video-banner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.video-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.video-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    z-index: 10;
    max-width: 800px;
    padding: 0 20px;
}

.video-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.video-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: #0071e3;
    color: #fff;
    border-color: #0071e3;
}

.btn-primary:hover {
    background-color: #005bb5;
    border-color: #005bb5;
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(0);
}

/* Products Section */
.products-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

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

.section-title {
    text-align: center;
    font-size: 30px;
    margin-bottom: 40px;
    color: #333;
    font-weight: bold;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: none;
}

.product-card:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.product-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 14px;
}

/* Brand Story Section */
.brand-story {
    padding: 60px 20px;
    background-color: #fff;
}

.story-content {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.story-text {
    flex: 1;
    min-width: 300px;
}

.story-text h2 {
    font-size: 30px;
    margin-bottom: 20px;
    color: #333;
    font-weight: bold;
}

.story-text p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.story-image {
    flex: 1;
    min-width: 300px;
    height: 300px;
    background-image: url('https://images.unsplash.com/photo-1490644147342-2537cfb08f96?w=800&h=600&fit=crop');
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}

/* Support Section */
.support-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.support-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.support-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.support-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Footer */
.site-footer {
    background-color: #1a1a1a;
    color: #fff;
    padding-top: 60px;
    padding-bottom: 20px;
}

/* 强制所有页脚链接为白色 */
.site-footer a,
.site-footer .footer-links-list a {
    color: #fff !important;
}

.site-footer a:hover,
.site-footer .footer-links-list a:hover {
    color: #0071e3 !important;
}

/* Footer container with 6-column grid layout */
.site-footer .footer-container {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 40px 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Footer section */
.footer-section {
    min-width: 0; /* Prevents grid blowout */
}

/* Footer section header */
.footer-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.footer-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
}

/* Footer section header left align */
.footer-section-header {
    text-align: left;
}

/* Footer toggle button (hidden on desktop by default) */
.footer-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: relative;
    width: 24px;
    height: 24px;
}

.footer-toggle span {
    position: absolute;
    background-color: #fff;
    transition: all 0.3s ease;
}

.footer-toggle span:nth-child(1) {
    width: 2px;
    height: 16px;
    left: 11px;
    top: 4px;
}

.footer-toggle span:nth-child(2) {
    width: 16px;
    height: 2px;
    left: 4px;
    top: 11px;
}

/* Footer section content */
.footer-section-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer links list */
.footer-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.footer-links-list li:last-child {
    margin-bottom: 0;
}

.footer-links-list a {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    transition: color 0.2s ease;
    display: inline-block;
    outline: none !important;
}

.footer-links-list a:focus,
.footer-links-list a:active {
    outline: none;
    box-shadow: none;
}

.footer-links-list a:hover {
    color: #0071e3;
    text-decoration: underline !important;
}

/* Contact section special styles */
.footer-contact .contact-item {
    margin-bottom: 15px;
}

.footer-contact .contact-item:last-child {
    margin-bottom: 20px;
}

.footer-contact .contact-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.footer-contact .contact-phone,
.footer-contact .contact-email {
    display: block;
    font-size: 18px;
    color: #fff;
    font-weight: 500;
}

/* Online service button */
.contact-online-service {
    display: inline-block;
    background-color: #0071e3;
    color: #fff !important;
    padding: 10px 20px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.contact-online-service:hover {
    background-color: #005bb5;
    color: #fff !important;
    text-decoration: none !important;
}

/* Footer site info (copyright) */
.site-info {
    text-align: center;
    padding: 30px 20px 20px;
    border-top: 1px solid #333;
    max-width: 1200px;
    margin: 0 auto;
}

.site-info,
.site-info a {
    color: #fff;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .support-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* 修复导航菜单在移动端的显示问题 */
    .custom-header {
        height: auto;
        padding: 10px 0;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .nav-menu li {
        margin: 5px 0;
    }
    
    .nav-menu li a {
        font-size: 14px;
    }
    
    /* 修复视频区域在移动端的高度问题 */
    .video-banner {
        height: 60vh;
        min-height: 400px;
    }
    
    /* 修复视频内容在移动端的显示 */
    .video-content h1 {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .video-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    /* 修复产品卡片在移动端的布局 */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* 修复品牌故事区域在移动端的布局 */
    .story-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .story-text,
    .story-image {
        min-width: 100%;
    }
    
    /* 修复支持卡片在移动端的布局 */
    .support-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Custom styles for EV Mobility */
.ev-mobility-theme .main-navigation {
    background-color: transparent !important;
}

.ev-mobility-theme .site-header {
    background-color: rgba(0, 0, 0, 0.9) !important;
    transition: all 0.3s ease !important;
    height: 80px;
    overflow: hidden;
}

.ev-mobility-theme .site-header:hover {
    background-color: #fff !important;
    color: #333 !important;
    animation: header-expand 0.3s ease forwards !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.ev-mobility-theme .site-header:hover .site-branding,
.ev-mobility-theme .site-header:hover .site-branding a,
.ev-mobility-theme .site-header:hover .main-navigation a {
    color: #333 !important;
}

.ev-mobility-theme .site-header:hover .main-navigation a:hover {
    color: #0071e3 !important;
}

/* Dropdown menu styles */
.ev-mobility-theme .main-navigation ul ul {
    background-color: #fff !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
    padding: 20px !important;
    min-width: 200px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
}

.ev-mobility-theme .main-navigation ul li:hover > ul {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.ev-mobility-theme .main-navigation ul ul a {
    color: #666 !important;
    padding: 8px 20px !important;
}

.ev-mobility-theme .main-navigation ul ul a:hover {
    color: #0071e3 !important;
    background-color: #f5f5f5 !important;
}

/* Navigation menu items */
.ev-mobility-theme .menu-primary-menu-container ul {
    display: flex !important;
    justify-content: space-between !important;
    gap: 40px !important;
}
