/* ============================================================
   NEXT INTERNATIONAL - MOBILE RESPONSIVE FIX
   ============================================================ */

/* ==================== GENEL AYARLAR ==================== */
* {
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
}

/* iOS input zoom engelleme */
@media screen and (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ==================== HEADER TOP ==================== */
@media (max-width: 991px) {
    .header-top {
        padding: 5px 0;
    }

    .header-top .welcome-msg {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    .header-top .header-right {
        font-size: 11px;
    }

    .header-top .header-right a {
        padding: 2px 5px;
    }

    .header-top .divider,
    .header-top .delimiter {
        margin: 0 3px;
    }
}

@media (max-width: 767px) {
    .header-top {
        display: none !important;
    }
}

/* ==================== HEADER MIDDLE ==================== */
@media (max-width: 991px) {
    .header-middle {
        padding: 10px 0;
    }

    .header-middle .container {
        padding: 0 10px;
    }

    .header-middle .logo img {
        max-width: 120px;
        height: auto;
    }

    /* Header search gizle - mobilde ayrı var */
    .header-middle .header-search {
        display: none !important;
    }

    /* Header right ikonlar */
    .header-right {
        gap: 5px;
    }

    .header-right .header-call {
        display: none !important;
    }

    .header-right .wishlist,
    .header-right .cart-dropdown > a {
        padding: 8px;
    }

    .header-right .wishlist-label,
    .header-right .cart-label {
        display: none !important;
    }

    .header-right .wishlist i,
    .header-right .cart-dropdown i {
        font-size: 22px;
    }
}

@media (max-width: 575px) {
    .header-middle .logo img {
        max-width: 90px;
    }

    .mobile-menu-toggle {
        font-size: 26px !important;
        padding: 10px !important;
        margin-right: 5px;
    }
}

/* ==================== MOBİL ARAMA KUTUSU ==================== */
@media (max-width: 767px) {
    .mobilOzel {
        display: block !important;
        padding: 0 10px 15px;
        background: #fff;
    }

    .mobilOzel .header-search {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
    }

    .mobilOzel .select-box {
        display: none !important;
    }

    .mobilOzel .form-control {
        border-radius: 25px 0 0 25px !important;
        height: 44px;
        padding: 0 15px;
        border: 1px solid #ddd;
        border-right: none;
    }

    .mobilOzel .btn-search {
        border-radius: 0 25px 25px 0 !important;
        height: 44px;
        width: 50px;
        background: #336699;
        border: 1px solid #336699;
    }

    .mobilOzel .btn-search i {
        color: #fff;
    }
}

@media (min-width: 768px) {
    .mobilOzel {
        display: none !important;
    }
}

/* ==================== HEADER BOTTOM / NAVİGASYON ==================== */
@media (max-width: 991px) {
    .header-bottom {
        padding: 8px 0;
    }

    .header-bottom .category-dropdown {
        display: none !important;
    }

    .header-bottom .main-nav {
        display: none !important;
    }

    .header-bottom .header-right {
        display: none !important;
    }
}

/* ==================== INTRO SLIDER ==================== */
@media (max-width: 767px) {
    .intro-section {
        margin-bottom: 15px;
    }

    .intro-slide {
        min-height: 200px !important;
        background-size: cover !important;
        background-position: center !important;
    }

    .intro-slide .container {
        padding: 0 15px;
    }

    /* Slider içindeki ürün görseli gizle */
    .intro-slide .slide-image {
        display: none !important;
    }

    /* Banner içerik */
    .intro-slide .banner-content {
        position: relative !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        padding: 20px 0;
        text-align: left;
        max-width: 100%;
    }

    .intro-slide .banner-subtitle {
        font-size: 11px !important;
        margin-bottom: 5px !important;
    }

    .intro-slide .banner-title {
        font-size: 16px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }

    .intro-slide .banner-content > p {
        font-size: 11px !important;
        margin-bottom: 10px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .intro-slide .btn {
        padding: 8px 16px !important;
        font-size: 11px !important;
    }

    /* Swiper pagination */
    .intro-section .swiper-pagination {
        bottom: 10px !important;
    }

    .intro-section .swiper-button-next,
    .intro-section .swiper-button-prev {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .intro-slide {
        min-height: 180px !important;
    }

    .intro-slide .banner-title {
        font-size: 14px !important;
    }
}

/* ==================== ICON BOX (Teslimat, İade vb.) ==================== */
@media (max-width: 767px) {
    .icon-box-wrapper {
        padding: 15px 10px !important;
        margin: 15px 0 !important;
    }

    .icon-box.icon-box-side {
        flex-direction: column;
        text-align: center;
        padding: 10px 5px;
    }

    .icon-box .icon-box-icon {
        margin-right: 0 !important;
        margin-bottom: 8px;
    }

    .icon-box .icon-box-icon i {
        font-size: 24px;
    }

    .icon-box .icon-box-title {
        font-size: 11px !important;
        line-height: 1.3;
    }

    .icon-box .icon-box-content p {
        font-size: 10px !important;
        display: none; /* Açıklama gizle, başlık yeterli */
    }
}

/* ==================== KATEGORİ HİKAYE (Instagram tarzı) ==================== */
@media (max-width: 767px) {
    .category-ellipse-section {
        padding: 10px 0;
        margin-bottom: 15px;
    }

    .category-ellipse-section .swiper-container {
        padding: 0 10px;
    }

    .category-ellipse-section .category-ellipse {
        min-width: 70px !important;
        max-width: 70px !important;
        margin-right: 12px !important;
    }

    .category-ellipse-section .category-media img {
        width: 65px !important;
        height: 65px !important;
    }

    .category-ellipse-section .category-name {
        font-size: 10px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70px;
    }
}

/* ==================== KAMPANYA BANNER ==================== */
@media (max-width: 767px) {
    .category-banner-wrapper {
        padding: 0 5px;
    }

    .category-banner-wrapper .col-md-6 {
        padding: 0 5px;
        margin-bottom: 10px !important;
    }

    .category-banner-wrapper .banner {
        border-radius: 8px;
        overflow: hidden;
    }

    .category-banner-wrapper .banner img {
        width: 100%;
        height: auto;
    }

    .category-banner-wrapper .banner-content {
        padding: 10px;
    }

    .category-banner-wrapper .banner-subtitle {
        font-size: 10px !important;
    }

    .category-banner-wrapper .banner-title {
        font-size: 13px !important;
        line-height: 1.3;
    }

    .category-banner-wrapper .banner-price-info {
        font-size: 11px !important;
    }
}

/* ==================== VİTRİN BAŞLIKLARI ==================== */
@media (max-width: 767px) {
    .title-link-wrapper {
        padding: 0 10px;
        margin-bottom: 15px !important;
    }

    .title-link-wrapper .title {
        font-size: 16px !important;
    }

    .title-link-wrapper .btn-link {
        font-size: 12px;
    }
}

/* ==================== ÜRÜN KARTLARI ==================== */
@media (max-width: 767px) {
    .product-wrapper,
    .tab-content.product-wrapper {
        padding: 0 5px;
    }

    /* 2 sütun görünüm */
    .product-wrapper .row.cols-2 > *,
    .product-wrapper .row.cols-sm-3 > *,
    .product-wrapper .row.cols-md-4 > *,
    .product-wrapper .row.cols-xl-5 > * {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 5px !important;
    }

    .product-wrap {
        margin-bottom: 10px;
    }

    .product {
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    .product .product-media {
        border-radius: 8px 8px 0 0;
    }

    .product .product-media img {
        width: 100% !important;
        height: auto !important;
        min-height: 120px;
        max-height: 200px;
        object-fit: contain;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .product .product-media {
        display: block !important;
        overflow: visible !important;
        min-height: 120px;
    }

    .product-wrap {
        display: block !important;
        visibility: visible !important;
    }

    figure.product-media {
        margin: 0;
        padding: 0;
        display: block !important;
    }

    figure.product-media a {
        display: block !important;
    }

    figure.product-media a img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Tek resimli ürünlerde opacity sorunu çözümü */
    .product-media img:only-child,
    .product-media img:first-child,
    .product-media img:last-child {
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }

    /* Lazy loading için */
    .product-media img[loading="lazy"] {
        opacity: 1 !important;
        visibility: visible !important;
    }

    .product .product-details {
        padding: 8px;
    }

    .product .product-name {
        font-size: 12px !important;
        line-height: 1.4;
        height: auto;
        max-height: 34px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 5px;
    }

    .product .product-name a {
        color: #333;
    }

    /* Rating gizle */
    .product .ratings-container {
        display: none !important;
    }

    /* Fiyat */
    .product .product-price {
        font-size: 13px !important;
        font-weight: 600;
    }

    .product .product-price .new-price {
        color: #336699;
    }

    .product .product-price .old-price {
        font-size: 11px;
    }

    /* Ürün action butonları */
    .product .product-action-vertical {
        opacity: 1;
        visibility: visible;
        right: 5px;
        top: 5px;
    }

    .product .product-action-vertical .btn-product-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-bottom: 3px;
        background: rgba(255,255,255,0.9);
        border-radius: 50%;
    }

    /* Fiyat gizli mesajı */
    .product-price--hidden {
        font-size: 10px !important;
        padding: 5px !important;
    }
}

@media (max-width: 380px) {
    .product .product-name {
        font-size: 11px !important;
    }

    .product .product-price {
        font-size: 12px !important;
    }
}

/* ==================== VİTRİN BANNER (Sol taraftaki büyük banner) ==================== */
@media (max-width: 991px) {
    .product-wrapper-1 .col-lg-3 {
        display: none !important; /* Büyük banner gizle, sadece ürünler göster */
    }

    .product-wrapper-1 .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ==================== CONTAINER PADDİNG ==================== */
@media (max-width: 767px) {
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    section,
    .section {
        padding: 15px 0;
    }

    .mt-6 {
        margin-top: 15px !important;
    }

    .mb-6,
    .mb-8 {
        margin-bottom: 15px !important;
    }

    .pb-1 {
        padding-bottom: 5px !important;
    }

    .mb-4 {
        margin-bottom: 10px !important;
    }
}

/* ==================== FOOTER ==================== */
@media (max-width: 767px) {
    .footer {
        padding: 20px 0 90px !important; /* Bottom nav için alan */
    }

    .footer .container {
        padding: 0 15px;
    }

    .footer .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 0;
    }

    /* Footer widget'ları accordion yap */
    .footer .widget {
        border-bottom: 1px solid #eee;
        padding: 12px 0;
        margin-bottom: 0 !important;
    }

    .footer .widget-title {
        margin-bottom: 0 !important;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .footer .widget-title::after {
        content: '+';
        font-size: 18px;
        font-weight: 300;
        color: #999;
    }

    .footer .widget.active .widget-title::after {
        content: '-';
    }

    .footer .widget-body {
        display: none;
        padding-top: 10px;
    }

    .footer .widget.active .widget-body {
        display: block;
    }

    .footer .widget-body ul li {
        padding: 6px 0;
    }

    .footer .widget-body ul li a {
        font-size: 13px;
    }

    /* Footer logo */
    .footer .logo-footer img {
        max-width: 120px;
    }

    /* Sosyal medya */
    .footer .social-links {
        justify-content: center;
        margin: 15px 0;
    }

    .footer .social-links a {
        width: 40px;
        height: 40px;
        margin: 0 5px;
    }

    /* Copyright */
    .footer-bottom {
        text-align: center;
        padding: 15px 0;
        font-size: 11px;
    }
}

/* ==================== WHATSAPP BUTONU ==================== */
@media (max-width: 767px) {
    .whatsapp-container {
        padding: 15px !important;
    }

    .whatsapp-button {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }

    .integration-fixed__bottom-left {
        margin-bottom: 80px !important; /* Bottom nav üstünde */
        margin-left: 0 !important;
    }
}

/* ==================== SEPET SAYFASI ==================== */
@media (max-width: 767px) {
    .shop-table thead {
        display: none;
    }

    .shop-table tbody tr {
        display: block;
        padding: 15px;
        margin-bottom: 10px;
        border: 1px solid #eee;
        border-radius: 8px;
        position: relative;
    }

    .shop-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
    }

    .shop-table tbody td::before {
        content: attr(data-title);
        font-weight: 600;
        font-size: 12px;
        color: #666;
    }

    .shop-table .product-thumbnail {
        width: 70px;
        height: 70px;
    }

    .shop-table .product-name {
        font-size: 13px;
    }

    /* Sepet özeti */
    .cart-summary,
    .order-summary {
        position: sticky;
        bottom: 70px;
        background: #fff;
        padding: 15px;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -3px 10px rgba(0,0,0,0.1);
        margin: 0 -10px;
        z-index: 100;
    }
}

/* ==================== CHECKOUT / ALIŞVERİŞ TAMAMLA ==================== */
@media (max-width: 767px) {
    .checkout-form .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .checkout-form .form-group {
        margin-bottom: 12px;
    }

    .checkout-form label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .checkout-form .form-control {
        height: 46px;
        font-size: 15px;
    }

    .checkout-form select.form-control {
        height: 46px;
    }

    .checkout-form textarea.form-control {
        height: auto;
        min-height: 80px;
    }

    /* Sipariş özeti */
    .basket-summary {
        background: #f9f9f9;
        padding: 15px;
        border-radius: 8px;
        margin-top: 15px;
    }

    .basket-summary h3 {
        font-size: 15px;
        margin-bottom: 15px;
    }
}

/* ==================== PAPEL KREDİ KARTI FORMU ==================== */
@media (max-width: 767px) {
    #papel-form .row > [class*="col-lg"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    #papel-form .basket-square,
    #papel-form .basket-summary {
        padding: 15px;
        margin-bottom: 15px;
        background: #fff;
        border-radius: 8px;
    }

    #papel-form h3 {
        font-size: 15px !important;
        margin-bottom: 15px;
    }

    #papel-form .form-group {
        margin-bottom: 12px;
    }

    #papel-form .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
        display: block;
    }

    #papel-form .form-control {
        height: 48px !important;
        font-size: 16px !important;
        border-radius: 6px;
    }

    #papel-form .col-lg-4 {
        margin-bottom: 0;
    }

    #papel-form .btn-primary {
        width: 100%;
        height: 50px;
        font-size: 15px;
        border-radius: 8px;
    }
}

/* ==================== ÜRÜN DETAY SAYFASI ==================== */
@media (max-width: 767px) {
    .product-gallery {
        margin-bottom: 20px;
    }

    .product-gallery .product-image {
        border-radius: 8px;
        overflow: hidden;
    }

    .product-thumbs-wrap {
        margin-top: 10px;
    }

    .product-thumbs {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding: 5px 0;
        -webkit-overflow-scrolling: touch;
    }

    .product-thumbs .product-thumb {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
        border-radius: 6px;
    }

    .product-details .product-name {
        font-size: 18px;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .product-details .product-price {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .product-details .product-price .old-price {
        font-size: 16px;
    }

    .quantity-wrapper {
        margin: 15px 0;
    }

    .quantity-wrapper .quantity {
        display: flex;
        align-items: center;
    }

    .quantity-wrapper button {
        width: 40px;
        height: 44px;
    }

    .quantity-wrapper .qty-input {
        width: 60px;
        height: 44px;
        text-align: center;
        font-size: 16px;
    }

    .product-details .btn-cart {
        width: 100%;
        height: 50px;
        font-size: 15px;
    }

    /* Ürün tabları */
    .product-tabs {
        margin-top: 20px;
    }

    .product-tabs .nav-tabs {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid #eee;
        padding-bottom: 0;
    }

    .product-tabs .nav-link {
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 13px;
        border: none;
        border-bottom: 2px solid transparent;
    }

    .product-tabs .nav-link.active {
        border-bottom-color: #336699;
    }

    .product-tabs .tab-content {
        padding: 15px 0;
    }
}

/* ==================== GİRİŞ / KAYIT SAYFASI ==================== */
@media (max-width: 767px) {
    .login-page .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .login-page .login-box,
    .login-page .register-box {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .login-page h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }
}

/* ==================== KATEGORİ SAYFASI ==================== */
@media (max-width: 767px) {
    /* Sidebar filtre */
    .sidebar-fixed {
        display: none;
    }

    /* Toolbox */
    .toolbox {
        padding: 10px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .toolbox-item {
        flex: 1;
    }

    .toolbox-item select {
        width: 100%;
        height: 40px;
        font-size: 13px;
    }

    .toolbox-item.toolbox-layout {
        display: none;
    }

    /* Filtre butonu göster */
    .btn-filter {
        display: flex !important;
        align-items: center;
        gap: 5px;
        padding: 8px 15px;
        background: #336699;
        color: #fff;
        border-radius: 6px;
        font-size: 13px;
    }
}

/* ==================== MOBILE BOTTOM NAVİGASYON AYARLARI ==================== */
@media (max-width: 767px) {
    /* Sayfanın alt kısmına bottom nav için padding */
    .page-wrapper {
        padding-bottom: 65px;
    }

    /* Main content */
    .main {
        min-height: calc(100vh - 150px);
    }
}

/* ==================== SCROLL & TOUCH İYİLEŞTİRMELERİ ==================== */
@media (max-width: 767px) {
    /* Smooth scroll */
    html {
        scroll-behavior: smooth;
    }

    /* Horizontal scroll için */
    .swiper-wrapper,
    .product-thumbs,
    .nav-tabs {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .swiper-wrapper::-webkit-scrollbar,
    .product-thumbs::-webkit-scrollbar,
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
