/* ================================================
   DEAL DETAIL PAGE
   ================================================ */

.deal-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

/* 브레드크럼 */
.deal-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    margin-bottom: 1.25rem;
    color: var(--color-muted, #6b7280);
}
.deal-back-link,
.deal-breadcrumb-cat {
    color: var(--color-primary, #f97316);
    text-decoration: none;
}
.deal-back-link:hover,
.deal-breadcrumb-cat:hover { text-decoration: underline; }
.deal-breadcrumb-sep { color: var(--color-muted, #9ca3af); }

/* 메인 딜 카드 */
.deal-card {
    display: flex;
    gap: 1.5rem;
    background: var(--color-card-bg, #fff);
    border-radius: 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
    padding: 1.5rem;
    margin-bottom: .85rem;
}
@media (max-width: 600px) {
    .deal-card { flex-direction: column; }
}

/* 썸네일 */
.deal-thumbnail-wrap {
    flex-shrink: 0;
    width: 220px;
}
@media (max-width: 600px) {
    .deal-thumbnail-wrap { width: 100%; }
}
.deal-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: .75rem;
    background: var(--color-card-bg-alt, #f9fafb);
}

/* 정보 패널 */
.deal-info { flex: 1; min-width: 0; }

.deal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .75rem;
}
.deal-badges span {
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 999px;
}
.badge-new     { background: #dbeafe; color: #1d4ed8; }
.badge-hot     { background: #fee2e2; color: #b91c1c; }
.badge-ship    { background: #d1fae5; color: #065f46; }
.badge-channel { background: var(--color-badge-ch-bg, #f3f4f6); color: var(--color-badge-ch, #374151); }

.deal-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 .85rem;
    color: var(--color-text, #111827);
    word-break: break-all;
}

/* 가격 */
.deal-price-area {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.deal-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-price, #f97316);
}
.deal-original-price {
    font-size: .9rem;
    color: var(--color-muted, #9ca3af);
    text-decoration: line-through;
}
.deal-discount-rate {
    font-size: .85rem;
    font-weight: 700;
    color: #ef4444;
    background: #fee2e2;
    padding: .1rem .4rem;
    border-radius: .35rem;
}

/* 메타 목록 */
.deal-meta-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.deal-meta-label {
    display: inline-block;
    min-width: 4.5rem;
    font-size: .8rem;
    color: var(--color-muted, #6b7280);
    font-weight: 500;
}
.deal-meta-value {
    font-size: .85rem;
    color: var(--color-text, #374151);
}

/* CTA 버튼 */
.deal-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary, #f97316);
    border: none;
    border-radius: .75rem;
    cursor: pointer;
    transition: background .15s, transform .1s;
    width: 100%;
    justify-content: center;
}
.deal-cta-btn:hover  { background: #ea6c0a; }
.deal-cta-btn:active { transform: scale(.97); }

/* 섹션 공통 */
.deal-section {
    background: var(--color-card-bg, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: .75rem;
}
.deal-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text, #111827);
    margin: 0 0 1rem;
}

/* AI 요약 */
.deal-summary-text {
    font-size: .9rem;
    line-height: 1.8;
    color: var(--color-text-muted, #4b5563);
    margin: 0;
}

/* 반응 버튼 */
.deal-reactions {
    display: flex;
    gap: .75rem;
    margin-bottom: .75rem;
}
.reaction-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem 1rem;
    border: 2px solid var(--color-border, #e5e7eb);
    border-radius: .75rem;
    background: var(--color-card-bg, #fff);
    cursor: pointer;
    font-size: .9rem;
    color: var(--color-text, #374151);
    font-weight: 600;
    transition: border-color .15s, background .15s, color .15s;
}
.reaction-btn.active {
    border-color: var(--color-primary, #f97316);
    background: #fff7ed;
    color: var(--color-primary, #f97316);
}
.reaction-btn:hover:not(.active) { border-color: #d1d5db; }
.reaction-count {
    font-size: .85rem;
    font-weight: 700;
    min-width: 1.2rem;
    text-align: center;
}

/* AdSense 래퍼 */
.deal-adsense-wrap {
    margin-bottom: .75rem;
    overflow: hidden;
    border-radius: .5rem;
}

/* 댓글 섹션 */
.comment-count-label {
    font-size: .9rem;
    color: var(--color-muted, #6b7280);
    font-weight: 500;
    margin-left: .25rem;
}
.comment-form-wrap { margin-bottom: 1.25rem; }
.comment-form-row {
    display: flex;
    gap: .5rem;
    margin-bottom: .5rem;
}
.comment-input {
    height: 2.4rem;
    padding: 0 .75rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: .5rem;
    font-size: .875rem;
    background: var(--color-input-bg, #fff);
    color: var(--color-text, #111827);
    outline: none;
    transition: border-color .15s;
}
.comment-input:focus { border-color: var(--color-primary, #f97316); }
.comment-input-nick { width: 130px; flex-shrink: 0; }
.comment-textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: .5rem;
    font-size: .875rem;
    resize: vertical;
    background: var(--color-input-bg, #fff);
    color: var(--color-text, #111827);
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}
.comment-textarea:focus { border-color: var(--color-primary, #f97316); }
.comment-submit-btn {
    flex-shrink: 0;
    padding: 0 1.1rem;
    height: 2.4rem;
    background: var(--color-primary, #f97316);
    color: #fff;
    border: none;
    border-radius: .5rem;
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.comment-submit-btn:hover { background: #ea6c0a; }

/* 댓글 목록 */
.comment-list { display: flex; flex-direction: column; gap: .75rem; }
.comment-empty { font-size: .875rem; color: var(--color-muted, #9ca3af); text-align: center; padding: 1rem 0; }
.comment-item {
    padding: .85rem 1rem;
    background: var(--color-card-bg-alt, #f9fafb);
    border-radius: .6rem;
    border: 1px solid var(--color-border, #f3f4f6);
}
.comment-item--new { border-color: var(--color-primary, #f97316); }
.comment-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .4rem;
}
.comment-nick  { font-size: .82rem; font-weight: 700; color: var(--color-text, #374151); }
.comment-time  { font-size: .78rem; color: var(--color-muted, #9ca3af); }
.comment-body  { font-size: .875rem; line-height: 1.6; color: var(--color-text, #374151); margin: 0; word-break: break-all; }

/* 유사 상품 그리드 */
.deal-similar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .75rem;
}
@media (max-width: 700px) { .deal-similar-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .deal-similar-grid { grid-template-columns: repeat(2, 1fr); } }

.similar-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: .75rem;
    overflow: hidden;
    background: var(--color-card-bg, #fff);
    transition: box-shadow .15s, transform .1s;
}
.similar-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px); }
.similar-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: var(--color-card-bg-alt, #f9fafb);
}
.similar-card-body { padding: .5rem .6rem .65rem; }
.similar-card-title {
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-text, #374151);
    margin: 0 0 .3rem;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.similar-card-price {
    font-size: .85rem;
    font-weight: 700;
    color: var(--color-price, #f97316);
    margin: 0 0 .2rem;
}
.similar-card-time { font-size: .72rem; color: var(--color-muted, #9ca3af); }

/* 로그인 프롬프트 */
.comment-login-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    background: var(--color-card-bg-alt, #f9fafb);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: .6rem;
    margin-bottom: 1.25rem;
    font-size: .875rem;
    color: var(--color-muted, #6b7280);
}
.comment-login-btn {
    padding: .35rem .9rem;
    background: var(--color-primary, #f97316);
    color: #fff;
    border-radius: .5rem;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* 댓글 폼 하단 */
.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .45rem;
}
.comment-form-user { font-size: .78rem; color: var(--color-muted, #9ca3af); }

/* 삭제 버튼 */
.comment-del-btn {
    margin-left: auto;
    font-size: .75rem;
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.comment-del-btn:hover { text-decoration: underline; }

/* 대댓글 목록 */
.reply-list {
    margin-top: .6rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.comment-item.is-reply {
    background: var(--color-card-bg, #fff);
    border: 1px solid var(--color-border, #f3f4f6);
    border-left: 3px solid var(--color-primary, #f97316);
    margin-left: 1.25rem;
    padding: .65rem .85rem;
}
.comment-reply-icon { font-size: .8rem; color: var(--color-primary, #f97316); margin-right: .25rem; }

/* 답글 버튼 */
.reply-actions { margin-top: .5rem; }
.reply-toggle-btn {
    font-size: .78rem;
    color: var(--color-muted, #6b7280);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.reply-toggle-btn:hover { color: var(--color-primary, #f97316); }

/* 답글 폼 */
.reply-form-wrap { margin-top: .5rem; }
.reply-textarea { font-size: .82rem; }

/* 다크모드 보정 */
.dark-mode .deal-card,
.dark-mode .deal-section { background: var(--color-card-bg, #1f2937); border-color: var(--color-border, #374151); }
.dark-mode .comment-item { background: var(--color-card-bg-alt, #111827); border-color: var(--color-border, #374151); }
.dark-mode .comment-input,
.dark-mode .comment-textarea { background: #1f2937; border-color: #374151; color: #f9fafb; }
.dark-mode .similar-card { background: #1f2937; border-color: #374151; }
.dark-mode .similar-card-img { background: #111827; }
.dark-mode .reaction-btn { background: #1f2937; border-color: #374151; color: #d1d5db; }
.dark-mode .reaction-btn.active { background: #1c1107; border-color: #f97316; color: #f97316; }
