/* ============================================
   威尔丹独立站 - v5 全面修复
   - 4 内页 page-hero 16:9 banner（about/contact/order/development）
   - products 默认页 banner 接通 banners.products_all
   - cushion 文字 3 行显示
   - 内页 banner 占位 no-img 样式
   v: 20260526_v5
   ============================================ */

@media (max-width: 992px) {
    /* === 内页 16:9 banner（about/contact/order/development） === */
    .page-hero {
        position: relative;
        width: 100%;
        aspect-ratio: 16 / 9;
        background: #FBF4E2;
        overflow: hidden;
        margin: 0 0 clamp(12px, 4vw, 24px);
        border-radius: clamp(6px, 2vw, 12px);
    }
    .page-hero .hero-img,
    .page-hero .hero-img img {
        width: 100%;
        height: 100%;
        display: block;
    }
    .page-hero .hero-img img {
        object-fit: cover;
    }
    .page-hero .hero-text {
        position: absolute;
        right: 14px;
        bottom: 12px;
        background: rgba(255, 255, 255, 0.78);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        padding: 6px 12px;
        border-radius: 6px;
        max-width: 78%;
    }
    .page-hero .hero-text h1 {
        margin: 0;
        font-size: clamp(16px, 5vw, 22px);
        line-height: 1.2;
        color: var(--text-dark, #3a3530);
        font-weight: 600;
    }
    .page-hero .hero-text .hero-title-en {
        margin: 2px 0 0;
        font-size: clamp(10px, 2.6vw, 12px);
        color: #7b7368;
        font-weight: 400;
    }
    /* 无图兜底：纯色卡，去掉 16:9 */
    .page-hero.no-img {
        aspect-ratio: auto;
        min-height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #FBF4E2 0%, #F5EBD0 100%);
    }
    .page-hero.no-img .hero-text {
        position: static;
        background: transparent;
        backdrop-filter: none;
        text-align: center;
        max-width: 100%;
        padding: 16px 18px;
    }
    .page-hero.no-img .hero-text h1 {
        font-size: clamp(20px, 6vw, 26px);
    }

    /* === 首页分类卡：文字 3 行，确保 Cushion & Loose Powder 完整显示 === */
    .category-name,
    body.is-home .category-name {
        -webkit-line-clamp: 3 !important;
        line-height: 1.18 !important;
        font-size: clamp(10px, 2.7vw, 13px) !important;
    }

    /* 让正方形卡片在文字 3 行时也不挤压图标：缩小图标，给文字让位 */
    body.is-home .category-icon {
        width: clamp(38px, 12vw, 64px) !important;
        height: clamp(38px, 12vw, 64px) !important;
    }
    body.is-home .category-card {
        gap: clamp(3px, 1vw, 6px) !important;
    }
}


/* ============================================
   v6 修改（2026-05-27）
   1. contact/order/development 三个表单页：删除 .contact-info 卡片后，让 .contact-form 全宽
   2. about 下方联系方式紧凑化（class="about-contact-compact"）
   ============================================ */

/* 表单页：去掉左卡后，contact-layout 自动只剩 contact-form，flex:1 撑满即可。
   桌面端 .contact-page max-width 1100，表单卡仍居中。这里只做兜底，确保即使浏览器缓存导致 .contact-info 仍渲染，也强制隐藏（v6 上线后清缓存即可恢复正常）。 */
body[data-page="contact"] .contact-info,
body[data-page="order"] .contact-info,
body[data-page="development"] .contact-info {
    display: none !important;
}

/* 表单卡片在去掉左卡后，桌面端不要被 flex:1 拉得过宽，居中收窄到 760px */
@media (min-width: 992px) {
    .contact-page .contact-layout {
        justify-content: center;
    }
    .contact-page .contact-form {
        max-width: 760px;
        width: 100%;
    }
}

/* about 联系方式紧凑（手机端和桌面端都生效） */
.about-contact-compact {
    line-height: 1.4;
}
.about-contact-compact strong {
    font-size: 13px !important;
    color: var(--text-secondary, #777);
    font-weight: 600;
    display: block;
    line-height: 1.3;
}
.about-contact-compact p {
    margin: 1px 0 0 !important;
    font-size: 14px !important;
    color: var(--text-dark, #333);
    line-height: 1.35;
    word-break: break-all;
}
.about-contact-compact > div > div {
    padding: 6px 0;
}

/* 手机端再紧凑 */
@media (max-width: 768px) {
    .about-contact-compact {
        margin-top: 16px !important;
        padding-top: 12px !important;
    }
    .about-contact-compact h3 {
        font-size: 15px !important;
        margin-bottom: 6px !important;
    }
    .about-contact-compact > div {
        gap: 4px 12px !important;
    }
    .about-contact-compact > div > div {
        padding: 4px 0;
    }
}


/* === v6.1 patch（强制手机端 contact-form 全宽） === */
.contact-page .contact-layout {
    align-items: stretch;
}
.contact-page .contact-form {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .contact-page .contact-form,
    .contact-page .contact-layout > .contact-form {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
    }
}
