/* css/products.css */
/* ============================================================
 * 祥成企業｜產品專區列表專用樣式（scss/_products.scss）
 * 輸出到 css/products.css
 * ============================================================ */

.designer-tpl-product-list.is-group-js .product-group {
  display: none;
}
.designer-tpl-product-list.is-group-js .product-group.is-active {
  display: block;
}
.designer-tpl-product-list .product-group {
  margin: 0 0 clamp(44px, 4.4vw, 80px);
  scroll-margin-top: 90px;
}
.designer-tpl-product-list .product-group:last-child {
  margin-bottom: 0;
}
.designer-tpl-product-list .product-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 1.8vw, 30px);
}
.product-list-card {
  border: 1px solid var(--BorderColorPrimary, #dde3e7);
  border-radius: var(--BorderRadius, 14px);
  background: var(--BgColorCard, #fff);
  padding: clamp(22px, 1.8vw, 30px);
  display: flex;
  flex-direction: column;
  transition: border-color var(--TransitionDefault, 0.3s ease), box-shadow var(--TransitionDefault, 0.3s ease);
}
.product-list-card .image-block {
  margin: 0 0 clamp(16px, 1.3vw, 20px);
  background: var(--ColorProductCardBg, #111a4c);
  border-radius: var(--BorderRadius, 14px);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.product-list-card .image-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-list-card .image-block.is-light {
  background: #fff;
  border: 1px solid var(--BorderColorPrimary, #dde3e7);
  padding: 10px;
}
.product-list-card .image-block.is-light img {
  object-fit: contain;
}
.product-list-card .image-block.is-fit {
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-list-card .image-block.is-fit img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-list-card h3 {
  color: var(--TextColorTitle, #0c415a);
  font-size: clamp(17px, 1.15vw, 21px);
  margin: 0;
  line-height: 1.35;
}
.product-list-card .card-description {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--TextColorSecondary, #56646c);
  line-height: 1.75;
}
.product-list-card .card-spec {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--BorderColorPrimary, #dde3e7);
  display: grid;
  gap: 8px;
  font-size: 15px;
  color: var(--TextColorSecondary, #56646c);
  margin-top: auto;
}
.product-list-card .card-spec div {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 10px;
}
.product-list-card .card-spec dt {
  color: var(--TextColorTitle, #0c415a);
  font-weight: 500;
}
@media (hover: hover) and (pointer: fine) {
.product-list-card:hover {
    border-color: var(--ColorAccent, #56bced);
    box-shadow: 0 10px 28px rgba(6, 31, 44, 0.1);
  }
.product-list-card:hover h3 {
    color: var(--ColorSecondary, #1e8cc4);
  }
.product-list-card:hover .image-block img {
    transform: scale(1.04);
  }
}
.product-list-card:is(:active, :focus-visible) {
  border-color: var(--ColorAccent, #56bced);
}
.empty-block {
  border: 1px dashed var(--BorderColorPrimary, #dde3e7);
  border-radius: var(--BorderRadius, 14px);
  padding: clamp(28px, 3vw, 54px);
  color: var(--TextColorSecondary, #56646c);
  background: var(--BgColorSoft, #f2f4f6);
}
.empty-block h3 {
  color: var(--TextColorTitle, #0c415a);
  margin-bottom: 10px;
}
@media (min-width: 1920px) {
.designer-tpl-product-list .product-list {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 1199px) {
.designer-tpl-product-list .product-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
.designer-tpl-product-list .product-list {
    grid-template-columns: 1fr;
  }
}
.product-card .image-block img,
.product-list-card .image-block img {
  filter: brightness(1.1) saturate(0.88);
}
.product-card .image-block img[src$="p-89.webp"],
.product-card .image-block img[src$="p-29.webp"],
.product-card .image-block img[src$="p-234.webp"],
.product-list-card .image-block img[src$="p-89.webp"],
.product-list-card .image-block img[src$="p-29.webp"],
.product-list-card .image-block img[src$="p-234.webp"] {
  filter: brightness(1.25) saturate(0.82);
}
.product-card .image-block img[src$="p-32.webp"],
.product-card .image-block img[src$="p-193.webp"],
.product-card .image-block img[src$="p-185.webp"],
.product-list-card .image-block img[src$="p-32.webp"],
.product-list-card .image-block img[src$="p-193.webp"],
.product-list-card .image-block img[src$="p-185.webp"] {
  filter: brightness(1.16) saturate(0.85);
}
.product-card .image-block.is-light img,
.product-list-card .image-block.is-light img {
  filter: none;
}
/* 規格、材質沒有值的那一列不顯示；兩列都沒有就整塊不顯示 */
.product-list-card .card-spec > div:not(:has(dd:not(:empty))) {
  display: none;
}
.product-list-card .card-spec:not(:has(dd:not(:empty))) {
  display: none;
}
.product-list-card .card-description:empty {
  display: none;
}