/* ============================================================
   improvements.css
   KURAL: position:fixed kullanan hiçbir parent'a backdrop-filter,
   transform veya filter uygulanmaz — fixed çocukları kırar.
   ============================================================ */

/* ============================================================
   1. GENEL
   ============================================================ */
div { transition: none; }
a, button, img, input, textarea { transition: all 0.22s ease; }

.btn { position: relative; overflow: hidden; }
.btn::before { display: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.13); }
.btn:active { transform: translateY(0); box-shadow: none; }

/* ============================================================
   2. KART (backdrop-filter YOK — içinde fixed modal'lar var)
   ============================================================ */
.card {
    border-radius: 2rem 2rem 0 0;
    box-shadow: 0 -2px 30px rgba(0,0,0,0.1);
    /* backdrop-filter kullanılmadı */
}

.card-footer {
    background: linear-gradient(135deg, #111, #2a2a2a);
}

.profile-pic img {
    border: 4px solid #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    transition: transform 0.3s ease !important;
}
.profile-pic img:hover { transform: scale(1.04); }

/* ============================================================
   3. HARİTA MODAL
   JS'te display='flex' set edilir, CSS sadece konumu belirler.
   ============================================================ */
#mapModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.78) !important;
    z-index: 9999 !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 20px;
    box-sizing: border-box;
}

#mapModal iframe {
    width: 100%;
    max-width: 540px;
    height: 65vh;
    border-radius: 16px;
    border: none !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

#mapModal button {
    background: #fff;
    color: #1a1a1a;
    border: none;
    border-radius: 30px;
    padding: 10px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    width: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
#mapModal button:hover { background: #f0f0f0; }

/* ============================================================
   4. KART IZGARASI
   custom-links içinde grid item olmayan şeyler (modal vs.)
   grid'e dahil edilmez.
   ============================================================ */
.custom-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, 155px);
    justify-content: center;
    gap: 12px;
    padding: 8px 4px 16px;
    margin-top: 12px;
    text-transform: none;
    align-items: start;
}

/* Grid içindeki modal'ların grid item olmasını engelle */
.custom-links #mapModal,
.custom-links .modal,
.custom-links .modal-menu {
    display: none;
    grid-column: unset;
    position: fixed !important;
}

.link-box {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 14px 10px;
    width: 155px;
    height: 185px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.link-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.11);
    background: #fff;
}
.link-box i { font-size: 2.2rem; color: #222; }
.link-box span { font-size: 13px; font-weight: 600; color: #222; text-align: center; }
.link-box img {
    width: 100%;
    height: 95px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

/* ============================================================
   5. ÜRÜN KARTI
   ============================================================ */
.urun_ {
    width: 155px !important;
    height: 185px !important;
    min-height: unset;
    justify-content: flex-start;
}
.urun_ img {
    width: 100% !important;
    height: 95px !important;
    object-fit: cover !important;
    border-radius: 12px;
    border: none;
    flex-shrink: 0;
}
.urun_ span {
    font-size: 12px !important;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.urun_ .btn-white {
    font-size: 11px; padding: 3px 10px; border-radius: 20px;
    background: #1a1a1a; color: #fff; font-weight: 600; flex-shrink: 0;
}
.urun_ .btn-primary {
    font-size: 11px; padding: 3px 10px; border-radius: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; font-weight: 600; flex-shrink: 0;
}
.urun_ .btn-danger {
    font-size: 10px; padding: 2px 7px; border-radius: 20px;
}

/* ============================================================
   6. SEPET İKONU
   sepet-ikon .card dışında, _UserLayout'ta body altında —
   backdrop-filter güvenli.
   ============================================================ */
.sepet-ikon {
    z-index: 101;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 6px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.sepet-ikon:hover { transform: scale(1.06); box-shadow: 0 6px 22px rgba(0,0,0,0.18); }
.sepet-icon { font-size: 1.4rem; animation: none; color: #ee0979; }
.sepet-bildirim {
    animation: none; font-size: 11px; width: 18px; height: 18px;
    position: static;
    background: linear-gradient(135deg, #ff6b6b, #ee0979);
    box-shadow: 0 2px 6px rgba(238,9,121,0.4);
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-weight: 700; color: #fff;
}

/* ============================================================
   7. MOBİL NAV DOKUNUŞ EFEKTİ
   ============================================================ */
.row_ .social-links .btn_ {
    transition: transform 0.18s ease !important;
}
.row_ .social-links .btn_:active { transform: scale(0.88); }

/* ============================================================
   7B. MENÜ MODAL — SIDE DRAWER
   KURAL:
   - #menuModal overlay: backdrop-filter YOK çünkü .modal-content-menu
     position:fixed çocuk — backdrop-filter containing block yaratır.
   - display JS tarafından yönetilir (display:none / display:block).
   - CSS hiçbir zaman display set etmez.
   ============================================================ */

#menuModal {
    position: fixed !important;
    inset: 0 !important;
    /* backdrop-filter KULLANILMAZ — fixed çocuk bozulur */
    background: rgba(0, 0, 0, 0.55) !important;
    z-index: 9998 !important;
}

/* Drawer paneli — her zaman DOM'da, sadece translateX ile gizli */
.modal-content-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: min(340px, 88vw) !important;
    height: 100dvh !important;
    background: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    box-shadow: -8px 0 40px rgba(0,0,0,0.22) !important;
    border-radius: 0 !important;
    transform: translateX(110%) !important;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 9999 !important;
}
.modal-content-menu.slide-in-menu {
    transform: translateX(0) !important;
}

/* Üst renk şeridi */
.modal-content-menu::before {
    content: '';
    display: block;
    width: 100%;
    height: 5px;
    flex-shrink: 0;
    background: linear-gradient(90deg, #667eea, #764ba2, #ee0979);
}

/* Kapat butonu */
.close-menu {
    position: absolute !important;
    top: 18px !important; right: 20px !important;
    width: 36px !important; height: 36px !important;
    background: #f2f2f2 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.4rem !important;
    line-height: 1 !important;
    color: #1a1a1a !important;
    cursor: pointer !important;
    transition: background 0.18s ease, transform 0.18s ease !important;
    z-index: 10 !important;
    font-weight: 300 !important;
    /* style.css'deki button{width:100%} ezme */
    width: 36px !important;
}
.close-menu:hover {
    background: #e0e0e0 !important;
    transform: rotate(90deg) !important;
}

/* Menü içeriği */
.menu_ {
    display: flex !important;
    flex-direction: column !important;
    padding: 64px 32px 40px !important;
    gap: 0 !important;
    flex: 1 !important;
}

.menu-item {
    display: block !important;
    text-decoration: none !important;
    padding: 18px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    position: relative !important;
    transition: padding-left 0.2s ease !important;
}
.menu-item:last-child { border-bottom: none !important; }

.menu-item::after {
    content: '→';
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem; color: #ccc;
    transition: right 0.2s ease, color 0.2s ease;
}
.menu-item:hover { padding-left: 8px !important; }
.menu-item:hover::after { right: -4px; color: #667eea; }

.menu-item h2 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    letter-spacing: -0.3px !important;
    transition: color 0.18s ease !important;
}
.menu-item:hover h2 { color: #667eea !important; }

/* ============================================================
   7C. QR MODAL
   KURAL: CSS display set etmez — JS yönetir (display:block/none).
   display:block gelince flex layout için attribute selector kullan.
   ============================================================ */

/* Sayfa yüklendiğinde display:none (inline) yoksa bile gizli olsun */
#qrModal:not([style*="display: block"]):not([style*="display:block"]) {
    display: none !important;
}

/* JS display:block set edince flex overlay yap */
#qrModal[style*="display: block"],
#qrModal[style*="display:block"] {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.6) !important;
    z-index: 9998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    /* backdrop-filter güvenli — içinde fixed child YOK, .modal-content relative */
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}

.modal-content {
    background: #fff !important;
    border-radius: 24px !important;
    padding: 32px 28px 28px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    max-width: 320px !important;
    width: 100% !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22) !important;
    position: relative !important;
}
.modal-content h2 {
    font-size: 1.1rem !important; font-weight: 700 !important;
    color: #1a1a1a !important; text-align: center !important; margin: 0 !important;
}
.modal-content h4 {
    font-size: 0.85rem !important; color: #888 !important;
    font-weight: 500 !important; text-align: center !important; margin: 0 !important;
}
.modal-content p {
    font-size: 0.78rem !important; color: #aaa !important;
    margin: 0 !important; text-align: center !important;
}
.modal-content .close {
    position: absolute !important;
    top: 14px !important; right: 18px !important;
    width: 32px !important; height: 32px !important;
    background: #f2f2f2 !important;
    border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 1.3rem !important; color: #333 !important; cursor: pointer !important;
    transition: background 0.18s ease, transform 0.18s ease !important;
    line-height: 1 !important;
}
.modal-content .close:hover {
    background: #e0e0e0 !important; transform: rotate(90deg) !important;
}
.qr-code canvas, .qr-code img { border-radius: 12px !important; }

/* ============================================================
   7D. DESKTOP NAVİGASYON
   ============================================================ */
@media (min-width: 480px) {
    .row_ { gap: 4px; padding: 6px 0; }
    .row_ .social-links { margin-bottom: 8px; }
    .row_ .social-links .btn_,
    .row_ .social-links a {
        background: #f4f4f4;
        border-radius: 50%;
        width: 56px; height: 56px;
        display: flex; align-items: center; justify-content: center;
        font-size: 1.5rem;
        transition: transform 0.2s ease, background 0.2s ease !important;
    }
    .row_ .social-links .btn_:hover,
    .row_ .social-links a:hover { background: #e8e8e8; transform: scale(1.08); }
    .row_ .social-links .title_ { font-size: 11px; font-weight: 600; color: #555; margin-top: 4px; }
}

/* ============================================================
   8. ÜRÜN DETAY SLIDER
   ============================================================ */
.urun-swiper {
    width: 100%; height: 280px;
    border-radius: 18px; overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    will-change: transform;
    contain: layout style;
}
.urun-swiper .swiper-slide {
    display: flex; align-items: center; justify-content: center;
    background: #f5f5f5; height: 280px;
}
.urunDetay_img {
    width: 100% !important; height: 280px !important;
    object-fit: contain !important;
    border: none !important; border-radius: 0 !important;
    background: #f5f5f5;
}
.urun-pagination { bottom: 10px !important; }
.urun-pagination .swiper-pagination-bullet { background: rgba(0,0,0,0.35); opacity: 1; }
.urun-pagination .swiper-pagination-bullet-active {
    background: #1a1a1a; width: 20px; border-radius: 4px;
    transition: width 0.2s ease !important;
}
.urun-prev, .urun-next {
    color: #1a1a1a; background: rgba(255,255,255,0.88);
    border-radius: 50%; width: 32px !important; height: 32px !important;
    transition: background 0.2s ease !important;
}
.urun-prev::after, .urun-next::after { font-size: 13px !important; font-weight: 700; }
.urun-prev:hover, .urun-next:hover { background: #fff; }

/* ============================================================
   9. ÜRÜN DETAY SAYFASI
   ============================================================ */
.urunDetay {
    display: flex; flex-direction: column;
    align-items: center; gap: 1rem; margin: 1rem 0 2rem;
}
.urun-baslik { font-size: 1.15rem; font-weight: 700; color: #1a1a1a; text-align: center; margin: 0; line-height: 1.4; }
.content_ { font-size: 0.9rem; color: #555; line-height: 1.75; text-align: left; width: 100%; padding: 0 4px; }
.urun-fiyat-alan { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fiyat-eski-satir { display: flex; align-items: center; gap: 8px; }
.fiyat-eski { text-decoration: line-through; opacity: 0.4; font-size: 1rem; color: #333; }
.indirim-badge { background: #ff3b30; color: #fff; font-size: 0.78rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.fiyat-yeni { font-size: 1.4rem; font-weight: 800; color: #1a1a1a; letter-spacing: -0.5px; }
.urunDetay .btns { display: flex; flex-direction: row; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.urunDetay .btn-primary {
    font-size: 0.95rem; font-weight: 600; padding: 12px 26px; border-radius: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border: none; cursor: pointer;
    box-shadow: 0 4px 15px rgba(102,126,234,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.urunDetay .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102,126,234,0.5); }

/* ============================================================
   10. SAYFA BAŞLIKLARI
   ============================================================ */
.card > h1.fade-up { font-size: 1.4rem; font-weight: 800; color: #1a1a1a; margin: 1rem 0 0.2rem; }
.card > h2.fade-up { font-size: 0.88rem; font-weight: 400; color: #999; margin-bottom: 0.5rem; }

/* ============================================================
   11. SEPET SAYFASI
   ============================================================ */
.sepet_ { margin: 12px 0; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.07); overflow: hidden; }
.sepet-item thead { background: linear-gradient(135deg, #f8f9fa, #e9ecef); font-size: 13px; }
.sepet-item th, .sepet-item td { padding: 11px 14px; font-size: 13px; }
.sepet-item img { border-radius: 10px; width: 60px !important; height: 60px; object-fit: cover; }

/* ============================================================
   12. MOBİL
   ============================================================ */
@media (max-width: 479px) {
    .custom-links {
        grid-template-columns: repeat(auto-fill, 148px);
        gap: 8px; padding: 4px 2px 12px;
    }
    .link-box { width: 148px; height: 180px; }
    .link-box img { height: 88px; }
    .urun_ { width: 148px !important; height: 180px !important; }
    .urun_ img { height: 88px !important; }
    .urun-swiper, .urun-swiper .swiper-slide, .urunDetay_img { height: 220px !important; }
    .urunDetay { margin: 0.5rem 0 1.5rem; }
    .fiyat-yeni { font-size: 1.2rem; }
    #mapModal iframe { height: 58vh; }
}
