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

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

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* 导航栏 */
.nav {
    background: #000000;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    position: relative;
}

.logo a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
}

#logo-text {
    visibility: hidden;
}

.menu {
    display: flex;
    list-style: none;
    gap: 36px;
}

.menu a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 4px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    margin: -10px;
    -webkit-tap-highlight-color: transparent;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.menu-overlay.active {
    display: block;
}

/* 主内容 */
.main {
    flex: 1;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 18px;
}

.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 1rem 1rem 0.5rem;
    font-size: 1.1rem;
}

.product-card p {
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .price {
    padding: 0.5rem 1rem 1rem;
    color: #ff0000;
    font-size: 1.2rem;
    font-weight: bold;
}

/* 产品标签筛选 */
.product-tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 18px;
}

.tag-btn {
    padding: 0.4rem 1rem;
    border: 1px solid #ffffff;
    border-radius: 20px;
    background: #aaaaaa;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tag-btn:hover {
    border-color: #ffffff;
    color: #ffffff;
}

.tag-btn.active {
    background: #333333;
}

/* 产品页面HTML区域 */
.product-page-html {
    margin-bottom: 1.5rem;
}

/* 产品详情页 */
.product-detail {
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.product-back {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #555555;
    text-decoration: none;
    font-size: 0.95rem;
}

.product-back:hover {
    text-decoration: underline;
}

.product-detail-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-detail-img {
    width: 400px;
    max-width: 50%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.product-detail-info .price {
    color: #e74c3c;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.product-detail-desc {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.product-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    background: #aaaaaa;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #ffffff;
}

.product-detail-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    line-height: 1.8;
    overflow-wrap: break-word;
    word-break: break-word;
}

.product-detail-content img,
.product-detail-content table,
.product-detail-content pre,
.product-detail-content iframe {
    max-width: 100%;
}

.product-detail-content pre {
    overflow-x: auto;
}

/* 页脚 */
.footer {
    background: #000000;
    color: #ffffff;
    text-align: center;
    padding: 2rem 0;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

/* 响应式 */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #000000;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .menu.active {
        display: flex;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail-header {
        flex-direction: column;
    }
    
    .product-detail-img {
        width: 100%;
        max-width: 100%;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 3rem;
    color: #999;
}

/* ========== 联系我们浮动组件 ========== */
.contact-float-wrapper {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

.contact-float-icons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.contact-float-item {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
}

.contact-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 1;
}

.contact-float-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.contact-float-panel {
    position: absolute;
    right: calc(100% + 12px);
    top: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.contact-float-panel::-webkit-scrollbar {
    display: none;
}

.contact-float-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.contact-float-panel-content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    word-break: break-word;
}

/* 联系我们表单弹窗 */
.contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

.contact-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.contact-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.contact-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.contact-modal-close:hover {
    color: #475569;
}

.contact-modal-body {
    padding: 20px 24px 24px;
}

.contact-field {
    margin-bottom: 16px;
}

.contact-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.contact-field input,
.contact-field textarea,
.contact-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.contact-field input:focus,
.contact-field textarea:focus,
.contact-field select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.contact-submit-btn {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.contact-submit-btn:hover {
    background: #1d4ed8;
}

@media (max-width: 768px) {
    .contact-float-wrapper {
        right: 12px;
    }
    .contact-float-icon {
        width: 48px;
        height: 48px;
    }
    .contact-float-icon svg {
        width: 22px;
        height: 22px;
    }
    .contact-float-panel {
        width: auto !important;
        max-width: calc(100vw - 90px);
        max-height: 60vh;
        overflow-y: auto;
    }
    .contact-modal {
        width: 95%;
        max-width: none;
        margin: 10px;
    }
}