/* =========================================================
   نمایش درخواست | ad.php — لاکچری
   ========================================================= */

.single-ad-page {
    min-height: calc(100vh - 72px);
    padding: 40px 20px 80px;
    background: var(--bg);
}

.single-ad-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ============ Breadcrumb ============ */
.ad-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.ad-breadcrumb a { color: var(--text-soft); transition: color .2s; }
.ad-breadcrumb a:hover { color: var(--gold); }
.ad-breadcrumb span { color: var(--text-faint); }

.ad-breadcrumb .current {
    color: var(--gold);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* ============ کارت اصلی ============ */
.ad-main-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, .25);
}

.light-mode .ad-main-card {
    box-shadow: 0 15px 50px rgba(0, 0, 0, .06);
}

/* ============ Hero ============ */
.ad-hero {
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 32px 36px;
    background:
        radial-gradient(circle at 15% 50%, var(--gold-soft), transparent 55%),
        linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
    border-bottom: 1px solid var(--border);
    position: relative;
}

.ad-hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 36px;
    left: 36px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
    opacity: .5;
}

.ad-hero-icon {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--gold-dark);
    border-radius: 20px;
    color: var(--gold);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, .2),
        0 0 30px var(--gold-soft);
}

.ad-hero-icon img {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 8px var(--gold-glow));
}

.ad-hero-text { flex: 1; min-width: 0; }

.ad-hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.badge-vip,
.badge-urgent,
.badge-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid;
    letter-spacing: .3px;
}

.badge-vip {
    color: var(--gold);
    background: var(--gold-soft);
    border-color: var(--gold);
}

.badge-urgent {
    color: #e74c3c;
    background: rgba(231, 76, 60, .1);
    border-color: rgba(231, 76, 60, .4);
}

.badge-cat {
    color: var(--text-soft);
    background: var(--bg-elevated);
    border-color: var(--border-light);
}

.ad-hero-title {
    margin: 0;
    color: var(--text);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.5;
}

.ad-hero-meta {
    display: flex;
    gap: 18px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.ad-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.ad-hero-meta svg {
    color: var(--gold);
    flex-shrink: 0;
}

/* ============ چیدمان دو ستونی ============ */
.ad-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 26px;
    padding: 32px 36px;
}

/* ============ محتوا ============ */
.ad-content { min-width: 0; }

.ad-description-box {
    padding: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.ad-description-box h2 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
    position: relative;
}

.ad-description-box h2::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.ad-description-box p {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 2.2;
}

/* ============ Sidebar ============ */
.ad-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ad-price-box {
    padding: 22px;
    background:
        radial-gradient(circle at 50% 0%, var(--gold-soft), transparent 65%),
        var(--bg-elevated);
    border: 1px solid var(--gold-dark);
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ad-price-box::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ad-price-box > span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.ad-price-box strong {
    display: inline-block;
    color: var(--gold);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
}

.ad-price-box small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 11px;
}

/* دکمه چت */
.ad-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: all .25s ease;
    box-shadow: 0 6px 20px rgba(52, 152, 219, .25);
}

.ad-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(52, 152, 219, .4);
}

.ad-chat-btn svg { flex-shrink: 0; }

/* دکمه تماس */
.ad-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: all .25s ease;
    box-shadow: 0 6px 20px rgba(46, 204, 113, .25);
}

.ad-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(46, 204, 113, .35);
}

.ad-contact-btn svg { flex-shrink: 0; }

/* دکمه اشتراک‌گذاری */
.share-main-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    padding: 0 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    color: var(--text-soft);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s ease;
}

.share-main-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: var(--gold-soft);
    transform: translateY(-2px);
}

.share-main-btn svg { flex-shrink: 0; transition: transform .25s; }
.share-main-btn:hover svg { transform: scale(1.1); }

.share-main-btn.shared {
    color: #4caf50;
    border-color: #4caf50;
    background: rgba(76, 175, 80, .1);
}

/* دکمه گزارش */
.ad-report-box { width: 100%; }

.report-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 20px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s ease;
}

.report-btn:hover {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, .4);
    background: rgba(231, 76, 60, .08);
}

.report-btn svg { flex-shrink: 0; }

/* لیست اطلاعات */
.ad-info-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.ad-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 10px;
    transition: background .2s;
}

.ad-info-row:hover { background: var(--bg-card); }

.ad-info-row span { color: var(--text-muted); font-size: 12px; }
.ad-info-row strong { color: var(--text); font-size: 13px; font-weight: 700; }

/* ============ نوار هشدار گزارش ============ */
.ad-report-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    background: rgba(255, 152, 0, .08);
    border: 1px solid rgba(255, 152, 0, .35);
    border-radius: 12px;
    color: #ff9800;
    font-size: 13px;
    font-weight: 700;
}

.ad-report-warning.strong {
    background: rgba(231, 76, 60, .1);
    border-color: rgba(231, 76, 60, .4);
    color: #e74c3c;
}

.ad-report-warning svg { flex-shrink: 0; }

/* ============ دکمه‌های پایین ============ */
.ad-actions {
    display: flex;
    gap: 12px;
    padding: 22px 36px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.btn-gold-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: all .25s ease;
    box-shadow: 0 4px 14px var(--gold-soft);
}

.btn-gold-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px var(--gold-glow);
}

.btn-ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 11px;
    background: transparent;
    color: var(--text-soft);
    border: 1px solid var(--border-light);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
}

.btn-ghost-link:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* ============ پیدا نشد ============ */
.ad-not-found {
    padding: 70px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
}

.not-found-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
}

.ad-not-found h1 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
}

.ad-not-found p {
    margin: 0 0 28px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ ریسپانسیو ============ */
@media (max-width: 900px) {
    .ad-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px;
    }

    .ad-hero {
        padding: 24px;
        flex-direction: column;
        text-align: center;
    }

    .ad-hero-icon {
        width: 90px;
        height: 90px;
    }

    .ad-hero-icon img {
        width: 52px;
        height: 52px;
    }

    .ad-hero-badges,
    .ad-hero-meta {
        justify-content: center;
    }

    .ad-hero-title { font-size: 22px; }

    .ad-actions {
        padding: 20px 24px;
        flex-direction: column;
    }

    .btn-gold-link,
    .btn-ghost-link { width: 100%; }
}

@media (max-width: 500px) {
    .single-ad-page { padding: 24px 15px 60px; }

    .ad-hero { padding: 20px 18px; }

    .ad-hero-icon {
        width: 76px;
        height: 76px;
    }

    .ad-hero-icon img {
        width: 44px;
        height: 44px;
    }

    .ad-hero-title { font-size: 18px; }

    .ad-layout { padding: 18px; }

    .ad-price-box strong { font-size: 20px; }

    .ad-description-box { padding: 18px; }

    .ad-breadcrumb {
        font-size: 12px;
        padding: 10px 14px;
    }

    .ad-breadcrumb .current { max-width: 120px; }
}

/* ============ آگهی‌های مشابه ============ */
.ad-similar {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.ad-similar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.ad-similar-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
}

.ad-similar-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
}

.ad-similar-count {
    padding: 5px 12px;
    background: var(--gold-soft);
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.ad-similar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.ad-similar-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    transition: all .25s ease;
    position: relative;
}

.ad-similar-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-dark);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
}

.ad-similar-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity .25s;
    z-index: 2;
}

.ad-similar-card:hover::before {
    opacity: 1;
}

.ad-similar-image {
    height: 90px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle, var(--gold-soft), transparent 60%),
        linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
}

.ad-similar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.ad-similar-icon img {
    width: 42px;
    height: 42px;
}

.ad-similar-badges {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 3px;
}

.similar-badge {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid;
    background: var(--bg-elevated);
}

.similar-badge.vip {
    color: var(--gold);
    border-color: var(--gold);
    background: var(--gold-soft);
}

.similar-badge.urgent {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, .5);
    background: rgba(231, 76, 60, .12);
}

.ad-similar-body {
    padding: 12px;
}

.ad-similar-cat {
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ad-similar-body h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-similar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.ad-similar-footer strong {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.ad-similar-footer span {
    color: var(--text-muted);
    font-size: 10px;
}

@media (max-width: 900px) {
    .ad-similar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .ad-similar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ad-similar-header h2 {
        font-size: 16px;
    }

    .ad-similar-body h3 {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .ad-similar-footer strong {
        font-size: 11px;
    }

    .ad-similar-footer span {
        font-size: 9px;
    }

    .ad-similar-image {
        height: 75px;
    }

    .ad-similar-icon img {
        width: 34px;
        height: 34px;
    }
}