/* ==================================================
   AdaArabam — İlan Detay Sayfası
   ================================================== */

.page-detail { padding: 20px 0 64px; }

.breadcrumb { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-muted); margin-bottom:14px; flex-wrap:wrap; }
.breadcrumb a { color:var(--text-secondary); transition:color .2s; }
.breadcrumb a:hover { color:var(--accent-red); }
.breadcrumb .sep { opacity:.4; }

.detail-title {
    font-family:var(--font-display);
    font-size:1.6rem;
    font-weight:800;
    line-height:1.3;
    margin-bottom:18px;
    color:var(--text-primary);
}

/* ═════════ VEHICLE SUMMARY (Sahibinden stili) ═════════ */
.vehicle-summary {
    background: #fafbfc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    gap: 24px;
    align-items: center;
}
.vehicle-summary__head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.vehicle-summary__brand {
    width: 72px; height: 72px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}
.vehicle-summary__brand img { max-width: 56px; max-height: 56px; object-fit: contain; }
.vehicle-summary__brand-fallback {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent-red); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 800;
}
.vehicle-summary__title {
    font-family: var(--font-display);
    font-size: 1.15rem; font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    min-width: 0;
}
.vehicle-summary__trim {
    margin-top: 4px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.vehicle-summary__trim i { color: var(--accent-red); }
.vehicle-summary__trim strong { color: var(--text-primary); font-weight: 700; }

.vehicle-summary__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 20px;
}
.vs-cell { display: flex; flex-direction: column; gap: 2px; }
.vs-cell__lbl { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.vs-cell__val { font-size: 14px; color: var(--text-primary); font-weight: 700; }

@media (max-width: 900px) {
    .vehicle-summary { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
    .vehicle-summary__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
    .vehicle-summary__grid { grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
    .vehicle-summary__brand { width: 60px; height: 60px; }
    .vehicle-summary__brand img { max-width: 46px; max-height: 46px; }
    .vehicle-summary__title { font-size: 1rem; }
}

/* ═════════ Grid Layout ═════════ */
.detail-top {
    display:grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 300px;
    gap:20px;
    align-items:start;
}

/* ═════════ GALERİ ═════════ */
.detail-gallery { min-width:0; }
.gallery-main {
    position:relative;
    background:#111;
    border-radius:var(--radius-lg);
    overflow:hidden;
    aspect-ratio: 16/10;
}
.gallery-main img {
    width:100%; height:100%; object-fit:cover;
    display:block;
    transition: opacity .2s;
}
.gallery-main img.is-loading { opacity:0.4; }

.gallery-counter {
    position:absolute; top:14px; left:14px;
    background:rgba(0,0,0,0.65); color:#fff;
    padding:4px 12px; font-size:12px; border-radius:20px;
    font-weight:600; backdrop-filter:blur(4px);
}
.gallery-tier-pill {
    position:absolute; top:14px; right:14px;
    padding:4px 12px; font-size:11px; font-weight:700;
    border-radius:4px; text-transform:uppercase; letter-spacing:.04em;
}

.gallery-nav {
    position:absolute; top:50%; transform:translateY(-50%);
    width:44px; height:44px; border-radius:50%;
    background:rgba(0,0,0,0.55); color:#fff; border:none;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    transition: all .2s;
}
.gallery-nav:hover { background:var(--accent-red); }
.gallery-nav--prev { left:14px; }
.gallery-nav--next { right:14px; }

.gallery-thumbs {
    display:flex; gap:6px; margin-top:10px; overflow-x:auto;
    scroll-snap-type:x mandatory; padding-bottom:6px;
}
.gallery-thumbs::-webkit-scrollbar { height:6px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background:#ccc; border-radius:3px; }
.gallery-thumb {
    flex:0 0 96px; height:66px;
    padding:0; background:none; border:2px solid transparent;
    border-radius:6px; overflow:hidden; cursor:pointer;
    transition: all .2s; scroll-snap-align: start;
}
.gallery-thumb img { width:100%; height:100%; object-fit:cover; }
.gallery-thumb.is-active { border-color:var(--accent-red); }
.gallery-thumb:hover { opacity:.85; }

.gallery-empty {
    aspect-ratio:16/10;
    background:var(--bg);
    border:1px dashed var(--border);
    border-radius:var(--radius-lg);
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    color:var(--text-muted); gap:10px;
}

/* ═════════ BİLGİ KARTI (SPECS) ═════════ */
.detail-info {
    background:#fff; border:1px solid var(--border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-card);
    overflow:hidden;
    min-width:0;
}
.detail-info__price-wrap {
    background: linear-gradient(180deg, #fff, #fafafa);
    padding: 18px 20px 16px;
    border-bottom: 2px solid var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.detail-info__price {
    font-family: var(--font-display);
    font-size: 1.75rem; font-weight: 900;
    color: var(--accent-red); line-height: 1.1;
    letter-spacing: -0.02em;
}
.detail-info__pills { display:flex; gap:6px; flex-wrap:wrap; }
@media (max-width: 768px) {
    .detail-info__price { font-size: 1.45rem; }
}
.pill {
    display:inline-block; padding:3px 10px;
    font-size:11px; font-weight:700;
    border-radius:4px; text-transform:uppercase; letter-spacing:.03em;
}
.pill--success { background:var(--success-light); color:var(--success); }
.pill--info    { background:var(--info-light); color:var(--info); }

.detail-specs { width:100%; border-collapse:collapse; font-size:13px; background:#fff; }
.detail-specs tr { border-bottom:1px solid #f0f0f0; }
.detail-specs tr:last-child { border-bottom:none; }
.detail-specs th {
    text-align:left; padding:9px 14px;
    color:var(--text-secondary); font-weight:500;
    width:42%;
    background: transparent;
}
.detail-specs td {
    padding:9px 14px;
    color:var(--text-primary); font-weight:500;
}
.detail-specs td a { color: var(--accent-red); text-decoration: none; }
.detail-specs td a:hover { text-decoration: underline; }

/* ═════════ SATICI KARTI ═════════ */
.detail-seller { display:flex; flex-direction:column; gap:12px; min-width:0; }
.seller-card {
    background:#fff; border:1px solid var(--border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-card);
    padding:18px;
}
.seller-card__head { display:flex; align-items:center; gap:12px; padding-bottom:14px; border-bottom:1px solid var(--border-light); }
.seller-avatar {
    width:52px; height:52px; border-radius:50%;
    background:var(--accent-red); color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-weight:800; font-size:18px; flex-shrink:0;
    overflow:hidden;
}
.seller-avatar img { width:100%; height:100%; object-fit:cover; }
.seller-info { flex:1; min-width:0; }
.seller-info strong { display:block; font-size:15px; font-weight:700; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.seller-info small { display:block; font-size:12px; color:var(--text-muted); margin-top:2px; }
.seller-all-link { display:inline-block; margin-top:4px; font-size:12px; font-weight:600; color:var(--accent-red); }
.seller-all-link:hover { text-decoration:underline; }

.seller-card__actions { display:flex; flex-direction:column; gap:8px; padding-top:14px; }
.seller-card__actions .btn { height:44px; font-size:13.5px; gap:8px; }
.seller-card__row { display:grid; grid-template-columns: repeat(3, 1fr); gap:6px; margin-top:4px; }

.icon-action-btn {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:4px; padding:8px 4px; background:var(--bg);
    border:1px solid var(--border-light); border-radius:var(--radius-sm);
    color:var(--text-secondary); cursor:pointer;
    font-size:11px; font-weight:600;
    transition: all .15s;
}
.icon-action-btn i { font-size:16px; color:var(--text-muted); }
.icon-action-btn:hover { border-color:var(--accent-red); color:var(--accent-red); background:#fff; }
.icon-action-btn:hover i { color:var(--accent-red); }
.icon-action-btn.is-active i { color:var(--accent-red); }
.icon-action-btn.is-active { border-color:var(--accent-red); color:var(--accent-red); }

.seller-card__warn {
    margin-top:14px; padding:10px 12px;
    background:var(--warning-light); color:#8a5500;
    border-radius:var(--radius-sm);
    font-size:11.5px; line-height:1.5;
    display:flex; align-items:flex-start; gap:8px;
}
.seller-card__warn i { margin-top:2px; flex-shrink:0; }

.seller-meta {
    background:#fff; border:1px solid var(--border);
    border-radius:var(--radius-md); padding:12px 16px;
    box-shadow:var(--shadow-card);
    display:flex; flex-direction:column; gap:6px;
    font-size:12.5px; color:var(--text-secondary);
}
.seller-meta i { color:var(--text-muted); width:16px; }

/* ═════════ STACKED PANELLER (Sahibinden stili) ═════════ */
.detail-panel {
    margin-top:20px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius-md);
    box-shadow:var(--shadow-card);
    overflow:hidden;
}
.detail-panel__head {
    width:100%;
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 20px;
    background: linear-gradient(to bottom, #fafafa, #f3f3f3);
    border:none; border-bottom:1px solid var(--border-light);
    cursor:pointer; text-align:left;
    font-family:var(--font-display); font-size:15px; font-weight:700;
    color:var(--accent-red);
    transition: background .15s;
}
.detail-panel__head:hover { background: linear-gradient(to bottom, #f5f5f5, #ececec); }
.detail-panel__head span { display:flex; align-items:center; gap:8px; }
.detail-panel__head i.fa-chevron-up { color:var(--text-muted); transition: transform .2s; font-size:12px; }
.detail-panel__head.is-collapsed i.fa-chevron-up { transform: rotate(180deg); }
.detail-panel__body { padding:20px 22px; }

.tab-description { font-size:14px; line-height:1.75; color:var(--text-primary); white-space:pre-wrap; }

/* Galeri ekspertiz rozeti */
.gallery-inspection-pill {
    position:absolute; top:14px; right:100px;
    display:inline-flex; align-items:center; gap:6px;
    padding:4px 12px; font-size:11px; font-weight:700;
    background:var(--success); color:#fff;
    border-radius:4px; text-transform:uppercase; letter-spacing:.04em;
}

/* ═════════ EKSPERTİZ GÖRSELİ (car-parts.png + ball) ═════════ */
.damage-layout {
    display:grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap:28px;
    align-items:start;
    margin-top:10px;
}
.damage-car-wrap {
    position:relative;
    background:#fff;
    border:1px solid var(--border-light);
    border-radius:var(--radius-md);
    padding:16px;
}

.car-parts-wrapper {
    position:relative;
    width:100%;
    max-width:400px;
    margin:0 auto;
}
.car-parts-wrapper img {
    width:100%;
    height:auto;
    display:block;
    user-select:none;
    pointer-events:none;
}

/* Ball marker stilleri */
.ball {
    position:absolute;
    width:26px;
    height:26px;
    border-radius:50%;
    border:2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor:pointer;
    transform:translate(-50%, -50%);
    transition: transform .15s, box-shadow .15s;
    z-index:2;
}
.ball:hover {
    transform: translate(-50%, -50%) scale(1.25);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    z-index:3;
}

/* Renk durumları */
.ball--original { background: #bdbdbd; }
.ball--local    { background: #F9A825; }   /* Lokal boyalı — turuncu */
.ball--painted  { background: #1565C0; }   /* Boyalı — mavi */
.ball--replaced { background: #C62828; }   /* Değişen — kırmızı */

/* Parça konumları (car-parts.png üzerinde, yüzde cinsinden) */
.ball--on_tampon          { top: 6%;   left: 50%; }
.ball--motor_kaputu       { top: 23%;  left: 50%; }
.ball--tavan              { top: 48%;  left: 50%; }
.ball--bagaj_kapagi       { top: 78%;  left: 50%; }
.ball--arka_tampon        { top: 95%;  left: 50%; }

/* Sağ yan panel */
.ball--sag_on_camurluk    { top: 21%;  left: 88%; }
.ball--sag_on_kapi        { top: 40%;  left: 88%; }
.ball--sag_arka_kapi      { top: 60%;  left: 88%; }
.ball--sag_arka_camurluk  { top: 79%;  left: 88%; }
.ball--sag_marspiyel      { top: 50%;  left: 80%; }

/* Sol yan panel */
.ball--sol_on_camurluk    { top: 21%;  left: 12%; }
.ball--sol_on_kapi        { top: 40%;  left: 12%; }
.ball--sol_arka_kapi      { top: 60%;  left: 12%; }
.ball--sol_arka_camurluk  { top: 79%;  left: 12%; }
.ball--sol_marspiyel      { top: 50%;  left: 20%; }

/* Tooltip */
.damage-tooltip {
    position:absolute;
    background:var(--primary-dark);
    color:#fff;
    padding:6px 10px;
    border-radius:6px;
    font-size:12px;
    pointer-events:none;
    display:none;
    z-index:10;
    line-height:1.4;
    box-shadow: var(--shadow-md);
    white-space:nowrap;
}

/* Sağ panel — aktif durum listesi */
.damage-side { display:flex; flex-direction:column; gap:12px; }
.damage-status-item {
    display:flex; gap:12px;
    padding:10px 12px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    transition: all .2s;
}
.damage-status-item.is-focused {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(198,40,40,.08);
}
.damage-status-item .swatch {
    flex-shrink:0;
    width:14px; height:14px;
    border-radius:3px;
    margin-top:4px;
}
.damage-status-item strong { display:block; font-size:13.5px; color:var(--text-primary); margin-bottom:4px; }
.damage-status-item strong em { font-style:normal; color:var(--text-muted); font-weight:500; }
.damage-status-item p { font-size:12.5px; color:var(--text-secondary); line-height:1.6; margin:0; }

.damage-legend {
    display:flex; flex-wrap:wrap; gap:16px;
    margin-bottom:18px;
    padding:10px 14px;
    background:var(--bg);
    border-radius:var(--radius-sm);
}
.damage-legend__item {
    display:inline-flex; align-items:center; gap:6px;
    font-size:12.5px; color:var(--text-primary); font-weight:600;
    cursor:pointer;
}
.damage-legend__item .swatch { display:inline-block; width:14px; height:14px; border-radius:3px; }

@media (max-width: 768px) {
    .damage-layout { grid-template-columns: 1fr; }
    .damage-car-wrap { padding:10px; }
}

/* Hasar Raporu */
.damage-legend { display:flex; flex-wrap:wrap; gap:14px; margin-bottom:18px; padding-bottom:14px; border-bottom:1px solid var(--border-light); }
.damage-legend__item { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--text-secondary); }
.damage-legend__item .swatch { display:inline-block; width:12px; height:12px; border-radius:3px; }

.damage-table { width:100%; border-collapse:collapse; font-size:13px; }
.damage-table tr { border-bottom:1px solid var(--border-light); }
.damage-table th { text-align:left; padding:10px 12px; font-weight:500; color:var(--text-secondary); width:50%; }
.damage-table td { padding:10px 12px; }
.damage-status { display:inline-block; padding:3px 10px; border-radius:4px; font-size:11px; font-weight:700; color:#fff; text-transform:uppercase; letter-spacing:.03em; }

.damage-notes { margin-top:16px; padding:14px; background:var(--bg); border-left:3px solid var(--accent-red); border-radius:4px; font-size:13px; }
.damage-notes strong { display:block; margin-bottom:4px; color:var(--text-primary); }
.damage-clean { padding:14px; background:var(--success-light); color:var(--success); border-radius:var(--radius-sm); font-weight:600; display:flex; align-items:center; gap:10px; }

/* Özellikler */
.feature-group + .feature-group { margin-top:24px; padding-top:20px; border-top:1px solid var(--border-light); }
.feature-group__title { font-family:var(--font-display); font-size:15px; font-weight:700; color:var(--accent-red); margin-bottom:12px; text-transform:uppercase; letter-spacing:.03em; }
.feature-list { display:grid; grid-template-columns: repeat(3, 1fr); gap:8px 14px; }
.feature-list li { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-secondary); }
.feature-list li i { color:var(--success); font-size:12px; }

/* Konum */
.detail-location p { font-size:14px; margin-bottom:12px; color:var(--text-secondary); }
.detail-location p strong { color:var(--text-primary); }
.detail-location i { color:var(--accent-red); }

/* ═════════ BENZER İLANLAR ═════════ */
.similar-section { margin-top:40px; }
.similar-section .section-header { margin-bottom:18px; }

/* ═════════ MODAL ═════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center;
    z-index: 9000; padding: 16px;
}
.modal-overlay.is-open { display: flex; }
.swal2-container { z-index: 10500 !important; }
.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 26px 26px 22px;
    width: 100%; max-width: 460px;
    box-shadow: var(--shadow-xl);
    position: relative;
}
.modal h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; color: var(--text-primary); }
.modal .modal-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.modal-close {
    position: absolute; top: 10px; right: 12px;
    width: 32px; height: 32px;
    background: none; border: none;
    font-size: 24px; line-height: 1;
    color: var(--text-muted); cursor: pointer;
    border-radius: 50%;
    transition: all .15s;
}
.modal-close:hover { background: var(--bg); color: var(--accent-red); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ═════════ LIGHTBOX ═════════ */
.lightbox {
    position:fixed; inset:0;
    background:rgba(0,0,0,0.92);
    display:none; align-items:center; justify-content:center;
    z-index:9500;
}
.lightbox.is-open { display:flex; }
.lightbox__inner { max-width:90vw; max-height:85vh; }
.lightbox__inner img { max-width:100%; max-height:85vh; object-fit:contain; }
.lightbox__close {
    position:absolute; top:20px; right:20px;
    width:44px; height:44px; border-radius:50%;
    background:rgba(255,255,255,0.1); color:#fff; border:none;
    cursor:pointer; font-size:20px;
    transition: all .2s;
}
.lightbox__close:hover { background:var(--accent-red); }
.lightbox__nav {
    position:absolute; top:50%; transform:translateY(-50%);
    width:52px; height:52px; border-radius:50%;
    background:rgba(255,255,255,0.08); color:#fff; border:none;
    cursor:pointer; font-size:22px;
    transition: all .2s;
}
.lightbox__nav:hover { background:var(--accent-red); }
.lightbox__nav--prev { left:30px; }
.lightbox__nav--next { right:30px; }
.lightbox__counter {
    position:absolute; bottom:24px; left:50%; transform:translateX(-50%);
    color:#fff; font-size:14px; font-weight:600;
    background:rgba(255,255,255,0.1); padding:6px 16px; border-radius:20px;
}

/* ═════════ TIER PILL (bilgi kartı) ═════════ */
.tier-pill--standard { background:var(--border-light); color:var(--text-secondary); }
.tier-pill--gold     { background:var(--gold-light); color:#8a6d1a; }
.tier-pill--premium  { background:var(--red-light); color:var(--accent-red); }
.tier-pill--vip      { background:var(--accent-red); color:#fff; }
.gallery-tier-pill.tier-pill--vip      { background:var(--accent-red); color:#fff; }
.gallery-tier-pill.tier-pill--premium  { background:var(--red-light); color:var(--accent-red); }
.gallery-tier-pill.tier-pill--gold     { background:var(--gold); color:#fff; }

/* ═════════ MOBİL ═════════ */
@media (max-width: 1100px) {
    .detail-top { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); }
    .detail-seller { grid-column: 1 / -1; flex-direction:row; gap:12px; }
    .seller-card { flex:1; }
    .seller-meta { flex:0 0 280px; }
}
@media (max-width: 768px) {
    .detail-title { font-size:1.2rem; }
    .detail-top { grid-template-columns: 1fr; }
    .detail-seller { flex-direction:column; }
    .seller-meta { flex:1; }
    .detail-info__price { font-size:1.6rem; }
    .feature-list { grid-template-columns: repeat(2, 1fr); }
    .gallery-thumb { flex:0 0 70px; height:50px; }
    .lightbox__nav--prev { left:8px; }
    .lightbox__nav--next { right:8px; }
    .tabs-nav { padding: 0 4px; }
    .tab-btn { padding:12px 14px; font-size:13px; }
    .tab-panel { padding:16px; }
}
@media (max-width: 480px) {
    .feature-list { grid-template-columns: 1fr; }
    .detail-specs th, .detail-specs td { padding:8px 12px; font-size:12.5px; }
}
