/**
 * lists_images.htm — lazy-load placeholders, gallery layout, product cards, category intro, FAQ.
 */

.lazy-image {
  opacity: 0;
  transition: opacity 0.3s ease;
  background-color: #f5f5f5;
}

.lazy-image.loaded {
  opacity: 1;
}

.sigma_product-thumb,
.category-intro-image,
.recent-post-image {
  position: relative;
  overflow: hidden;
}

/* 仅分类导语 / 侧栏缩略图拉满宽；产品列表 .sigma_product-thumb 若设 width:100% 会拉高主图并被 overflow 裁切 */
.category-intro-image img,
.recent-post-image img {
  display: block;
  width: 100%;
  height: auto;
}

.image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: aoxiang-lists-images-loading 1.5s infinite;
  z-index: 1;
}

@keyframes aoxiang-lists-images-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sigma_product-thumb .image-placeholder,
.recent-post-image .image-placeholder {
  min-height: 200px;
}

.category-intro-image .image-placeholder {
  min-height: 250px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .sigma_product-thumb .image-placeholder,
  .recent-post-image .image-placeholder {
    min-height: 120px;
  }

  .category-intro-image .image-placeholder {
    min-height: 180px;
  }

  .section > .container,
  .sigma_subheader > .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .sidebar {
    margin-top: 20px;
  }
  .sidebar .widget {
    padding: 14px !important;
    border-radius: 12px;
  }

  .widget.widget-categories ul {
    margin: 0;
    padding-left: 0;
  }
  .widget.widget-categories li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  .widget.widget-categories li:last-child {
    border-bottom: 0;
  }

  .sidebar .widget input,
  .sidebar .widget select,
  .sidebar .widget textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* --- product cards, intro, FAQ --- */

.product-card-simple {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #fff;
  margin-bottom: 20px;
}

.product-card-simple .sigma_product-thumb {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 150px;
}

/* 占满图区高度，img 的 max-height:100% 才有参照，避免圆图被裁切 */
.product-card-simple .sigma_product-thumb > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  align-self: stretch;
  box-sizing: border-box;
}

.product-card-simple .sigma_product-thumb img {
  display: block;
  max-width: 100% !important;
  max-height: 180px;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  transition: transform 0.2s ease;
}

.product-card-simple .sigma_product-thumb:hover img {
  transform: scale(1.02);
}

.product-card-simple .sigma_product-body {
  padding: 12px;
  text-align: center;
}

.product-card-simple .sigma_product-title {
  margin: 0;
}

.product-card-simple .sigma_product-title a {
  color: #333;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-simple .sigma_product-title a:hover {
  color: var(--thm-base);
}

.category-intro {
  margin: 60px 0;
  background: #f8f9fa;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.category-intro-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.category-intro-image {
  flex: 0 0 300px;
  position: relative;
  min-height: 250px;
}

.category-intro-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-intro-text {
  flex: 1;
}

.category-intro-title {
  color: #333;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
}

.category-intro-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--thm-base);
  border-radius: 2px;
}

.category-intro-description {
  color: #666;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 25px;
}

.category-intro-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-intro-features li {
  color: #555;
  font-size: 15px;
  margin-bottom: 12px;
  padding-left: 25px;
  position: relative;
}

.category-intro-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--thm-base);
  font-weight: bold;
  font-size: 16px;
}

.category-faq {
  margin: 60px 0;
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.faq-title {
  color: #333;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

.faq-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--thm-base);
  border-radius: 2px;
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid #e9ecef;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--thm-base);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.faq-question {
  padding: 16px 20px;
  background: #f8f9fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: #e9ecef;
}

.faq-question-text {
  color: #333;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.faq-toggle {
  color: var(--thm-base);
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  will-change: max-height, opacity;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.faq-item.active .faq-answer {
  padding: 16px 20px;
  opacity: 1;
}

.faq-answer p {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .category-intro-content {
    flex-direction: column;
    gap: 30px;
  }

  .category-intro-image {
    flex: none;
    width: 100%;
    min-height: 180px;
  }

  .category-intro {
    padding: 30px 20px;
    margin: 40px 0;
  }

  .category-faq {
    padding: 30px 20px;
    margin: 40px 0;
  }

  .category-intro-title {
    font-size: 24px;
  }

  .faq-title {
    font-size: 22px;
  }

  .product-card-simple .sigma_product-thumb {
    min-height: 120px;
  }

  .product-card-simple .sigma_product-thumb img {
    max-width: 100% !important;
    max-height: 150px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .product-card-simple .sigma_product-body {
    padding: 12px;
  }

  .product-card-simple .sigma_product-title a {
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .product-card-simple .sigma_product-thumb {
    min-height: 100px;
  }

  .product-card-simple .sigma_product-thumb img {
    max-width: 100% !important;
    max-height: 120px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .product-card-simple .sigma_product-body {
    padding: 10px;
  }

  .product-card-simple .sigma_product-title a {
    font-size: 12px;
  }
}

/* 产品栅格：列与列、行与行留出空隙（与下方 PC 规则叠加；PC 再加大横向 padding） */
@media (max-width: 991px) {
  .section .col-lg-8 > .row {
    row-gap: 10px;
  }

  .section .col-lg-8 > .row > [class*="col-"] > .product-card-simple {
    margin-bottom: 0 !important;
  }
}

/* PC：产品卡片统一尺寸 + 栅格间距 + 图区内边距（完整显示、少裁切） */
@media (min-width: 992px) {
  .section .col-lg-8 > .row {
    row-gap: 10px;
  }

  .section .col-lg-8 > .row > [class*="col-"] > .product-card-simple {
    margin-bottom: 0 !important;
  }

  .section .col-lg-8 > .row > [class*="col-"] {
    display: flex;
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-top: 6px;
    padding-bottom: 6px;
    align-items: flex-start;
  }

  .section .col-lg-8 .row > [class*="col-"] > .product-card-simple {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    align-self: flex-start;
    margin-bottom: 0 !important;
  }

  .section .col-lg-8 .row > [class*="col-"] > .product-card-simple .sigma_product-thumb {
    width: 100%;
    height: 280px;
    min-height: 280px;
    max-height: 280px;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 8px 10px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
  }

  .section .col-lg-8 .row > [class*="col-"] > .product-card-simple .sigma_product-thumb .image-placeholder {
    min-height: 100%;
  }

  .section .col-lg-8 .row > [class*="col-"] > .product-card-simple .sigma_product-thumb img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    /* 固定图区高度内可显示的最大高度（避免 max-height:100% 在部分环境下不生效） */
    max-height: 264px !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .section .col-lg-8 .row > [class*="col-"] > .product-card-simple .sigma_product-thumb:hover img {
    transform: scale(1.01);
  }

  /* 标题区：勿 flex-grow，否则整行等高时会把标题条撑得很高 */
  .section .col-lg-8 .row > [class*="col-"] > .product-card-simple .sigma_product-body {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 6px 10px;
  }
}
