/* SEO Agent - 핫딜 표시 템플릿 전용 스타일. 다른 카테고리/evergreen 글
   페이지에는 이 파일이 로드되지 않는다(hotdeal-router.php 조건부 enqueue). */

.hotdeal-page,
.hotdeal-single,
.hotdeal-comments {
  --hd-bg: #0f1115;
  --hd-card: #1a1d24;
  --hd-card-border: #2a2e38;
  --hd-text: #f2f3f5;
  --hd-text-dim: #9aa0ac;
  --hd-accent: #ffd43b;
  --hd-danger: #ff6b6b;
  color: var(--hd-text);
}

.hotdeal-page { background: var(--hd-bg); padding: 32px 16px 64px; }

.hotdeal-hero { text-align: center; margin-bottom: 28px; }
.hotdeal-hero-title { font-size: 2rem; margin: 0 0 6px; }
.hotdeal-hero-sub { color: var(--hd-text-dim); font-size: 0.9rem; margin: 0; }

.hotdeal-empty { text-align: center; color: var(--hd-text-dim); padding: 48px 0; }

.hotdeal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.hotdeal-card {
  position: relative;
  background: var(--hd-card);
  border: 1px solid var(--hd-card-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}
.hotdeal-card:hover { transform: translateY(-4px); }

.hotdeal-card.is-new {
  border-color: var(--hd-accent);
  animation: hotdeal-gold-pulse 1.8s ease-in-out infinite;
}
@keyframes hotdeal-gold-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--hd-accent), 0 0 12px rgba(255, 212, 59, 0.25); }
  50% { box-shadow: 0 0 0 1px var(--hd-accent), 0 0 22px rgba(255, 212, 59, 0.55); }
}

.hotdeal-tag-new {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: var(--hd-accent);
  color: #1a1500;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.hotdeal-ribbon {
  position: absolute;
  top: 14px;
  right: -34px;
  z-index: 3;
  background: var(--hd-danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 40px;
  transform: rotate(35deg);
  animation: hotdeal-ribbon-shake 2.4s ease-in-out infinite;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
@keyframes hotdeal-ribbon-shake {
  0%, 92%, 100% { transform: rotate(35deg); }
  94% { transform: rotate(31deg); }
  96% { transform: rotate(39deg); }
  98% { transform: rotate(33deg); }
}

.hotdeal-sparkle {
  position: absolute;
  z-index: 3;
  font-size: 0.9rem;
  animation: hotdeal-twinkle 1.6s ease-in-out infinite;
}
.hotdeal-sparkle.s1 { top: 8px; left: 8px; animation-delay: 0s; }
.hotdeal-sparkle.s2 { top: 40%; right: 10px; animation-delay: 0.4s; }
.hotdeal-sparkle.s3 { bottom: 46%; left: 14px; animation-delay: 0.8s; }
@keyframes hotdeal-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

.hotdeal-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #22262f;
}
.hotdeal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hotdeal-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.hotdeal-emoji-lg { font-size: 5rem; }

.palette-0 { background: linear-gradient(135deg, #ff6b6b, #f06595); }
.palette-1 { background: linear-gradient(135deg, #4dabf7, #3b5bdb); }
.palette-2 { background: linear-gradient(135deg, #63e6be, #12b886); }
.palette-3 { background: linear-gradient(135deg, #ffd43b, #f76707); }
.palette-4 { background: linear-gradient(135deg, #da77f2, #9c36b5); }
.palette-5 { background: linear-gradient(135deg, #74c0fc, #1971c2); }

.hotdeal-shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: hotdeal-shine-sweep 3.2s ease-in-out infinite;
}
@keyframes hotdeal-shine-sweep {
  0% { left: -60%; }
  50%, 100% { left: 130%; }
}

.hotdeal-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.hotdeal-name {
  color: var(--hd-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hotdeal-name:hover { text-decoration: underline; }

.hotdeal-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hotdeal-orig { color: var(--hd-text-dim); text-decoration: line-through; font-size: 0.82rem; }

.hotdeal-sale-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 107, 107, 0.12);
  border-radius: 10px;
  padding: 4px 10px;
}
.hotdeal-sale-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ff8787;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.55);
}

.hotdeal-badge {
  background: var(--hd-danger);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 999px;
  animation: hotdeal-badge-bounce 1.4s ease-in-out infinite;
}
@keyframes hotdeal-badge-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.hotdeal-pagination { text-align: center; margin-top: 32px; }
.hotdeal-pagination a, .hotdeal-pagination span {
  color: var(--hd-text);
  margin: 0 4px;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
}
.hotdeal-pagination .current { background: var(--hd-accent); color: #1a1500; }

/* 모바일: 그리드 대신 가로 스크롤 캐러셀 */
@media (max-width: 640px) {
  .hotdeal-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .hotdeal-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
  .hotdeal-hero-title { font-size: 1.5rem; }
}

/* 단일 딜 상세 페이지 */
.hotdeal-single {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 8px;
}
.hotdeal-single-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #22262f;
  margin-bottom: 16px;
}
.hotdeal-single-media img { width: 100%; height: 100%; object-fit: cover; }
.hotdeal-single-title { font-size: 1.4rem; margin: 0 0 12px; }
.hotdeal-single-content { margin-top: 18px; line-height: 1.7; color: var(--hd-text); }
.hotdeal-single-content a.wp-block-button__link {
  display: inline-block;
  background: var(--hd-accent);
  color: #1a1500;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
}

/* 준실시간 댓글 */
.hotdeal-comments {
  max-width: 720px;
  margin: 32px auto 64px;
  padding: 0 16px;
}
.hotdeal-comments-title { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.hotdeal-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #51cf66;
  display: inline-block;
  animation: hotdeal-live-pulse 1.6s ease-in-out infinite;
}
@keyframes hotdeal-live-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.hotdeal-comment-list {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--hd-card-border);
  border-radius: 12px;
  background: var(--hd-card);
}
.hotdeal-comment {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hd-card-border);
}
.hotdeal-comment:last-child { border-bottom: none; }
.hotdeal-comment-author { font-weight: 700; margin-right: 8px; font-size: 0.85rem; }
.hotdeal-comment-date { color: var(--hd-text-dim); font-size: 0.75rem; }
.hotdeal-comment-text { margin: 4px 0 0; font-size: 0.88rem; line-height: 1.5; }
.hotdeal-comment-fresh { animation: hotdeal-comment-fade-in 0.4s ease-out; }
@keyframes hotdeal-comment-fade-in {
  from { background: rgba(255, 212, 59, 0.18); }
  to { background: transparent; }
}
.hotdeal-comments-empty { color: var(--hd-text-dim); font-size: 0.85rem; }
