@charset "UTF-8";

/* =========================================================
   contact.css — 联系我们（电脑端）
   对应设计稿：蓝湖「电脑端 联系我们」1920 坐标系
   排版原则：与 about.css / certificates.css 保持一致
             · 区块内部用 flex / grid 排版（外边距定位）
             · 横向 / 纵向尺寸均按设计稿 px（整页 1920 等比缩放）
             · 背景图、装饰图统一在 HTML 中以 <img> 呈现，CSS 只管尺寸
   ========================================================= */

/* ---------- 1. 主题变量 ---------- */
:root {
    --contact-ink: #011e49;
    --contact-ink-2: #001a3f;
    --contact-gray: #6c6c6c;
    --contact-gold: #bd8d4a;
    --contact-gold-l: #e9c675;
    --contact-gold-d: #ce9d47;
    --contact-line: #dddddd;
    --contact-title: 38px; /* 区块标题字号 */
    --contact-text: 24px; /* 正文 / 表单字号 */
    --contact-field-w: 491px; /* 表单输入框宽度 */
    --contact-panel-h: 891px; /* 联系信息面板高度 */
    --contact-icon: 46px; /* 联系信息图标统一宽度 */
}

/* ---------- 2. 通用区块 ---------- */
.contact-page .section > .canvas {
    display: flex;
    flex-direction: column;
}

/* 区块标题：图标 + 文字（下方加分隔条） */
.contact-page .contact-title {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 18px;
}

.contact-page .contact-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 44px;
    height: 4px;
    background-color: var(--contact-gold-l);
    margin-top: 10px;
}

.contact-page .contact-title__icon {
    display: block;
    width: 44px;
}

.contact-page .contact-title__text {
    margin: 0;
    font-size: var(--contact-title);
    font-weight: 700;
    line-height: 1;
    color: var(--contact-ink);
    white-space: nowrap;
}

.contact-box {
    padding: 20px 40px;
    background-color: #FFFFFF;
}

/* ---------- 4. 联系信息与在线询盘 ---------- */
.contact-main {
    position: relative;
    padding-bottom: 34px;
    border: 1px solid var(--contact-line);
    border-radius: 20px;
}

.contact-main__grid {
    display: grid;
    grid-template-columns: 787px 1fr;
    padding-top: 73px;
}

/* 4.1 联系信息 */
.contact-info {
    position: relative;
    padding-left: 127px;
}

.contact-page .contact-info__list {
    margin: 24px 0 0;
    padding: 0;
}

.contact-info__row {
    display: grid;
    grid-template-columns: 46px 1fr;
    column-gap: 39px;
    align-items: start;
    font-size: var(--contact-text);
    color: var(--contact-ink);
}

.contact-page .contact-info__icon {
    display: block;
    grid-column: 1;
    grid-row: 1 / span 2;
    width: var(--contact-icon);
    margin-left: 13px;
}

.contact-page .contact-info__label {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: var(--contact-text);
    line-height: 28px;
    white-space: nowrap;
}

.contact-page .contact-info__value {
    grid-column: 2;
    grid-row: 2;
    margin: 7px 0 0;
    font-size: var(--contact-text);
    line-height: 35px;
    white-space: nowrap;
}

.contact-page .contact-info__value a {
    color: inherit;
    transition: color 0.2s ease;
}

.contact-page .contact-info__value a:hover {
    color: var(--contact-gold);
}

/* 各行间距（按设计稿行位置收敛） */
.contact-info__row--phone {
    margin-top: 34px;
}

.contact-info__row--whatsapp {
    margin-top: 64px;
}

.contact-info__row--email {
    margin-top: 70px;
}

.contact-info__row--web {
    margin-top: 39px;
}

.contact-info__row--hours {
    margin-top: 42px;
}

/* 各行图标尺寸与微调 */
.contact-info__row--address .contact-info__icon {
    height: 48px;
    margin-top: 10px;
}

.contact-info__row--phone .contact-info__icon {
    height: 46px;
    margin-top: 13px;
}

.contact-info__row--whatsapp .contact-info__icon {
    height: 46px;
    margin-top: 7px;
}

.contact-info__row--email .contact-info__icon {
    height: 36px;
    margin-top: 10px;
}

.contact-info__row--web .contact-info__icon {
    height: 46px;
    margin-top: 7px;
}

.contact-info__row--hours .contact-info__icon {
    height: 46px;
    margin-top: 7px;
}

/* 二维码 */
.contact-info__qr {
    position: absolute;
    left: 491px;
    top: 325px;
}

.contact-page .contact-info__qrcode {
    display: block;
    width: 144px;
    height: 144px;
}

.contact-page .contact-info__qr-hint {
    position: absolute;
    left: -31px;
    top: 62px;
    width: 26px;
    height: 26px;
}

/* 4.2 在线询盘 */
.contact-form {
    position: relative;
    padding-left: 4px;
}

.contact-page .contact-form .contact-title {
    gap: 26px;
}

.contact-form__form {
    margin-top: 60px;
}

/* 六个输入项：两列三行 */
.contact-form__fields {
    display: grid;
    grid-template-columns: var(--contact-field-w) var(--contact-field-w);
    column-gap: 26px;
    row-gap: 44px;
}

.contact-field {
    position: relative;
    height: 72px;
}

.contact-page .contact-field__input,
.contact-page .contact-field__select {
    width: 100%;
    height: 100%;
    margin: 0;
    border: 1px solid var(--contact-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 0 40px 0 60px;
    font-size: var(--contact-text);
    line-height: 1;
    color: var(--contact-ink);
    -webkit-appearance: none;
    appearance: none;
}

.contact-page .contact-field__select {
    cursor: pointer;
    /* 未选择时与输入框占位文字同色，选中后转为正文色 */
    color: var(--contact-gray);
}

.contact-page .contact-field__select:valid {
    color: var(--contact-ink);
}

.contact-page .contact-field__input:focus,
.contact-page .contact-field__select:focus {
    outline: 2px solid var(--contact-gold-l);
    outline-offset: 1px;
}

.contact-page .contact-field__label {
    position: absolute;
    left: 66px;
    top: 25px;
    margin: 0;
    font-size: var(--contact-text);
    line-height: 1;
    color: var(--contact-gray);
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.contact-page .contact-field__input:not(:placeholder-shown) + .contact-field__label {
    opacity: 0;
}

.contact-page .contact-field__icon {
    position: absolute;
    left: 10px;
    top: 15px;
    width: 48px;
    pointer-events: none;
}

.contact-page .contact-field__chevron {
    position: absolute;
    left: 448px;
    top: 25px;
    width: 26px;
    pointer-events: none;
}

/* 各字段的图标 / 文字起点（文字起点避开图标可见像素） */
.contact-field--name {
    --icon-left: -10px;
    --icon-top: -2px;
    --icon-w: 59px;
    --icon-h: 79px;
}

.contact-field--company {
    --pad-left: 63px;
    --label-left: 63px;
    --label-top: 26px;
    --icon-left: -5px;
    --icon-top: 20px;
    --icon-w: 70px;
    --icon-h: 92px;
}

.contact-field--country {
    --pad-left: 91px;
    --icon-left: 12px;
    --icon-top: 4px;
    --icon-w: 72px;
    --icon-h: 72px;
    --chevron-left: 449px;
    --chevron-top: 25px;
}

.contact-field--email {
    --pad-left: 64px;
    --label-left: 64px;
    --label-top: 22px;
    --icon-left: 9px;
    --icon-top: -4px;
    --icon-w: 62px;
    --icon-h: 53px;
}

.contact-field--whatsapp {
    --pad-left: 98px;
    --label-left: 98px;
    --label-top: 29px;
    --icon-left: 12px;
    --icon-top: -4px;
    --icon-w: 80px;
    --icon-h: 58px;
}

.contact-field--product {
    --pad-left: 63px;
    --icon-left: 23px;
    --icon-top: 23px;
    --icon-w: 32px;
    --icon-h: 28px;
    --chevron-left: 458px;
    --chevron-top: 28px;
}

/* 4.3 留言与提交 */
.contact-message {
    position: relative;
    width: 1018px;
    height: 200px;
    margin: 44px 0 0 -7px;
}

.contact-page .contact-message__input {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 20px 28px;
    border: 1px solid #808080;
    border-radius: 4px;
    background: #ffffff;
    font-size: var(--contact-text);
    line-height: 50px;
    color: var(--contact-ink);
    resize: none;
}

.contact-page .contact-message__input:focus {
    outline: 2px solid var(--contact-gold-l);
    outline-offset: 1px;
}

.contact-page .contact-message__label {
    position: absolute;
    left: 32px;
    top: 13px;
    margin: 0;
    font-size: var(--contact-text);
    line-height: 50px;
    color: var(--contact-gray);
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.contact-page .contact-message__input:not(:placeholder-shown) + .contact-message__label {
    opacity: 0;
}

.contact-form__actions {
    position: relative;
    width: 1027px;
    height: 70px;
    margin: 42px 0 0 -16px;
}

.contact-page .contact-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(
            90deg,
            var(--contact-gold-l) 0%,
            var(--contact-gold-l) 28%,
            var(--contact-gold-d) 66%,
            var(--contact-gold-d) 100%
    );
    cursor: pointer;
    transition: filter 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-page .contact-form__submit:hover {
    filter: brightness(1.06);
    box-shadow: 0 8px 22px rgba(158, 99, 43, 0.28);
}

.contact-page .contact-form__submit:focus-visible {
    outline: 3px solid var(--contact-ink);
    outline-offset: 3px;
}

.contact-page .contact-form__submit-icon {
    display: block;
    width: 44px;
    height: 43px;
}

.contact-page .contact-form__submit-text {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
}

.contact-page .contact-form__success {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0;
    border-radius: 4px;
    background: linear-gradient(
            90deg,
            var(--contact-gold-l) 0%,
            var(--contact-gold-l) 28%,
            var(--contact-gold-d) 66%,
            var(--contact-gold-d) 100%
    );
    font-size: var(--contact-text);
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    /* 新增下面3行 */
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
}

.contact-page .contact-form__success.is-visible {
    display: flex;
}

.contact-page .contact-form__success::before {
    content: "";
    width: 22px;
    height: 11px;
    border-left: 4px solid #ffffff;
    border-bottom: 4px solid #ffffff;
    transform: rotate(-45deg) translateY(-3px);
}

.contact-page .contact-form__privacy {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 24px 0 0 35px;
    font-size: 17px;
    font-weight: bold;
    line-height: 1;
    color: var(--contact-gray);
    white-space: nowrap;
}

.contact-page .contact-form__lock {
    width: 21px;
}

/* 4.4 校验提示 */
.contact-page .contact-field__error {
    position: absolute;
    left: var(--error-left, 66px);
    top: 74px;
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    color: #c0392b;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.contact-page .contact-field__error.is-visible {
    opacity: 1;
}

/* 原生校验提示：仅在用户交互后（:user-invalid）显示，无需 JS */
.contact-page .contact-field__input:user-invalid ~ .contact-field__error,
.contact-page .contact-field__select:user-invalid ~ .contact-field__error,
.contact-page .contact-message__input:user-invalid ~ .contact-field__error {
    opacity: 1;
}

.contact-page .contact-message .contact-field__error {
    left: 60px;
    top: 206px;
}

.contact-page .contact-field:has(:user-invalid) .contact-field__input,
.contact-page .contact-field:has(:user-invalid) .contact-field__select {
    border-color: #c0392b;
}

.contact-page .contact-field:has(:user-invalid) .contact-field__label {
    color: #c0392b;
}

/* ---------- 5. 工厂位置 ---------- */
.contact-factory {
    position: relative;
    border: 1px solid #EFEFEF;
    border-radius: 20px;
    margin-top: 20px;
}

.contact-factory__inner {
    display: grid;
    grid-template-columns: 694px 1fr;
}

.contact-factory__text {
    padding: 88px 0 0 143px;
}

.contact-page .contact-factory__title {
    margin: 0;
    font-size: var(--contact-title);
    font-weight: 700;
    line-height: 1;
    color: var(--contact-ink-2);
    white-space: nowrap;
}

.contact-page .contact-factory__title::after {
    content: "";
    display: block;
    width: 80px;
    height: 8px;
    background-color: var(--contact-gold-l);
    margin-top: 20px;
}

.contact-page .contact-factory__lead {
    margin: 35px 0 0;
    font-size: 28px;
    line-height: 1;
    color: var(--contact-ink-2);
    white-space: nowrap;
}

.contact-page .contact-factory__desc {
    margin: 8px 0 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 42px;
    color: var(--contact-ink-2);
    white-space: nowrap;
}

/* 地图与浮层信息卡 */
.contact-factory__map {
    position: relative;
    margin-left: -23px;
}

.contact-page .contact-factory__map-image {
    display: block;
    width: 1249px;
    height: 383px;
}

.contact-factory__card {
    position: absolute;
    left: 23px;
    top: 39px;
    padding: 20px 40px;
    background-color: #FFFFFF;
    border: 1px solid #EFEFEF;
    border-radius: 20px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.contact-page .contact-factory__card-title {
    font-size: 32px;
    font-weight: bold;
    line-height: 1.5;
    color: #000000;
    white-space: nowrap;
}

.contact-page .contact-factory__card-addr {
    margin: 0;
    font-size: 18px;
    line-height: 28px;
    color: #898989;
    white-space: nowrap;
}

.contact-page .contact-factory__card-link {
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    color: #354eba;
    transition: opacity 0.2s ease;
}

.contact-page .contact-factory__card-link:hover {
    opacity: 0.75;
}

/* ---------- 6. 为什么选择九鼎酵母 ---------- */
.contact-page .contact-why__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0 20px;
}

.contact-page .contact-why__title {
    font-size: 45px;
    font-weight: 700;
    color: var(--contact-ink-2);
    text-align: center;
    white-space: nowrap;
}

.contact-page .contact-why__title::after {
    content: "";
    display: block;
    width: 80px;
    height: 8px;
    background-color: var(--contact-gold-l);
    margin: 40px auto 0;
}

.contact-why__list {
    display: flex;
    gap: 20px;
    margin: 0;
    padding-bottom: 60px;
    list-style: none;
}

.contact-why__card {
    flex: 1;
    display: flex;
    align-items: flex-start;
    border: 1px solid #EFEFEF;
    border-radius: 20px;
    padding: 20px 10px;
    box-sizing: border-box;
}

.contact-page .contact-why__card img {
    width: 100px;
}

.contact-why__box {
    flex: 1;
    margin-left: 10px;
}

.contact-page .contact-why__num {
    font-size: 40px;
    font-weight: bold;
    color: var(--contact-ink-2);
    white-space: nowrap;
    line-height: 1;
    margin-bottom: 10px;
}

.contact-page .contact-why__label {
    font-size: 26px;
    font-weight: bold;
    line-height: 1.2em;
    color: var(--contact-ink-2);
    white-space: nowrap;
    margin-bottom: 10px;
}

.contact-page .contact-why__desc {
    font-size: 18px;
    line-height: 1.2em;
    color: var(--contact-ink-2);
    white-space: nowrap;
}

/* 默认隐藏 */
.contact-page-form__success {
    display: none;
    margin-top:8px;
    color:#333;
}
/* 加上class才显示 */
.contact-page-form__success.is-visible {
    display: block;
}

.contact-form__actions {
    position: relative; /* 作为成功提示的定位容器 */
}
/* 成功提示：默认隐藏，叠加在按钮区域居中 */
.contact-page-form__success {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin:0;
}
.contact-page-form__success.is-visible {
    display: flex;
}
/* 成功后按钮置灰，保留黄色底色，禁止点击 */
.contact-form__submit.is-disabled {
    opacity: 0.65;
    pointer-events: none;
}

.contact-form__actions {
    position: relative;
}
.contact-page-form__success {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin: 0;
}
.contact-page-form__success.is-visible {
    display: flex;
}
/* 给按钮内部元素加隐藏规则 */
.contact-form__submit.is-disabled .contact-form__submit-icon,
.contact-form__submit.is-disabled .contact-form__submit-text {
    visibility: hidden; /* 占位、不消失，保证按钮宽高底色不变 */
}
