/* 产品详情区域 */
  :root {
      --primary: #2563eb;
      --primary-dark: #007a2f;
      --secondary: #f8f9fa;
      --dark: #333;
      --light: #fff;
      --gray: #6c757d;
      --border: #dee2e6;
      --shadow: 0 5px 15px rgba(0,0,0,0.08);
    }
    .product-detail {
      padding: 10px;
      margin-bottom: 20px;
    }
    
    .product-gallery {
      float: left;
      width: 50%;
    }
    
    .main-image {
      width: 100%;
      height: 500px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 10px;
      overflow: hidden;
      border:1px solid #000;
      border-radius: 5px;
    }
    
    .main-image img {
      max-width: 95%;
      max-height: 95%;
      object-fit: contain;
    }
    
    .thumbnail-container {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
    }
    
    .thumbnail {
      height: 80px;
      background: #f8f9fa;
      border-radius: 5px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      border: 2px solid transparent;
      transition: all 0.3s;
    }
    
    .thumbnail img {
      max-width: 80%;
      max-height: 80%;
      object-fit: contain;
    }
    
    .thumbnail.active, .thumbnail:hover {
      border-color: var(--primary);
    }
    
    .product-info {
      float: left;
      width: 25%;
      padding: 0px 5px;
    }
    
    .product-title {
      font-size: 2rem;
      color: var(--dark);
      padding: 0px 0px 5px 10px;
    }
    .specs-grid{
      border:1px solid #999;
      border-radius: 5px;
      padding: 5px 10px;
    }
    .specs-grid h2{
      font-size: 14px;
      font-weight: 500;
      padding: 5px 0px;
     
    }
    
    .spec-item{
      border-bottom: 1px solid #f0f0f0;
    }
    
    .spec-title {
      display: inline;
      font-size: 12px;
      color: var(--dark);
    }
    
    .spec-value {
      display: inline;
      font-size: 12px;
      color: var(--gray);
    }
    
    
    
    .action-buttons {
      float: left;
      width: 25%;
      border:1px solid #999;
      border-radius: 10px;
      padding: 10px;
    }
    .action-buttons .form-group{
      width: 100%;
      padding: 5px 0px;
    }

    .action-buttons .form-group .form-label{
      display: block;
      font-size: 14px;
      font-weight: 400;
      line-height: 1.6rem;
    }

    .action-buttons .form-group input{
      height: 40px;
      padding: 5px;
      width: 100%;
      border-radius: 10px;
      border: 1px solid #f2f2f2;
    }
    
    .action-buttons .form-group textarea{
      border-radius: 10px;
      border: 1px solid #f2f2f2;
    }
    
    .action-buttons .form-group input:focus,textarea:focus{
        outline: none;
        border: 1px solid #F66;
    }

    .action-buttons .form-group textarea{
      width: 100%;
      min-height: 60px;
      border-radius: 5px;
    }
    
    .action-buttons button{
      width: 100%;
      height: 50px;
      cursor: pointer;
      margin: 10px 0px;
      border-radius: 10px;
      border: 1px solid #f2f2f2;
      background-color: #1a5f3f;
      color: #fff;
    }
    
    .action-buttons button:hover{
      background-color:#008532
    }
    

    .toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* 完全居中 */
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

/* Toast 样式 */
.toast {
  min-width: 250px;
  padding: 14px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInUp 0.4s forwards;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  text-align: center;
}

/* 成功/错误颜色 */
.toast-success { background-color: #28a745; }
.toast-error   { background-color: #dc3545; }

/* 动画 */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

    

     /* 规格标签 */
    .spec-tabs {
      margin-bottom: 40px;
      background: var(--light);
      border-radius: 10px;
      box-shadow: var(--shadow);
      padding: 20px;
    }
    
    .tabs {
      display: flex;
      border-bottom: 1px solid var(--border);
      margin-bottom: 20px;
      flex-wrap: wrap;
    }
    
    .tab {
      padding: 12px 25px;
      cursor: pointer;
      font-weight: 500;
      border-bottom: 3px solid transparent;
      transition: all 0.3s;
      white-space: nowrap;
    }
    
    .tab.active {
      border-bottom: 3px solid var(--primary);
      color: var(--primary);
    }
    
    .tab-content {
      display: none;
      padding: 10px 0;
    }
    
    .tab-content.active {
      display: block;
    }
    
    .spec-table {
      width: 100%;
      border-collapse: collapse;
    }
    
    .spec-table th,
    .spec-table td {
      padding: 12px 15px;
      text-align: left;
      border-bottom: 1px solid var(--border);
    }
    
    .spec-table th {
      background-color: #f8f9fa;
      font-weight: 600;
    }
    
    .spec-table tr:last-child td {
      border-bottom: none;
    }
    /* 推荐产品 */
    .related-products {
      margin-bottom: 60px;
    }
    
    .section-title {
      font-size: 1.8rem;
      margin-bottom: 25px;
      position: relative;
      padding-bottom: 10px;
    }
    
    .section-title::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 60px;
      height: 3px;
      background: var(--primary);
    }
    
    .products-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 25px;
    }
    
    .product-card {
      background: var(--light);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 3px 10px rgba(0,0,0,0.08);
      transition: transform 0.3s, box-shadow 0.3s;
    }
    
    .product-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    
    .product-image {
      height: 100px;
      background-color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 5px;
      border-bottom: 1px solid #333;
    }
    
    .product-image img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }
    
    .product-info-card {
      padding: 20px;
      background-color: #f2f2f2;
    }
    
    .product-name {
      font-weight: 500;
      margin-bottom: 8px;
      color: var(--dark);
      font-size: 0.8rem;
      text-align: center;
    }

    .view-btn {
      display: block;
      text-align: center;
      background: var(--primary);
      color: var(--light);
      padding: 10px;
      border-radius: 4px;
      text-decoration: none;
      font-weight: 500;
      transition: background 0.3s;
    }
    
    .view-btn:hover {
      background-color: #1d4ed8;
    }

    /* 响应式设计 */
    @media (max-width: 1100px) {
      .products-grid {
        grid-template-columns: repeat(3, 1fr);
      }
      
      .specs-grid {
        grid-template-columns: 1fr;
      }
    }
    
    @media (max-width: 900px) {
      .product-gallery, .product-info, .action-buttons {
        min-width: 100%;
      }
      .product-gallery{
          padding-bottom: 10px;
      }
      .product-info{
          margin-top:10px;
      }
      .thumbnail img {
          max-width: 50%;
          max-height: 50%;
        }
      
      .product-gallery {
        border-right: none;
        border-bottom: 1px solid var(--border);
      }

      .action-buttons {
        margin: 10px 0px;
      }
    }
    
    @media (max-width: 768px) {
      .products-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      .tabs {
        overflow-x: auto;
        padding-bottom: 10px;
      }
    }
    
    @media (max-width: 576px) {
      .products-grid {
        grid-template-columns: 1fr;
      }
      
      .action-buttons {
        flex-direction: column;
      }
      
      .btn {
        width: 100%;
        min-width: auto;
      }
      
      .thumbnail-container {
        grid-template-columns: repeat(3, 1fr);
      }
      
      .main-image {
        height: 300px;
      }
      
    }
    
    .product-info .price{
        padding: 5px 0px;
        font-size: 16px;
    }
    .product-info .price-value{
        color: #009e3c;
    }

    .add-to-cart {
  width: 100%;
  height: 35px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: #fff;
  background-color: #1a5f3f;
  border-radius: 25px;
  border: 1px solid #fff;
  outline: none;
  transition: background-color 0.2s ease;
}

/* 鼠标移上去 */
.add-to-cart:hover {
  background-color: #2563eb; /* 保持不变 */
}

/* 点击时 */
.add-to-cart:active {
  background-color: #2563eb;
}

/* 获取焦点（防止出现淡蓝色） */
.add-to-cart:focus {
  background-color: #2563eb;
  outline: none;
}

.add-to-cart[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.add-to-cart.loading::after {
  content: '...';
  margin-left: 6px;
}

.inline-msg {
  text-align: center;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.inline-msg.success {
  color: #2563eb;
}

.inline-msg.error {
  color: #d93025;
}