/* =============================================
   سوق الشراء — Ad Detail Page Styles
   ============================================= */

/* ── Layout ── */
.ad-detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    margin-bottom: 48px;
}
.ad-detail-main { min-width: 0; }
.ad-detail-sidebar { }

/* ── Card base ── */
.card {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 20px;
}

/* ── Gallery ── */
.ad-gallery { margin-bottom: 20px; }
.main-image-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg);
    aspect-ratio: 4/3;
}
.main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.main-image-wrap .fav-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 38px; height: 38px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all .2s;
    cursor: pointer;
    backdrop-filter: blur(4px);
    border: none;
}
.main-image-wrap .fav-btn:hover,
.main-image-wrap .fav-btn.active { color: var(--danger); transform: scale(1.15); }

.condition-badge {
    position: absolute;
    top: 12px; right: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: .75rem;
    font-weight: 700;
}
.badge-new        { background: rgba(16,185,129,.9); color: #fff; }
.badge-like_new   { background: rgba(37,99,235,.9);  color: #fff; }
.badge-used       { background: rgba(107,114,128,.85); color: #fff; }

.thumb-strip {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.thumb-strip::-webkit-scrollbar { display: none; }
.thumb {
    width: 72px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
    flex-shrink: 0;
}
.thumb.active,
.thumb:hover { border-color: var(--primary-light); }

/* ── Description ── */
.ad-description h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 14px;
}
.description-text {
    font-size: .9rem;
    line-height: 1.8;
    color: var(--text-body);
}

/* ── Stats ── */
.ad-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--text-muted);
}
.stat i { color: var(--primary-light); font-size: .9rem; }

/* ── Report btn ── */
.report-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    padding: 7px 16px;
    border-radius: 8px;
    font-size: .82rem;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.report-btn:hover { border-color: var(--danger); color: var(--danger); }

/* ── Price card ── */
.ad-price-card { }
.ad-title-price h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 10px;
}
.ad-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
}
.price-amount {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--primary);
}
.price-currency {
    font-size: .95rem;
    color: var(--text-muted);
    font-weight: 600;
}
.price-free {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--success);
}
.ad-location-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.ad-location-detail i { color: var(--danger); }

/* ── Actions ── */
.my-ad-actions,
.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-weight: 700; border-radius: 10px; cursor: pointer; transition: all .2s; border: none; text-decoration: none; font-size: .9rem; padding: 11px 20px; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: none; border: 2px solid var(--border); color: var(--text-body); }
.btn-outline:hover, .btn-outline.active { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: none; border: none; }

/* ── Share ── */
.share-ad {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: .85rem;
    color: var(--text-muted);
}
.share-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem;
    border: 1.5px solid var(--border);
    color: var(--text-body);
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.share-btn.whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
.share-btn.twitter:hover  { background: #1da1f2; border-color: #1da1f2; color: #fff; }
.share-btn.copy:hover     { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Seller card ── */
.seller-card h3 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}
.seller-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.seller-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.seller-meta strong { display: block; font-size: .95rem; font-weight: 700; color: var(--text-dark); }
.seller-meta span   { font-size: .78rem; color: var(--text-muted); }
.seller-ads-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: var(--primary-light);
    font-weight: 600;
}
.seller-ads-link:hover { text-decoration: underline; }

/* ── Related ads ── */
.related-ads { margin-top: 40px; }
.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::before {
    content: '';
    width: 4px; height: 22px;
    background: var(--primary-light);
    border-radius: 4px;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 20px;
    backdrop-filter: blur(3px);
}
.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--text-dark); }
.modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    color: var(--text-muted);
    font-size: .9rem;
    cursor: pointer;
    transition: all .2s;
}
.modal-close:hover { background: var(--danger); color: #fff; }
.modal-body { padding: 20px 22px; }
.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Report reasons ── */
.report-reasons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.radio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    font-size: .88rem;
    color: var(--text-body);
}
.radio-card:hover { border-color: var(--primary-light); }
.radio-card input { accent-color: var(--primary-light); }
.mt-2 { margin-top: 10px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: .9rem;
    font-family: inherit;
    color: var(--text-body);
    outline: none;
    transition: border-color .2s;
    resize: vertical;
}
.form-control:focus { border-color: var(--primary-light); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .ad-detail-layout { grid-template-columns: 1fr; }
    .ad-detail-sidebar { order: -1; }
}
@media (max-width: 480px) {
    .ad-stats { gap: 12px; }
    .price-amount { font-size: 1.5rem; }
}
