/* XPlak Mobil Header & Menü v5.7.0 (≤ 900px) */

/* Masaüstünde çekmece ve hamburger görünmez */
.xplak-burger, .xplak-drawer, .xplak-drawer-overlay { display:none; }

@media (min-width:901px) {
    .xplak-burger, .xplak-drawer, .xplak-drawer-overlay { display:none !important; }
}

@media (max-width:900px) {
    .xplak-header-wrapper { overflow:visible !important; }

    /* ---- Anasayfa kategori kartları: mobilde gizli (kategoriler çipler ve çekmecede var) ---- */
    .xplak-categories-grid { display:none !important; }

    /* ---- Üst şerit: mobilde gizli (linkler çekmecede) ---- */
    .xplak-topbar { display:none !important; }

    /* ---- Ana header: [☰ logo ... hesap sepet] / [arama] ---- */
    .xplak-header { padding:10px 14px 12px !important; }
    .xplak-header-inner {
        display:grid !important; grid-template-columns:auto minmax(0,1fr) auto;
        grid-template-areas:"burger logo actions" "search search search"; gap:10px 10px !important; align-items:center;
    }
    .xplak-burger {
        grid-area:burger; display:inline-flex !important; align-items:center; justify-content:center;
        width:44px; height:44px; background:#14151a !important; color:#fff !important; border:1px solid #2a2c34 !important; border-radius:10px !important; padding:0 !important; cursor:pointer;
    }
    .xplak-burger:active { background:#1c1e26 !important; }
    .xplak-logo { grid-area:logo; min-width:0; gap:9px !important; }
    .xplak-logo-icon { width:36px !important; height:36px !important; }
    .xplak-logo-brand { font-size:1.5rem !important; }
    .xplak-logo-sub { font-size:.6rem !important; margin-top:2px !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; }
    .xplak-actions { grid-area:actions; gap:8px !important; }
    .xplak-account-link, .xplak-action-badge {
        width:44px; height:44px; justify-content:center; background:#14151a; border:1px solid #2a2c34; border-radius:10px;
    }
    .xplak-account-text { display:none !important; }
    .xplak-badge-count { top:-6px !important; right:-6px !important; }

    /* ---- Arama: tam genişlik ---- */
    .xplak-search-box { grid-area:search; max-width:100% !important; width:100%; flex:none; }
    .xplak-search-form { padding:3px 3px 3px 14px !important; box-shadow:0 2px 10px rgba(0,0,0,.35) !important; }
    .xplak-search-icon { margin-right:8px !important; }
    .xplak-search-input { font-size:16px !important; /* iOS yakınlaştırmasını engeller */ padding:10px 0 !important; min-width:0; }
    .xplak-search-btn { padding:10px 20px !important; font-size:.9rem !important; flex-shrink:0; }

    /* ---- Kategori menüsü: kaydırılabilir çipler ---- */
    .xplak-navbar { position:relative; border-bottom:1px solid #1c1d24; }
    .xplak-navbar::after {
        content:""; position:absolute; top:0; right:0; bottom:0; width:34px; pointer-events:none;
        background:linear-gradient(90deg, rgba(10,11,13,0), #0a0b0d);
    }
    .xplak-navbar-inner { display:block !important; padding:0 !important; }
    .xplak-nav-left { display:flex; align-items:center; gap:8px; overflow-x:auto; -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity; scrollbar-width:none; padding:10px 40px 10px 14px; scroll-padding-left:14px; }
    .xplak-nav-left::-webkit-scrollbar { display:none; }
    .xplak-nav-home { border-radius:999px !important; padding:9px 14px !important; flex-shrink:0; scroll-snap-align:start; }
    .xplak-nav-menu { flex-wrap:nowrap !important; gap:8px; align-items:center; }
    .xplak-nav-menu, .xplak-nav-menu li { flex-shrink:0; }
    .xplak-nav-menu li { scroll-snap-align:start; }
    .xplak-nav-menu li a {
        padding:9px 15px !important; font-size:.85rem !important; background:#14151a; border:1px solid #2a2c34; border-radius:999px; white-space:nowrap;
    }
    .xplak-nav-menu li a:active { background:#c8232c; border-color:#c8232c; color:#fff !important; }
    .xplak-nav-menu li ul.sub-menu, .xplak-nav-menu li:hover > ul.sub-menu { display:none !important; }
    .xplak-nav-custom-btn { display:none !important; }   /* çekmecede büyük buton olarak var */

    /* ---- Çekmece menü ---- */
    .xplak-drawer-overlay { display:block; position:fixed; inset:0; background:rgba(0,0,0,.65); z-index:100000; opacity:0; transition:opacity .25s; }
    .xplak-drawer-overlay[hidden] { display:none; }
    body.xplak-drawer-open .xplak-drawer-overlay { opacity:1; }
    .xplak-drawer {
        display:flex !important; flex-direction:column; position:fixed; top:0; left:0; bottom:0; height:100%; width:min(88vw,360px);
        background:#0e0f13; border-right:1px solid #2a2c34; z-index:100001; transform:translateX(-102%); transition:transform .28s ease; box-shadow:12px 0 40px rgba(0,0,0,.6);
        font-family:'Inter',sans-serif; color:#fff; visibility:hidden;
    }
    body.xplak-drawer-open .xplak-drawer { transform:translateX(0); visibility:visible; }
    body.xplak-drawer-open { overflow:hidden !important; }
    .xplak-drawer-head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid #1f2128; flex-shrink:0; }
    .xplak-drawer-close { width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center; background:#14151a !important; color:#fff !important; border:1px solid #2a2c34 !important; border-radius:10px !important; padding:0 !important; cursor:pointer; }
    .xplak-drawer-body { flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; padding:16px 16px 28px; }

    .xplak-drawer-quick { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
    .xplak-drawer-quick a { display:flex; align-items:center; justify-content:center; gap:8px; padding:12px 8px; background:#14151a; border:1px solid #2a2c34; border-radius:10px; color:#fff !important; font-size:.88rem; font-weight:600; text-decoration:none !important; }
    .xplak-drawer-cta { display:flex; align-items:center; justify-content:center; gap:9px; padding:14px; background:#c8232c; border-radius:10px; color:#fff !important; font-weight:700; font-size:.98rem; text-decoration:none !important; box-shadow:0 4px 14px rgba(200,35,44,.4); margin-bottom:6px; }
    .xplak-drawer-title { margin:20px 0 8px; font-size:.72rem; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:#8e8f99; }

    .xplak-drawer-nav ul { list-style:none !important; margin:0 !important; padding:0 !important; }
    .xplak-drawer-nav li { position:relative; margin:0 !important; padding:0 !important; border-bottom:1px solid #1c1d24; }
    .xplak-drawer-nav li > a { display:block; padding:14px 48px 14px 6px; color:#f1f1f3 !important; font-size:1rem; font-weight:600; text-decoration:none !important; }
    .xplak-drawer-nav li > a:active { color:#e0323b !important; }
    .xplak-sub-toggle { position:absolute; top:4px; right:0; width:44px; height:44px; display:flex; align-items:center; justify-content:center; background:transparent !important; border:0 !important; color:#b9b9c2 !important; padding:0 !important; cursor:pointer; }
    .xplak-sub-toggle svg { transition:transform .2s; }
    .xplak-drawer-nav li.is-open > .xplak-sub-toggle svg { transform:rotate(180deg); }
    .xplak-drawer-nav li.is-open > .xplak-sub-toggle { color:#e0323b !important; }
    .xplak-drawer-nav ul.sub-menu { display:none !important; background:#14151a; border-radius:8px; margin:0 0 10px !important; padding:4px 0 !important; position:static !important; box-shadow:none !important; border:0 !important; }
    .xplak-drawer-nav li.is-open > ul.sub-menu { display:block !important; }
    .xplak-drawer-nav ul.sub-menu li { border-bottom:1px solid #1c1d24; }
    .xplak-drawer-nav ul.sub-menu li:last-child { border-bottom:0; }
    .xplak-drawer-nav ul.sub-menu li > a { font-size:.93rem; font-weight:500; color:#d4d4da !important; padding:12px 16px; }

    .xplak-drawer-links { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
    .xplak-drawer-links a { padding:12px 14px; background:#14151a; border:1px solid #2a2c34; border-radius:10px; color:#e6e6ea !important; font-size:.9rem; font-weight:500; text-decoration:none !important; }
    .xplak-drawer-social { display:flex; gap:10px; margin-top:16px; }
    .xplak-drawer-social a { width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center; background:#14151a; border:1px solid #2a2c34; border-radius:50%; color:#e6e6ea !important; }
}

@media (max-width:380px) {
    .xplak-logo-sub { display:none !important; }
    .xplak-burger, .xplak-account-link, .xplak-action-badge { width:40px; height:40px; }
    .xplak-header-inner { gap:8px 8px !important; }
}

/* =====================================================================
   TEK ÜRÜN SAYFASI — MOBİL (≤ 900px)
   Sorun: 13 küçük galeri görseli tek satırda ~1200px genişlik yapıp sayfayı
   telefonda küçültüyordu; üst üste 3 kutuya verilen boşluklar da alanı daraltıyordu.
   ===================================================================== */
@media (max-width:900px) {
    html body.single-product { overflow-x:hidden !important; max-width:100% !important; }

    /* İç içe kutuların çift/üçlü boşluğunu tek boşluğa indir */
    html body.single-product #content,
    html body.single-product .site-content,
    html body.single-product .entry-content { padding:0 !important; max-width:100% !important; width:100% !important; }
    html body.single-product .ast-container { padding:14px 12px 44px !important; max-width:100% !important; width:100% !important; display:block !important; }

    html body.single-product div.product { display:block !important; gap:0 !important; margin-bottom:28px !important; width:100% !important; max-width:100% !important; }
    html body.single-product div.product div.woocommerce-product-gallery { width:100% !important; max-width:100% !important; min-width:0 !important; margin:0 0 18px !important; }
    html body.single-product div.product div.summary.entry-summary { width:100% !important; max-width:100% !important; min-width:0 !important; flex:none !important; margin:0 !important; }

    /* Galeri küçük görselleri: yatay kaydırılabilir şerit */
    html body.single-product .flex-control-thumbs {
        display:flex !important; flex-wrap:nowrap !important; gap:8px !important; width:100% !important; max-width:100% !important;
        margin:12px 0 0 !important; padding:0 0 6px !important; overflow-x:auto !important; -webkit-overflow-scrolling:touch; scrollbar-width:none; scroll-snap-type:x proximity;
    }
    html body.single-product .flex-control-thumbs::-webkit-scrollbar { display:none; }
    html body.single-product .flex-control-thumbs li { flex:0 0 62px !important; width:62px !important; height:62px !important; scroll-snap-align:start; }

    /* Başlık / fiyat */
    html body.single-product h1.product_title.entry-title { font-size:1.55rem !important; line-height:1.25 !important; margin-bottom:8px !important; overflow-wrap:anywhere; }
    html body.single-product .summary p.price { font-size:1.5rem !important; }

    /* Kısa açıklama (uzun, renkli metinler) */
    html body.single-product .woocommerce-product-details__short-description {
        padding:14px !important; font-size:.9rem !important; line-height:1.6 !important; overflow-wrap:anywhere; word-break:break-word; max-width:100%;
    }
    html body.single-product .woocommerce-product-details__short-description * { max-width:100% !important; }
    html body.single-product .woocommerce-product-details__short-description img { height:auto !important; border-radius:8px; }

    /* Sepete ekle: adet + geniş buton */
    html body.single-product form.cart { flex-wrap:wrap !important; gap:10px !important; align-items:stretch !important; }
    html body.single-product form.cart div.quantity { flex:0 0 auto; }
    html body.single-product form.cart div.quantity input.qty { height:50px !important; width:52px !important; }
    html body.single-product form.cart button.single_add_to_cart_button { flex:1 1 150px !important; min-height:50px; font-size:1rem !important; padding:12px 18px !important; }

    /* Garantili ödeme kutusu (eklenti çıktısı) */
    html body.single-product .summary fieldset {
        border:1px solid #22242e !important; border-radius:10px !important; background:#111216 !important; padding:10px 12px 12px !important; margin:0 0 16px !important; min-width:0; text-align:center;
    }
    html body.single-product .summary fieldset legend { color:#8e8f99 !important; font-size:.75rem !important; padding:0 8px !important; text-decoration:none !important; width:auto; }
    html body.single-product .summary fieldset img { max-width:100%; height:auto; }

    html body.single-product .xplak-single-trust-boxes { grid-template-columns:1fr !important; }
    html body.single-product .xplak-st-box { font-size:.85rem !important; padding:12px !important; }

    /* Sekmeler (Açıklama / Değerlendirmeler) */
    html body.single-product div.woocommerce-tabs ul.tabs { overflow-x:auto; flex-wrap:nowrap !important; scrollbar-width:none; }
    html body.single-product div.woocommerce-tabs ul.tabs li a { padding:12px 16px !important; white-space:nowrap; }
    html body.single-product div.woocommerce-tabs .woocommerce-Tabs-panel {
        padding:18px 14px !important; font-size:.92rem !important; overflow-wrap:anywhere; word-break:break-word; max-width:100%; overflow-x:hidden;
    }
    html body.single-product div.woocommerce-tabs .woocommerce-Tabs-panel h1,
    html body.single-product div.woocommerce-tabs .woocommerce-Tabs-panel h2,
    html body.single-product div.woocommerce-tabs .woocommerce-Tabs-panel h3,
    html body.single-product div.woocommerce-tabs .woocommerce-Tabs-panel h4 { color:#fff !important; }
    html body.single-product div.woocommerce-tabs .woocommerce-Tabs-panel img,
    html body.single-product div.woocommerce-tabs .woocommerce-Tabs-panel iframe,
    html body.single-product div.woocommerce-tabs .woocommerce-Tabs-panel video { max-width:100% !important; height:auto; }
    html body.single-product div.woocommerce-tabs .woocommerce-Tabs-panel table { display:block; max-width:100%; overflow-x:auto; }

    /* İlgili ürünler */
    html body.single-product section.related.products { margin-top:36px !important; padding-top:22px !important; }
    html body.single-product section.related.products > h2 { font-size:1.35rem !important; margin-bottom:16px !important; }
}
