/* conversion.css — WhatsApp float, mobile bottom nav, cookie, exit intent,
   sticky bar, social proof, quick view, shipping progress, recently viewed */

/* ── 1. WhatsApp Floating Button ──────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.wa-float-btn {
  width: 52px;
  height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(37,211,102,.45);
  cursor: pointer;
  border: none;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  animation: waWobble 3s ease-in-out 4s infinite;
}
.wa-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,.55);
}
@keyframes waWobble {
  0%,90%,100% { transform: rotate(0); }
  92%          { transform: rotate(-12deg); }
  96%          { transform: rotate(10deg); }
  98%          { transform: rotate(-6deg); }
}
.wa-float-tooltip {
  background: var(--black);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-full);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: all .2s;
  pointer-events: none;
}
.wa-float:hover .wa-float-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ── 2. Mobil Alt Navigasyon ──────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  background: white;
  border-top: var(--border);
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
@media (max-width: 768px) {
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  .wa-float  { bottom: 78px; right: 16px; }
  #backToTop { bottom: 78px !important; right: 16px !important; }
}

/* Safe area desteği (iPhone X ve üzeri notch) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-bottom-nav {
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
}

/* Bottom nav ikonları daha net */
.mobile-nav-tab .tab-icon { font-size: 22px; }
.mobile-nav-tab            { font-size: 11px; }
.mobile-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  text-decoration: none;
  transition: color .15s;
  position: relative;
}
.mobile-nav-tab.active { color: var(--primary); }
.mobile-nav-tab:hover  { color: var(--primary); }
.mobile-nav-tab .tab-icon { font-size: 20px; line-height: 1; }
.mobile-nav-tab .tab-badge {
  position: absolute;
  top: 4px;
  left: 50%;
  margin-left: 4px;
  background: var(--primary);
  color: white;
  font-size: 9px;
  font-weight: 700;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 3. Cookie Consent Banner ─────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: var(--black);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform .35s ease;
  box-shadow: 0 -4px 24px rgba(0,0,0,.2);
}
.cookie-banner.visible { transform: translateY(0); }
@media(max-width:768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .wa-float { bottom: 150px; }
  #backToTop { bottom: 150px !important; }
}
.cookie-text { flex: 1; font-size: 13px; color: rgba(255,255,255,.8); line-height: 1.5; min-width: 200px; }
.cookie-text a { color: var(--primary); }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-accept {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.cookie-accept:hover { background: var(--primary-dark, #D4690E); }
.cookie-reject {
  background: transparent;
  color: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.2);
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ── 4. Exit Intent Popup ─────────────────────────────────────── */
.exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease;
}
.exit-overlay.open { display: flex; }
.exit-box {
  background: white;
  border-radius: var(--r-2xl, 24px);
  padding: 40px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  animation: scaleIn .25s ease;
}
@keyframes scaleIn { from{transform:scale(.9);opacity:0} to{transform:scale(1);opacity:1} }
.exit-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--gray-100, #F2F2F7);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600, #8E8E93);
}
.exit-icon  { font-size: 56px; margin-bottom: 12px; line-height: 1; }
.exit-title {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.25;
  color: var(--black, #1D1D1F);
}
.exit-sub { font-size: 14px; color: var(--gray-500, #AEAEB2); margin-bottom: 20px; line-height: 1.6; }
.exit-coupon {
  background: var(--primary-bg, #FFF8F2);
  border: 2px dashed var(--primary, #F27A1A);
  border-radius: var(--r-lg, 14px);
  padding: 12px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.exit-coupon-code {
  font-family: monospace;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--primary, #F27A1A);
}
.exit-coupon-copy {
  background: var(--primary, #F27A1A);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: var(--r-sm, 6px);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.exit-actions { display: flex; flex-direction: column; gap: 8px; }
.exit-cta {
  background: var(--primary, #F27A1A);
  color: white;
  border: none;
  padding: 13px 24px;
  border-radius: var(--r-md, 10px);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-family: var(--font-body, 'Inter', sans-serif);
  transition: background .15s;
}
.exit-cta:hover { background: var(--primary-dark, #D4690E); }
.exit-skip { font-size: 12px; color: var(--gray-400, #C7C7CC); cursor: pointer; background: none; border: none; padding: 4px; }

/* ── 5. Sticky Ürün Detay Bar ─────────────────────────────────── */
.sticky-product-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 350;
  background: white;
  border-bottom: var(--border);
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.08));
  transform: translateY(-100%);
  transition: transform .25s ease;
}
.sticky-product-bar.visible { transform: translateY(0); }
.sticky-product-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sticky-product-name  { font-weight: 700; font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-product-price { font-family: var(--font-heading, sans-serif); font-size: 18px; font-weight: 800; color: var(--primary, #F27A1A); white-space: nowrap; }
.sticky-product-btn   { flex-shrink: 0; }

/* ── 6. Sosyal Kanıt Bildirimi ────────────────────────────────── */
.social-proof-toast {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 600;
  background: white;
  border: var(--border);
  border-radius: var(--r-lg, 14px);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg, 0 8px 32px rgba(0,0,0,.10));
  max-width: 280px;
  transform: translateX(-120%);
  transition: transform .35s ease;
  font-size: 12px;
}
.social-proof-toast.visible { transform: translateX(0); }
@media(max-width:768px) { .social-proof-toast { bottom: 140px; max-width: 240px; } }
.sp-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-bg, #FFF8F2); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.sp-text strong { color: var(--black, #1D1D1F); font-weight: 700; }
.sp-text { color: var(--gray-600, #8E8E93); line-height: 1.4; }
.sp-time { font-size: 10px; color: var(--gray-400, #C7C7CC); margin-top: 2px; }

/* ── 7. Quick View Modal ──────────────────────────────────────── */
.quick-view-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.quick-view-overlay.open { display: flex; }
.quick-view-box {
  background: white;
  border-radius: var(--r-2xl, 24px);
  overflow: hidden;
  width: min(720px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  animation: scaleIn .2s ease;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media(max-width: 600px) { .quick-view-box { grid-template-columns: 1fr; } }
.qv-image {
  background: var(--gray-50, #F9F9FB);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  position: relative;
}
.qv-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.qv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm, 0 2px 6px rgba(0,0,0,.06));
  display: flex;
  align-items: center;
  justify-content: center;
}
.qv-brand  { font-size: 11px; font-weight: 700; color: var(--gray-500, #AEAEB2); text-transform: uppercase; letter-spacing: .06em; }
.qv-name   { font-family: var(--font-heading, sans-serif); font-size: 18px; font-weight: 800; line-height: 1.3; }
.qv-price  { font-size: 24px; font-weight: 800; color: var(--primary, #F27A1A); }
.qv-min    { font-size: 12px; color: var(--gray-400, #C7C7CC); }
.qv-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.qv-add-btn {
  background: var(--primary, #F27A1A);
  color: white;
  border: none;
  padding: 13px;
  border-radius: var(--r-md, 10px);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background .15s;
}
.qv-add-btn:hover { background: var(--primary-dark, #D4690E); }
.qv-detail-link {
  text-align: center;
  font-size: 13px;
  color: var(--primary, #F27A1A);
  text-decoration: none;
  font-weight: 600;
}

/* ── 8. Shipping Progress Bar ─────────────────────────────────── */
.shipping-progress-bar {
  background: var(--primary-bg, #FFF8F2);
  border: 1px solid rgba(242,122,26,.2);
  border-radius: var(--r-md, 10px);
  padding: 10px 14px;
  margin: 8px 0;
}
.spb-text { font-size: 13px; font-weight: 600; color: var(--black, #1D1D1F); margin-bottom: 6px; }
.spb-bar-wrap { background: var(--gray-100, #F2F2F7); border-radius: var(--r-full, 9999px); height: 6px; overflow: hidden; }
.spb-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary, #F27A1A), #FF9544);
  border-radius: var(--r-full, 9999px);
  transition: width .5s ease;
}
.spb-achieved { font-size: 12px; color: var(--success, #30D158); font-weight: 700; }

/* ── 9. Recently Viewed ───────────────────────────────────────── */
.recently-viewed {
  padding: 32px 0;
  border-top: var(--border);
}
.recently-viewed-title {
  font-family: var(--font-heading, sans-serif);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}
.rv-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.rv-scroll::-webkit-scrollbar { display: none; }
.rv-card {
  flex-shrink: 0;
  width: 140px;
  background: white;
  border: var(--border);
  border-radius: var(--r-lg, 14px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s;
}
.rv-card:hover { box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.08)); }
.rv-img { height: 120px; background: var(--gray-50, #F9F9FB); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.rv-info { padding: 8px 10px; }
.rv-name  { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-price { font-size: 12px; font-weight: 800; color: var(--primary, #F27A1A); margin-top: 2px; }

/* ── 10. Coupon Code Input ────────────────────────────────────── */
.coupon-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.coupon-input {
  flex: 1;
  border: 1.5px dashed var(--gray-300, #D1D1D6);
  border-radius: var(--r-md, 10px);
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  outline: none;
  transition: border-color .15s;
  font-family: var(--font-body, sans-serif);
}
.coupon-input:focus { border-color: var(--primary, #F27A1A); border-style: solid; }
.coupon-input::placeholder { text-transform: none; font-weight: 400; letter-spacing: 0; }
.coupon-apply {
  background: var(--gray-100, #F2F2F7);
  border: none;
  padding: 9px 16px;
  border-radius: var(--r-md, 10px);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  font-family: var(--font-body, sans-serif);
}
.coupon-apply:hover { background: var(--primary, #F27A1A); color: white; }
.coupon-success { color: var(--success, #30D158); font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.coupon-error   { color: var(--error, #FF3B30);   font-size: 12px; font-weight: 600; }

/* ── 11. Sticky Mobile CTA Bar ────────────────────────────────── */
.sticky-mobile-cta {
  display: none;
  position: fixed;
  bottom: 62px;
  left: 0;
  right: 0;
  z-index: 390;
  padding: 10px 14px;
  background: white;
  border-top: var(--border);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  gap: 8px;
}
@media(max-width:768px) {
  .sticky-mobile-cta.show { display: flex; }
}
.sticky-mobile-cta .btn-primary { flex: 1; justify-content: center; font-size: 15px; padding: 13px; }
.sticky-mobile-cta .btn-wa      { background: #25D366; color: white; border: none; padding: 13px 16px; border-radius: var(--r-md, 10px); font-size: 18px; cursor: pointer; }

/* ── 12. Urgency / Stock Warning ──────────────────────────────── */
.stock-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--error-bg, #FFF5F5);
  border: 1px solid rgba(255,59,48,.15);
  border-radius: var(--r-md, 10px);
  font-size: 12px;
  font-weight: 600;
  color: var(--error, #FF3B30);
}
.viewing-now {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-600, #8E8E93);
  margin-top: 4px;
}
.viewing-dot {
  width: 7px;
  height: 7px;
  background: var(--success, #30D158);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.3); }
}

/* ── 13. WhatsApp Ürün Butonu ─────────────────────────────────── */
.btn-whatsapp {
  background: #25D366;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
}
.btn-whatsapp:hover { background: #1da851; color: white; }

/* ── fadeIn helper ────────────────────────────────────────────── */
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
