:root {
    --ag-brand: #f15a24;
    --ag-brand-deep: #d84412;
    --ag-ink: #0f172a;
    --ag-muted: #64748b;
    --ag-surface: #ffffff;
    --ag-line: rgba(15, 23, 42, 0.09);
    --ag-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ag-shadow-soft: 0 18px 55px rgba(15, 23, 42, 0.08);
    --ag-shadow-hover: 0 28px 70px rgba(15, 23, 42, 0.14);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html { overflow-x: clip; }
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    color: #fff;
    background: var(--ag-brand);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid rgba(241, 90, 36, 0.38) !important;
    outline-offset: 3px !important;
}

/* Özel imleç yalnızca uygun cihazda JavaScript etkinleştirdikten sonra görünür. */
.cursor-dot,
.cursor-circle {
    opacity: 0;
    visibility: hidden;
}

html.ag-cursor-active * { cursor: none !important; }

html.ag-cursor-active .cursor-dot,
html.ag-cursor-active .cursor-circle {
    opacity: 1;
    visibility: visible;
}

html.ag-cursor-active body.is-hovering .cursor-dot { opacity: 0.18; }
html.ag-cursor-active body.is-hovering .cursor-circle { opacity: 0.5; }

/* Navigasyon */
body .space-nav {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.66));
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
    border-bottom-color: rgba(15, 23, 42, 0.06);
    box-shadow: 0 8px 34px rgba(15, 23, 42, 0.035);
}

body .space-nav::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(241,90,36,0.5), transparent);
    opacity: 0;
    transform: scaleX(0.55);
    transition: opacity 0.35s ease, transform 0.55s var(--ag-ease);
    pointer-events: none;
}

body .space-nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 14px 45px rgba(15, 23, 42, 0.09);
}

body .space-nav.scrolled::after {
    opacity: 1;
    transform: scaleX(1);
}

body .brand-logo img {
    filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.08));
}

@media (hover: hover) and (pointer: fine) {
    body .brand-logo:hover img { transform: translateY(-2px) scale(1.025); }

    body .popcart-menu {
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
        border: 1px solid rgba(15, 23, 42, 0.07);
        border-top: 3px solid var(--ag-brand);
    }
}

/* Hero alanlarında hafif, performans dostu ışık katmanları. */
body :is(.ag-s-hero, .ag-k-hero, .ag-dm-hero, .alt-tum-hero, .ag-p-hero, .ag-e-hero) {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

body :is(.ag-s-hero, .ag-k-hero, .ag-dm-hero, .alt-tum-hero, .ag-p-hero, .ag-e-hero) > :not(.ag-hero-aura) {
    position: relative;
    z-index: 2;
}

.ag-hero-aura {
    position: absolute;
    z-index: 1;
    width: min(48vw, 680px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241,90,36,0.28), rgba(241,90,36,0) 68%);
    filter: blur(3px);
    opacity: 0.8;
    pointer-events: none;
    animation: ag-aura-drift 11s ease-in-out infinite alternate;
}

.ag-hero-aura:first-of-type {
    top: -70%;
    left: -8%;
}

.ag-hero-aura:nth-of-type(2) {
    right: -10%;
    bottom: -95%;
    background: radial-gradient(circle, rgba(255,255,255,0.2), rgba(255,255,255,0) 68%);
    animation-delay: -5s;
}

@keyframes ag-aura-drift {
    from { transform: translate3d(-2%, -1%, 0) scale(0.94); }
    to { transform: translate3d(8%, 6%, 0) scale(1.08); }
}

/* Kaydırma ile görünme efekti; transform kullanan mevcut kart hover'larıyla çakışmaz. */
.ag-reveal {
    opacity: 0;
    filter: blur(8px);
    translate: 0 28px;
    transition:
        opacity 0.72s var(--ag-ease) var(--ag-delay, 0ms),
        filter 0.72s var(--ag-ease) var(--ag-delay, 0ms),
        translate 0.78s var(--ag-ease) var(--ag-delay, 0ms);
}

.ag-reveal.ag-in-view {
    opacity: 1;
    filter: none;
    translate: 0 0;
}

/* Kartlar, filtreler ve görseller */
body :is(
    .ag-f-card,
    .alt-tum-card,
    .ag-s-card,
    .ag-k-card,
    .ag-dm-card,
    .ag-p-card,
    .ag-e-card,
    .review-card,
    .choice-box
) {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: var(--ag-shadow-soft);
}

@media (hover: hover) and (pointer: fine) {
    body :is(
        .ag-f-card,
        .alt-tum-card,
        .ag-s-card,
        .ag-k-card,
        .ag-dm-card,
        .ag-p-card,
        .ag-e-card,
        .review-card,
        .choice-box
    ):hover {
        border-color: rgba(241, 90, 36, 0.22);
        box-shadow: var(--ag-shadow-hover);
    }

    body :is(
        .ag-f-card,
        .alt-tum-card,
        .ag-s-card,
        .ag-k-card,
        .ag-dm-card,
        .ag-p-card
    ):hover .swiper-slide-active img,
    body .ag-p-card:hover .ag-p-img-wrap img {
        transform: scale(1.055);
    }
}

body :is(
    .ag-f-slider-wrap,
    .alt-tum-slider-wrap,
    .ag-s-slider-wrap,
    .ag-k-slider-wrap,
    .ag-dm-slider-wrap,
    .ag-p-img-wrap
) img {
    transition: transform 0.8s var(--ag-ease), filter 0.5s ease;
}

body :is(
    .alt-tum-filter-card,
    .ag-s-filter-box,
    .ag-k-filter-box,
    .ag-dm-filter-box,
    .glass-search-box
) {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 65px rgba(15, 23, 42, 0.11);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

body :is(
    .alt-tum-input,
    .alt-tum-select,
    .ag-s-input,
    .ag-k-input,
    .ag-dm-input,
    .search-input,
    .form-control
) {
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

body :is(
    .alt-tum-input,
    .alt-tum-select,
    .ag-s-input,
    .ag-k-input,
    .ag-dm-input,
    .search-input,
    .form-control
):focus {
    border-color: var(--ag-brand) !important;
    box-shadow: 0 0 0 4px rgba(241, 90, 36, 0.12) !important;
}

body .r-info {
    min-width: 0;
}

body .r-info h5,
body .r-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body .r-price {
    flex: 0 0 auto;
    white-space: nowrap;
}

body :is(
    .alt-tum-btn-submit,
    .ag-s-btn-search,
    .ag-k-btn-search,
    .ag-dm-btn-search,
    .ag-f-btn-lux,
    .ag-e-btn-call,
    .search-action-btn,
    .btn-etelif
) {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
    transition: transform 0.3s var(--ag-ease), box-shadow 0.3s ease, background-color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    body :is(
        .alt-tum-btn-submit,
        .ag-s-btn-search,
        .ag-k-btn-search,
        .ag-dm-btn-search,
        .ag-f-btn-lux,
        .ag-e-btn-call,
        .search-action-btn,
        .btn-etelif
    ):hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 36px rgba(241, 90, 36, 0.22);
    }
}

/* Sabit çağrı butonu ve menü katman sırası */
body .reaching-container { z-index: 9000; }

body.mobile-nav-open .reaching-container,
body.mobile-nav-open .notification-wrapper {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body .reaching-container,
body .notification-wrapper {
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Mobil menü */
body .mobile-overlay {
    height: 100vh;
    height: 100dvh;
    overscroll-behavior: contain;
    touch-action: pan-y;
    background:
        radial-gradient(circle at 8% 4%, rgba(241,90,36,0.12), transparent 34%),
        rgba(255,255,255,0.985);
}

body .mobile-link,
body .mobile-sub-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body .mobile-sub-menu {
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

@media (max-width: 1300px) {
    body .burger-menu {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255,255,255,0.7);
        border: 1px solid rgba(15,23,42,0.08);
        box-shadow: 0 8px 22px rgba(15,23,42,0.08);
    }

    body .burger-line {
        right: 9px;
        width: 26px;
    }

    body .burger-line:nth-child(1) { top: 13px; }
    body .burger-line:nth-child(2) { top: 21px; width: 19px; }
    body .burger-line:nth-child(3) { top: 29px; }
    body .burger-menu.active .burger-line:nth-child(1),
    body .burger-menu.active .burger-line:nth-child(3) { top: 21px; }
}

@media (max-width: 767.98px) {
    body .nav-container { padding-right: 12px; }

    body .mobile-overlay {
        padding: calc(88px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
    }

    body .mobile-overlay > div:first-child { margin-bottom: 14px !important; }

    body .mobile-li { margin: 7px 0; }

    body .mobile-link {
        font-size: clamp(21px, 6.2vw, 26px);
        padding: 7px 16px;
    }

    body .mobile-sub-menu a {
        padding: 10px 12px;
        font-size: 15px;
    }

    body :is(.ag-s-hero, .ag-k-hero, .ag-dm-hero, .alt-tum-hero, .ag-p-hero, .ag-e-hero) h1 {
        font-size: clamp(30px, 9vw, 38px) !important;
        line-height: 1.08;
        text-wrap: balance;
    }

    .ag-hero-aura {
        width: 88vw;
        animation: none;
        opacity: 0.55;
    }

    body :is(
        .alt-tum-filter-card,
        .ag-s-filter-box,
        .ag-k-filter-box,
        .ag-dm-filter-box
    ) {
        padding: 18px !important;
        border-radius: 18px !important;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
    }

    body :is(
        .alt-tum-filter-card,
        .ag-s-filter-box,
        .ag-k-filter-box,
        .ag-dm-filter-box
    ) .d-flex.gap-2 > :is(input, select) {
        min-width: 0;
        width: 100%;
    }

    body :is(.ag-s-btn-search, .ag-k-btn-search, .ag-dm-btn-search) {
        min-height: 48px;
        flex: 1 1 auto;
    }

    body :is(.ag-s-btn-reset, .ag-k-btn-reset, .ag-dm-btn-reset) {
        min-width: 48px;
        min-height: 48px;
    }

    body :is(
        .ag-f-card,
        .alt-tum-card,
        .ag-s-card,
        .ag-k-card,
        .ag-dm-card,
        .ag-p-card
    ) {
        border-radius: 20px;
        box-shadow: 0 14px 38px rgba(15, 23, 42, 0.09);
    }

    body :is(.alt-tum-card-body, .ag-s-details, .ag-k-details, .ag-dm-details) {
        padding: 20px !important;
    }

    body :is(.ag-s-badge-status, .ag-k-badge-status, .ag-dm-badge-status) {
        max-width: 52%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-inline: 10px;
        letter-spacing: 0.65px;
    }

    body :is(.ag-s-badge-eids, .ag-k-badge-eids, .ag-dm-badge-eids) {
        max-width: 41%;
        padding-inline: 9px;
        white-space: nowrap;
    }

    body .reaching-container {
        top: auto;
        right: 0;
        bottom: calc(16px + env(safe-area-inset-bottom));
        transform: none;
        perspective: none;
    }

    body .reaching-link,
    body .reaching-link:hover,
    body .reaching-link:active {
        min-height: 50px;
        padding: 8px 13px 8px 12px;
        gap: 8px;
        border-radius: 34px 0 0 34px;
        transform: none;
        box-shadow: -8px 12px 28px rgba(15, 23, 42, 0.24);
    }

    body .reach-icon-box {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    body .reach-title { font-size: 12px; }
    body .reach-sub { display: none; }

    body .notification-wrapper {
        bottom: calc(82px + env(safe-area-inset-bottom));
        width: calc(100% - 24px);
    }

    body .social-3d-card {
        padding: 13px;
        gap: 11px;
    }

    body :is(
        .ag-s-hero,
        .ag-k-hero,
        .alt-tum-hero,
        .ag-p-hero,
        .ag-ab-hero,
        .alt-k-hero,
        .legal-hero,
        .policy-hero,
        .e-teklif-section
    ) {
        background-attachment: scroll !important;
    }

    body .modal-dialog {
        max-height: calc(100dvh - 24px);
        margin-block: 12px;
    }

    body .modal-content {
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

@media (max-width: 359.98px) {
    body :is(.ag-s-badge-status, .ag-k-badge-status, .ag-dm-badge-status) {
        max-width: 49%;
        font-size: 9px;
    }

    body :is(.ag-s-badge-eids, .ag-k-badge-eids, .ag-dm-badge-eids) span {
        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    .ag-reveal,
    .ag-reveal.ag-in-view {
        opacity: 1;
        filter: none;
        translate: none;
    }
}
