/* ═══════════════════════════════════════════════════════════
   RusticaGlow — Mobil Uyumluluk Düzeltmeleri (v5-D)
   ═══════════════════════════════════════════════════════════
   Bu dosya style.css'ten SONRA linklenmeli. Mevcut kuralları
   ezmek için !important kullanılmıştır — sadece mobil viewport'ta.

   index.html'e şöyle ekle:
       <link rel="stylesheet" href="assets/css/style.css">
       <link rel="stylesheet" href="assets/css/mobile-fix.css">

   Düzeltilen sorunlar:
   1. Cookie banner Redmi'de sayfa ile birlikte kaydırma sorunu
   2. Trust badges Redmi'de bozuk hizalama
   3. Sepet drawer bottom sheet sorunu
   4. Footer payment icons mobil hizalama
   ═══════════════════════════════════════════════════════════ */


/* ─── Cookie Banner Mobil (tam bottom-sheet) ─── */
@media (max-width: 640px) {
  .cookie-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom)) !important;
    box-shadow: 0 -8px 28px rgba(44, 26, 16, 0.22) !important;
    z-index: 10500 !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
  }

  .cookie-banner .cookie-banner-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    grid-template-columns: 1fr !important;
  }

  .cookie-banner .cookie-text {
    font-size: 13px !important;
    line-height: 1.55 !important;
  }
  .cookie-banner .cookie-text strong { font-size: 17px !important; }

  .cookie-banner .cookie-buttons,
  .cookie-banner .cookie-buttons-3 {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .cookie-banner .cookie-btn {
    width: 100% !important;
    padding: 13px 16px !important;
    font-size: 14px !important;
  }

  /* Buton sırası: Essential (en az tıklanan) en üstte, Accept All en altta */
  .cookie-buttons-3 .cookie-btn-essential { order: 1; }
  .cookie-buttons-3 .cookie-btn-manage { order: 2; }
  .cookie-buttons-3 .cookie-btn-accept { order: 3; }
}

/* ─── Consent Modal Mobil ─── */
@media (max-width: 640px) {
  .consent-modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
    z-index: 11000 !important;
  }

  .consent-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 95vh !important;
    border-radius: 16px 16px 0 0 !important;
    margin: 0 !important;
  }

  .consent-modal-actions {
    flex-direction: column !important;
    padding: 14px 20px calc(20px + env(safe-area-inset-bottom)) !important;
  }

  .consent-modal-actions .cookie-btn {
    width: 100% !important;
    padding: 13px 16px !important;
  }

  .consent-cat-cookies code {
    word-break: break-all !important;
  }
}

/* ─── Trust Bar Mobil (Redmi fix) ─── */
@media (max-width: 480px) {
  .trust-bar { padding: 14px 16px !important; }

  .trust-bar-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .trust-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 4px 0 !important;
    min-width: 0 !important;
  }

  .trust-icon {
    font-size: 22px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }

  .trust-text {
    font-size: 13px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    flex: 1 !important;
  }
}

/* ─── Cart Drawer Mobil ─── */
@media (max-width: 640px) {
  .cart-drawer {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .cart-drawer-footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  }
}

/* ─── Footer Logo Mobil ─── */
@media (max-width: 768px) {
  .footer-logo {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
  }
  .footer-logo-icon {
    width: 32px !important;
    height: 32px !important;
    color: #E8A77A;
    flex-shrink: 0 !important;
  }
  .footer-logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px !important;
    font-weight: 700;
    color: inherit;
  }
  .footer-logo-text span {
    color: #E8A77A;
  }
}

/* Desktop için de logo yan yana */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.footer-logo-icon {
  width: 36px;
  height: 36px;
  color: #E8A77A;  /* Açık turuncu — koyu footer'da görünür */
  flex-shrink: 0;
  opacity: 0.95;
}
.footer-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 700;
  color: inherit;  /* Footer'ın kendi text rengini al */
  line-height: 1;
}
.footer-logo-text span {
  color: #E8A77A;  /* "Glow" kısmı turuncu */
}

/* ─── Footer Payment Icons ─── */
.footer-payments {
  border-top: 1px solid rgba(217, 196, 168, 0.3);
  padding: 22px 24px 14px;
  display: flex;
  justify-content: center;
}

.pm-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.pm-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 32px !important;
  width: auto !important;
  max-width: 52px !important;
  line-height: 0;
  overflow: hidden;
  transition: transform 0.15s ease;
}
.pm-icon:hover { transform: translateY(-1px); }

.pm-icon img,
.pm-icon svg,
.footer-payments .pm-icon img,
.footer-payments .pm-icon svg,
.co-payment-icons .pm-icon img,
.co-payment-icons .pm-icon svg {
  display: block !important;
  height: 32px !important;
  width: auto !important;
  max-width: 52px !important;
  max-height: 32px !important;
  min-width: 0 !important;
  border-radius: 5px;
  object-fit: contain !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

/* Checkout sayfasında payment icons */
.co-payment-icons {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.co-payment-icons .pm-icon {
  height: 28px !important;
  max-width: 46px !important;
}
.co-payment-icons .pm-icon img,
.co-payment-icons .pm-icon svg {
  height: 28px !important;
  max-width: 46px !important;
  max-height: 28px !important;
}

@media (max-width: 640px) {
  .pm-icons { gap: 10px; }
  .pm-icon { height: 28px !important; max-width: 46px !important; }
  .pm-icon img, .pm-icon svg { height: 28px !important; max-width: 46px !important; max-height: 28px !important; }
  .footer-payments { padding: 18px 16px 10px; }
}

@media (max-width: 380px) {
  .pm-icons { gap: 8px; }
  .pm-icon { height: 24px !important; max-width: 40px !important; }
  .pm-icon img, .pm-icon svg { height: 24px !important; max-width: 40px !important; max-height: 24px !important; }
}

/* ─── Header İcon Düzeltmeleri (mobil dokunma alanı) ─── */
@media (max-width: 480px) {
  .icon-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ─── Header Taşma Düzeltmesi (Ülke + Dil mobil) ─── */
/* SORUN: Header'da hamburger + logo + 3 ikon + ülke seçici + dil butonu
   mobilde yatay olarak sığmıyor. ÇÖZÜM: SADECE mobilde kompakt mod —
   desktop'a karışmıyor (overflow ve flex-wrap kuralları @media içinde) */

@media (max-width: 768px) {
  .header-inner {
    max-width: 100% !important;
    /* overflow: hidden KULLANMA - country dropdown'unu keser */
  }
  /* Dropdown'un parent overflow'tan kurtulup tüm sayfaya yayılabilmesi için */
  .country-dropdown {
    position: fixed !important;
    top: 64px !important;  /* header yüksekliği civarı */
    right: 8px !important;
    left: auto !important;
    width: calc(100vw - 16px) !important;
    max-width: 360px !important;
    max-height: calc(100vh - 80px) !important;
    z-index: 9999 !important;
  }
  .header-top {
    flex-wrap: nowrap !important;
    gap: 4px !important;
    min-width: 0 !important;
  }
  .header-actions {
    flex-wrap: nowrap !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    align-items: center !important;
  }

  /* Mobilde dil butonu artık hamburger menüye taşındı, header'dan gizle */
  .header-actions .lang-btn { display: none !important; }

  /* Logo sub-text mobilde gizle - yer kazan */
  .logo-sub { display: none !important; }
  .logo-text { font-size: 20px !important; }

  /* İkon butonlarda padding düşür ama dokunma alanı koru */
  .header-actions .icon-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 4px !important;
  }

  /* Ülke seçici kompakt */
  .country-picker {
    padding: 6px 8px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .country-picker img,
  .country-picker svg { width: 22px !important; height: 15px !important; }
  .country-picker .country-arrow { font-size: 10px !important; margin-left: 4px !important; }
}

/* Mobil menü içindeki dil seçici - her zaman görünsün (tüm boyutlarda) */
.mobile-lang-switcher {
  padding: 16px 20px;
  border-bottom: 1px solid #F2E8D9;
  margin-bottom: 16px;
  margin-top: 8px;
}
.mobile-lang-label {
  font-size: 11px;
  font-weight: 600;
  color: #8B5E42;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.mobile-lang-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mobile-lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  background: #FDF6EC;
  border: 1.5px solid #F2E8D9;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #5C3320;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mobile-lang-btn:hover {
  background: #F2E8D9;
  border-color: #D9C4A8;
}
.mobile-lang-btn.active {
  background: #5C3320;
  color: #FDF6EC;
  border-color: #5C3320;
}
.mobile-lang-flag {
  font-size: 18px;
  line-height: 1;
}

/* Mobil menüde dil seçici sadece mobile-nav VE 768px+ ekran ölçüsünde gizli olsun
   (yani desktop'ta mobil menü zaten görünmüyor ama emin olalım) */
@media (min-width: 769px) {
  /* Mobil menü zaten 768'den büyük ekranlarda görünmüyor ama
     dil seçici de görünmesin diye guard */
  .mobile-nav .mobile-lang-switcher { display: block; }
}

/* Çok dar ekranlar (Redmi vb. 380px civarı) */
@media (max-width: 380px) {
  .header-top {
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 2px !important;
  }
  .header-actions { gap: 4px !important; }
  .header-actions .icon-btn {
    width: 32px !important;
    height: 32px !important;
  }
  .header-actions .icon-btn svg {
    width: 18px !important;
    height: 18px !important;
  }
  .country-picker {
    padding: 4px 6px !important;
    height: 32px !important;
  }
  .logo-text { font-size: 18px !important; }
  .burger-btn {
    padding: 4px 6px !important;
    font-size: 22px !important;
  }
}

/* ─── Body scroll lock — modal açıkken ─── */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ─── PDP butonları mobil ─── */
@media (max-width: 480px) {
  .pdp-cta-wrap .btn-lg {
    font-size: 15px !important;
    padding: 14px 16px !important;
  }
  .pdp-shipping-note {
    font-size: 12px !important;
    text-align: center !important;
    margin-top: 8px !important;
  }
}

/* ─── Checkout form mobil ─── */
@media (max-width: 640px) {
  .co-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .co-summary {
    position: static !important;
    margin-top: 0 !important;
  }
  .co-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ─── E-posta Typo Öneri Kutusu (v5-D) ─── */
.co-email-suggestion {
  margin-top: 8px;
  padding: 8px 12px;
  background: #FFF8E8;
  border: 1px solid #E8C97A;
  border-radius: 6px;
  font-size: 13px;
  color: #6B4F38;
}
.email-fix-btn {
  background: none;
  border: none;
  color: #C4714E;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  font-size: 13px;
  padding: 0 2px;
  font-family: inherit;
}
.email-fix-btn:hover {
  color: #A85B3A;
}
