/* 联系我们页面 — 小米/华为商城式简洁电商风 */
.contact-page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 0 40px;
}

.contact-page h1 {
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.contact-item {
    background: var(--card);
    padding: 24px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    text-align: center;
    transition: transform var(--fast), box-shadow var(--fast);
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.contact-item h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--brand);
}

.contact-item p {
    color: var(--text-2);
    font-size: 14px;
}

.contact-form {
    background: var(--card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
}

.contact-form h2 {
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}

.form-group .required {
    color: var(--danger);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    font-size: 14px;
    transition: border-color var(--fast), box-shadow var(--fast);
    background: var(--card);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-divider {
    padding: 12px 0;
    margin: 10px 0 20px;
    border-top: 1px solid var(--line);
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

/* 文件上传 */
.file-upload-group {
    margin-bottom: 25px;
}

.file-upload-area {
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--fast);
    background: var(--bg);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--brand);
    background: var(--brand-light);
}

.file-upload-area.has-files {
    padding: 15px 20px;
}

.file-upload-area input[type="file"] {
    display: none;
}

.upload-placeholder svg {
    color: var(--brand);
    margin-bottom: 10px;
}

.upload-placeholder p {
    margin: 8px 0;
    color: var(--text);
    font-size: 14px;
}

.upload-hint {
    display: block;
    font-size: 12px;
    color: var(--text-3);
}

.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius-s);
    margin-bottom: 8px;
    font-size: 13px;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.file-size {
    color: var(--text-3);
    margin: 0 10px;
    white-space: nowrap;
}

.file-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.file-remove:hover {
    color: #c62828;
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    padding: 12px 24px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-s);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--fast);
}

.btn-submit:hover:not(:disabled) {
    background: var(--brand-hover);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 消息提示 */
.message {
    display: none;
    padding: 12px 16px;
    border-radius: var(--radius-s);
    margin-bottom: 20px;
    font-size: 14px;
}

.message.success {
    background: #e8f7ee;
    color: var(--success);
    border: 1px solid #c6ecd4;
}

.message.error {
    background: #fdecec;
    color: var(--danger);
    border: 1px solid #f9d2d2;
}

/* 最新产品推荐（contact.liquid 内的 featured-products 卡片） */
.contact-page > h2 {
    margin: 32px 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.featured-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.featured-product {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast);
}

.featured-product:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand);
}

.featured-product-img {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-s);
    overflow: hidden;
    background: var(--bg);
    margin-bottom: 12px;
}

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

.featured-product h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-product p {
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-product .featured-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 0;
}

/* ================= 移动端补强（≤768） =================
   注意：以下规则需置于文件末尾，才能覆盖同权重、在源码中更靠后的基础样式 */
@media (max-width: 768px) {
    .contact-page h1 { font-size: 20px; }
    .contact-form { padding: 20px 16px; }
    .contact-item { padding: 20px 16px; }
    .contact-page > h2 { margin: 24px 0 14px; font-size: 17px; }
    .file-upload-area { padding: 24px 16px; }
    /* 触摸目标：移除按钮加大点按区域 */
    .file-remove { font-size: 20px; padding: 4px 10px; }
}

@media (max-width: 480px) {
    .contact-form { padding: 16px 12px; }
    .contact-item { padding: 18px 14px; }
    .file-item { font-size: 12px; }
    .file-upload-area { padding: 20px 14px; }
    .btn-submit { font-size: 15px; }
    .featured-products { grid-template-columns: 1fr; }
}
