/**
 * style.css
 * 晨宇不锈钢 Google ads site
 */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --dark-color: #212529;
  --light-bg: #f8f9fa;
  --border-color: #dee2e6;
  --whatsapp-color: #25D366;
  --whatsapp-hover: #1eb954;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  padding-bottom: 0 !important; /* 取消底部空白，让悬浮条直接压在页脚上 */
}

/* 确保页脚层级低于悬浮条 */
footer {
  position: relative;
  z-index: 1 !important;
}

/* 导航栏 & 头部 */
.navbar-brand img {
  max-height: 35px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.hero-section .badge {
  white-space: normal !important;      
  word-break: break-word !important;   
  display: inline-block;               
  max-width: 100%;                     
  line-height: 1.4;                    
}

/* 卡片与悬停交互 */
.custom-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-card:hover {
  transform: translateY(-4px);
}

.object-fit-cover {
  object-fit: cover;
}

/* 表格响应式与文本防止挤压 */
.table-responsive {
  border-radius: 8px;
  overflow-x: auto;
}

.table th, .table td {
  vertical-align: middle;
}

/* 全端固定悬浮条样式 (PC & Mobile) */
.global-sticky-bar {
  display: flex !important;
  position: fixed !important; /* 强制固定定位 */
  bottom: 0 !important;       /* 强制贴底 */
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;   /* 提升至最高层级，压住页面所有元素 */
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 10px 16px;
  /* 适配苹果/全面屏手机底部安全区 */
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  border-top: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

/* PC 桌面端：居中胶囊形态 */
@media (min-width: 768px) {
  .global-sticky-bar {
    left: 50% !important;
    transform: translateX(-50%);
    right: auto !important;
    bottom: 20px !important;
    width: 100%;
    max-width: 520px;
    border-radius: 50px;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }
}

/* WhatsApp 专属品牌按钮 */
.btn-whatsapp {
  background-color: var(--whatsapp-color);
  color: #ffffff;
  font-weight: 600;
  border: none;
}

.btn-whatsapp:hover, 
.btn-whatsapp:active {
  background-color: var(--whatsapp-hover);
  color: #ffffff;
}

/* Modal 弹窗在小屏设备的微调 */
#inquiryModal .modal-content {
  border-radius: 12px;
}

@media (max-width: 576px) {
  #inquiryModal .modal-dialog {
    margin: 0.75rem;
  }
}

/* 针对当前输入框或全局 placeholder 调小字体 */
.form-control-lg::placeholder {
  font-size: 0.99rem; 
  font-weight: normal;
}


/* ==========================================
   PC端右侧高级折叠抽屉悬浮组件 (移动端高兼容版)
   ========================================== */

/* 仅在大屏 (PC端 ≥ 992px) 下渲染与生效 */
@media (min-width: 992px) {
  .side-floating-bar {
    position: fixed !important;
    right: 0 !important;
    top: 50% !important;
    -webkit-transform: translateY(-50%) !important;
    transform: translateY(-50%) !important;
    z-index: 1050 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .side-floating-bar .floating-item {
    position: relative !important;
    display: flex !important;
    justify-content: flex-end !important;
  }

  /* 统一标签宽度与对齐 */
  .side-floating-bar .floating-label {
    display: flex !important;
    align-items: center !important;
    width: 120px !important;
    padding: 10px 12px !important;
    background: #ffffff !important;
    border-radius: 8px 0 0 8px !important;
    box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e2e8f0 !important;
    border-right: none !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    color: #1e293b !important;
    box-sizing: border-box !important;
  }

  .side-floating-bar .floating-item:hover .floating-label {
    background: #f8fafc !important;
  }

  .side-floating-bar .label-icon {
    font-size: 1.2rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }

  .side-floating-bar .label-text {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    margin-left: 8px !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
  }

  .side-floating-bar .wa-item .label-icon { color: #25D366 !important; }
  .side-floating-bar .wx-item .label-icon { color: #07c160 !important; }

  /* 悬浮面板与桥接防丢失区 */
  .side-floating-bar .floating-panel {
    position: absolute !important;
    right: 100% !important;
    top: 50% !important;
    -webkit-transform: translateY(-50%) scale(0.95) !important;
    transform: translateY(-50%) scale(0.95) !important;
    width: 160px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
  }

  .side-floating-bar .floating-panel::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: -15px !important;
    width: 15px !important;
    height: 100% !important;
    background: transparent !important;
  }

  /* Hover 触发生效 */
  .side-floating-bar .floating-item:hover .floating-panel {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    -webkit-transform: translateY(-50%) scale(1) !important;
    transform: translateY(-50%) scale(1) !important;
  }

  .side-floating-bar .panel-header {
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 8px 10px !important;
    text-align: center !important;
  }

  .side-floating-bar .panel-header.header-wx {
    background: #07c160 !important;
  }

  .side-floating-bar .panel-body {
    padding: 12px !important;
  }

  .side-floating-bar .qr-wrapper {
    background: #f8fafc !important;
    padding: 6px !important;
    border-radius: 8px !important;
    border: 1px solid #f1f5f9 !important;
  }

  .side-floating-bar .qr-wrapper img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 4px !important;
  }

  .side-floating-bar .contact-num {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
  }

  .side-floating-bar .btn-action {
    display: block !important;
    width: 100% !important;
    padding: 6px 0 !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: background 0.2s ease !important;
  }

  .side-floating-bar .btn-wa {
    background: #25D366 !important;
    color: #ffffff !important;
  }
  .side-floating-bar .btn-wa:hover {
    background: #20bd5a !important;
  }

  .side-floating-bar .btn-wx-outline {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
    cursor: pointer !important;
  }
  .side-floating-bar .btn-wx-outline:hover {
    background: #dcfce7 !important;
  }
}

/* 2. 移动端与平板 (＜992px) 绝对隐藏黑科技：多重清理，防止属性残留 */
@media (max-width: 991.98px) {
  .side-floating-bar,
  .side-floating-bar *,
  .floating-item,
  .floating-panel {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}



