/**
 * VIVA - Mobile Responsive Enhancements
 * =====================================
 * Mobil cihazlar için özel responsive tasarım iyileştirmeleri
 * 
 * ÖNEMLİ: PC versiyonunda hiçbir değişiklik yapılmaz!
 * Sadece mobil cihazlar için (@media queries)
 * 
 * Hedefler:
 * - Ürünler 2 sütun grid sistemi
 * - Tüm ikonlar korunur ve görünür
 * - Touch-friendly butonlar (minimum 44px)
 * - Optimum kullanıcı deneyimi
 */

/* ===================================================================
   GENEL MOBİL İYİLEŞTİRMELER
   Tüm mobil cihazlar için (max-width: 767px)
   =================================================================== */

@media screen and (max-width: 767px) {
    
    /* TOUCH-FRIENDLY BUTONLAR - Minimum 44px x 44px */
    button,
    .btn,
    a.btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 10px 15px !important;
        font-size: 14px !important;
    }
    
    /* TÜM İKONLAR KORUNUR */
    i,
    [data-lucide],
    .fa,
    .icon,
    svg {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* ÜRÜN GRİD SİSTEMİ - 2 SÜTUN */
    .product-main-box {
        width: calc(50% - 20px) !important;
        max-width: 180px !important;
        margin: 10px 5px !important;
        display: inline-block !important;
        vertical-align: top !important;
        box-sizing: border-box !important;
    }
    
    /* Ürün görseli mobilde optimize */
    .product-main-box-img {
        width: 100% !important;
        height: auto !important;
    }
    
    .product-main-box-img img {
        width: 100% !important;
        height: auto !important;
        max-height: 150px !important;
        object-fit: contain !important;
    }
    
    /* Ürün başlığı mobilde */
    .product-main-box h1,
    .product-main-box h2,
    .product-main-box h3 {
        font-size: 13px !important;
        line-height: 1.3 !important;
        margin: 8px 0 !important;
        padding: 0 5px !important;
    }
    
    /* Ürün fiyatı mobilde */
    .product-main-box .price,
    .product-main-box .fiyat {
        font-size: 15px !important;
        font-weight: bold !important;
        margin: 5px 0 !important;
    }
    
    /* Ürün butonları mobilde */
    .product-main-box .buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        padding: 5px !important;
    }
    
    .product-main-box .buttons .text,
    .product-main-box .buttons a {
        width: 100% !important;
        padding: 10px 5px !important;
        font-size: 12px !important;
        text-align: center !important;
    }
    
    /* Ürün rating/yıldızlar mobilde */
    .product-main-box .rating,
    .product-main-box .star-rate {
        font-size: 14px !important;
        margin: 5px 0 !important;
    }
    
    /* Ürün ikonu/rozeti mobilde */
    .product-main-box .badge,
    .product-main-box .label {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
    
    /* ÜRÜN LİSTELEME CONTAINER */
    .products-home-main-div,
    .product-list-container {
        width: 100% !important;
        padding: 15px 5px !important;
        text-align: center !important;
    }
    
    /* ÜRÜN KATEGORİ TABLAR MOBİLDE */
    .product_tabs {
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 10px 0 !important;
    }
    
    .product_tabs li {
        display: inline-block !important;
        margin: 0 3px !important;
    }
    
    .product_tabs li a {
        padding: 8px 12px !important;
        font-size: 12px !important;
        display: inline-block !important;
    }
    
    /* NAVİGASYON MOBİLDE */
    .header-main,
    .header-ust-bar {
        width: 100% !important;
        padding: 10px !important;
    }
    
    /* Logo mobilde */
    .header-main-left img {
        max-width: 140px !important;
        max-height: 50px !important;
    }
    
    /* Menü mobilde */
    .top-level-menu {
        display: block !important;
    }
    
    /* Dropdown menü mobilde */
    .dropdown-menu {
        max-width: 90vw !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    /* Sepet ikonu mobilde */
    .shopping-cart,
    .dropdown-box-type-cart {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .shopping-detail {
        min-width: 20px !important;
        min-height: 20px !important;
        font-size: 11px !important;
    }
    
    /* Arama kutusu mobilde */
    .search-box,
    input[type="search"],
    input[type="text"].search {
        width: 100% !important;
        font-size: 14px !important;
        padding: 12px !important;
    }
    
    /* FOOTER MOBİLDE */
    footer,
    .footer-main {
        width: 100% !important;
        padding: 20px 10px !important;
    }
    
    .footer-column {
        width: 100% !important;
        margin-bottom: 20px !important;
    }
    
    /* Footer ikonları */
    .footer-social-icons a {
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 18px !important;
    }
    
    /* BREADCRUMB MOBİLDE */
    .breadcrumb {
        font-size: 11px !important;
        padding: 8px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
    
    /* SAYFALAMA MOBİLDE */
    .pagination {
        font-size: 13px !important;
    }
    
    .pagination a,
    .pagination span {
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 8px !important;
    }
    
    /* FORM ELEMENTLERİ MOBİLDE */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        width: 100% !important;
        font-size: 16px !important; /* iOS zoom engellemek için */
        padding: 12px !important;
        min-height: 44px !important;
    }
    
    /* Checkbox ve Radio mobilde */
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 22px !important;
        min-height: 22px !important;
        margin-right: 10px !important;
    }
    
    /* MODAL MOBİLDE */
    .modal-dialog {
        max-width: 95% !important;
        margin: 10px auto !important;
    }
    
    .modal-content {
        border-radius: 8px !important;
    }
    
    /* CARD/KART ELEMENTLERİ */
    .card,
    .box,
    .panel {
        margin-bottom: 15px !important;
        padding: 15px !important;
    }
    
    /* TABLO MOBİLDE */
    table {
        width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
    }
    
    table th,
    table td {
        font-size: 12px !important;
        padding: 8px 5px !important;
    }
    
    /* SLIDER MOBİLDE */
    .swiper-container,
    .slider-container {
        width: 100% !important;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* VIDEO MOBİLDE */
    iframe,
    video {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* IMAGE MOBİLDE */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* HİDE PC ONLY ELEMENTS */
    .pc-only,
    .desktop-only {
        display: none !important;
    }
    
    /* SHOW MOBILE ONLY ELEMENTS */
    .mobile-only {
        display: block !important;
    }
}

/* ===================================================================
   TABLET VE BÜYÜK MOBİL (481px - 767px)
   =================================================================== */

@media screen and (min-width: 481px) and (max-width: 767px) {
    
    /* Ürünler tablette de 2 sütun */
    .product-main-box {
        width: calc(50% - 20px) !important;
        max-width: 220px !important;
    }
    
    .product-main-box-img img {
        max-height: 180px !important;
    }
    
    .product-main-box h1,
    .product-main-box h2,
    .product-main-box h3 {
        font-size: 14px !important;
    }
    
    /* Butonlar biraz daha büyük */
    button,
    .btn {
        padding: 12px 18px !important;
        font-size: 15px !important;
    }
}

/* ===================================================================
   KÜÇÜK MOBİL (max-width: 480px)
   =================================================================== */

@media screen and (max-width: 480px) {
    
    /* Ürünler küçük mobilde 2 sütun - daha dar */
    .product-main-box {
        width: calc(50% - 16px) !important;
        max-width: 160px !important;
        margin: 8px 4px !important;
    }
    
    .product-main-box-img img {
        max-height: 130px !important;
    }
    
    .product-main-box h1,
    .product-main-box h2,
    .product-main-box h3 {
        font-size: 12px !important;
    }
    
    .product-main-box .price {
        font-size: 14px !important;
    }
    
    /* Container padding azalt */
    .products-home-main-div {
        padding: 10px 2px !important;
    }
    
    /* Tab'lar daha küçük */
    .product_tabs li a {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
}

/* ===================================================================
   ÇOK KÜÇÜK MOBİL (max-width: 360px)
   =================================================================== */

@media screen and (max-width: 360px) {
    
    /* Ürünler çok küçük ekranda */
    .product-main-box {
        width: calc(50% - 12px) !important;
        max-width: 140px !important;
        margin: 6px 3px !important;
    }
    
    .product-main-box-img img {
        max-height: 110px !important;
    }
    
    .product-main-box h1,
    .product-main-box h2,
    .product-main-box h3 {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }
    
    .product-main-box .price {
        font-size: 13px !important;
    }
    
    .product-main-box .buttons .text {
        font-size: 10px !important;
        padding: 8px 4px !important;
    }
}

/* ===================================================================
   LANDSCAPE (Yatay) MOD - Mobil cihazlar yatay pozisyonda
   =================================================================== */

@media screen and (max-width: 896px) and (orientation: landscape) {
    
    /* Landscape'de header küçült */
    .header-main-left img {
        max-height: 40px !important;
    }
    
    /* Ürünler landscape'de 3 sütun olabilir */
    .product-main-box {
        width: calc(33.33% - 16px) !important;
        max-width: 200px !important;
    }
}

/* ===================================================================
   PERFORMANS VE UX İYİLEŞTİRMELERİ
   =================================================================== */

@media screen and (max-width: 767px) {
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Tap highlight kaldır */
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    /* Focus state görünürlüğü */
    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #007bff !important;
        outline-offset: 2px !important;
    }
    
    /* Link ve buton active state */
    a:active,
    button:active {
        opacity: 0.7 !important;
        transform: scale(0.98) !important;
    }
    
    /* Prevent text selection on buttons */
    button,
    .btn {
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
    }
    
    /* Font smoothing */
    body {
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }
}

/* ===================================================================
   ACCESSIBILITY - Erişilebilirlik
   =================================================================== */

@media screen and (max-width: 767px) {
    
    /* Yeterli kontrast */
    a {
        color: #0056b3 !important;
    }
    
    a:visited {
        color: #551a8b !important;
    }
    
    /* Skip to content link */
    .skip-to-content {
        position: absolute !important;
        top: -40px !important;
        left: 0 !important;
        background: #000 !important;
        color: #fff !important;
        padding: 8px !important;
        text-decoration: none !important;
        z-index: 100000 !important;
    }
    
    .skip-to-content:focus {
        top: 0 !important;
    }
}

/* ===================================================================
   SON NOTLAR:
   - Bu dosya sadece MOBİL cihazlar için çalışır
   - PC/Desktop versiyonunda HİÇBİR değişiklik yapmaz
   - Tüm değişiklikler @media queries içinde
   - !important kullanımı: Mevcut stil önceliğini aşmak için gerekli
   =================================================================== */
