/* ========================================
   DEAL DETAILS PAGE STYLES
   ======================================== */

/* Container */
.dd-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 100px;
}

/* Breadcrumb */
.dd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dd-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.dd-breadcrumb a:hover {
    color: var(--text-main);
}

.dd-breadcrumb .separator {
    color: var(--border-default);
    font-size: 11px;
}

.dd-breadcrumb .current {
    color: var(--text-main);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* ========================================
   HERO CARD
   ======================================== */
.dd-hero {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}

@media (max-width: 768px) {
    .dd-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }
}

/* Image */
.dd-image {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: zoom-in;
}

.dd-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.dd-image:hover img {
    transform: scale(1.05);
}

[data-theme="dark"] .dd-image {
    background: var(--bg-surface);
}

/* Deal Info */
.dd-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Meta row: voting + poster */
.dd-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Temperature voting */
.dd-voting {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface);
    border-radius: var(--radius-round);
    padding: 4px 6px;
    gap: 2px;
}

.dd-vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 50%;
    transition: all var(--transition-fast);
    font-size: 14px;
    line-height: 1;
}

.dd-vote-btn.up {
    color: #f1416c;
}

.dd-vote-btn.down {
    color: #009ef7;
}

.dd-vote-btn:hover {
    background: var(--bg-card);
}

.dd-vote-btn.active {
    background: rgba(112, 57, 226, 0.15);
    color: #7039ea;
    transform: scale(1.1);
    font-weight: 700;
}

.dd-temp {
    font-weight: 800;
    font-size: 1.3rem;
    min-width: 50px;
    text-align: center;
    line-height: 1;
}

.dd-temp.warm { color: #f1416c; }
.dd-temp.cold { color: #009ef7; }

/* Poster info */
.dd-poster {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.dd-poster-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.dd-poster-name {
    font-weight: 700;
    color: var(--text-main);
}

.dd-poster-date {
    color: var(--text-muted);
}

/* Title */
.dd-title {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

/* Price */
.dd-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.dd-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-main);
}

.dd-price-original {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.dd-price-discount {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-round);
}

/* Shipping info */
.dd-shipping {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.dd-shipping i {
    font-size: 14px;
}

/* CTA Button */
.dd-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 40px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-round);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
}

.dd-cta:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 112, 224, 0.3);
}

.dd-cta i {
    font-size: 14px;
}

/* Actions row */
.dd-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dd-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-round);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.dd-action-btn:hover {
    background: var(--bg-card);
    color: var(--text-main);
    border-color: var(--brand-primary);
}

/* Voucher code */
.dd-voucher {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(114, 57, 234, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    border: 2px dashed rgba(114, 57, 234, 0.3);
    border-radius: var(--radius-md);
}

.dd-voucher-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7239ea;
}

.dd-voucher-code {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #7239ea;
    flex: 1;
}

.dd-voucher-copy {
    padding: 6px 14px;
    background: #7239ea;
    color: #fff;
    border: none;
    border-radius: var(--radius-round);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dd-voucher-copy:hover {
    background: #5b21b6;
}

/* ========================================
   AD SLOTS
   ======================================== */
.dd-ad-slot {
    position: relative;
    min-height: 90px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    overflow: hidden;
    animation: dd-fade-in 0.5s ease;
}

.dd-ad-slot.dd-ad-leaderboard {
    min-height: 90px;
}

.dd-ad-slot.dd-ad-rectangle {
    min-height: 250px;
}

.dd-ad-label {
    position: absolute;
    top: 6px;
    left: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    opacity: 0.6;
}

.dd-ad-slot .dd-ad-placeholder {
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.4;
}

@keyframes dd-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .dd-ad-slot.dd-ad-leaderboard {
        min-height: 60px;
    }
    .dd-ad-slot.dd-ad-rectangle {
        min-height: 200px;
    }
}

/* ========================================
   VOTE PROMPT
   ======================================== */
.dd-vote-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.dd-vote-prompt-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dd-vote-prompt-text i {
    color: var(--text-muted);
}

.dd-vote-prompt-actions {
    display: flex;
    gap: 10px;
}

.dd-vote-cold,
.dd-vote-hot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--radius-round);
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dd-vote-cold {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.dd-vote-cold:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.dd-vote-hot {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.dd-vote-hot:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.dd-vote-cold.active {
    background: rgba(59, 130, 246, 0.25) !important;
    color: #3b82f6 !important;
    font-weight: 700;
    transform: scale(1.08);
}

.dd-vote-hot.active {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #ef4444 !important;
    font-weight: 700;
    transform: scale(1.08);
}

/* ========================================
   ABOUT / DESCRIPTION
   ======================================== */
.dd-section {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.dd-section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dd-description-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    word-break: break-word;
}

.dd-description-text p {
    margin: 0 0 12px;
}

.dd-description-text ul,
.dd-description-text ol {
    margin: 0 0 12px 20px;
}

.dd-description-text img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 12px 0;
}

.dd-description-text a {
    color: var(--brand-primary);
    text-decoration: underline;
}

/* Poster card inside description */
.dd-poster-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    margin-top: 20px;
}

.dd-poster-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.dd-poster-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dd-poster-card-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
}

.dd-poster-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

/* Delivery info expandable */
.dd-delivery {
    border-top: 1px solid var(--border-subtle);
    margin-top: 16px;
    padding-top: 16px;
}

.dd-delivery-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.dd-delivery-toggle i {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.dd-delivery-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.dd-delivery-content {
    display: none;
    padding-top: 12px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.dd-delivery-content.open {
    display: block;
}

/* Deal summary row */
.dd-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.dd-summary-row:last-child {
    border-bottom: none;
}

.dd-summary-label {
    font-size: 14px;
    color: var(--text-muted);
}

.dd-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

/* ========================================
   COMMENTS
   ======================================== */
.dd-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dd-comment-form {
    margin-bottom: 24px;
}

.dd-comment-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-base);
    color: var(--text-main);
    background: var(--bg-main);
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.dd-comment-form textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.dd-comment-form textarea::placeholder {
    color: var(--text-muted);
}

.dd-comment-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.dd-comment-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-round);
    background: var(--brand-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.dd-comment-submit:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 112, 224, 0.25);
}

.dd-comment-submit:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.dd-signin-prompt {
    text-align: center;
    padding: 20px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.dd-signin-prompt a {
    color: var(--brand-primary);
    font-weight: 700;
    text-decoration: none;
    margin-left: 8px;
}

.dd-signin-prompt a:hover {
    text-decoration: underline;
}

/* Comment cards */
.dd-comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dd-comment {
    display: flex;
    gap: 14px;
}

.dd-comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
}

.dd-comment-body {
    flex: 1;
    min-width: 0;
}

.dd-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.dd-comment-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
}

.dd-comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.dd-comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    word-break: break-word;
}

.dd-comment-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.dd-comment-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: color var(--transition-fast);
}

.dd-comment-action:hover {
    color: var(--brand-primary);
}

/* Replies */
.dd-replies {
    margin-top: 16px;
    padding-left: 20px;
    border-left: 2px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dd-reply {
    display: flex;
    gap: 10px;
}

.dd-reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dd-reply-body {
    flex: 1;
    min-width: 0;
}

.dd-reply-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
}

.dd-reply-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
}

.dd-reply-content {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========================================
   NEVER MISS A DEAL / ALERTS
   ======================================== */
.dd-alerts {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.dd-alerts-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}

.dd-alerts-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.dd-alerts-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dd-alert-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-round);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dd-alert-chip:hover {
    border-color: var(--brand-primary);
    background: var(--bg-card);
    color: var(--brand-primary);
}

.dd-alert-chip i {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   RELATED DEALS
   ======================================== */
.dd-related {
    margin-bottom: 24px;
}

.dd-related-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
}

.dd-related-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.dd-related-scroll::-webkit-scrollbar {
    display: none;
}

.dd-related-card {
    flex: 0 0 180px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dd-related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--brand-primary);
}

.dd-related-img {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.dd-related-img img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.dd-related-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    margin-bottom: 8px;
}

.dd-related-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--brand-primary);
}

/* ========================================
   MOBILE STICKY BAR
   ======================================== */
.dd-sticky-bar {
    display: none;
}

@media (max-width: 768px) {
    .dd-sticky-bar {
        position: fixed;
        bottom: 64px;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        border-top: 1px solid var(--border-default);
        padding: 10px 16px;
        z-index: 2000;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    }
}

.dd-sticky-price {
    display: flex;
    flex-direction: column;
}

.dd-sticky-price .label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

.dd-sticky-price .price {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-main);
}

.dd-sticky-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-round);
    text-decoration: none;
    transition: background 0.2s;
}

.dd-sticky-cta:hover {
    background: var(--brand-primary-hover);
}

/* ========================================
   DARK MODE
   ======================================== */
[data-theme="dark"] .dd-hero,
[data-theme="dark"] .dd-section,
[data-theme="dark"] .dd-vote-prompt,
[data-theme="dark"] .dd-alerts {
    background: var(--bg-card);
    border-color: var(--border-default);
}

[data-theme="dark"] .dd-ad-slot {
    background: var(--bg-surface);
    border-color: var(--border-subtle);
}

[data-theme="dark"] .dd-comment-form textarea {
    background: var(--bg-surface);
    border-color: var(--border-default);
    color: var(--text-main);
}

[data-theme="dark"] .dd-voucher {
    background: linear-gradient(135deg, rgba(114, 57, 234, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
}

[data-theme="dark"] .dd-sticky-bar {
    background: var(--bg-card);
    border-color: var(--border-default);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .dd-hero {
        grid-template-columns: 260px 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .dd-container {
        padding: 16px 12px 160px;
    }

    .dd-hero {
        grid-template-columns: 1fr;
    }

    .dd-image {
        max-width: 300px;
        margin: 0 auto;
    }

    .dd-vote-prompt {
        flex-direction: column;
        text-align: center;
    }

    .dd-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .dd-actions {
        justify-content: center;
    }

    .dd-breadcrumb .current {
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .dd-alerts-chips {
        flex-direction: column;
    }

    .dd-alert-chip {
        width: 100%;
        justify-content: center;
    }
}
