/* X007 主题 - 布局样式 */

/* ========== Top Bar ========== */
.topbar {
    background: var(--primary);
    color: var(--white);
    font-size: 13px;
    padding: 8px 0;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar-left {
    display: flex;
    gap: 25px;
}
.topbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-item i {
    color: var(--accent);
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.topbar-lang select {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 4px 8px;
}
.topbar-lang select option {
    background: var(--primary);
    color: var(--white);
}

/* ========== Header ========== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.header-main {
    padding: 15px 0;
}
.header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-img {
    height: 40px;
    width: auto;
}
.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

/* 主导航 */
.nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
.nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
}
.nav > ul > li {
    position: relative;
}
.nav a {
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    text-decoration: none;
}
.nav a:hover,
.nav a.active {
    color: var(--accent);
}
.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

/* 二级导航下拉菜单 */
.nav .has-submenu > a .arrow {
    font-size: 10px;
    transition: transform 0.3s;
    margin-left: 5px;
}
.nav .has-submenu:hover > a .arrow {
    transform: rotate(180deg);
}
.nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    min-width: 200px;
    padding: 4px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.nav .has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav .submenu li {
    margin: 0;
    display: block;
    width: 100%;
    border-bottom: 1px solid #eee;
}
.nav .submenu li:last-child {
    border-bottom: none;
}
.nav .submenu a {
    padding: 10px 20px;
    display: block;
    color: var(--text);
    font-weight: 400;
    width: 100%;
    line-height: 1.5;
    white-space: nowrap;
}
.nav .submenu a:hover {
    background: var(--bg);
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.search-btn,
.icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg);
    color: var(--primary);
    transition: all 0.3s;
}
.search-btn:hover,
.icon-btn:hover {
    background: var(--primary);
    color: var(--white);
}
.cart-btn {
    position: relative;
}
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-menu-btn {
    display: none;
    background: none;
    font-size: 24px;
    color: var(--primary);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 1001;
    padding: 80px 20px 20px;
}
.mobile-menu.active {
    display: block;
}
.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mobile-menu li a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
    color: var(--text);
}
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: var(--text);
}

@media (max-width: 992px) {
    .nav { display: none; }
    .mobile-menu-btn { display: block; }
    .topbar-left { display: none; }
}

/* ========== Footer ========== */
.footer {
    background: var(--primary);
    color: var(--white);
    padding-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col h4 {
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}
.footer-about p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
    line-height: 1.8;
}
.footer-social {
    display: flex;
    gap: 12px;
}
.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.footer-social a:hover {
    background: var(--accent);
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-links a:hover {
    color: var(--accent);
}
.arrow {
    color: var(--accent);
}
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8);
}
.footer-contact i {
    color: var(--accent);
    margin-top: 3px;
}
.footer-bottom {
    background: var(--primary-dark);
    padding: 20px 0;
    text-align: center;
}
.footer-bottom-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}
.copyright {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

/* Back to Top */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow-lg);
    opacity: 0.8;
    transition: all 0.3s;
    z-index: 999;
}
.back-top:hover {
    background: var(--accent);
    opacity: 1;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Contact Form Modal ========== */
.contact-form-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
}

.contact-float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}
.contact-float-btn:hover {
    background: var(--accent);
    transform: scale(1.05);
}
.contact-float-btn i {
    font-size: 20px;
}
.contact-float-text {
    display: none;
}

.contact-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 9999;
}
.contact-form-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-form-modal {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 480px;
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 60px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.contact-form-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.contact-form-wrapper {
    padding: 24px 30px 30px;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
}
.contact-form-header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}
.contact-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f0f0f;
    margin: 0 0 8px 0;
}
.contact-form-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
}
.contact-form-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: all 0.3s;
}
.contact-form-close:hover {
    background: #f5f5f5;
    color: #000;
}
.contact-form-modal-body .form-group {
    margin-bottom: 14px;
}
.contact-form-modal-body .form-group:last-of-type {
    margin-bottom: 0;
}
.contact-form-modal-body .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 0 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form-modal-body .input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.1);
}
.contact-form-modal-body .input-wrapper input {
    padding: 0;
    font-size: 14px;
    height: 42px;
    border: none;
    background: transparent;
    width: 100%;
}
.contact-form-modal-body .textarea-wrapper {
    padding: 12px 14px;
    min-height: 90px;
}
.contact-form-modal-body .textarea-wrapper textarea {
    min-height: 90px;
    font-size: 14px;
    resize: vertical;
    line-height: 1.5;
    border: none;
    background: transparent;
    width: 100%;
}
.contact-form-modal-body .contact-submit-btn {
    width: 100%;
    margin-top: 10px;
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 600;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}
.contact-form-modal-body .contact-submit-btn:hover {
    background: var(--accent);
}
.contact-form-modal-body .form-message {
    margin-top: 10px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    line-height: 1.4;
}
.contact-form-modal-body .form-message.success {
    background: #d4edda;
    color: #155724;
}
.contact-form-modal-body .form-message.error {
    background: #f8d7da;
    color: #721c24;
}
