/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* 头部样式 */
header {
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 主容器 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
}

.index_page_banner {
    background: url("./img/banner_bg_login.webp") no-repeat center top;
    background-size: cover;
    min-height: 60vh; 
    display: flex; 
    align-items: center; 
    justify-content: flex-end;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.15s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: #2563EB;
}

.btn:disabled,
.btn[disabled] {
    background: #94A3B8;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.95;
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* 表单样式 */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
}

/* 产品卡片样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.2rem;
    overflow: hidden;
}

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

/* 分类子项样式 */
.category-child {
    font-size: 0.875rem;
    text-decoration: none;
    color: #999;
    padding: 4px 6px;
    border-radius: 6px;
    display: inline-block;
    transition: color 0.18s, background 0.18s;
}
.category-child:hover {
    color: #6b7280; /* muted hover */
    background: rgba(0,0,0,0.03);
}
.category-child.selected {
    color: #94A3B8; /* 更素的选中颜色（浅灰蓝） */
    background: rgba(148,163,184,0.12);
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-description {
    color: #999;
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.8rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #3B82F6;
}

/* 页脚样式 */
footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3B82F6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .main-container {
        padding: 1rem 10px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

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

/* Modal (terms) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
    max-height: 80vh;
    overflow: auto;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
}
.modal-header {
    font-weight: bold;
    margin-bottom: 8px;
    text-align:center;
    font-size: 1.5rem;
}
.modal-body {
    color: #444;
    line-height: 1.6;
    font-size: 0.95rem;
}
.modal-body h3 {
    margin: 1rem 0;
}
.modal-body h4 {
    margin: 0.5rem 0;
}
.modal-body p {
    margin: 0.375rem 0.5rem;
}
.modal-body ul {
    list-style: none;
    padding-left: 2rem;
}

/* phone / sms inputs */
.phone-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.country-select {
    min-width: 90px;
    max-width: 120px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    height: 44px;
    box-sizing: border-box;
    font-size: 1rem;
}
.phone-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    height: 44px;
    box-sizing: border-box;
    font-size: 1rem;
}
.sms-row {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    height: 44px;
}
.sms-row input {
    flex: 1;
    border: none;
    padding: 12px;
    outline: none;
    font-size: 1rem;
}
.sms-btn {
    background: transparent;
    border-left: 1px solid #e6e9ef;
    color: #3B82F6;
    padding: 0 14px;
    cursor: pointer;
    font-size: 0.8rem;
    height: 100%;
    display: inline-flex;
    align-items: center;
}
.sms-btn:disabled {
    color: #94A3B8;
    cursor: default;
}
