
/* 배경 이미지 */
.sub-visual-bg {
  position: absolute;
  inset: 0;
  background-image: url("/static/img/product.png");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.sub-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3); /* 숫자 올릴수록 더 어두움 */
  z-index: 1;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.product-card {
  text-decoration: none;
  color: #222;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
}


/* 이미지 */
.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f3f3f3;
  border-radius: 6px;
  overflow: hidden;
}
/* 초기 상태: 숨김 */
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  transform: scale(1);
  transition: opacity 0.4s ease, transform 0.3s ease;
}
/* 로드 완료 후 표시 */
.product-img img.loaded {
  opacity: 1;
}
/* hover 확대 (로드된 이미지에만 적용됨) */
.product-card:hover img.loaded {
  transform: scale(1.05);
}


/* 제품명 */
.product-name {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  color: #333;
  line-height: 1.4;
}


@media (max-width: 768px) {

  /* 서브 비주얼 */
  .sub-visual {
    height: 200px;
  }

  .sub-visual-content {
    padding: 0 16px;
  }

  .sub-visual-content h1 {
    font-size: 24px;
    margin-bottom: 16px;
  }

  /* ===== 제품 그리드 ===== */
  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* 2열 고정 */
    gap: 16px;
    margin-top: 24px;
  }

  /* 제품 카드 */
  .product-card {
    transform: none; /* 모바일 hover 무력화 */
  }

  /* 이미지 */
  .product-img {
    border-radius: 6px;
  }

  .product-img img {
    transition: opacity 0.3s ease; /* 확대 효과 제거 */
  }

  /* hover 확대 제거 (터치 환경) */
  .product-card:hover img.loaded {
    transform: none;
  }

  /* 제품명 */
  .product-name {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.3;
  }
}


