/* ============================================================================
 * Footer (ft- prefix)
 * ----------------------------------------------------------------------------
 * 全局页脚外壳样式，全站加载。包含：
 * - ft-footer     页脚主体
 * - ft-contact    联系方式
 * - ft-share      社交媒体
 * - ft-nav        导航链接
 * - ft-bottom     底部版权
 * - ft-floating   浮动按钮（WhatsApp + 返回顶部）
 * - ft-modal      全局报价弹窗
 * ============================================================================ */

/* ============================================================================
 * 1. Footer 主体
 * ============================================================================ */
.ft-footer {
  background: var(--bg-white);
  color: var(--text-primary);
  padding: 40px 0 0;
}

.ft-footer__container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad-sm);
}

/* ----------------------------------------------------------------------------
 * 1.1 Logo
 * ---------------------------------------------------------------------------- */
.ft-footer__logo {
  margin-bottom: 30px;
}

.ft-footer__logo-img {
  max-width: 200px;
  height: auto;
}

/* ----------------------------------------------------------------------------
 * 1.2 主要内容区（左右两列）
 * ---------------------------------------------------------------------------- */
.ft-footer__main {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 40px;
}

@media (min-width: 1024px) {
  .ft-footer__main {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Left */
.ft-footer__left {
  width: 100%;
}

@media (min-width: 1024px) {
  .ft-footer__left {
    flex: 0 0 40%;
    max-width: 40%;
  }
}

/* Right */
.ft-footer__right {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 30px;
}

@media (min-width: 1024px) {
  .ft-footer__right {
    flex: 0 0 55%;
    max-width: 55%;
  }
}

/* Company info */
.ft-footer__company-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 20px;
}

.ft-footer__company-desc {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ============================================================================
 * 2. 联系方式 ft-contact
 * ============================================================================ */
.ft-contact {
  margin: 20px 0;
}

.ft-contact__item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.ft-contact__icon {
  margin-right: 10px;
}

.ft-contact__icon img {
  width: 20px;
  height: 20px;
}

.ft-contact__text a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
}

.ft-contact__text a:hover {
  color: #ed6f13;
}

/* ============================================================================
 * 3. 社交媒体 ft-share
 * ============================================================================ */
.ft-share {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ft-share a {
  display: flex;
  align-items: center;
}

.ft-share img {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.ft-share img:hover {
  opacity: 1;
}

/* ============================================================================
 * 4. 导航 ft-nav
 * ============================================================================ */
.ft-nav {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

@media (min-width: 1024px) {
  .ft-nav {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
  }
}

.ft-nav__col {
  flex: 1;
}

.ft-nav__col h4 {
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ft-nav__category {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ft-nav__category li {
  margin-bottom: 10px;
}

.ft-nav__category a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}

.ft-nav__category a:hover {
  color: #ed6f13;
}

/* ============================================================================
 * 5. 底部版权 ft-bottom
 * ============================================================================ */
.ft-bottom {
  background: #f8f9fa;
  padding: 15px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 40px;
}

.ft-bottom__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad-sm);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .ft-bottom__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.ft-bottom__copyright {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ft-bottom__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .ft-bottom__links {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 20px;
  }
}

.ft-bottom__links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}

.ft-bottom__links a:hover {
  color: #ed6f13;
}

@media (min-width: 768px) {
  .ft-bottom__links a:last-child {
    margin-right: 40px;
  }
}

/* ============================================================================
 * 6. 浮动按钮 ft-floating
 * ============================================================================ */
.ft-floating {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ft-floating__btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

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

.ft-floating__whatsapp {
  background: #25D366;
}

.ft-floating__whatsapp-icon {
  width: 28px;
  height: 28px;
}

.ft-floating__backtop {
  background: var(--bg-white);
  font-size: 20px;
  color: var(--text-primary);
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.ft-floating__backtop.show {
  opacity: 1;
  visibility: visible;
}

/* ============================================================================
 * 7. 报价弹窗 ft-modal
 * ============================================================================ */
.ft-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

.ft-modal.is-open {
  display: flex;
}

.ft-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.ft-modal__content {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-modal);
  padding: 40px 32px 32px;
  width: 600px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
}

.ft-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}

.ft-modal__close:hover {
  color: var(--text-primary);
}

.ft-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.ft-modal__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 24px;
}

/* --- WPForms inside modal --- */
.ft-modal__form .wpforms-container {
  margin: 0;
}

.ft-modal__form .wpforms-field {
  margin-bottom: 16px;
}

.ft-modal__form .wpforms-field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.ft-modal__form .wpforms-field input[type="text"],
.ft-modal__form .wpforms-field input[type="email"],
.ft-modal__form .wpforms-field input[type="tel"],
.ft-modal__form .wpforms-field select,
.ft-modal__form .wpforms-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-input);
  transition: border-color var(--transition);
  box-sizing: border-box;
}

.ft-modal__form .wpforms-field input:focus,
.ft-modal__form .wpforms-field select:focus,
.ft-modal__form .wpforms-field textarea:focus {
  border-color: var(--border-focus);
  outline: none;
}

.ft-modal__form .wpforms-field textarea {
  min-height: 170px;
  height: 170px;
}

.ft-modal__form .wpforms-submit {
  width: 100%;
  padding: 13px 26px;
  background: var(--brand);
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.ft-modal__form .wpforms-submit:hover {
  background: var(--brand-dark);
}

/* ============================================================================
 * 8. 响应式
 * ============================================================================ */
@media (max-width: 992px) {
  .ft-nav {
    flex-direction: column;
    gap: 30px;
  }

  .ft-nav__col {
    margin-bottom: 20px;
  }
}

@media (max-width: 767px) {
  .ft-floating {
    right: 12px;
    bottom: 60px;
  }

  .ft-floating__btn {
    width: 40px;
    height: 40px;
  }

  .ft-bottom__inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .ft-bottom__links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .ft-bottom__links a:last-child {
    margin-right: 0;
  }
}