/* ==========================================================================
   Storefront — Bar Reklamları (dealer_bar_ads / ThemeBarAds)
   ========================================================================== */

/* ── Temel kart: contained, radiuslu, negatif margin YOK ── */
.sf-dealer-promo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
  padding: 18px 28px;
  max-width: var(--sf-layout-max-width, 1360px);
  width: calc(100% - 32px);
  background: var(--sf-dealer-banner-bg, #2a975c);
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 6px 24px rgb(0, 0, 0, .14);
  color: var(--sf-dealer-banner-color, #fff);
  text-decoration: none;
  font-family: var(--sf-font, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  position: relative;
  overflow: hidden;
}

/* after_nav içi: sarıcı içinde zaten max-width var, daha az margin */
.sf-bar-ad-nav-wrap {
  border-top: 1px solid rgb(15, 23, 42, .07);
}

.sf-bar-ad-nav-wrap .sf-topbar-inner {
  padding-top: 0;
  padding-bottom: 0;
}

.sf-bar-ad-nav-wrap .sf-dealer-promo-banner {
  margin: 10px auto;
  width: 100%;
}

a.sf-dealer-promo-banner:hover,
a.sf-dealer-promo-banner:focus {
  color: var(--sf-dealer-banner-color, #fff);
  text-decoration: none;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgb(0, 0, 0, .18);
  transition: filter .2s, transform .2s, box-shadow .2s;
}

.sf-dealer-promo-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: nowrap;
  position: relative;
  z-index: 1;
}

.sf-bar-ad-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgb(255, 255, 255, .2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--sf-bar-ad-icon-size, 18px);
  line-height: 1;
  color: var(--sf-dealer-banner-color, #fff);
}

.sf-bar-ad-text {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.sf-bar-ad-text strong,
.sf-dealer-promo-content h3 {
  margin: 0;
  padding: 0;
  font-size: var(--sf-bar-ad-title-size, 16px);
  font-weight: 800;
  color: var(--sf-dealer-banner-color, #fff);
  letter-spacing: -.4px;
  white-space: nowrap;
  font-style: normal;
}

.sf-bar-ad-text em,
.sf-dealer-promo-content p {
  margin: 0;
  padding: 0;
  font-size: var(--sf-bar-ad-subtitle-size, 24px);
  font-weight: 700;
  color: var(--sf-dealer-banner-color, #fff);
  opacity: .95;
  white-space: nowrap;
  font-style: normal;
}

/* ── Mobil ── */
@media (max-width: 768px) {
  .sf-dealer-promo-banner {
    margin: 10px auto;
    padding: 12px 16px;
    border-radius: 12px;
    width: calc(100% - 20px);
    gap: 10px;
    flex-flow: row wrap;
  }

  .sf-dealer-promo-content {
    width: 100%;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
  }

  .sf-bar-ad-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .sf-bar-ad-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    flex: 1;
  }

  .sf-bar-ad-text strong,
  .sf-dealer-promo-content h3 {
    font-size: 13px;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
  }

  .sf-bar-ad-text em,
  .sf-dealer-promo-content p {
    font-size: 14px;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
  }
}

/* ════════════════════════════════════════════════
   GÖRSEL EFEKTLER
   ════════════════════════════════════════════════ */

/* ── Pulse: tüm kart hafifçe büyüyüp küçülür ── */
.sf-bar-ad--effect-pulse {
  animation: sf-bar-pulse 2.2s ease-in-out infinite;
}

@keyframes sf-bar-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.012); }
}

/* ── Glow: kartın etrafında renkli ışık halesi ── */
.sf-bar-ad--effect-glow {
  animation: sf-bar-glow 2.4s ease-in-out infinite;
}

@keyframes sf-bar-glow {
  0%, 100% {
    box-shadow: 0 6px 24px rgb(0,0,0,.14),
                0 0 0   0   rgb(255,255,255,0);
  }

  50% {
    box-shadow: 0 8px 32px rgb(0,0,0,.20),
                0 0 28px 6px rgb(255,255,255,.30);
  }
}

/* ── Shimmer: soldan sağa kayan ışık şeridi ── */
.sf-bar-ad--effect-shimmer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent   30%,
    rgb(255,255,255,.22) 50%,
    transparent   70%
  );
  background-size: 220% 100%;
  animation: sf-bar-shimmer-bg 2.6s linear infinite;
}

/* Shimmer: metin rengi inherit — background-clip:text desteği varsa üstüne parlaklık katmanı */
.sf-bar-ad--effect-shimmer .sf-bar-ad-text strong,
.sf-bar-ad--effect-shimmer .sf-bar-ad-text em {
  position: relative;
}

/* @supports ile sadece destekleyen tarayıcılarda text-shine aktif */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .sf-bar-ad--effect-shimmer .sf-bar-ad-text strong,
  .sf-bar-ad--effect-shimmer .sf-bar-ad-text em {
    background: linear-gradient(
      90deg,
      currentcolor 0%,
      rgb(255,255,255,.9) 45%,
      currentcolor 55%,
      currentcolor 100%
    );
    background-size: 250% auto;
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sf-bar-text-shine 2.6s linear infinite;
  }
}

@keyframes sf-bar-shimmer-bg {
  0%   { background-position: -100% 0; }
  100% { background-position: 200%  0; }
}

@keyframes sf-bar-text-shine {
  0%   { background-position: 200% center; }
  100% { background-position: -50% center; }
}

/* ════════════════════════════════════════
   Pozisyon-özel stiller
   ════════════════════════════════════════ */

/* Footer üstü: footer ile arasında boşluk */
.sf-bar-ad--before_footer {
  margin-bottom: 8px;
}

/* Tab üstü: ürün detay sekmeleriyle uyum */
.sf-bar-ad--before_tabs {
  margin-top: 24px;
  margin-bottom: 0;
}

/* Navigasyon altı: zaten sf-bar-ad-nav-wrap ile sarılı */
.sf-bar-ad--after_nav {
  margin-top: 0;
  margin-bottom: 0;
}

/* ════════════════════════════════════════
   Mobil + PWA Native Dock uyumu
   ════════════════════════════════════════ */
@media (max-width: 991px) {
  /* Footer üstü bar, PWA mobile dock'un üstünde kalmalı */
  body.sf-mobile-dock-on .sf-bar-ad--before_footer {
    margin-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  /* Tab üstü bar, ürün detay mobil görünümde tam genişlik */
  .sf-bar-ad--before_tabs {
    margin-top: 16px;
    width: calc(100% - 16px);
  }

  /* Nav altı bar mobilde gizle (nav zaten mobilde gizleniyor) */
  .sf-bar-ad--after_nav {
    display: none;
  }
}

/* Çok küçük ekranlar (360px) */
@media (max-width: 480px) {
  .sf-dealer-promo-banner {
    width: calc(100% - 12px);
    padding: 10px 12px;
    gap: 8px;
    border-radius: 10px;
  }

  .sf-bar-ad-text {
    gap: 4px;
  }
}

/* PWA standalone mod: safe area padding */
@media (display-mode: standalone) {
  .sf-bar-ad--before_footer {
    margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
}

/* Mobilde gizle seçeneği */
@media (max-width: 991px) {
  .sf-bar-ad--mobile-hidden {
    display: none !important;
  }
}

/* Masaüstünde gizle (>=992px) */
@media (min-width: 992px) {
  .sf-bar-ad--desktop-hidden {
    display: none !important;
  }
}
