/* ========= 基础重置与变量 ========= */
html, body {
  overflow-x: hidden;
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}
:root {
  --primary: #cda292;
  --bg: rgba(0, 0, 0, 0.55);
  --radius: 16px;
  --transition: 0.3s ease;
}

/* ====== 头图：自适应高度，永不变形 ====== */
.main-title{
    width:100%;
    padding-top:60px;          /* 导航多高就写多高，实测60px足够 */
    line-height:0;
    scroll-margin-top:60px;    /* 锚点跳转时也自动留空 */
}
.main-title img{
    width:100%;
    height:auto;
    display:block;
}

/* ========= 产品区 ========= */
.product-section {
  padding: 0 5vw;
}
.section-title {
  color: var(--primary);
  font-size: 24px;
  margin: 10px 0 20px;
}

/* 默认 6 列 → 响应式递减 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.product-card {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 图片统一比例 */
.product-image {
  width: 100%;
  height: 180px;
  background: #f0f0f0;
  margin-bottom: 10px;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.product-image:hover {
  transform: scale(1.1);
}
.product-image img:hover {
  transform: scale(1.2);
}

/* 文字与按钮 */
.product-name {
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 5px;
}
.view-details {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  text-decoration: none;
  margin-top: 10px;
  margin-left: 10px;
  transition: background 0.3s;
}
.view-details:hover {
  background: #b88e7d;
}

/* 爱心图标 */
.favorite-icon {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  background: #fff;
  color: var(--primary);
  border-radius: 50%;
  text-align: center;
  font-size: 18px;
  cursor: pointer;
  margin-left: 10px;
  transition: all 0.3s;
}
.favorite-icon:hover {
  background: var(--primary);
  color: #fff;
}
.spanIcon {
  background: var(--primary);
  color: #fff;
}

/* ========= 详情弹窗 ========= */
.product-dialog {
  width: 90%;
  max-width: 90%;
  height:90%;
  max-height:90%;
  border: none;
  border-radius: var(--radius);
  background: #fff;
  padding: 0;
  animation: fadeIn 0.4s;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.btnClose {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--transition);
  z-index: 10;
}
.btnClose:hover {
  transform: scale(1.1);
}

.product-detail-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}
.product-detail-image img {
  width: 100%;
  border-radius: 8px;
}
#subclassProductImg:hover {
  transform: scale(1.2);
}
.product-detail-content {
  max-width: 100%;
  padding-left: 0;
}
.product-detail-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.product-detail-content td {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.product-detail-content td:first-child {
  width: 30%;
  color: #777;
}

/* 缩略图导航 */
.thumbnail-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.related-products {
  display: flex;
  gap: 8px;
  overflow: hidden;
  scroll-behavior: smooth;
  flex: 1;
}
.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.thumbnail.active,
.thumbnail:hover {
  opacity: 1;
  outline: 2px solid var(--primary);
}
.nav-btn {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
}
.nav-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ========= 响应式断点 ========= */
/* 1200px 以下 4 列 */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* 768px 以下 2 列 */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4vw;
  }
  .product-detail-section {
    flex-direction: column;
  }
  .product-detail-content {
    padding-left: 0;
  }
}
/* 480px 以下 1 列 */
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ========= 图片放大模态框（Bootstrap） ========= */
.modal-content {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  border: none;
}
.modal-header,
.modal-body {
  background: transparent;
  border: none;
}
.show-modal-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}
.btn-close {
  opacity: 1;
  filter: none;
}

/* ========= 咨询弹窗（沿用 consultModal 变量） ========= */
.consult-dialog {
  width: 90%;
  max-width: 720px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 0;
  animation: fadeIn 0.4s;
}
.consult-containerUs {
  display: flex;
  gap: 30px;
  padding: 40px;
}
#consult-contactFormUs {
  flex: 1 1 380px;
}
.consult-cat {
  flex: 0 0 220px;
  width: 220px;
  object-fit: contain;
  align-self: center;
  user-select: none;
}
#consult-contactFormUs h2 {
  margin-bottom: 20px;
  font-size: 26px;
}
#consult-contactFormUs input,
#consult-contactFormUs textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 12px 15px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.85);
  color: #222;
  transition: box-shadow var(--transition);
}
#consult-contactFormUs input:focus,
#consult-contactFormUs textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary);
}
#consult-contactFormUs button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition);
}
#consult-contactFormUs button:hover {
  background: #b88e7d;
}
@media (max-width: 700px) {
  .consult-containerUs {
    flex-direction: column;
    align-items: center;
  }
  .consult-cat {
    width: 160px;
    flex: 0 0 auto;
  }
}

 /* 回顶部箭头 */  
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.25);
    color: white;
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}
.back-to-top:hover {
    background-color: #cda292;
}
 /* -----------------   */