/**
 * KRT - Tüm Sayfalar Mobil Uyumluluk
 * Global mobil düzeltmeler ve iyileştirmeler
 */

/* ========== GENEL - Tüm Sayfalar ========== */
html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-overflow-scrolling: touch;
}

.page {
    overflow-x: hidden;
    max-width: 100%;
}

.container, .container-fluid {
    max-width: 100%;
}

/* ========== 767px ve altı ========== */
@media (max-width: 767px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    /* Page title - breadcrumb gizle, başlık küçült */
    .ttm-page-title-row .breadcrumb-wrapper {
        display: none !important;
    }

    .ttm-page-title-row .d-flex {
        flex-wrap: wrap;
    }

    .page-title-heading h1.title {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    /* Section padding azalt */
    section {
        padding: 40px 0 !important;
    }

    /* Store grid - mağaza ürünleri */
    .store-grid .col-6 {
        padding-left: 8px;
        padding-right: 8px;
        flex: 0 0 50%;
        max-width: 50%;
    }

    .store-card {
        padding: 12px;
    }

    .store-card__title {
        font-size: 13px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .store-card__actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .store-card__actions .store-btn {
        font-size: 12px;
        padding: 8px 10px;
    }

    /* Pagination mobil */
    .ttm-pagination .pager {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .ttm-pagination .pager li a {
        padding: 10px 14px;
        font-size: 14px;
    }

    /* Footer mobil */
    .footer-top .widget {
        margin-bottom: 24px;
    }

    .footer-top .widget-title {
        font-size: 16px;
    }

    .footer-bottom .row > div {
        text-align: center !important;
        margin-bottom: 12px;
    }

    /* Form elemanları */
    .form-control, input[type="text"], input[type="email"], input[type="password"],
    input[type="tel"], textarea, select {
        font-size: 16px !important;
        max-width: 100%;
    }

    /* Butonlar tam genişlik */
    .btn, .ttm-btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    /* Back to top */
    #totop {
        bottom: 20px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}

/* ========== 575px ve altı ========== */
@media (max-width: 575px) {
    .page-title-heading h1.title {
        font-size: 22px !important;
    }

    .store-grid .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .store-card__actions .store-btn {
        flex: 1;
        min-width: calc(50% - 4px);
    }
}

/* ========== LOGIN & REGISTER ========== */
@media (max-width: 767px) {
    .wrap-login {
        padding: 24px 16px !important;
    }

    .wrap-login .form-group {
        margin-bottom: 16px;
    }

    .wrap-login .btn {
        width: 100%;
    }
}

/* ========== CONTACT ========== */
@media (max-width: 767px) {
    .contact-section .row > [class*="col-"] {
        margin-bottom: 24px;
    }
}

/* ========== CHECKOUT ========== */
@media (max-width: 767px) {
    .checkout-section .col-lg-8,
    .checkout-section .col-lg-4 {
        max-width: 100%;
        flex: 0 0 100%;
    }

    .checkout-card {
        padding: 20px !important;
    }

    .checkout-form .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .checkout-actions button {
        width: 100%;
        padding: 16px !important;
    }
}

/* ========== WISHLIST ========== */
@media (max-width: 767px) {
    #wishlist-grid .store-card {
        margin-bottom: 16px;
    }

    #wishlist-grid .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575px) {
    #wishlist-grid .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ========== PRODUCT DETAIL ========== */
@media (max-width: 767px) {
    .ttm-single-product-details .col-lg-6 {
        max-width: 100%;
        flex: 0 0 100%;
    }

    .summary.entry-summary {
        padding-left: 0 !important;
    }

    .summary .quantity {
        margin: 16px 0;
    }

    .summary .add-to-cart button,
    .summary #fav-toggle-btn {
        width: 100%;
    }

    .summary .actions {
        flex-direction: column;
    }

    .summary .actions > * {
        width: 100%;
    }

    .easyzoom-product-gallery .product-look-preview {
        margin-bottom: 20px;
    }
}

/* ========== ACCOUNT SAYFALARI ========== */
@media (max-width: 767px) {
    .sidebar .sidebar-left {
        order: 2;
        width: 100%;
    }

    .sidebar .content-area {
        order: 1;
        width: 100%;
        margin-bottom: 24px;
    }

    .modern-sidebar {
        position: static;
    }

    .sidebar .row > [class*="col-"] {
        max-width: 100%;
        flex: 0 0 100%;
    }

    .content-area .table-responsive,
    .sidebar .table-responsive {
        overflow-x: auto;
    }

    .content-area .table,
    .sidebar .table {
        min-width: 500px;
    }

    .profile-header {
        padding: 1.5rem 1rem;
    }

    .profile-header h2 {
        font-size: 1.3rem;
    }
}

/* ========== ABOUT US ========== */
@media (max-width: 767px) {
    .about-section .col-md-6 {
        margin-bottom: 24px;
    }
}

/* ========== ERROR SAYFASI ========== */
@media (max-width: 767px) {
    .error-404 h1 {
        font-size: 80px !important;
    }

    .error-404 .error-404-text {
        font-size: 18px;
    }
}

/* ========== SHOP TOOLBAR ========== */
@media (max-width: 767px) {
    .ttm-shop-toolbar-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .ttm-shop-toolbar-wrapper .toolbar-left,
    .ttm-shop-toolbar-wrapper .toolbar-right {
        width: 100%;
    }
}
