/* ==========================================================================
   RESPONSIVE.CSS - KAPSAMLI MOBİL UYUMLULUK
   Bu dosya mevcut style.css'e ek olarak yüklenir.
   Inline style'ları !important ile override eder.
   Hiçbir mevcut dosyayı değiştirmez.
   ========================================================================== */

/* ==========================================================================
   TABLET (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {

  /* --- Inline Grid Override: 2-sütunlu layout'ları tekil sütuna düşür --- */
  div[style*="grid-template-columns: 1fr 1.15fr"],
  div[style*="grid-template-columns: 1.15fr 1fr"],
  div[style*="grid-template-columns: 1fr 1.2fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"],
  div[style*="grid-template-columns: 1.1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 50px"],
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 40px"] {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  /* --- Inline Grid Override: 4-sütunlu grid'ler 2'ye --- */
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  /* --- Inline Grid Override: 3-sütunlu grid'ler 2'ye --- */
  div[style*="grid-template-columns: repeat(3, 1fr)"][style*="gap: 30px"],
  div[style*="grid-template-columns: repeat(3, 1fr)"][style*="gap: 20px"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Section padding tablet */
  .section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-title {
    font-size: 2rem;
  }

  /* Navbar height */
  .navbar-inner {
    height: 90px;
  }

  /* Hero adjustments */
  .home-hero {
    padding: 50px 0 60px;
  }

  .home-hero-content h1 {
    font-size: 2.6rem;
  }

  /* Page hero adjustments */
  .page-hero h1 {
    font-size: 2.25rem;
  }

  /* Spec table responsive */
  .spec-table th,
  .spec-table td {
    padding: 12px 14px;
    font-size: 0.88rem;
  }

  .spec-table td.feature-label {
    width: 40%;
  }

  /* Calculator card */
  .savings-calculator-card {
    padding: 28px;
  }
}

/* ==========================================================================
   MOBİL (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {

  /* --- GENEL TIPOGRAFI & SPACING --- */
  html {
    font-size: 15px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section {
    padding: 45px 0;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .section-lead {
    font-size: 0.95rem;
  }

  .section-subtitle {
    font-size: 0.75rem;
  }

  /* --- NAVBAR MOBİL --- */
  .navbar-inner {
    height: 64px;
    position: relative;
  }

  .brand-logo img {
    height: 55px !important;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    z-index: 120;
    gap: 0;
    max-height: 70vh;
    overflow-y: auto;
  }

  .nav-menu.mobile-open {
    display: flex !important;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    padding: 14px 20px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-light);
  }

  /* Mobilde dropdown menü */
  .dropdown-menu {
    position: static !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background-color: var(--bg-stone-50) !important;
    display: none;
  }

  .nav-item:hover .dropdown-menu {
    display: none;
  }

  .nav-item.dropdown-open .dropdown-menu {
    display: block !important;
  }

  .dropdown-item {
    padding: 12px 20px 12px 36px !important;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
  }

  .dropdown-item:hover {
    padding-left: 36px !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
  }

  /* Nav CTA mobil */
  .nav-cta {
    gap: 8px;
  }

  .nav-cta .btn {
    display: inline-flex !important;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  /* --- TOP BAR GİZLE --- */
  .top-header-bar {
    display: none;
  }

  /* --- HOMEPAGE HERO MOBİL --- */
  .home-hero {
    padding: 40px 0 50px;
  }

  .home-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  .home-hero-content h1 {
    font-size: 1.85rem !important;
    margin-bottom: 14px;
  }

  .home-hero-content p.lead {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-features-list {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding-top: 20px;
  }

  .hero-feature-item {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .hero-feature-item strong {
    font-size: 1rem;
  }

  .hero-feature-item span {
    font-size: 0.78rem;
  }

  /* Hero visual card */
  .home-hero-visual {
    order: -1;
  }

  .hero-card-display {
    padding: 16px;
    max-width: 100%;
  }

  .hero-card-img-wrap {
    padding: 12px;
  }

  .hero-card-img-wrap img {
    max-height: 280px;
  }

  .hero-card-footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  /* --- PAGE HERO MOBİL --- */
  .page-hero {
    padding: 36px 0 40px;
  }

  .page-hero h1 {
    font-size: 1.6rem !important;
    line-height: 1.3;
  }

  .page-hero p {
    font-size: 0.95rem;
  }

  .breadcrumbs {
    font-size: 0.78rem;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }

  /* --- TÜM INLINE GRID OVERRIDE: 2+ SÜTUN → 1 SÜTUN --- */
  div[style*="grid-template-columns: 1fr 1.15fr"],
  div[style*="grid-template-columns: 1.15fr 1fr"],
  div[style*="grid-template-columns: 1fr 1.2fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"],
  div[style*="grid-template-columns: 1.1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* 3 ve 4 sütunlu inline grid'ler */
  div[style*="grid-template-columns: repeat(3, 1fr)"],
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Inline 2-sütunlu spec listeleri (daha küçük gap'liler) */
  ul[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* Thumbnail grid'ler (4 sütundan 2'ye) */
  div[style*="grid-template-columns: repeat(4, 1fr)"][style*="gap: 12px"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* --- ÜRÜN KARTLARI MOBİL --- */
  .products-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .product-card-body {
    padding: 18px;
  }

  .product-card-title {
    font-size: 1.1rem;
  }

  .product-card-specs {
    grid-template-columns: 1fr !important;
  }

  .product-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .product-card-footer .btn {
    width: 100%;
    justify-content: center;
  }

  /* --- BLOG KARTLARI MOBİL --- */
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .blog-card-body {
    padding: 18px;
  }

  .blog-card-title {
    font-size: 1.05rem;
  }

  /* --- TOPTAN/B2B TIER KARTLARI MOBİL --- */
  .wholesale-tiers-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .tier-card {
    padding: 24px;
  }

  .tier-discount {
    font-size: 1.8rem;
  }

  /* --- HESAPLAYICI MOBİL --- */
  .calc-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .savings-calculator-card {
    padding: 20px;
  }

  .calc-results-card {
    padding: 20px;
  }

  .calc-result-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 0;
    font-size: 0.88rem;
  }

  .calc-result-row.highlight {
    padding: 14px;
  }

  /* --- İLETİŞİM MOBİL --- */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  .contact-form-card {
    padding: 24px;
  }

  .contact-info-card {
    padding: 24px;
  }

  .form-row {
    grid-template-columns: 1fr !important;
  }

  /* --- İLÇELER GRID MOBİL --- */
  .districts-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .district-item {
    padding: 12px 14px;
    font-size: 0.85rem;
  }

  /* --- FOOTER MOBİL --- */
  .site-footer {
    padding-top: 50px;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px;
    padding-bottom: 30px;
  }

  .footer-col h4 {
    font-size: 0.95rem;
    margin-bottom: 14px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 18px 0;
  }

  /* Footer logo */
  .footer-col .brand-logo img {
    height: 80px !important;
  }

  /* --- SPEC TABLE MOBİL --- */
  .spec-table-container {
    max-width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .spec-table {
    font-size: 0.84rem;
    min-width: 500px;
  }

  .spec-table th,
  .spec-table td {
    padding: 10px 12px;
  }

  /* --- ARTICLE LAYOUT MOBİL --- */
  .article-container {
    padding: 36px 16px;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-content h2 {
    font-size: 1.45rem;
    margin-top: 28px;
  }

  .article-content h3 {
    font-size: 1.15rem;
    margin-top: 22px;
  }

  .article-callout {
    padding: 16px 18px;
    margin: 22px 0;
    font-size: 0.92rem;
  }

  /* --- BUTONLAR MOBİL --- */
  .btn-lg {
    padding: 13px 24px;
    font-size: 0.95rem;
  }

  .btn {
    font-size: 0.88rem;
  }

  /* --- WHATSAPP FLOATING BUTTON MOBİL --- */
  .whatsapp-float {
    bottom: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }

  /* --- CTA BANNER MOBİL --- */
  div[style*="flex: 1 1 500px"] {
    flex: 1 1 100% !important;
  }

  div[style*="flex: 1 1 500px"] h2 {
    font-size: 1.5rem !important;
  }

  div[style*="flex: 1 1 500px"] p {
    font-size: 0.95rem !important;
  }

  /* "Gözde Ürünümüz" badge - mobilde konumlandırma düzeltme */
  .product-card div[style*="position: absolute; top: 10px; right: -10px"] {
    right: 0 !important;
    font-size: 0.72rem !important;
    padding: 4px 10px !important;
  }

  /* --- SWIPE GALLERY MOBİL İYİLEŞTİRMELERİ --- */
  .swipe-gallery {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  /* --- INLINE STYLE GENEL OVERRIDE'LAR --- */

  /* Ürün detay sayfası inline gap override */
  div[style*="gap: 50px"] {
    gap: 24px !important;
  }

  /* Inline margin-bottom küçültme */
  div[style*="margin-bottom: 70px"] {
    margin-bottom: 40px !important;
  }

  div[style*="margin-bottom: 80px"] {
    margin-bottom: 45px !important;
  }

  div[style*="padding-bottom: 60px"] {
    padding-bottom: 35px !important;
  }

  /* Inline font-size override for large headings */
  h2[style*="font-size: 2.2rem"] {
    font-size: 1.5rem !important;
  }

  p[style*="font-size: 1.1rem"] {
    font-size: 0.95rem !important;
  }

  /* Inline modüler aksesuar kutuları */
  div[style*="display: flex; flex-direction: column; gap: 10px"] label {
    font-size: 0.84rem !important;
  }

  /* Guarantee/info inline spans */
  div[style*="display: flex; gap: 20px"][style*="font-size: 0.82rem"] {
    flex-direction: column !important;
    gap: 6px !important;
  }

  /* CTA banner on index.html - make it stack */
  .section-alt > .container[style*="display: flex"][style*="justify-content: space-between"] {
    flex-direction: column !important;
    gap: 20px !important;
    align-items: flex-start !important;
  }

  /* FAQ cards */
  .faq-card {
    margin-bottom: 8px;
  }

  .faq-item-header {
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  .faq-item-body {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

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

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .section {
    padding: 36px 0;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-lead {
    font-size: 0.88rem;
  }

  /* Hero */
  .home-hero-content h1 {
    font-size: 1.55rem !important;
  }

  .home-hero-content p.lead {
    font-size: 0.9rem;
  }

  .page-hero h1 {
    font-size: 1.35rem !important;
  }

  .page-hero p {
    font-size: 0.88rem;
  }

  .page-hero {
    padding: 28px 0 32px;
  }

  /* Ürün kartları */
  .product-card-body {
    padding: 14px;
  }

  .product-card-title {
    font-size: 1rem;
  }

  .product-card-desc {
    font-size: 0.82rem;
  }

  /* Butonlar tam genişlik */
  .btn-lg {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  /* Badge'ler */
  .badge {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  /* Inline thumbnail grids - 2 columns even for small */
  div[style*="grid-template-columns: repeat(4, 1fr)"][style*="gap: 12px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* Footer */
  .footer-bottom {
    font-size: 0.75rem;
  }

  .footer-col .brand-logo img {
    height: 60px !important;
  }

  /* Whatsapp float küçük */
  .whatsapp-float {
    bottom: 14px;
    right: 14px;
    width: 48px;
    height: 48px;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }

  /* Spec table */
  .spec-table {
    font-size: 0.8rem;
    min-width: 420px;
  }

  /* Tier card mobil */
  .tier-card {
    padding: 18px;
  }

  .tier-title {
    font-size: 1.15rem;
  }

  .tier-discount {
    font-size: 1.5rem;
  }

  /* Contact form */
  .contact-form-card {
    padding: 18px;
  }

  .contact-info-card {
    padding: 18px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  /* Hesaplayıcı */
  .savings-calculator-card {
    padding: 16px;
  }

  .calc-results-card {
    padding: 16px;
  }

  /* Inline h2 font-size override */
  h2[style*="font-size: 2.2rem"] {
    font-size: 1.3rem !important;
  }
}

/* ==========================================================================
   TOUCH DESTEĞİ & GENEL MOBİL İYİLEŞTİRMELER
   ========================================================================== */

/* Touch cihazlarda hover effect kaldır */
@media (hover: none) {
  .product-card:hover {
    transform: none;
  }

  .blog-card:hover {
    transform: none;
  }

  .district-item:hover {
    transform: none;
  }

  .btn-primary:hover {
    transform: none;
  }

  .whatsapp-float:hover {
    transform: none;
  }

  /* Dropdown menülerde hover yerine tap kullan */
  .nav-item:hover .dropdown-menu {
    display: none;
  }
}

/* Landscape düzeltmeleri */
@media (max-height: 500px) and (orientation: landscape) {
  .home-hero {
    padding: 30px 0;
  }

  .page-hero {
    padding: 24px 0;
  }

  .hero-card-img-wrap img {
    max-height: 200px;
  }

  .nav-menu.mobile-open {
    max-height: 60vh;
    overflow-y: auto;
  }
}

/* Print düzeltmeleri */
@media print {
  .top-header-bar,
  .mobile-menu-toggle,
  .whatsapp-float,
  .nav-cta {
    display: none !important;
  }
}

/* --- SCI-FI CONTACT SECTION MOBIL UYUMLULUK --- */
@media (max-width: 768px) {
  #sci-fi-contact-section {
    padding: 50px 15px !important;
    min-height: auto !important;
  }
  .sci-fi-card {
    padding: 24px !important;
    max-width: 100% !important;
  }
  .sci-fi-title {
    font-size: 1.8rem !important;
    letter-spacing: 1px !important;
  }
  .sci-fi-subtitle {
    font-size: 1.3rem !important;
    margin-bottom: 20px !important;
  }
  .sci-fi-item {
    padding: 12px 15px !important;
    gap: 10px !important;
  }
  .sci-fi-icon {
    width: 35px !important;
    height: 35px !important;
  }
  .sci-fi-icon svg {
    width: 18px !important;
    height: 18px !important;
  }
  .sci-fi-text {
    font-size: 0.85rem !important;
  }
  .sci-fi-status-bar {
    flex-direction: column;
    gap: 8px !important;
    margin-top: 20px !important;
    padding-top: 15px !important;
    font-size: 1rem !important;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .sci-fi-title {
    font-size: 1.5rem !important;
  }
  .sci-fi-card {
    padding: 20px !important;
  }
  .sci-fi-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left;
  }
  .sci-fi-icon {
    margin-bottom: 5px;
  }
}

/* --- GLOBAL MOBILE SAFEGUARDS --- */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
  }
  
  img, iframe, video, object, embed {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Inline padding/margin fixes */
  *[style*="padding: 10"], *[style*="padding: 80"], *[style*="padding: 60"], *[style*="padding: 50"] {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  
  /* Ensure grids that might have been missed are forced to stack */
  *[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Prevent fixed inline widths from breaking viewport */
  *[style*="width: 4"], *[style*="width: 5"], *[style*="width: 6"], *[style*="width: 7"], *[style*="width: 8"], *[style*="width: 9"] {
    max-width: 100% !important;
    width: 100% !important;
  }
}
