/* ═══════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATION — Ziyalar Doğal Lezzetler
   Kapsamlı mobil düzeltmeler (320px - 768px)
   ═══════════════════════════════════════════════════════════════ */

/* ── Global kutu modeli ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; height: auto; display: block; }

/* ═══════════════════════
   1. HEADER & NAVIGATION
═══════════════════════ */
@media (max-width: 768px) {

  /* Bildirim çubuğu */
  .global-notification .notification-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 7px 12px;
    text-align: left;
    justify-content: space-between;
  }
  .global-notification p {
    font-size: 10px;
    line-height: 1.4;
    white-space: normal;
    flex: 1;
  }
  .global-notification .social-links { display: none; }
  .warning-text { font-size: 9px; display: block; margin-top: 2px; }

  /* Ana header */
  .main-header { padding: 10px 0; }
  .header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
  }
  .header-left { flex: 1; }
  .logo { gap: 8px; }
  .logo-img { width: 42px; height: 42px; }
  .brand-name { font-size: 1.1rem; }
  .brand-location { font-size: 0.6rem; }

  /* Sağ header — sadece telefon + sepet göster */
  .header-right .social-links { display: none; }
  .header-right .search-button { display: none; }
  .phone-button span { display: none; }
  .phone-button { padding: 8px 10px; min-width: 0; }
  .cart-button { padding: 8px 10px; }
  .cart-count {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }

  /* Desktop nav gizle */
  .main-nav { display: none; }

  /* Mobil menü butonu göster */
  .header-mobile { display: flex !important; }
  .mobile-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 1.4rem;
    cursor: pointer;
    color: #333;
  }
}

/* Mobil menü drawer */
.mobile-menu {
  position: fixed;
  top: 0; left: -100%;
  width: min(320px, 90vw);
  height: 100dvh;
  background: #fff;
  z-index: 9999;
  overflow-y: auto;
  box-shadow: 4px 0 30px rgba(0,0,0,0.15);
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}
.mobile-menu.active { left: 0; }

/* Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  backdrop-filter: blur(2px);
}
.mobile-overlay.active { display: block; }

/* Mobil menü içi */
.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-nav-list > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s, color 0.2s;
}
.mobile-nav-list > li > a:hover,
.mobile-nav-list > li > a:active {
  background: #f0faf3;
  color: #2d7a45;
}

/* Mobil dropdown */
.mobile-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f8fdf9;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-submenu.open { max-height: 600px; }
.mobile-submenu li a {
  display: block;
  padding: 12px 24px 12px 36px;
  font-size: 0.9rem;
  color: #444;
  text-decoration: none;
  border-bottom: 1px solid #eef5f0;
}
.mobile-submenu li a:hover { color: #2d7a45; background: #e8f5ec; }

/* Mobil menü header */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #2d7a45, #3aab5e);
  color: white;
}
.mobile-menu-header .logo-text .brand-name { color: white; font-size: 1.2rem; }
.mobile-menu-header .logo-text .brand-location { color: rgba(255,255,255,0.7); }
.mobile-menu-close {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.15);
  border: none; border-radius: 50%;
  color: white; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ═══════════════════════
   2. HERO SLIDER
═══════════════════════ */
@media (max-width: 768px) {
  .hero-swiper { height: 400px; }

  .hero-slide-title {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
    line-height: 1.1;
  }
  .hero-slide-sub {
    font-size: 0.85rem;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-slide-cta {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .hero-btn-detail, .hero-btn-wa {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 13px 20px;
    font-size: 0.9rem;
  }
  .hero-slide-badge { font-size: 11px; padding: 5px 14px; }
  .hero-counter { font-size: 11px; top: 12px; right: 12px; }
  .hero-counter .current { font-size: 16px; }

  /* Nav butonları küçük yap */
  .hero-swiper .swiper-button-next,
  .hero-swiper .swiper-button-prev {
    width: 38px; height: 38px;
  }
  .hero-swiper .swiper-button-next::after,
  .hero-swiper .swiper-button-prev::after { font-size: 13px; }
}
@media (max-width: 480px) {
  .hero-swiper { height: 320px; }
  .hero-slide-sub { display: none; }
  .hero-slide-title { font-size: clamp(1.3rem, 8vw, 2rem); }
}

/* ═══════════════════════
   3. KATEGORİLER
═══════════════════════ */
@media (max-width: 768px) {
  .categories { padding: 32px 0; }
  .category-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px;
  }
  .category-item { width: 100% !important; }
  .category-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
  }
  .category-title {
    font-size: 0.75rem;
    margin-top: 6px;
  }
}
@media (max-width: 480px) {
  .category-list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .category-image { height: 100px; }
}

/* ═══════════════════════
   4. ÜRÜN KARTLARI
═══════════════════════ */
@media (max-width: 768px) {
  .products-section { padding: 24px 0; }
  .section-title h2 { font-size: 1.4rem; }
  .section-title p { font-size: 0.85rem; }

  .product-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 12px !important;
  }
  .product-item {
    width: 100% !important;
    margin: 0 !important;
  }

  .product-image {
    height: 160px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
  }
  .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .product-info { padding: 10px; }
  .product-title {
    font-size: 0.78rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-price { font-size: 1rem; }
  .product-old-price { font-size: 0.75rem; }
  .product-discount-badge { font-size: 0.65rem; padding: 2px 6px; }

  /* Ürün aksiyon butonları */
  .product-actions {
    gap: 4px;
  }
  .product-actions a {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  /* Sepet butonu — tam genişlik */
  .btn-add-cart, .product-cart-btn {
    font-size: 0.8rem;
    padding: 8px 10px;
    width: 100%;
  }
}

@media (max-width: 400px) {
  .product-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .product-image { height: 130px; }
  .product-title { font-size: 0.72rem; }
}

/* ═══════════════════════
   5. ÜRÜN DETAY SAYFASI
═══════════════════════ */
@media (max-width: 768px) {
  .product-detail-page { padding: 16px 0 40px; }
  .product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* Fotoğraflar */
  .product-main-image {
    height: 280px;
    border-radius: 14px;
    overflow: hidden;
  }
  .product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .product-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .product-thumbs::-webkit-scrollbar { display: none; }
  .product-thumb {
    min-width: 64px;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
  }

  /* Fiyat satırı */
  .product-detail-price-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .product-detail-new-price { font-size: 1.8rem; }

  /* Countdown */
  .product-detail-countdown {
    padding: 12px;
    border-radius: 10px;
  }
  .timer-display { font-size: 1.2rem !important; }

  /* CTA butonlar — alt alta */
  .product-detail-cta {
    flex-direction: column;
    gap: 10px;
  }
  .btn-whatsapp-order,
  .btn-add-cart {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 14px 16px;
  }

  /* Özellikler grid */
  .product-detail-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .product-detail-feature { font-size: 0.8rem; padding: 8px; }

  /* Sekmeler */
  .tabs-nav {
    overflow-x: auto;
    display: flex;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
    border-bottom: 2px solid #e9ecef;
  }
  .tabs-nav::-webkit-scrollbar { display: none; }
  .tab-btn {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 8px 14px;
  }
}

/* ═══════════════════════
   6. KATEGORİ SAYFALARI
═══════════════════════ */
@media (max-width: 768px) {
  /* Breadcrumb */
  .breadcrumb-section { padding: 10px 12px; }
  .breadcrumb-nav { font-size: 12px; }

  /* Filtre */
  .filter-section, .products-filter {
    overflow-x: auto;
    padding: 8px 12px;
    gap: 6px;
    display: flex;
    scrollbar-width: none;
  }
  .filter-btn { white-space: nowrap; font-size: 0.8rem; padding: 6px 12px; }

  /* Hero banner kategori */
  .category-hero-banner {
    height: 180px;
    padding: 20px 12px;
  }
  .category-hero-banner h1 { font-size: 1.5rem; }
  .category-hero-banner p { font-size: 0.85rem; }
}

/* ═══════════════════════
   7. FOOTER
═══════════════════════ */
@media (max-width: 768px) {
  .site-footer { padding: 32px 0 16px; }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .footer-col h3 { font-size: 1rem; margin-bottom: 12px; }
  .footer-links li a { font-size: 0.85rem; }
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .footer-copyright { font-size: 0.8rem; }
}

/* ═══════════════════════
   8. SABİT BUTONLAR
═══════════════════════ */
@media (max-width: 768px) {
  .fixed-buttons-wrapper {
    bottom: 16px;
    right: 12px;
    gap: 10px;
  }
  .whatsapp-button a {
    padding: 12px 16px;
    font-size: 0.85rem;
    gap: 6px;
  }
  .whatsapp-button a i { font-size: 1.1rem; }
  .live-chat-button button {
    padding: 10px 14px;
    font-size: 0.8rem;
  }

  /* Chat widget */
  .live-chat-widget {
    width: calc(100vw - 20px);
    max-width: 320px;
    right: 10px;
    bottom: 100px;
    border-radius: 16px;
  }
}

/* ═══════════════════════
   9. SEPET (CART)
═══════════════════════ */
@media (max-width: 768px) {
  .cart-page { padding: 16px 12px; }
  .cart-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .cart-item-img { width: 80px; height: 80px; }
  .cart-item-title { font-size: 0.9rem; }
  .cart-summary { position: static !important; }
}

/* ═══════════════════════
   10. SSS & BLOG
═══════════════════════ */
@media (max-width: 768px) {
  /* FAQ accordion */
  .faq-question { font-size: 0.9rem; padding: 14px 12px; }
  .faq-answer { font-size: 0.85rem; padding: 12px; }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .blog-card-img { height: 200px; }
}

/* ═══════════════════════
   11. SCROLL TOP BTN
═══════════════════════ */
@media (max-width: 768px) {
  .scroll-top {
    width: 42px;
    height: 42px;
    bottom: 80px;
    right: 12px;
    font-size: 0.9rem;
  }
}

/* ═══════════════════════
   12. POPUP & TOAST
═══════════════════════ */
@media (max-width: 768px) {
  .exit-popup .popup-content {
    width: calc(100vw - 32px);
    max-width: 380px;
    padding: 24px 20px;
    border-radius: 16px;
  }
  .exit-popup h2 { font-size: 1.2rem; }
  .coupon-code { font-size: 1.5rem; padding: 10px; }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 80px;
    width: auto;
    font-size: 0.85rem;
    padding: 12px 16px;
    border-radius: 10px;
  }
}

/* ═══════════════════════
   13. SEPET (BASKET) DETAY
═══════════════════════ */
@media (max-width: 768px) {
  .basket-detail-hero {
    padding: 40px 16px 32px;
    border-radius: 0;
  }
  .basket-detail-hero h1 { font-size: 1.6rem; }
  .basket-price-badge { font-size: 1.3rem; }

  .basket-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .basket-img-thumbs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }
  .basket-thumb { min-width: 72px; height: 72px; flex-shrink: 0; }

  .basket-contents-list { gap: 10px; }
  .basket-content-item { padding: 10px 12px; font-size: 0.85rem; }

  .basket-benefits-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .basket-benefit-chip { font-size: 0.75rem; padding: 8px; }

  .basket-cta { padding: 20px 16px; }
  .basket-cta .btn-whatsapp { font-size: 0.95rem; padding: 14px; }
}

/* ═══════════════════════
   14. GENEL TOUCH İYİLEŞTİRME
═══════════════════════ */
@media (max-width: 768px) {
  /* Tüm tıklanabilir alanlar min 44px */
  a, button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Metin seçimini engelle (slider) */
  .hero-swiper-section { -webkit-user-select: none; user-select: none; }

  /* Overflow taşmalarını önle */
  body { overflow-x: hidden; }
  section, .container { overflow-x: hidden; }

  /* Container padding */
  .container { padding: 0 12px; }
}
