/* Alfa Cit — mobil + galeri düzeltmeleri */

/* ------------------------------------------------------------------
   Yan menü (offcanvas) — inline stillerdeki z-index üstüne çıkar.
   Bazı mobil tarayıcılarda üst bar / içerik overlay'in üstüne binip
   tıklamayı veya görünümü bozabiliyordu.
------------------------------------------------------------------ */
#overlay {
  z-index: 12000 !important;
}

#overlay.active {
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.offcanvas {
  z-index: 12100 !important;
}

.offcanvas.open {
  pointer-events: auto;
}

/* ------------------------------------------------------------------
   Ürün galerisi — ana görsel kutuyu her zaman doldurur (yan/boş şerit
   görünümünü giderir). aspect-ratio + yüzde yükseklik bazı motorlarda
   object-fit:cover ile tam dolmuyordu; absolute + cover güvenilir.
------------------------------------------------------------------ */
.pd-gallery-card .pd-main-img-wrap,
.pd-main-img-wrap {
  position: relative;
  overflow: hidden;
}

.pd-gallery-card .pd-main-img-wrap .pd-main-img,
.pd-main-img-wrap > .pd-main-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

/* WhatsApp, açık menünün altında kalsın */
.whatsapp-fab {
  z-index: 11900;
}

/* İletişim / teklif formları — hata modalı FAB ve overlay üstünde kalsın
   (inline şablonda z-index:2000; !important ile üzerine yazılır) */
.cf-error-modal {
  z-index: 12500 !important;
}

/* ------------------------------------------------------------------
   Ürün hero — breadcrumb’da aktif sayfa, vurgu rengi (lime / --accent).
   Inline şablondaki span.current { color: beyaz } kurallarının üzerine yazar.
------------------------------------------------------------------ */
.pd-page-hero .breadcrumb span.current,
.pd-page-hero .breadcrumb .breadcrumb-current {
  color: var(--accent) !important;
  font-weight: 600;
}

/* ------------------------------------------------------------------
   Renk kartelası / renk skalası: galeri sütununda ana görsel alanıyla aynı
   hizada; kutu genişliği bu alanın %50’si (masaüstü + mobil, tüm ürün
   sayfaları). Inline şablondaki width/max-width ile çakışmayı giderir.
------------------------------------------------------------------ */
.pd-product-page .pd-gallery-col .pd-color-scale-img-wrap,
.pd-product-page .pd-gallery-col .pd-color-scale-wrap .pd-color-scale-inner,
.pd-product-page .pd-gallery-col .pd-color-scale-wrap .pd-color-scale-inner--wide {
  width: 50% !important;
  max-width: 50% !important;
  min-width: 0 !important;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.pd-product-page .pd-gallery-col .pd-color-scale-block,
.pd-product-page .pd-gallery-col .pd-color-scale-wrap {
  width: 100%;
  max-width: 100%;
  align-items: center;
}

/* ------------------------------------------------------------------
   ≤1100px: Inline CSS yalnızca .main-nav’ı gizliyor; <nav> kutusu flex’te
   yer kaplıyor, logo flex-shrink:0 ile geniş kalıp hamburgeri ekran dışına
   itiyordu. Nav’u tamamen kapat + logo küçült + hdr-right sabit.
------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .site-header .hdr-inner,
  .sticky-header .hdr-inner {
    justify-content: space-between !important;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .site-header .hdr-inner > nav,
  .sticky-header .hdr-inner > nav {
    display: none !important;
  }

  .site-header .logo-link,
  .sticky-header .logo-link {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100vw - 96px);
    overflow: hidden;
  }

  .site-header .logo-link svg,
  .sticky-header .logo-link svg {
    height: 36px !important;
    width: auto !important;
    max-width: 100%;
    display: block;
  }

  .site-header .hdr-right,
  .sticky-header .hdr-right {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 48px;
    justify-content: flex-end !important;
  }

  .hamburger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--accent) !important;
    position: relative;
    z-index: 10050;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Kurumsal / boş şablon sayfaları */
  .page-content-placeholder {
    min-height: min(58vh, 560px);
    padding: 20px 16px;
    box-sizing: border-box;
  }

  .page-content-placeholder .placeholder-note {
    font-size: 15px;
    line-height: 1.65;
    padding: 16px;
    max-width: 100%;
  }

  .page-hero .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .page-hero h1 {
    font-size: clamp(1.35rem, 4.5vw, 1.9rem);
    line-height: 1.2;
  }

  /* Ürün hero — uzun breadcrumb (ör. Çim Çit) taşmasın */
  .pd-page-hero .breadcrumb {
    flex-wrap: wrap;
    row-gap: 6px;
    column-gap: 6px;
    font-size: 12px;
    line-height: 1.45;
    max-width: 100%;
  }

  .pd-inner {
    min-width: 0;
    box-sizing: border-box;
  }
}

/* Tablet: inline şablonda 960px’e kadar 2 sütun; 961–1024 arası dar kalıp yatay kaydırma yapabiliyordu */
@media (max-width: 1024px) {
  body.page-body {
    overflow-x: hidden;
  }

  .pd-product-page .pd-split {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    min-width: 0;
  }

  .pd-product-page .pd-content-card,
  .pd-product-page .pd-gallery-col,
  .pd-product-page .pd-gallery-stack {
    min-width: 0;
    max-width: 100%;
  }

  .pd-product-page .pd-gallery-col {
    position: static !important;
    order: -1;
  }

  .pd-product-page .pd-thumbs-wrap,
  .pd-product-page .pd-thumbs {
    min-width: 0;
  }
}

@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* clip bazı WebKit sürümlerinde fixed overlay ile sorun çıkarabiliyor */
  body.page-body {
    overflow-x: hidden;
  }

  /* Üst bar — daha az yükseklik, daha geniş dokunma alanı */
  .page-body {
    padding-top: 64px;
  }

  .site-header,
  .sticky-header {
    height: 64px;
  }

  .sticky-header {
    top: -64px;
  }

  .hdr-inner {
    height: 64px;
    padding: 0 12px 0 14px;
    justify-content: space-between;
    gap: 8px;
  }

  .logo-link svg {
    height: 34px !important;
    width: auto !important;
  }

  .hamburger {
    font-size: 28px;
    padding: 10px 12px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    z-index: 10050;
  }

  .offcanvas {
    width: min(92vw, 340px);
    max-width: 100%;
  }

  .offcanvas-head {
    padding: 32px 20px 16px;
  }

  .oc-link,
  .oc-btn {
    min-height: 48px;
    padding: 14px 16px;
  }

  .whatsapp-fab {
    bottom: max(14px, env(safe-area-inset-bottom, 14px));
    right: max(14px, env(safe-area-inset-right, 14px));
    width: 50px;
    height: 50px;
    z-index: 11900;
  }

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

  /* Genel içerik */
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .page-hero .breadcrumb {
    font-size: 12px;
    line-height: 1.45;
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 6px;
  }

  .page-hero h1 {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
    line-height: 1.2;
  }

  /* Ürün şablonu — hero */
  .pd-page-hero {
    padding: 22px 0 26px;
  }

  .pd-page-hero .breadcrumb {
    font-size: 11px;
    line-height: 1.45;
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 6px;
    margin-bottom: 10px;
  }

  .pd-page-hero .breadcrumb a,
  .pd-page-hero .breadcrumb span {
    display: inline;
  }

  .pd-hero-title {
    font-size: clamp(1.3rem, 5.2vw, 1.75rem);
    line-height: 1.2;
    word-wrap: break-word;
  }

  .pd-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pd-top {
    padding: 22px 0 36px;
  }

  .pd-split {
    gap: 22px;
  }

  .pd-content-card {
    padding: 20px 16px;
    border-radius: 10px;
  }

  .pd-h-underline {
    font-size: clamp(1.2rem, 4vw, 1.45rem);
    margin-bottom: 16px;
    padding-bottom: 8px;
  }

  .pd-lead,
  .pd-lead:last-of-type,
  .product-p,
  .direk-list li,
  .pd-features li,
  .pd-lead,
  .highlight-box li {
    font-size: 15px;
    line-height: 1.65;
  }

  .product-h2 {
    font-size: 14px;
    margin: 22px 0 10px;
  }

  .pd-content-card .product-h2:first-of-type {
    margin-top: 28px;
  }

  .btn-pd-cta {
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
    min-height: 48px;
    font-size: 15px;
    border-radius: 10px;
    box-sizing: border-box;
  }

  /* Galeri sütunu */
  .pd-gallery-col {
    width: 100%;
    max-width: 100%;
  }

  .pd-gallery-stack {
    gap: 16px;
  }

  .pd-gallery-card {
    padding: 12px;
    border-radius: 10px;
  }

  .pd-gallery-sub .pd-subgallery-title {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .pd-main-img-wrap {
    border-radius: 10px;
  }

  /* Küçük resim şeridi — dokunma ve kaydırma */
  .pd-thumbs-wrap {
    gap: 6px;
    margin-top: 10px;
    align-items: stretch;
  }

  .pd-thumb-nav {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    font-size: 20px;
    line-height: 1;
    border-radius: 10px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .pd-thumbs {
    gap: 8px;
    padding: 6px 2px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 4px;
  }

  .pd-thumb-btn {
    flex: 0 0 calc((100% - 16px) / 3);
    min-width: 76px;
    max-width: 104px;
    min-height: 58px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .pd-thumb-btn.is-active {
    box-shadow: 0 0 0 2px rgba(144, 205, 66, 0.45);
  }

  /* Renk skalası — genişlik üstteki global %50 kurallarıyla (mobilde de aynı) */
  .pd-color-scale-block {
    margin-top: 4px;
    padding-bottom: 8px;
  }

  .pd-color-scale-img-wrap {
    padding: 10px;
  }

  .pd-color-scale-title {
    font-size: 14px;
    margin: 14px 0 6px;
  }

  .pd-color-scale-desc {
    font-size: 13px;
    line-height: 1.6;
    padding: 0 4px;
  }

  .pd-color-scale-wrap {
    padding: 0 4px;
  }

  .pd-color-note-small,
  .pd-color-note {
    font-size: 12px;
  }

  /* İlgili ürünler */
  .pd-related {
    padding: 36px 0 44px;
  }

  .pd-related .pd-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pd-related-title {
    margin-bottom: 18px;
    font-size: 1.1rem;
  }

  .pd-related-grid {
    gap: 14px;
  }

  .pd-rel-card {
    min-height: 132px;
    border-radius: 10px;
  }

  .pd-rel-label {
    bottom: 12px;
    left: 12px;
    right: 12px;
    font-size: 14px;
  }

  .pd-h1 {
    font-size: clamp(1.25rem, 4.5vw, 1.65rem);
  }

  .highlight-box {
    padding: 16px 14px;
    margin-top: 20px;
  }

  .section {
    padding: 36px 0;
  }

  .site-footer {
    padding-top: 36px;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

@media (max-width: 480px) {
  .pd-page-hero .breadcrumb {
    font-size: 10px;
  }

  .pd-thumb-btn {
    flex: 0 0 30vw;
    min-width: 72px;
    max-width: none;
  }

  .pd-thumbs-wrap {
    flex-wrap: nowrap;
  }

  .pd-content-card {
    padding: 18px 14px;
  }
}

@media (max-width: 380px) {
  .pd-thumb-btn {
    flex: 0 0 28vw;
    min-width: 68px;
  }
}

/* Ana sayfa hero — dar ekranda yükseklik */
@media (max-width: 900px) {
  .home-slider,
  .home-hero {
    min-height: min(58vh, 520px);
    max-height: none;
  }
}

/* Üst menü — doğrudan link ile aktif sayfa (ör. Hakkımızda) */
.nav-item--current > .nav-link {
  color: var(--accent);
}
