@charset "utf-8";

/* 새글 스킨 (latest) */
.pic_lt {
  position: relative;
  margin-bottom: 20px;
  background: #fff;
}
.pic_lt .lat_title {
  display: block;
  line-height: 45px;
  font-size: 1.2em;
  color: #253dbe;
}
.pic_lt .lat_title a {
  color: #000;
  display: inline-block;
  position: relative;
}

.pic_lt .lt_more {
  position: absolute;
  top: 11px;
  right: 10px;
  display: block;
  width: 25px;
  line-height: 25px;
  color: #aaa;
  border-radius: 3px;
  text-align: center;
}
.pic_lt .lt_more:hover {
  color: #777;
}
.pic_lt ul:after {
  display: block;
  visibility: hidden;
  clear: both;
  content: "";
}
.pic_lt ul {
  margin: 0 -10px;
}
.pic_lt li {
  float: left;
  width: 25%;
  padding: 0 10px;
}
.pic_lt li.galley_li:nth-child(4n + 1) {
  clear: both !important;
}
.pic_lt li .lt_img {
  margin: 5px 0;
  display: block;
}
.pic_lt li .lt_img img,
.pic_lt li .lt_img video {
  width: 100%;
  height: auto;
}
.pic_lt li a:hover {
  color: #a22121;
}
.pic_lt li .fa-heart {
  color: #ff0000;
}
.pic_lt li .fa-lock {
  display: inline-block;
  line-height: 14px;
  width: 16px;
  font-size: 0.833em;
  color: #4f818c;
  background: #cbe3e8;
  text-align: center;
  border-radius: 2px;
  font-size: 12px;
  border: 1px solid #cbe3e8;
  vertical-align: middle;
}
.pic_lt li .new_icon {
  display: inline-block;
  width: 16px;
  line-height: 16px;
  font-size: 0.833em;
  color: #23db79;
  background: #b9ffda;
  text-align: center;
  border-radius: 2px;
  margin-left: 2px;
  font-weight: bold;
  vertical-align: middle;
}
.pic_lt li .hot_icon {
  display: inline-block;
  width: 16px;
  line-height: 16px;
  font-size: 0.833em;
  color: #ff0000;
  background: #ffb9b9;
  text-align: center;
  border-radius: 2px;
  vertical-align: middle;
}
.pic_lt li .fa-caret-right {
  color: #bbb;
}
.pic_lt li .fa-download {
  display: inline-block;
  width: 16px;
  line-height: 16px;
  font-size: 0.833em;
  color: #daae37;
  background: #ffefb9;
  text-align: center;
  border-radius: 2px;
  vertical-align: middle;
}
.pic_lt li .fa-link {
  display: inline-block;
  width: 16px;
  line-height: 16px;
  font-size: 0.833em;
  color: #b451fd;
  background: #edd3fd;
  text-align: center;
  border-radius: 2px;
  vertical-align: middle;
}

.pic_lt .profile_img img {
  border-radius: 50%;
}

.lt_info {
  padding: 10px 0;
}
.lt_info .lt_nick {
}
.lt_info .lt_date {
  color: #888;
}

.pic_lt .empty_li {
  line-height: 145px;
  color: #666;
  text-align: center;
  padding: 0;
}
.pic_lt .empty_li:before {
  background: none;
  padding: 0;
}

.pic_lt .lt_cmt {
  background: #e9eff5;
  color: #3a8afd;
  font-size: 11px;
  height: 16px;
  line-height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  vertical-align: middle;
}
.pic_lt .lt_more {
  position: absolute;
  top: 11px;
  right: 0;
  display: block;
  width: 40px;
  line-height: 25px;
  color: #3a8afd;
  border-radius: 3px;
  text-align: center;
}
.pic_lt .lt_more:hover {
  color: #777;
}

/* 제품 카드 링크 스타일 */
.product-card {
  text-decoration: none !important;
  color: inherit !important;
  display: block !important;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.product-card:hover {
  text-decoration: none !important;
  color: inherit !important;
  transform: translateY(-2px);
}

.product-card:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* 제품 카드 내부 요소들 */
.product-card img {
  transition: transform 0.3s ease;
  /* 이미지 로딩 실패 방지 */
  min-height: 200px;
  background-color: #f3f4f6;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiBmaWxsPSIjRjNGNEY2Ii8+CjxwYXRoIGQ9Ik0yMCAyNkMyMy4zMTM3IDI2IDI2IDIzLjMxMzcgMjYgMjBDMjYgMTYuNjg2MyAyMy4zMTM3IDE0IDIwIDE0QzE2LjY4NjMgMTQgMTQgMTYuNjg2MyAxNCAyMEMxNCAyMy4zMTM3IDE2LjY4NjMgMjYgMjAgMjZaIiBmaWxsPSIjRDNEQ0YxIi8+CjxwYXRoIGQ9Ik0yMCAyNkMyMy4zMTM3IDI2IDI2IDIzLjMxMzcgMjYgMjBDMjYgMTYuNjg2MyAyMy4zMTM3IDE0IDIwIDE0QzE2LjY4NjMgMTQgMTQgMTYuNjg2MyAxNCAyMEMxNCAyMy4zMTM3IDE2LjY4NjMgMjYgMjAgMjZaIiBmaWxsPSIjRjNGNEY2Ii8+Cjwvc3ZnPgo=");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px;
}

.product-card:hover img {
  transform: scale(1.05);
}

/* 이미지 로딩 실패 시 스타일 */
.product-card img[src*="no_img.png"] {
  background-color: #f3f4f6;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiBmaWxsPSIjRjNGNEY2Ii8+CjxwYXRoIGQ9Ik0yMCAyNkMyMy4zMTM3IDI2IDI2IDIzLjMxMzcgMjYgMjBDMjYgMTYuNjg2MyAyMy4zMTM3IDE0IDIwIDE0QzE2LjY4NjMgMTQgMTQgMTYuNjg2MyAxNCAyMEMxNCAyMy4zMTM3IDE2LjY4NjMgMjYgMjAgMjZaIiBmaWxsPSIjRDNEQ0YxIi8+CjxwYXRoIGQ9Ik0yMCAyNkMyMy4zMTM3IDI2IDI2IDIzLjMxMzcgMjYgMjBDMjYgMTYuNjg2MyAyMy4zMTM3IDE0IDIwIDE0QzE2LjY4NjMgMTQgMTQgMTYuNjg2MyAxNCAyMEMxNCAyMy4zMTM3IDE2LjY4NjMgMjYgMjAgMjZaIiBmaWxsPSIjRjNGNEY2Ii8+Cjwvc3ZnPgo=");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px;
}

/* 텍스트 색상 유지 */
.product-card .text-black {
  color: #000 !important;
}

.product-card .text-gray-600 {
  color: #6b7280 !important;
}

.product-card:hover .text-black {
  color: #374151 !important;
}

.product-card:hover .text-gray-600 {
  color: #4b5563 !important;
}

/* 그리드 컨테이너 높이 조정 */
#product-grid {
  min-height: auto !important;
  height: auto !important;
  display: grid !important;
  /* 고정된 3열 그리드로 설정하여 너비 일관성 유지 */
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
  /* 제품이 적을 때도 그리드 영역을 균등하게 분배 */
  justify-items: stretch !important;
}

/* 제품 카드 높이 조정 */
.product-card {
  height: auto !important;
  min-height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  /* 그리드 셀 내에서 전체 너비 사용 */
  width: 100% !important;
}

/* 반응형 그리드 설정 */
@media (max-width: 1024px) {
  #product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  #product-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 더보기 버튼과 그리드 간격 조정 */
.lt_more {
  margin-top: 2rem !important;
}

/* 숨겨진 제품 카드 스타일 */
.more-product {
  display: none !important;
}

/* 더보기 버튼이 클릭된 후 숨겨진 제품들이 보이도록 */
.more-product.show {
  display: flex !important;
}

/* 이미지 로딩 상태 표시 */
.product-card img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card img.loaded {
  opacity: 1;
}

/* 이미지 로딩 실패 시 대체 텍스트 */
.product-card img::after {
  content: "이미지를 불러올 수 없습니다";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border-radius: 4px;
  display: none;
}

.product-card img[src*="no_img.png"]::after {
  display: block;
}

/* 반응형 이미지 처리 */
@media (max-width: 768px) {
  .product-card img {
    min-height: 150px;
    background-size: 30px;
  }
}

@media (max-width: 480px) {
  .product-card img {
    min-height: 120px;
    background-size: 25px;
  }
}
