/**
Theme Name: Akdeniz Mobilya
Author: Ozan Oduncu
Author URI: https://oduncu.com
Description: Akdeniz Mobilya 
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: akdeniz-mobilya
Template: astra
*/

/*GTranslate ana container Özelleştirme Başlangıç*/

/* GTranslate Widget - Tema Uyumlu Tasarım */

/* Ana GTranslate Container - Gölge ve arka plan kaldırıldı */
.gt_float_switcher {
    font-family: Arial !important;
    font-size: 20px !important;
    border-radius: 2px !important;
    color: #555 !important;
    display: inline-block !important;
    line-height: 20px !important;
    box-shadow: none !important; /* Gölge kaldırıldı */
    background: transparent !important; /* Arka plan kaldırıldı */
    overflow: hidden !important;
    transition: all .5s cubic-bezier(0.4, 0, 1, 1) !important;
}

/* Ana container - header yüksekliğine sığacak şekilde */
.gtranslate_wrapper {
    position: relative !important;
    height: auto !important;
    max-height: 10px !important;
    z-index: 9999 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    vertical-align: top !important;
}

/* Ana buton - tema stiline uygun */
.gt_float_switcher .gt-selected {
    background: transparent !important;
    border: 1px solid white !important;
    border-radius: 4px !important;
    color: white !important; /* Masaüstünde beyaz */
    padding: 6px 10px !important;
    font-size: 11px !important;
    height: 32px !important;
    min-width: 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

/* Aktif dil gösterimi - Masaüstünde beyaz */
.gt_float_switcher .gt-current-lang {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    color: white !important; /* Masaüstünde beyaz */
    font-size: 11px !important;
    font-weight: 500 !important;
}

.gt_float_switcher .gt-current-lang img {
    width: 16px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
}

.gt_float_switcher .gt-current-lang .gt-lang-code {
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Dropdown ok - sadece ::after kullan, diğerlerini gizle */
.gt_float_switcher-arrow {
    display: none !important; /* Çift ok problemini çöz */
}

.gt_float_switcher .gt-selected::after {
    content: '' !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    border-top: 4px solid white !important;
    display: inline-block !important;
    margin-left: 5px !important;
}

/* Hover efekti */
.gt_float_switcher .gt-selected:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-1px) !important;
}

/* Buton focus, active, clicked durumlarında border koru - MASAÜSTÜ */
.gt_float_switcher .gt-selected:focus,
.gt_float_switcher .gt-selected:active,
.gt_float_switcher .gt-selected:visited {
    border: 1px solid white !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Dropdown menü - aşağı doğru açılım */
.gt_float_switcher .gt_options {
    position: absolute !important;
    top: calc(100% + 2px) !important;
    left: 0 !important;
    right: auto !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
    box-shadow: none !important; /* Gölge kaldırıldı */
    z-index: 99999 !important;
    min-width: 160px !important;
    max-width: 200px !important;
    padding: 8px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    transition: all 0.2s ease !important;
    max-height: 250px !important;
    overflow-y: auto !important;
}

/* Dropdown gizli hali */
.gt_float_switcher .gt_options[style*="display:none"] {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
}

/* Dropdown öğeleri */
.gt_float_switcher .gt_options a {
    display: flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    color: #333 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    gap: 8px !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

.gt_float_switcher .gt_options a:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1a1a1a !important;
}

.gt_float_switcher .gt_options a img {
    width: 18px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
    border-radius: 2px !important;
}

/* Aktif dil vurgulama */
.gt_float_switcher .gt_options a.gt-current {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #1e40af !important;
    font-weight: 500 !important;
}

/* Header içindeki konumlama */
header .gtranslate_wrapper,
.header .gtranslate_wrapper {
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
    max-height: 50px !important;
}

/* Modern scrollbar */
.gt_float_switcher .gt_options::-webkit-scrollbar {
    width: 4px !important;
}

.gt_float_switcher .gt_options::-webkit-scrollbar-track {
    background: transparent !important;
}

.gt_float_switcher .gt_options::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 2px !important;
}

/* Mobil uyumluluk */
@media (max-width: 768px) {
    /* Mobilde buton rengi siyah */
    .gt_float_switcher .gt-selected {
        height: 28px !important;
        padding: 4px 8px !important;
        font-size: 10px !important;
        min-width: 60px !important;
        color: black !important; /* Mobilde siyah */
        border: 1px solid black !important; /* Mobilde border siyah */
    }
    
    /* Mobilde dil yazısı siyah */
    .gt_float_switcher .gt-current-lang {
        color: black !important; /* Mobilde siyah */
    }
    
    /* Mobilde ok siyah */
    .gt_float_switcher .gt-selected::after {
        border-top-color: black !important; /* Mobilde ok siyah */
    }
    
    .gt_float_switcher .gt-current-lang img {
        width: 14px !important;
        height: 10px !important;
    }
    
    /* Dropdown mobilde üst üste binme sorunu çözümü */
    .gt_float_switcher .gt_options {
        min-width: 140px !important;
        right: 0 !important;
        left: auto !important;
        top: calc(100% + 8px) !important; /* Daha fazla boşluk */
        margin-top: 5px !important; /* Daha fazla ekstra boşluk */
    }
    
    .gt_float_switcher .gt_options a {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    
    /* Mobilde buton focus, active durumlarında border koru - GÜÇLÜ KURAL */
    .gt_float_switcher .gt-selected:focus,
    .gt_float_switcher .gt-selected:active,
    .gt_float_switcher .gt-selected:visited,
    .gt_float_switcher .gt-selected:hover {
        border: 1px solid black !important;
        outline: none !important;
        box-shadow: none !important;
        background: rgba(0, 0, 0, 0.05) !important; /* Hafif arka plan */
    }
    
    /* Mobilde buton her durumda border koruması */
    .gt_float_switcher .gt-selected[style],
    .gt_float_switcher .gt-selected.gt-selected {
        border: 1px solid black !important;
    }
}

/*GTranslate ana container Özelleştirme Bitiş*/


/* Ana kategori linklerini devre dışı bırak */
.main-navigation .menu-item-has-children > a {
    pointer-events: none;
    cursor: default;
}

/* Mobilde dropdown açılma işlevini koru */
@media (max-width: 768px) {
    .main-navigation .menu-item-has-children > a {
        pointer-events: auto;
        cursor: pointer;
    }
}

/* Mobile toggle arrow'u görünür yap */
.ast-mobile-menu-buttons {
    display: block !important;
}



/* Masaüstü: Alt galeri oklarına dokunmadan sadece ana galeri oklarını gizler. */
@media (min-width: 769px) {
    .woocommerce-product-gallery .flex-direction-nav:not(.ast-single-product-thumbnails .flex-direction-nav) {
        display: none !important;
    }
}

/* --- */

/* Mobil: Alt galeri alanını tamamen gizler ve ana galeri oklarını stillendirir. */
@media (max-width: 768px) {
    /* Alt küçük resimler alanını tamamen gizler */
    .ast-single-product-thumbnails {
        display: none !important;
        visibility: hidden !important;
    }

    /* Ana galeri kapsayıcısını göreceli olarak konumlandırır */
    .woocommerce-product-gallery {
        position: relative !important;
    }
    
    /* Okların kapsayıcısını resmin üzerine konumlandırır ve yatayda tam yerleştirir */
    .woocommerce-product-gallery .flex-direction-nav {
        display: flex !important;
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        justify-content: space-between;
        align-items: center;
        transform: translateY(-50%);
        z-index: 10;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    /* Ok düğmelerinin ana stilini zorlar */
    .woocommerce-product-gallery .flex-direction-nav li a {
        display: flex !important;
        justify-content: center;
        align-items: center;
        text-decoration: none;
        transition: all 0.2s ease-in-out;
        
        background-color: rgba(0, 0, 0, 0.5) !important;
        color: #fff !important;
        
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        border-radius: 50% !important;
        
        box-shadow: none !important;
        border: none !important;

        /* Metinleri gizlemek için en güvenilir yöntem */
        text-indent: -9999px !important;
        overflow: hidden !important;
        font-size: 0 !important;
    }

    /* Okların üzerine gelindiğinde rengini değiştirir */
    .woocommerce-product-gallery .flex-direction-nav li a:hover {
        background-color: rgba(0, 0, 0, 0.7) !important;
    }
    
    /* Okların konumu */
    .woocommerce-product-gallery .flex-direction-nav .flex-prev {
        left: 10px !important;
        position: absolute !important;
    }
    .woocommerce-product-gallery .flex-direction-nav .flex-next {
        right: 10px !important;
        position: absolute !important;
    }

    /* Fazladan eklenmiş okları kesin olarak gizler */
    .woocommerce-product-gallery .flex-prev::after,
    .woocommerce-product-gallery .flex-next::after {
        content: none !important;
        display: none !important;
        visibility: hidden !important;
    }

    /* Font Awesome ikonları için stiller ve içerikler */
    .woocommerce-product-gallery .flex-direction-nav a.flex-prev::before,
    .woocommerce-product-gallery .flex-direction-nav a.flex-next::before {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        text-indent: 0 !important;
        font-family: "Font Awesome 5 Free" !important;
        font-weight: 900 !important;
        font-size: 20px !important;
        line-height: 1 !important;
    }

    /* Sol ok ikonu */
    .woocommerce-product-gallery .flex-direction-nav a.flex-prev::before {
        content: '\f053' !important;
    }

    /* Sağ ok ikonu */
    .woocommerce-product-gallery .flex-direction-nav a.flex-next::before {
        content: '\f054' !important;
    }
}


/* --- Mobil menüde Dil & Para birimi X'in soluna hizalama (Astra) --- */ @media (max-width: 768px) { .ast-mobile-popup-header { display: flex !important; align-items: center !important; justify-content: flex-end !important; padding: 10px 14px !important; gap: 10px !important; position: relative !important; } /* X’in solunda gruplanmış alan */ .ast-mobile-popup-header .mobile-lang-currency { display: flex !important; align-items: center !important; justify-content: flex-end !important; flex-direction: row !important; gap: 6px !important; margin-right: 10px !important; position: relative !important; right: 0 !important; left: auto !important; top: auto !important; transform: none !important; } /* GTranslate ve YayCurrency butonları aynı satırda */ .ast-mobile-popup-header .mobile-lang-currency .gtranslate_wrapper, .ast-mobile-popup-header .mobile-lang-currency .yay-currency-switcher { display: inline-flex !important; align-items: center !important; justify-content: center !important; position: relative !important; margin: 0 !important; padding: 0 !important; top: auto !important; left: auto !important; transform: none !important; z-index: 10 !important; } /* X butonunun kendi hizası */ .ast-mobile-popup-header .ast-mobile-popup-close { order: 3 !important; flex-shrink: 0 !important; position: relative !important; margin-left: auto !important; z-index: 20 !important; } }


/* Özel indirim badge'i */
.custom-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 9;
    background-color: #e74c3c;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 3px;
    line-height: 1;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Mobil için küçült ve sol üst köşeye yerleştir */
@media (max-width: 768px) {
    .custom-sale-badge {
        top: 8px;
        left: 8px;
        font-size: 11px;
        padding: 5px 8px;
        border-radius: 2px;
    }
}

/* Çok küçük ekranlar */
@media (max-width: 360px) {
    .custom-sale-badge {
        top: 5px;
        left: 5px;
        font-size: 10px;
        padding: 4px 6px;
    }
}

/* Ürün kartının position'ını ayarla */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    position: relative;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
    position: relative;
    display: block;
}


/* Toggle buton ikon + yazı kapsayıcısı */
.main-header-menu-toggle {
  display: inline-flex !important;
  flex-direction: column;  /* ikon ve yazı dikey olacak şekilde */
  align-items: center;     /* ortala */
}

/* Altına MENÜ yazısı ekle */
.main-header-menu-toggle:after {
  content: "MENÜ";
  display: block;
  margin-top: 4px;
  font-size: 12px;
  text-transform: uppercase;
  color: inherit;
}





/* Akdeniz Woc Kategori Witgeti Ana Izgara Yapısı */
.akdeniz-cat-grid {
    display: grid;
    gap: 20px; /* Kutular arası boşluk */
    margin-bottom: 30px;
}

/* 5 Sütunlu Görünüm (Varsayılan) */
.akdeniz-cat-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Eğer 4 sütun kullanırsan diye yedek */
.akdeniz-cat-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Kutu Tasarımı (Görseldeki Beyaz Kutular) */
.akdeniz-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* İçeriği dikeyde ortalar */
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #e5e5e5; /* Görseldeki ince gri çizgi */
    padding: 30px 15px;
    transition: all 0.3s ease;
    min-height: 220px; /* Kutuların kareye yakın durması için */
    text-align: center;
}

/* Hover Efekti (Mouse üzerine gelince - GÜNCELLENDİ) */
.akdeniz-cat-item:hover {
    /* Kenarlık rengini biraz koyulaştır (isteğe bağlı, kaldırabilirsin de) */
    border-color: #d0d0d0; 

    /* GÖLGE: 4 tarafa eşit yayılan, yumuşak ve geniş bir gölge */
    /* 0 0 offsetsiz demektir, 25px bulanıklık, 0.1 opacity siyah */
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.12); 

    /* BÜYÜTME: Kartı orijinal boyutunun %3'ü kadar büyüt */
    transform: scale(1.03); 
    
    /* Büyürken diğer kutuların altında kalmaması için katmanını yükselt */
    z-index: 10; 
    
    /* Arkaplanı çok hafif değiştirerek vurguyu artır (isteğe bağlı) */
    background-color: #fafafa;
}

/* Resim Alanı */
.akdeniz-cat-img-wrapper {
    width: 100%;
    height: 120px; /* Resimler için sabit alan */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px; /* Yazı ile resim arası boşluk */
}

.akdeniz-cat-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Resmin oranını bozmadan sığdırır */
    display: block;
}

/* Başlık Yazısı */
.akdeniz-cat-title {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    font-family: inherit; /* Temanın fontunu kullanır */
}

/* --- MOBİL UYUMLULUK (Responsive) --- */

/* Tabletler için (3 sütuna düşer) */
@media (max-width: 1024px) {
    .akdeniz-cat-grid.columns-5,
    .akdeniz-cat-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Telefonlar için (2 sütuna düşer) */
@media (max-width: 768px) {
    .akdeniz-cat-grid.columns-5,
    .akdeniz-cat-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .akdeniz-cat-item {
        padding: 15px 10px;
        min-height: 180px;
    }
    .akdeniz-cat-title {
        font-size: 13px;
    }
}
