/* ===== 产品卡片样式 ===== */
.lp-products-section {
  padding: 100px 0px;
}

.lp-product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(44,60,28,0.07);
  padding: 1rem 1rem 0.8rem 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 330px;
  max-width: 330px;
  margin: 0 auto;
}

.lp-product-top {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lp-product-image-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
}

.lp-product-img {
  width: 96%;
  height: 96%;
  object-fit: contain;
  transition: transform 0.16s;
}

.lp-product-image-wrap:hover .lp-product-img {
  transform: scale(1.08);
  cursor: zoom-in;
}

.lp-products-title {
  color: var(--military-green);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
  margin-bottom: 0.7rem;
  min-height: 40px;
}

.lp-product-btn {
  border: none;
  outline: none;
  background: #ff7a2f;
  color: #fff;
  border-radius: 12px;
  padding: 0.48rem 0.5rem;
  font-weight: 700;
  font-size: 1.01rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: auto;
  box-shadow: 0 2px 8px rgba(255,122,47,0.08);
  transition: background 0.16s;
}

.lp-product-btn:hover,
.lp-product-btn:focus {
  background: #e86615;
  color: #fff;
}

.lp-btn-orange {
  background: #ff7a2f;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 30px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(255,122,47,0.08);
  transition: background 0.2s;
  text-decoration: none;
}

.lp-btn-orange:hover, 
.lp-btn-orange:focus {
  background: #ff903e;
  color: #fff;
}

/* ===== 优化的模态框样式 ===== */
.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* 修复关闭按钮颜色 */
.modal-header {
  background: #455428;
  color: white;
  border: none;
  padding: 20px 25px;
  position: relative;
}

.modal-header .btn-close {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 0.5rem;
  opacity: 0.9;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.modal-header .btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

/* 确保X图标显示为白色 */
.modal-header .btn-close::before {
  content: "×";
  font-size: 1.8rem;
  line-height: 1;
  color: white;
  font-weight: 300;
}

.modal-header .btn-close:hover::before {
  color: white;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

/* 优化模态框布局 - 更适合正方形图片 */
.modal-body {
  background: #f8f9f8;
  padding: 0;
  min-height: 500px;
}

.product-modal-container {
  display: flex;
  min-height: 500px;
}

/* 左侧图片区域 - 减小宽度 */
.product-image-section {
  flex: 0 0 45%; /* 从50%减少到45% */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background: white;
}

/* 右侧信息区域 - 增加宽度 */
.product-info-section {
  flex: 1;
  padding: 30px 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 参数表格样式 */
.lp-modal-table {
  margin-bottom: 25px;
}

.lp-modal-table th {
  min-width: 80px;
  color: #314a2c;
  font-weight: 600;
  font-size: 1rem;
  background: transparent;
  border: none;
  padding: 12px 8px;
  width: 30%;
}

.lp-modal-table td {
  color: #38491a;
  font-size: 1rem;
  background: transparent;
  border: none;
  padding: 12px 8px;
  font-weight: 500;
}

.lp-modal-table tbody tr {
  border-bottom: 1px solid rgba(52, 74, 43, 0.1);
}

.lp-modal-table tbody tr:last-child {
  border-bottom: none;
}

/* 产品描述 */
.modal-product-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 25px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  border-left: 4px solid var(--accent-color, #ff7a2f);
}

/* 按钮容器 - 居中对齐 */
.modal-button-container {
  padding-top: 20px;
  border-top: 1px solid rgba(52, 74, 43, 0.1);
  text-align: center;  /* 🔥 新增：按钮居中 */
}

/* ===== 新增：轮播图相关样式 ===== */

/* 当前颜色名称样式 */
.current-color-name {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #455428;
  margin-bottom: 15px;
  padding: 8px 16px;
  background: rgba(69, 84, 40, 0.1);
  border-radius: 8px;
}

/* 🔥 优化主图片容器 - 设置合理宽度 */
.main-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  width: 90%;  /* 容器占90%，给按钮留空间 */
  max-width: 400px;  /* 桌面端最大宽度 */
}

/* 轮播导航按钮 */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-nav-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: -45px;  /* 移到图片外侧 */
}

.next-btn {
  right: -45px;  /* 移到图片外侧 */
}

/* 🔥 优化主图片样式 - 在容器内占满 */
.modal-product-image {
  width: 100%;
  max-width: 100%;  /* 在容器内占满 */
  height: auto;
  aspect-ratio: 1/1;
  object-fit: contain;
  border-radius: 12px;
  transition: opacity 0.3s ease;
}

/* 缩略图容器 */
.thumbnail-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 350px;
  margin: 0 auto;
}

/* 缩略图样式 */
.thumbnail-item {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  overflow: hidden;
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-item:hover {
  transform: scale(1.05);
  border-color: #ff7a2f;
}

.thumbnail-item.active {
  border-color: #ff7a2f;
  box-shadow: 0 0 0 2px rgba(255, 122, 47, 0.3);
}

/* 移动端响应式 */
@media (max-width: 991.98px) {
  .lp-product-card {
    min-height: 380px;
    padding: 1rem 0.7rem 0.7rem 0.7rem;
  }

  .lp-product-image-wrap {
    min-height: 110px;
    max-height: 130px;
  }

  .lp-products-title {
    font-size: 1.8rem;
  }

  /* 移动端模态框布局改为垂直 */
  .product-modal-container {
    flex-direction: column;
    min-height: auto;
  }

  .product-image-section {
    flex: none;
    padding: 20px;
  }

  .product-info-section {
    padding: 20px 25px 25px 25px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  /* 🔥 平板端容器调整 */
  .main-image-container {
    width: 85%;  /* 平板端85% */
    max-width: 350px;
  }

  /* 移动端轮播图调整 */
  .carousel-nav-btn {
    width: 35px;
    height: 35px;
  }
  
  .prev-btn {
    left: -45px;  /* 移动端稍微靠近一些 */
  }
  
  .next-btn {
    right: -45px;  /* 移动端稍微靠近一些 */
  }
  
  .thumbnail-item {
    width: 40px;
    height: 40px;
  }
  
  .current-color-name {
    font-size: 1rem;
    margin-bottom: 10px;
  }
}

@media (max-width: 575.98px) {
  .lp-product-card {
    min-height: 260px;
    padding: 0.6rem 0.2rem 0.2rem 0.2rem;
  }

  .lp-product-image-wrap {
    min-height: 140px;
    max-height: 180px;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .product-image-section {
    padding: 15px;
  }

  .product-info-section {
    padding: 15px 20px 20px 20px;
  }

  .modal-product-desc {
    font-size: 0.95rem;
    padding: 12px;
  }

  /* 🔥 手机端容器调整 - 减小宽度给按钮更多空间 */
  .main-image-container {
    width: 70%;  /* 减少到70%，给按钮更多空间 */
    max-width: 280px;
  }

  /* 小屏幕按钮调整 - 远离图片避免遮挡 */
  .carousel-nav-btn {
    width: 32px;
    height: 32px;
  }
  
  .prev-btn {
    left: -45px;  /* 增加到-45px，更远离图片 */
  }
  
  .next-btn {
    right: -45px;  /* 增加到-45px，更远离图片 */
  }
  
  .thumbnail-item {
    width: 35px;
    height: 35px;
  }
  
  .current-color-name {
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding: 6px 12px;
  }
}

/* 适配 PAD 屏幕 */
@media (min-width: 768px) and (max-width: 991.98px) {
  .lp-product-image-wrap {
    min-height: 180px;
    max-height: 220px;
  }
  
  /* 🔥 新增：PAD端模态框加宽 */
  .modal-dialog {
    max-width: 85%;  /* PAD端占85%宽度 */
  }
}

/* 超小屏幕处理 - 进一步优化按钮位置 */
@media (max-width: 400px) {
  .main-image-container {
    width: 65%;  /* 更小的容器宽度 */
    max-width: 250px;
  }
  
  .carousel-nav-btn {
    width: 30px;
    height: 30px;
  }
  
  .prev-btn {
    left: -40px;  /* 保持足够距离 */
  }
  
  .next-btn {
    right: -40px;  /* 保持足够距离 */
  }
}