/* Reklam alanları — beyaz kart, isimlendirilmiş bölgeler */

/* Ana sayfa: hero yanında dikey reklam alanları */
.hero-page-ad-row {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 16px;
    gap: 20px;
    box-sizing: border-box;
}

.hero-page-ad-center {
    flex: 1;
    min-width: 0;
}

.ad-sidebar--hero-flank {
    width: 200px;
    flex-shrink: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.ad-sidebar--hero-flank .ad-unit {
    position: static;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: auto;
}

.ad-sidebar--hero-flank .ad-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.ad-sidebar--hero-flank .ad-slot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ad-sidebar--hero-flank .ad-slot-placeholder {
    flex: 1;
    justify-content: center;
    min-height: 180px;
}

.ad-sidebar--hero-flank .ad-slot.ad-slot--filled {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

.ad-sidebar--hero-flank .ad-slot.ad-slot--filled .ad-slot-body {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-sidebar--hero-flank .ad-slot.ad-slot--filled .ad-item,
.ad-sidebar--hero-flank .ad-slot.ad-slot--filled img {
    border-radius: 12px;
}

/* Ana sayfa üst: 1280×420 banner (GIF / fotoğraf) */
.home-main-banner-ad {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 16px;
    padding: 0 16px;
    box-sizing: border-box;
}

.home-main-banner-ad .ad-zone-home-top.ad-inline.ad-slot--filled .ad-item {
    max-width: 100% !important;
    width: 100%;
    aspect-ratio: 1280 / 420;
    max-height: 420px;
    margin-left: 0;
    margin-right: 0;
}

.home-main-banner-ad .ad-zone-home-top.ad-slot--filled .ad-link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.home-main-banner-ad .ad-zone-home-top.ad-slot--filled .ad-link img,
.home-main-banner-ad .ad-zone-home-top.ad-slot--filled img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
}

.home-main-banner-ad .ad-zone-home-top.ad-slot--filled .ad-html {
    width: 100%;
    aspect-ratio: 1280 / 420;
    max-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.home-main-banner-ad .ad-zone-home-top.ad-slot--filled .ad-html img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home-main-banner-ad .ad-zone-home-top.ad-slot--empty {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 !important;
}

.home-main-banner-ad .ad-zone-home-top.ad-slot--empty .ad-slot-header {
    margin-bottom: 8px;
}

.home-main-banner-ad .ad-zone-home-top.ad-slot--empty .ad-slot-body {
    aspect-ratio: 1280 / 420;
    max-height: 420px;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .home-main-banner-ad .ad-zone-home-top.ad-inline.ad-slot--filled .ad-item {
        max-height: none;
    }

    .home-main-banner-ad .ad-zone-home-top.ad-slot--filled .ad-link img,
    .home-main-banner-ad .ad-zone-home-top.ad-slot--filled img {
        max-height: none;
    }
}

/* Ana sayfa üst — çoklu reklam kaydırıcı */
.home-main-banner-ad .home-top-ad-slider {
    position: relative;
    width: 100%;
}

.home-main-banner-ad .home-top-ad-slider__badges {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    max-width: calc(100% - 24px);
    pointer-events: none;
}

.home-main-banner-ad .home-top-ad-slider__badge {
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #fff;
    background: rgba(15, 18, 25, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.home-main-banner-ad .home-top-ad-slider__badge--position {
    font-variant-numeric: tabular-nums;
    min-width: 3.5em;
    justify-content: center;
}

@media (max-width: 480px) {
    .home-main-banner-ad .home-top-ad-slider__badges {
        top: 8px;
        right: 8px;
        gap: 6px;
    }

    .home-main-banner-ad .home-top-ad-slider__badge {
        font-size: 11px;
        padding: 5px 10px;
    }
}

.home-main-banner-ad .home-top-ad-slider__viewport {
    overflow: hidden;
    width: 100%;
    border-radius: 10px;
    touch-action: pan-y pinch-zoom;
}

.home-main-banner-ad .home-top-ad-slider__track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    will-change: transform;
}

.home-main-banner-ad .home-top-ad-slider__slide {
    flex: 0 0 auto;
    box-sizing: border-box;
}

.home-main-banner-ad .home-top-ad-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    padding: 0;
}

.home-main-banner-ad .home-top-ad-slider__nav:hover {
    background: rgba(0, 0, 0, 0.72);
}

.home-main-banner-ad .home-top-ad-slider__nav--prev {
    left: max(10px, env(safe-area-inset-left));
}

.home-main-banner-ad .home-top-ad-slider__nav--prev::after {
    content: '';
    width: 10px;
    height: 10px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    margin-left: 4px;
}

.home-main-banner-ad .home-top-ad-slider__nav--next {
    right: max(10px, env(safe-area-inset-right));
}

.home-main-banner-ad .home-top-ad-slider__nav--next::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid #fff;
    border-top: 2px solid #fff;
    transform: rotate(45deg);
    margin-right: 4px;
}

@media (max-width: 480px) {
    .home-main-banner-ad .home-top-ad-slider__nav {
        width: 36px;
        height: 36px;
    }
}

/* Ana sayfa orta ve alt — 1400×200 banner */
.home-ad-1400x200 {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.home-ad-1400x200 .ad-zone-home-mid.ad-inline.ad-slot--filled .ad-item,
.home-ad-1400x200 .ad-zone-home-bottom.ad-inline.ad-slot--filled .ad-item {
    max-width: 100% !important;
    width: 100%;
    aspect-ratio: 1400 / 200;
    max-height: 200px;
    margin-left: 0;
    margin-right: 0;
}

.home-ad-1400x200 .ad-zone-home-mid.ad-slot--filled .ad-link,
.home-ad-1400x200 .ad-zone-home-bottom.ad-slot--filled .ad-link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.home-ad-1400x200 .ad-zone-home-mid.ad-slot--filled .ad-link img,
.home-ad-1400x200 .ad-zone-home-mid.ad-slot--filled img,
.home-ad-1400x200 .ad-zone-home-bottom.ad-slot--filled .ad-link img,
.home-ad-1400x200 .ad-zone-home-bottom.ad-slot--filled img {
    width: 100%;
    height: 100%;
    max-height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
}

.home-ad-1400x200 .ad-zone-home-mid.ad-slot--filled .ad-html,
.home-ad-1400x200 .ad-zone-home-bottom.ad-slot--filled .ad-html {
    width: 100%;
    aspect-ratio: 1400 / 200;
    max-height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.home-ad-1400x200 .ad-zone-home-mid.ad-slot--filled .ad-html img,
.home-ad-1400x200 .ad-zone-home-bottom.ad-slot--filled .ad-html img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home-ad-1400x200 .ad-zone-home-mid.ad-slot--empty .ad-slot-body,
.home-ad-1400x200 .ad-zone-home-bottom.ad-slot--empty .ad-slot-body {
    aspect-ratio: 1400 / 200;
    max-height: 200px;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Beyaz reklam kutusu */
.ad-slot {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 12px 14px 14px;
    box-sizing: border-box;
}

.ad-slot--empty .ad-slot-body {
    min-height: 72px;
}

.ad-slot-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    line-height: 1.2;
    text-align: center;
}

.ad-slot-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1f2937;
    padding: 6px 12px;
    border-radius: 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    max-width: 100%;
    line-height: 1.3;
}

.ad-slot-code {
    font-size: 9px;
    font-family: ui-monospace, Menlo, Monaco, Consolas, monospace;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.ad-slot-body {
    min-height: 0;
}

/* İçerik varken: sadece reklam — çerçeve/etiket yok, şık sunum */
.ad-slot.ad-slot--filled {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.ad-slot.ad-slot--filled .ad-slot-body {
    padding: 0;
}

.ad-slot.ad-slot--filled .ad-item {
    margin-bottom: 20px;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.07),
        0 10px 24px -4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.28s ease, transform 0.28s ease;
}

.ad-slot.ad-slot--filled .ad-item:last-child {
    margin-bottom: 0;
}

.ad-slot.ad-slot--filled .ad-item:hover {
    box-shadow:
        0 8px 16px -4px rgba(0, 0, 0, 0.1),
        0 16px 40px -8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.ad-slot.ad-slot--filled .ad-link {
    line-height: 0;
    border-radius: 14px;
}

.ad-slot.ad-slot--filled img {
    border-radius: 14px;
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

.ad-slot.ad-slot--filled .ad-html {
    font-size: inherit;
    line-height: 1.5;
    border-radius: 14px;
    overflow: hidden;
}

.ad-slot.ad-slot--filled .ad-html img {
    border-radius: 14px;
}

/* Inline (ana sayfa orta/üst): ortalanmış, maksimum genişlik */
.ad-inline.ad-slot--filled {
    max-width: 100%;
}

.ad-inline.ad-slot--filled .ad-item {
    max-width: min(100%, 728px);
    margin-left: auto;
    margin-right: auto;
}

.ad-slot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 10px;
    text-align: center;
    background: #fafafa;
    border-radius: 8px;
    border: 1px dashed #e5e7eb;
}

.ad-slot-placeholder-line1 {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.ad-slot-placeholder-line2 {
    font-size: 11px;
    color: #9ca3af;
    max-width: 220px;
    line-height: 1.4;
}

.ad-unit {
    position: sticky;
    top: 100px;
    max-width: 100%;
    box-sizing: border-box;
}

.ad-inline.ad-unit {
    position: static;
}

.ad-unit .ad-item {
    margin-bottom: 24px;
}

.ad-unit .ad-item:last-child {
    margin-bottom: 0;
}

.ad-unit img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.ad-unit .ad-link {
    display: block;
    transition: opacity 0.2s ease;
}

.ad-unit .ad-link:hover {
    opacity: 0.9;
}

.ad-unit .ad-html {
    font-size: 13px;
    line-height: 1.5;
}

.ad-unit .ad-html img {
    max-width: 100%;
    height: auto;
}

.ad-inline {
    margin: 24px 0;
    text-align: center;
}

.ad-inline .ad-item {
    display: inline-block;
    max-width: 100%;
}

/* Sadece mobilde görünen alanlar (mobile_top / mobile_bottom) */
.ad-zone-mobile-only {
    display: none !important;
}

/* Mobilde tüm reklamlar gizli — telefon ve tablet */
@media (max-width: 991px) {
    .ad-unit,
    .ad-slot,
    .home-main-banner-ad,
    .home-ad-1400x200,
    .home-top-ad-slider,
    .ad-strip-mobile-wrap,
    .ad-zone-mobile-only,
    .accounts-ad-mid,
    .accounts-ad-bottom,
    .product-ad-top,
    .product-ad-bottom {
        display: none !important;
    }
}

@media (max-width: 1200px) {
    .ad-sidebar--hero-flank {
        width: 160px;
    }
    .hero-page-ad-row {
        gap: 14px;
    }
}

@media (max-width: 992px) {
    .hero-page-ad-row {
        flex-direction: column;
        padding: 0 12px;
        gap: 0;
    }
    .ad-sidebar--hero-flank {
        display: none;
    }
    .hero-page-ad-center {
        width: 100%;
    }
}

/* Sayfa gömüleri — taşma yok */
.accounts-ad-mid,
.accounts-ad-bottom,
.product-ad-top,
.product-ad-bottom {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.accounts-ad-mid {
    margin: 12px 0 8px;
}

.accounts-ad-bottom {
    margin: 20px 0 8px;
}

.product-ad-top {
    margin: 12px 0 16px;
}

.product-ad-bottom {
    margin: 24px auto 8px;
}

@media (max-width: 768px) {
    .ad-inline {
        margin: 16px 0;
    }

    .ad-slot:not(.ad-slot--filled) {
        padding: 10px 12px 12px;
    }

    .ad-slot.ad-slot--filled .ad-item:hover {
        transform: none;
    }
}

/* Koyu tema: hâlâ okunaklı açık yüzey */
body.dark-mode .ad-slot,
[data-theme="dark"] .ad-slot {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

body.dark-mode .ad-slot-badge,
[data-theme="dark"] .ad-slot-badge {
    background: #e5e7eb;
    color: #111827;
    border-color: #d1d5db;
}

body.dark-mode .ad-slot-code,
[data-theme="dark"] .ad-slot-code {
    color: #6b7280;
}

body.dark-mode .ad-slot-placeholder,
[data-theme="dark"] .ad-slot-placeholder {
    background: #f3f4f6;
    border-color: #d1d5db;
}

body.dark-mode .ad-slot-placeholder-line1,
[data-theme="dark"] .ad-slot-placeholder-line1 {
    color: #4b5563;
}

body.dark-mode .ad-slot-placeholder-line2,
[data-theme="dark"] .ad-slot-placeholder-line2 {
    color: #6b7280;
}

/* Dolu reklam — koyu temada gölge uyumu */
body.dark-mode .ad-slot.ad-slot--filled .ad-item,
[data-theme="dark"] .ad-slot.ad-slot--filled .ad-item {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.dark-mode .ad-slot.ad-slot--filled .ad-item:hover,
[data-theme="dark"] .ad-slot.ad-slot--filled .ad-item:hover {
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}
