/**
 * DEEP TEMA — Mobil UX İyileştirmeleri
 * Kapsam: body.home-minimal (deep tema)
 * Yüklenme sırası: awa-perf-tail.css sonrasında
 */

/* ====== CSS DEĞİŞKENLERİ ====== */
:root {
    --deep-accent: #121212;
    --deep-accent-hover: #2a2a2a;
    --deep-accent-light: #f3f4f6;
    --deep-hairline: #e5e7eb;
    --deep-text: #111;
    --deep-muted: #6b7280;
    --deep-tabbar-h: 62px;
    --deep-tab-active: #111;
}

/* ====== GENEL MOBİL TAŞMA ÖNLEME ====== */
@media (max-width: 991.98px) {
    html {
        overflow-x: hidden;
        overflow-x: clip;
    }
    body.home-minimal {
        overflow-x: hidden;
        overflow-x: clip;
        position: relative;
    }
    body.home-minimal #main-content,
    body.home-minimal main#main-content {
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
        overflow-x: clip;
        box-sizing: border-box;
    }
    body.home-minimal #main-content img,
    body.home-minimal #main-content video {
        max-width: 100%;
        height: auto;
    }
}

/* ====== SAYFA AÇILIŞ ANİMASYONLARI ====== */
@keyframes deep-page-fade {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes deep-card-rise {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes deep-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
@keyframes deep-tab-glow {
    from { opacity: 0; transform: scaleX(0); }
    to   { opacity: 1; transform: scaleX(1); }
}

body.home-minimal #main-content {
    animation: deep-page-fade 0.32s ease both;
}

/* ====== MODERN ALT NAVIGASYON — DEEP SÜRÜM ====== */
.modern-footer-mobile {
    background: #fff !important;
    border-top: 1px solid var(--deep-hairline) !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08) !important;
    padding-bottom: max(0px, env(safe-area-inset-bottom)) !important;
    z-index: 10050 !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.modern-footer-mobile .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}

.modern-footer-mobile .row {
    margin: 0 !important;
}

/* Her sekme */
.modern-footer-mobile__link {
    color: var(--deep-muted) !important;
    text-decoration: none !important;
    transition: color 0.18s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    font-size: 0.6rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    min-height: var(--deep-tabbar-h) !important;
    padding: 0.5rem 0.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    position: relative !important;
    cursor: pointer !important;
    border: none !important;
    background: transparent !important;
    width: 100% !important;
}

.modern-footer-mobile__link svg {
    display: block !important;
    transition: transform 0.18s ease, color 0.18s ease !important;
}

/* Aktif sekme — siyah */
.modern-footer-mobile__link.is-active,
.modern-footer-mobile__link--active {
    color: var(--deep-tab-active) !important;
    font-weight: 700 !important;
}

.modern-footer-mobile__link.is-active svg,
.modern-footer-mobile__link--active svg {
    color: var(--deep-tab-active) !important;
}

/* Aktif çizgi üstte */
.modern-footer-mobile__link.is-active::before,
.modern-footer-mobile__link--active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2.5px;
    background: var(--deep-tab-active);
    border-radius: 0 0 4px 4px;
    animation: deep-tab-glow 0.2s ease both;
}

/* Dokunma geri bildirimi */
.modern-footer-mobile__link:active {
    background: rgba(0, 0, 0, 0.04) !important;
}

.modern-footer-mobile__link:active svg {
    transform: scale(0.88) !important;
}

/* Sepet rozeti */
.modern-footer-mobile__badge {
    position: absolute !important;
    top: 7px !important;
    right: calc(50% - 23px) !important;
    background: #111 !important;
    color: #fff !important;
    font-size: 0.585rem !important;
    font-weight: 700 !important;
    min-width: 1.1rem !important;
    height: 1.1rem !important;
    line-height: 1.1rem !important;
    padding: 0 3px !important;
    border-radius: 999px !important;
    text-align: center !important;
    border: 1.5px solid #fff !important;
}

/* Lightbox açıkken gizle */
body.lightbox-open .modern-footer-mobile {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Mobil menü açıkken gizle */
body.mobile-menu-opened .modern-footer-mobile {
    transform: translateY(100%) !important;
}

/* Ana içerik alt padding */
@media (max-width: 991.98px) {
    body.home-minimal #main-content {
        padding-bottom: calc(var(--deep-tabbar-h) + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.home-minimal .footer-section {
        margin-bottom: calc(var(--deep-tabbar-h) + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ====== ÜRÜN KARTLARI — DEEP ====== */
@media (max-width: 767.98px) {
    .product-card,
    .product-item {
        animation: deep-card-rise 0.28s ease both;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    /* Hover lift — sadece hover-capable cihazlarda */
    @media (hover: hover) and (pointer: fine) {
        .product-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
        }
    }

    .product-card .wishlist-btn,
    .product-card .add-to-wishlist {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .product-card .product-name,
    .product-card .product-title {
        font-size: 0.8125rem !important;
        line-height: 1.35 !important;
    }
    .product-card .price-old {
        font-size: 0.6875rem !important;
    }
    .product-card .price,
    .product-card .product-price {
        font-size: 0.875rem !important;
        font-weight: 600 !important;
    }
}

/* ====== KATEGORİ SAYFASI ====== */
@media (max-width: 991.98px) {
    .filter-bar,
    .shop-toolbar,
    .category-toolbar,
    .shop-main-bar {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        flex-wrap: nowrap !important;
    }
    .filter-bar::-webkit-scrollbar,
    .shop-toolbar::-webkit-scrollbar {
        display: none !important;
    }
    .filter-btn,
    .filter-dropdown-toggle {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .filter-btn.active,
    .filter-btn.is-active {
        background: #111 !important;
        border-color: #111 !important;
        color: #fff !important;
    }
}

@media (max-width: 767.98px) {
    .sort-dropdown-menu.show,
    .sort-dropdown-menu {
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
    }
}

/* ====== ÜRÜN DETAY SAYFASI ====== */
@media (max-width: 767.98px) {
    /* Ürün sekmeleri yatay scroll */
    .product-tabs .nav-tabs,
    .product-details-tabs.nav-tabs,
    .tabs-horizontal.nav-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        border-bottom: 1px solid var(--deep-hairline) !important;
    }
    .product-tabs .nav-tabs::-webkit-scrollbar,
    .product-details-tabs.nav-tabs::-webkit-scrollbar {
        display: none !important;
    }
    .product-tabs .nav-link,
    .product-details-tabs .nav-link {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        font-size: 0.8125rem !important;
        padding: 0.65rem 0.9rem !important;
        min-height: 44px !important;
    }

    /* Sepete ekle — büyük dokunma */
    .btn-add-to-cart,
    .add-to-cart-btn,
    .btn.btn-primary.add-to-cart {
        min-height: 52px !important;
        font-size: 0.9rem !important;
        border-radius: 10px !important;
        -webkit-tap-highlight-color: transparent !important;
        transition: transform 0.12s ease, background 0.18s ease !important;
    }
    .btn-add-to-cart:active,
    .add-to-cart-btn:active {
        transform: scale(0.972) !important;
    }
}

/* ====== ÖDEME SAYFASI ====== */
@media (max-width: 575.98px) {
    .checkout-steps,
    .steps-bar {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding-bottom: 4px !important;
    }
    .checkout-steps::-webkit-scrollbar { display: none !important; }

    .address-grid,
    .checkout-address-grid {
        grid-template-columns: 1fr !important;
    }

    .checkout-product-title,
    .order-product-name {
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }
}

/* Form focus */
body.home-minimal .checkout-page input:focus,
body.home-minimal .checkout-page select:focus,
body.home-minimal .checkout-page textarea:focus {
    outline: none !important;
    border-color: #111 !important;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

/* ====== MOBİL ARAMA MODALI ====== */
@media (max-width: 575.98px) {
    .mobile-search-modal__content {
        border-radius: 1.25rem 1.25rem 0 0 !important;
        padding: 1rem 1rem 1.25rem !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        max-height: 88dvh !important;
        overflow-y: auto !important;
        animation: deep-slide-up 0.3s cubic-bezier(0.32, 0.72, 0, 1) !important;
    }
    .mobile-search-modal__overlay {
        background: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(3px) !important;
    }
    .mobile-search-modal__input {
        font-size: 16px !important;
        height: 3rem !important;
        border-radius: 0.625rem !important;
    }
}

/* ====== DOKUNMA GERİBİLDİRİMİ ====== */
body.home-minimal .btn,
body.home-minimal button {
    -webkit-tap-highlight-color: transparent;
}
body.home-minimal a {
    -webkit-tap-highlight-color: transparent;
}
body.home-minimal .btn-primary {
    transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease !important;
}
body.home-minimal .btn-primary:active {
    transform: scale(0.972) !important;
}

/* ====== SCROLL TO TOP ====== */
@media (max-width: 991.98px) {
    #scrollTop,
    .scroll-to-top-btn {
        bottom: calc(var(--deep-tabbar-h) + env(safe-area-inset-bottom, 0px) + 0.75rem) !important;
        right: 1rem !important;
        width: 42px !important;
        height: 42px !important;
        font-size: 0.875rem !important;
    }
}

/* ====== HEADER SEPETİ ====== */
@media (max-width: 767.98px) {
    .cart-amount,
    .header-tools__cart .cart-amount {
        background-color: #111 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
        border-radius: 999px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
    }
}

/* ====== FOOTER — MOBİL ====== */
@media (max-width: 575.98px) {
    .footer-section .container,
    .footer .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .footer-collapse-btn,
    .footer-heading-btn {
        min-height: 48px !important;
    }
}

/* ====== BLOG — MOBİL ====== */
@media (max-width: 575.98px) {
    .blog-grid,
    .blog-card-grid {
        grid-template-columns: 1fr !important;
    }
    .blog-card__img-wrap {
        aspect-ratio: 16/9 !important;
    }
}

/* ====== HESAP SAYFASI ====== */
@media (max-width: 575.98px) {
    .orders-table th:nth-child(3),
    .orders-table td:nth-child(3) {
        display: none !important;
    }
    .order-card-header {
        gap: 8px !important;
    }
    .order-status-badge {
        font-size: 0.6875rem !important;
    }
}

/* ====== MODAL — MOBİL TAM EKRAN ====== */
@media (max-width: 575.98px) {
    .address-modal,
    .checkout-modal {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 1.25rem 1.25rem 0 0 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        max-height: 90dvh !important;
        overflow-y: auto !important;
    }
}

/* ====== GÜVENLİ ALAN — iOS ====== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .modern-footer-mobile {
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
}

/* ====== REDUCED MOTION ====== */
@media (prefers-reduced-motion: reduce) {
    body.home-minimal #main-content,
    .product-card,
    .product-item {
        animation: none !important;
    }
    .btn,
    .modern-footer-mobile__link {
        transition: none !important;
    }
}

/* ====== SLIDER PAGİNATION DOTS — MOBİL ====== */
/* 48px touch target çok fazla alan alıyor; mobilde 32px'e düşür */
@media (max-width: 767.98px) {
    .awp-modern-product-slider-pagination,
    .awp-viewed-products-pagination,
    .awp-similar-products-pagination,
    .awp-modern-blog-slider-pagination {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0 !important;
        row-gap: 0 !important;
        overflow: hidden !important;
        max-width: 100% !important;
    }

    .awp-modern-product-slider-pagination button.awp-modern-product-slider-pagination-dot,
    .awp-viewed-products-pagination button.awp-viewed-products-pagination-dot,
    .awp-similar-products-pagination button.awp-similar-products-pagination-dot,
    .awp-modern-blog-slider-pagination button.awp-modern-blog-slider-pagination-dot,
    .hp-homepage-section .awp-modern-product-slider-pagination .awp-modern-product-slider-pagination-dot,
    .hp-homepage-section.awp-modern-product-slider-section .awp-modern-product-slider-pagination .awp-modern-product-slider-pagination-dot {
        min-width: 28px !important;
        min-height: 28px !important;
        width: 28px !important;
        height: 28px !important;
    }

    /* Nokta boyutu küçük ekranda biraz daha küçük */
    .awp-modern-product-slider-pagination button.awp-modern-product-slider-pagination-dot::before,
    .awp-viewed-products-pagination button.awp-viewed-products-pagination-dot::before,
    .hp-homepage-section .awp-modern-product-slider-pagination .awp-modern-product-slider-pagination-dot::before,
    .hp-homepage-section.awp-modern-product-slider-section .awp-modern-product-slider-pagination .awp-modern-product-slider-pagination-dot::before {
        width: 5px !important;
        height: 5px !important;
    }

    /* Aktif nokta — kısa pill */
    .awp-modern-product-slider-pagination button.awp-modern-product-slider-pagination-dot.active::before,
    .awp-viewed-products-pagination button.awp-viewed-products-pagination-dot.active::before,
    .hp-homepage-section .awp-modern-product-slider-pagination .awp-modern-product-slider-pagination-dot.active::before,
    .hp-homepage-section.awp-modern-product-slider-section .awp-modern-product-slider-pagination .awp-modern-product-slider-pagination-dot.active::before {
        width: 16px !important;
        height: 5px !important;
        border-radius: 8px !important;
    }

    /* 8'den fazla dot varsa bazılarını gizle — bant görüntüsü yerine minimal */
    .awp-modern-product-slider-pagination button.awp-modern-product-slider-pagination-dot:nth-child(n+9):not(.active) {
        display: none !important;
    }
}

/* ====== TAKIM TAB — CONTAINER PADDING FİX ====== */
@media (max-width: 767.98px) {
    /* Container yan padding'i sıfırla — kart kırıntıları azalsın */
    #tab-team-content .container.team-content-wrap {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #tab-team-content .team-content-section--custom-pdp {
        padding-top: 0 !important;
    }

    /* Kart kenar çizgileri yerine sadece alt çizgi (sol-sağ frame kalkar) */
    #tab-team-content .team-content-section--custom-pdp .productdetail-team-card {
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
        border-top: none !important;
        border-bottom: 1px solid #eef1f5 !important;
        box-shadow: none !important;
    }

    #tab-team-content .team-content-section--custom-pdp .productdetail-team-card:last-child {
        border-bottom: none !important;
    }

    /* Ürünler sütunu: arka plan ile çerçeve yerine liste görünümü */
    #tab-team-content .team-content-section--custom-pdp .team-products-column {
        background: #fff;
        border: 1px solid #e8eaed;
        border-radius: 10px;
        overflow: hidden;
    }

    /* Özet kutusu: tam genişlik, yan kenar boşlukları */
    #tab-team-content .team-content-section--custom-pdp .team-summary-column {
        padding: 0 12px;
    }

    /* Kicker gizle (daha önce gizledik, kesinleştir) */
    #tab-team-content .team-content-section__kicker {
        display: none !important;
    }
}
