/* ==========================================================================
   detail.css — Advertisement Detail Page v3
   Loaded via $extraHead from show.php — not global.
   Inherits design tokens from site.css; uses .hp-wrap from home.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page wrapper & breadcrumb
   -------------------------------------------------------------------------- */
.detail-page {
    padding-bottom: 4rem;
}

.detail-breadcrumb {
    padding: .875rem 0 .375rem;
}
.detail-breadcrumb .breadcrumb {
    font-size: .8125rem;
}

/* --------------------------------------------------------------------------
   2. Layout — gallery left + summary sidebar right
   -------------------------------------------------------------------------- */
.detail-layout {
    margin-bottom: .5rem;
}

@media (min-width: 992px) {
    .detail-sidebar {
        position: sticky;
        top: calc(var(--nav-height, 64px) + 1.25rem);
        align-self: flex-start;
        max-height: calc(100vh - var(--nav-height, 64px) - 2.5rem);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .detail-sidebar::-webkit-scrollbar { display: none; }
}

/* --------------------------------------------------------------------------
   3. Gallery — compact stage, natural proportions (contain, no crop)
      Max heights: Mobile 300px · Tablet 420px · Desktop 480px · Wide 550px
   -------------------------------------------------------------------------- */
.detail-gallery {
    margin-bottom: 0;
}

.detail-gallery__stage {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 300px;
    background: var(--color-surface-raised, #f2f3f8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.06);
}

.detail-gallery__main-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    object-position: center;
    transition: opacity .16s ease;
}

@media (min-width: 768px) {
    .detail-gallery__stage,
    .detail-gallery__main-img { max-height: 420px; }
}

@media (min-width: 992px) {
    .detail-gallery__stage,
    .detail-gallery__main-img { max-height: 480px; }
}

@media (min-width: 1200px) {
    .detail-gallery__stage,
    .detail-gallery__main-img { max-height: 550px; }
}

/* Image counter badge — bottom-right overlay */
.detail-gallery__counter {
    position: absolute;
    bottom: .875rem;
    right: .875rem;
    z-index: 4;
    background: rgba(0,0,0,.54);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    padding: .25rem .6875rem;
    border-radius: 100px;
    letter-spacing: .03em;
    line-height: 1.4;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

/* Fullscreen button — top-right overlay */
.detail-gallery__fs-btn {
    position: absolute;
    top: .625rem;
    right: .625rem;
    z-index: 4;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(0,0,0,.44);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .875rem;
    line-height: 1;
    transition: background var(--dur-fast, .14s) var(--ease-std);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.detail-gallery__fs-btn:hover  { background: rgba(0,0,0,.66); }
.detail-gallery__fs-btn:focus-visible {
    outline: 2px solid var(--color-brand-accent, #4f46e5);
    outline-offset: 2px;
}

/* Thumbnail strip */
.detail-gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .625rem 0 0;
}

.detail-gallery__thumb {
    flex: 0 0 auto;
    width: 113px;
    height: 85px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #e4e4ec;
    transition:
        border-color var(--dur-fast, .14s) var(--ease-std),
        opacity      var(--dur-fast, .14s) var(--ease-std);
    opacity: .7;
}
.detail-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.detail-gallery__thumb:hover  { opacity: .9; }
.detail-gallery__thumb.active {
    border-color: var(--color-brand-accent, #4f46e5);
    opacity: 1;
}
.detail-gallery__thumb:focus-visible {
    outline: 2px solid var(--color-brand-accent, #4f46e5);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   4. Summary sidebar — title, highlights, contact
   -------------------------------------------------------------------------- */
.detail-summary {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

.detail-summary__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
}

.detail-summary__title {
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: 700;
    color: var(--color-text-primary, #1a1a2e);
    line-height: 1.25;
    margin: 0;
    letter-spacing: -.015em;
    word-break: break-word;
}

/* VIP GOLD — matches homepage listing-card featured badge */
.detail-summary__badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .6875rem;
    border-radius: 100px;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.5;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.detail-summary__badge--featured {
    background: var(--color-badge-featured, #f59e0b);
    color: #3d1f00;
}

.detail-summary__highlights {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .4375rem;
}

.detail-summary__highlight {
    display: flex;
    align-items: flex-start;
    gap: .4375rem;
    font-size: .875rem;
    color: var(--color-text-secondary, #4a4b5c);
    line-height: 1.45;
    word-break: break-word;
}

.detail-summary__icon {
    flex-shrink: 0;
    color: var(--color-brand-accent, #4f46e5);
    font-size: .9375rem;
    line-height: 1.35;
    margin-top: .0625rem;
}

.detail-summary__price {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-brand-accent, #4f46e5);
    margin: 0;
    line-height: 1.2;
}
.detail-summary__currency {
    font-size: .8125rem;
    font-weight: 500;
    color: var(--color-text-muted, #8b8fa8);
    margin-left: .25rem;
}

.detail-summary__phone {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .375rem .5rem;
    padding-top: .75rem;
    margin-top: .25rem;
    border-top: 1px solid var(--color-border-light, #eceef6);
    font-size: .8125rem;
    color: var(--color-text-muted, #8b8fa8);
}
.detail-summary__phone i {
    color: var(--color-brand-accent, #4f46e5);
}
.detail-summary__phone-value {
    color: var(--color-text-primary, #1a1a2e);
    font-weight: 600;
    text-decoration: none;
    direction: ltr;
}
.detail-summary__phone-value:hover {
    color: var(--color-brand-accent, #4f46e5);
}

/* --------------------------------------------------------------------------
   5. Communication card (inside summary sidebar)
   -------------------------------------------------------------------------- */
.detail-comm-card {
    background: #fff;
    border: 1.5px solid var(--color-border-light, #eceef6);
    border-radius: 16px;
    box-shadow:
        0 4px 24px rgba(0,0,0,.06),
        0 1px 4px  rgba(0,0,0,.04);
    padding: 1.125rem;
}

.detail-comm-card__header {
    text-align: center;
    margin-bottom: .875rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--color-border-light, #eceef6);
}

.detail-comm-card__title {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--color-text-primary, #1a1a2e);
    margin: 0 0 .25rem;
}

.detail-comm-card__subtitle {
    font-size: .8125rem;
    color: var(--color-text-muted, #8b8fa8);
    margin: 0;
    line-height: 1.5;
}

.detail-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .875rem;
    width: 100%;
    min-height: 56px;
    padding: .75rem 1.25rem;
    background: #25d366;
    color: #fff;
    border-radius: 14px;
    text-decoration: none;
    box-shadow:
        0 4px 18px rgba(37,211,102,.30),
        0 1px 4px  rgba(0,0,0,.08);
    transition:
        background  .15s ease,
        transform   .15s ease,
        box-shadow  .15s ease,
        color       .15s ease;
    margin-bottom: .625rem;
    cursor: pointer;
}
.detail-wa-btn:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow:
        0 8px 26px rgba(37,211,102,.36),
        0 2px 8px  rgba(0,0,0,.10);
    color: #fff;
    text-decoration: none;
}
.detail-wa-btn:active {
    transform: translateY(0);
}
.detail-wa-btn:focus-visible {
    outline: 3px solid rgba(37,211,102,.5);
    outline-offset: 2px;
    color: #fff;
    text-decoration: none;
}

.detail-tg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .875rem;
    width: 100%;
    min-height: 56px;
    padding: .75rem 1.25rem;
    background: #229ED9;
    color: #fff;
    border-radius: 14px;
    text-decoration: none;
    box-shadow:
        0 4px 18px rgba(34,158,217,.28),
        0 1px 4px  rgba(0,0,0,.08);
    transition:
        background  .15s ease,
        transform   .15s ease,
        box-shadow  .15s ease,
        color       .15s ease;
    margin-bottom: .625rem;
    cursor: pointer;
}
.detail-tg-btn:hover {
    background: #1a8bc4;
    transform: translateY(-2px);
    box-shadow:
        0 8px 26px rgba(34,158,217,.34),
        0 2px 8px  rgba(0,0,0,.10);
    color: #fff;
    text-decoration: none;
}
.detail-tg-btn:active {
    transform: translateY(0);
}
.detail-tg-btn:focus-visible {
    outline: 3px solid rgba(34,158,217,.5);
    outline-offset: 2px;
    color: #fff;
    text-decoration: none;
}

.detail-tg-btn__icon {
    font-size: 1.625rem;
    line-height: 1;
    flex-shrink: 0;
}

.detail-tg-btn__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .125rem;
}

.detail-tg-btn__label {
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.25;
}

.detail-wa-btn__icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    line-height: 1;
}

.detail-wa-btn__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.detail-wa-btn__label {
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.2;
}

.detail-wa-btn__number {
    font-size: .8125rem;
    font-weight: 500;
    opacity: .88;
    margin-top: .125rem;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

.detail-comm-card__helper {
    font-size: .75rem;
    color: var(--color-text-muted, #8b8fa8);
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   6. Body — specs panel + description (full width below layout row)
   -------------------------------------------------------------------------- */
.detail-body {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-section-heading {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--color-text-muted, #8b8fa8);
    margin: 0 0 .875rem;
    padding-bottom: .625rem;
    border-bottom: 1px solid var(--color-border-light, #eceef6);
}

/* İlan Bilgileri + Açıklama — shared panel card */
.detail-specs,
.detail-description {
    background: #fff;
    border: 1.5px solid var(--color-border-light, #eceef6);
    border-radius: 16px;
    padding: 1.25rem 1.375rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

/* İlan Bilgileri specs grid */
.detail-specs__list {
    margin: 0;
    display: grid;
    gap: 0;
}

@media (min-width: 576px) {
    .detail-specs__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.5rem;
    }
}

.detail-specs__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .1875rem;
    padding: .6875rem 0;
    border-bottom: 1px solid var(--color-border-light, #eceef6);
}
.detail-specs__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.detail-specs__row:first-child {
    padding-top: 0;
}

.detail-specs__label {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--color-text-muted, #8b8fa8);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.detail-specs__label i {
    font-size: .875rem;
    color: var(--color-brand-accent, #4f46e5);
}

.detail-specs__value {
    font-size: .9375rem;
    font-weight: 500;
    color: var(--color-text-primary, #1a1a2e);
    margin: 0;
    line-height: 1.45;
    word-break: break-word;
}

.detail-specs__vip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .1875rem .5625rem;
    background: var(--color-badge-featured, #f59e0b);
    color: #3d1f00;
    border-radius: 100px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.detail-description__body {
    font-size: .9375rem;
    line-height: 1.78;
    color: var(--color-text-secondary, #4a4b5c);
    letter-spacing: .01em;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Önemli Uyarı — soft amber informational panel */
.detail-safety-notice {
    background: linear-gradient(145deg, #fffbeb 0%, #fef9e8 55%, #fef3c7 100%);
    border: 1.5px solid rgba(245, 158, 11, .26);
    border-radius: 16px;
    padding: 1.25rem 1.375rem;
    box-shadow: 0 2px 12px rgba(245, 158, 11, .07);
}

.detail-safety-notice__header {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    margin-bottom: .625rem;
}

.detail-safety-notice__icon {
    flex-shrink: 0;
    font-size: 1.125rem;
    line-height: 1.35;
    color: #d97706;
    margin-top: .0625rem;
}

.detail-safety-notice__title {
    font-size: .9375rem;
    font-weight: 700;
    color: #92400e;
    letter-spacing: -.01em;
    line-height: 1.35;
    margin: 0;
}

.detail-safety-notice__intro {
    font-size: .875rem;
    font-weight: 500;
    color: rgba(120, 53, 15, .88);
    line-height: 1.55;
    margin: 0 0 .875rem;
}

.detail-safety-notice__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .4375rem;
}

.detail-safety-notice__item {
    position: relative;
    padding-left: 1rem;
    font-size: .8125rem;
    font-weight: 400;
    line-height: 1.55;
    color: rgba(120, 53, 15, .92);
    word-break: break-word;
}

.detail-safety-notice__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: .55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d97706;
    transform: translateY(-50%);
}

/* --------------------------------------------------------------------------
   7. Fullscreen gallery modal
   -------------------------------------------------------------------------- */
.gallery-fs {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-fs[hidden] { display: none; }

.gallery-fs__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 14, .93);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gallery-fs__stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 3.5rem 5rem;
    box-sizing: border-box;
}

.gallery-fs__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 32px 96px rgba(0,0,0,.6);
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity .18s ease;
}

.gallery-fs__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.125rem;
    transition: background var(--dur-fast, .14s) ease;
    backdrop-filter: blur(4px);
}
.gallery-fs__close:hover { background: rgba(255,255,255,.28); }
.gallery-fs__close:focus-visible {
    outline: 2px solid rgba(255,255,255,.6);
    outline-offset: 2px;
}

.gallery-fs__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background var(--dur-fast, .14s) ease,
                transform   var(--dur-fast, .14s) ease;
    backdrop-filter: blur(4px);
}
.gallery-fs__nav:hover { background: rgba(255,255,255,.26); }
.gallery-fs__prev { left: 1.25rem; }
.gallery-fs__next { right: 1.25rem; }
.gallery-fs__nav:hover.gallery-fs__prev  { transform: translateY(-50%) translateX(-2px); }
.gallery-fs__nav:hover.gallery-fs__next  { transform: translateY(-50%) translateX(2px); }
.gallery-fs__nav:focus-visible {
    outline: 2px solid rgba(255,255,255,.6);
    outline-offset: 2px;
}

.gallery-fs__counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: rgba(0,0,0,.52);
    color: #fff;
    font-size: .8125rem;
    font-weight: 600;
    padding: .3125rem .875rem;
    border-radius: 100px;
    letter-spacing: .04em;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

/* --------------------------------------------------------------------------
   8. Responsive adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .detail-summary__title { font-size: 1.3125rem; }
    .detail-body { margin-top: 1rem; }
}

@media (max-width: 575.98px) {
    .detail-gallery__thumb   { width: 100px; height: 80px; }
    .detail-comm-card        { padding: 1rem; }
    .detail-wa-btn           { min-height: 52px; gap: .75rem; }
    .detail-wa-btn__icon     { font-size: 1.5rem; }
    .detail-tg-btn           { min-height: 52px; gap: .75rem; }
    .detail-tg-btn__icon      { font-size: 1.5rem; }
    .detail-specs,
    .detail-description,
    .detail-safety-notice { padding: 1rem 1.125rem; }
    .gallery-fs__stage       { padding: 3.5rem 1rem; }
    .gallery-fs__prev        { left: .5rem; }
    .gallery-fs__next        { right: .5rem; }
    .gallery-fs__nav         { width: 42px; height: 42px; font-size: 1rem; }
}

/* --------------------------------------------------------------------------
   9. Accessibility: reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .detail-gallery__main-img { transition: none; }
    .gallery-fs__img { transition: none; }
    .detail-wa-btn { transition: none; }
    .detail-gallery__thumb { transition: none; }
}

/* --------------------------------------------------------------------------
   10. Dark mode architecture (future-ready)
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    .detail-comm-card,
    .detail-specs,
    .detail-description {
        background: var(--color-card-bg, #1e1e2e);
        border-color: var(--color-border, #2d2d44);
    }
    .detail-safety-notice {
        background: linear-gradient(145deg, #2a2418 0%, #1f1a12 100%);
        border-color: rgba(245, 158, 11, .22);
        box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
    }
    .detail-safety-notice__title { color: #fcd34d; }
    .detail-safety-notice__intro,
    .detail-safety-notice__item { color: rgba(253, 230, 138, .88); }
    .detail-safety-notice__icon,
    .detail-safety-notice__item::before { color: #fbbf24; background: #fbbf24; }
    .detail-summary__title,
    .detail-specs__value {
        color: var(--color-text-primary, #f0f0ff);
    }
    .detail-gallery__stage {
        background: var(--color-surface-raised, #202035);
    }
}
