/* Mobil Uyumluluk Düzeltmeleri */

/* Sağa sola kaymayı engelle */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
}

* {
    box-sizing: border-box;
}

/* Container genişlikleri */
.container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container { max-width: 640px; }
}

@media (min-width: 768px) {
    .container { max-width: 768px; }
}

@media (min-width: 1024px) {
    .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
    .container { max-width: 1280px; }
}

/* Tüm elementler viewport'u aşmasın */
section, div, article, main, header, footer {
    max-width: 100%;
}

/* Görseller */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Uzun metinler */
h1, h2, h3, h4, h5, h6, p, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Grid sistemleri */
.grid {
    width: 100%;
}

/* Flex sistemleri */
.flex {
    flex-wrap: wrap;
}

/* Mobil font boyutları */
@media (max-width: 768px) {
    /* Başlıklar */
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    /* Büyük textler */
    .text-6xl { font-size: 2rem !important; }
    .text-5xl { font-size: 1.875rem !important; }
    .text-4xl { font-size: 1.5rem !important; }
    .text-3xl { font-size: 1.25rem !important; }
    .text-2xl { font-size: 1.125rem !important; }
    .text-xl { font-size: 1rem !important; }
    
    /* Padding ve margin */
    .py-20 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    .py-16 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    .py-12 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    
    /* Grid gap */
    .gap-12 { gap: 1.5rem !important; }
    .gap-8 { gap: 1rem !important; }
    .gap-6 { gap: 0.75rem !important; }
}

/* Çok küçük ekranlar */
@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    .text-5xl,
    .text-4xl,
    .text-3xl {
        font-size: 1.25rem !important;
    }
}

/* Butonlar mobilde tam genişlik */
@media (max-width: 640px) {
    .btn-primary,
    button[type="submit"] {
        width: 100%;
    }
}

/* Form elementleri */
input, textarea, select {
    max-width: 100%;
    width: 100%;
}

/* Table responsive */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ========================================
   MOBİL ÖDEME SAYFASI İYİLEŞTİRMELERİ
======================================== */

/* Ödeme kartları - Mobilde daha büyük ve kolay tıklanabilir */
@media (max-width: 768px) {
    /* Ödeme kartları */
    .payment-card {
        padding: 1.25rem !important;
        margin-bottom: 1rem !important;
        min-height: 120px;
    }
    
    /* Radio butonları daha büyük */
    input[type="radio"] {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px;
        min-height: 24px;
    }
    
    /* Checkbox daha büyük */
    input[type="checkbox"] {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px;
        min-height: 24px;
    }
    
    /* Form inputları daha büyük */
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    textarea,
    select {
        font-size: 16px !important; /* iOS zoom'u engeller */
        padding: 0.875rem !important;
        min-height: 48px !important; /* Touch-friendly */
    }
    
    /* Butonlar daha büyük ve kolay tıklanabilir */
    button,
    .btn,
    .btn-primary,
    a.btn {
        min-height: 48px !important;
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        touch-action: manipulation; /* Çift tıklamayı engelle */
    }
    
    /* Sipariş tamamla butonu */
    button[type="submit"] {
        min-height: 56px !important;
        font-size: 1.125rem !important;
        font-weight: bold !important;
    }
    
    /* Ödeme kartı ikonları */
    .payment-card .text-5xl {
        font-size: 3rem !important;
    }
    
    /* Badge'ler */
    .badge {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.75rem !important;
    }
    
    /* Sipariş özeti - Mobilde sticky olmasın, alta gelsin */
    .sticky {
        position: relative !important;
        top: auto !important;
    }
    
    /* Mobilde padding azalt */
    .bg-white.rounded-2xl {
        padding: 1.25rem !important;
    }
    
    /* Progress steps mobilde daha kompakt */
    .progress-step {
        gap: 0.5rem !important;
    }
    
    .progress-step .w-10 {
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Grid mobilde tek sütun */
    .lg\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    .lg\:col-span-2 {
        grid-column: span 1 !important;
    }
}

/* Çok küçük ekranlar (iPhone SE, eski Android'ler) */
@media (max-width: 375px) {
    /* Daha kompakt padding */
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .bg-white.rounded-2xl {
        padding: 1rem !important;
        border-radius: 1rem !important;
    }
    
    /* Font boyutları küçült */
    .text-3xl {
        font-size: 1.125rem !important;
    }
    
    .text-2xl {
        font-size: 1rem !important;
    }
    
    .text-xl {
        font-size: 0.9375rem !important;
    }
    
    /* İkonlar küçült */
    .payment-card .text-5xl {
        font-size: 2.5rem !important;
    }
}

/* ========================================
   MOBİL ANA SAYFA İYİLEŞTİRMELERİ
======================================== */

@media (max-width: 768px) {
    /* Hero section */
    .hero-section {
        padding: 2rem 0 !important;
    }
    
    /* Ürün kartları */
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    /* Ürün görselleri */
    .product-image {
        max-height: 300px;
        object-fit: contain;
    }
    
    /* Fiyat gösterimleri */
    .price-display {
        font-size: 1.5rem !important;
    }
    
    /* Özellik rozetleri */
    .feature-badge {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.625rem !important;
    }
}

/* ========================================
   TOUCH & HOVER İYİLEŞTİRMELERİ
======================================== */

/* Touch cihazlarda hover efektlerini kaldır */
@media (hover: none) and (pointer: coarse) {
    button:hover,
    a:hover,
    .btn:hover {
        transform: none !important;
    }
    
    /* Active state daha belirgin */
    button:active,
    a:active,
    .btn:active {
        transform: scale(0.98) !important;
        opacity: 0.9 !important;
    }
}

/* Link ve butonlar için tap highlight rengi */
* {
    -webkit-tap-highlight-color: rgba(139, 71, 137, 0.3);
}

/* Smooth scroll mobilde */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   ÜRÜN DETAY SAYFASI MOBİL
======================================== */

@media (max-width: 768px) {
    /* Ürün slider */
    .product-slider {
        height: auto !important;
        max-height: 400px;
    }
    
    /* Paket kartları */
    .package-card {
        padding: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Paket fiyatları */
    .package-price {
        font-size: 1.5rem !important;
    }
    
    /* Sepete ekle butonu */
    .add-to-cart-btn {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 50 !important;
        border-radius: 0 !important;
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Yorumlar */
    .review-card {
        padding: 1rem !important;
    }
}

/* ========================================
   SEPETmodal gibi overlay'ler
======================================== */

@media (max-width: 768px) {
    /* Sepet sayfası */
    .cart-item {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .cart-item-image {
        width: 100% !important;
        max-width: 200px;
        margin: 0 auto 1rem auto;
    }
    
    .cart-summary {
        position: sticky !important;
        bottom: 0 !important;
        background: white !important;
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1) !important;
        padding: 1rem !important;
        margin: 0 -1rem !important;
        border-radius: 1rem 1rem 0 0 !important;
    }
}

/* ========================================
   NAVBAR & FOOTER MOBİL
======================================== */

@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        padding: 0.75rem 0 !important;
    }
    
    .navbar-logo {
        font-size: 1.5rem !important;
    }
    
    .navbar-menu {
        font-size: 0.875rem !important;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 !important;
    }
    
    .footer-section {
        margin-bottom: 1.5rem !important;
    }
}

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

/* GPU accelerated animations */
.animated-element {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Lazy loading için placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
