/* =====================================================================
   GBIST — Global Misc (FINAL v2025.11.05)
   Site-geneli cilalar + CLS mikro korumalar + fiyat renk politikası
   Flatsome uyumlu · Çakışma düşük özgülük · Güvenli !important kullanımı
   ===================================================================== */

/* -------------------- 0) Değişkenler -------------------- */
:root{
  /* Spacing */
  --gb-gap: 28px;
  --gb-gap-sm: 16px;

  /* CLS guards (bileşen-level) */
  --gb-price-minh: 48px;   /* tek satır fiyat */
  --gb-rating-minh: 20px;  /* yıldız şeridi */
  --gb-delivery-minh: 20px;
  --gb-cta-minh: 44px;     /* ATC butonu */

  /* Konteyner */
  --gb-container: 1320px;
  /* Sticky header offset (TOC/anchor’lar için ortak) */
  --gb-sticky-offset: 80px;
}

/* -------------------- 1) Resetler / Güvenli Varsayılanlar -------------------- */
#wrapper :where(*, *::before, *::after){ box-sizing:border-box; }
#wrapper a{ text-underline-offset:3px; }
#wrapper :where(h1,h2,h3,h4,h5,h6){ line-height:1.2; }

/* Smooth scroll (iç linkler) */
html{ scroll-behavior:smooth; }

/* Sticky header varsa anchor offset’i */
[id^="gb-sec-"]{ scroll-margin-top: var(--gb-sticky-offset); }

/* Konteyner genişliği (ürün ana + footer) */
.product-container .product-main,
.product-footer .container{
  max-width:var(--gb-container);
  margin-inline:auto;
}

/* -------------------- 2) Mevcut Sitenize Özel Aktif Parçalar -------------------- */
/* Toggle & side cart icon gizle */
.tayfunaccordion button.toggle,
.xoo-wsch-basket{ display:none !important; }

/* Cookies bubble */
.flatsome-cookies{
  width:fit-content; border-radius:10px; margin:auto; inset-inline:0;
  font-size:90%;
}
.flatsome-cookies--active{ margin-bottom:20px; }
.flatsome-cookies__buttons>a{ margin-right:0; }

/* Arama ikon boyutu */
i.icon-search{ display:inline-block; inline-size:22px; block-size:22px; }

/* Menü link tonu */
.nav-column>li>a,.nav-dropdown>li>a,.nav-vertical-fly-out>li>a,.nav>li>a{ color:#222; }

/* Nextend (sosyal login) satır içi */
div.tayfunnex div.nsl-container-block .nsl-container-buttons{ display:flex; flex-direction:row; gap:2px; }
div.tayfunnex div.nsl-container-block .nsl-container-buttons a{ margin:0; }

/* Etiket/duyuru kutuları */
span.woofrom{ display:none; }
div.translate_tayfun{
  background-color:rgb(255 255 255 / 47%); color:rgb(0,107,71);
  margin:5px auto; border:1px solid #d7d7d7; border-radius:4px;
  padding:7px; font-size:.8rem;
}
div.orangenotice{
  background:#f8d7da; color:#721c24; border:1px solid #dc3545;
  border-radius:4px; padding:8px; text-align:center;
}

/* Slick carousel item genişliği fix */
.rvpscarousel .slick-slide{ width:100%; padding:0; box-sizing:border-box; }

/* Custom button */
.tayfunbuton{
  color:#b20000; border:2px solid #b20000; border-radius:6px;
  font-size:13px; font-weight:600; padding:3px 8px; display:inline-block; transition:.3s;
}
.tayfunbuton:hover{ color:#fff; border-color:transparent; background:#e21346; }

/* Home grid */
.sonurunlertayfun{ column-count:4; column-gap:10px; }

/* Kutu iç hizalama */
.tayfunbox, .tayfunbox .text-box-content{ height:100%; display:flex; align-items:center; }
.textboxtayfun .button{ margin-block:0 !important; }

/* Accordion başlıkları (küçük) */
.tayfunaccordion .accordion-title{
  border-top:none; display:block; font-size:85%; padding:0; position:relative;
}

/* Üst mini menü */
div.tayfuntopmenu a{
  font-family:"Source Sans Pro",sans-serif; color:#999; font-size:12px; line-height:15px;
}

/* Tipografi (site-wide) */
:where(.nav>li>a,.alt-font,.heading-font,.mobile-sidebar-levels-2 .nav>li>ul>li>a,
.off-canvas-center .nav-sidebar.nav-vertical>li>a, body,h1,h2,h3,h4,h5,h6){
  font-family:Montserrat,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue","Noto Sans",Arial,sans-serif;
}

/* Arama alanı */
input#woocommerce-product-search-field-0,
input#woocommerce-product-search-field-1{
  background:#f3f3f3; border-radius:0;
  border-top:none; border-left:none; border-right:none;
  padding-block:21px;
}

/* Side cart detayları */
span.xoo-wsc-sc-subt{ display:none; }
span.xoo-wsc-sc-bki{ font-size:20px; }

/* Header logo stabilizasyonu (CLS) */
.header .logo img, #logo img{ width:230px; height:44px; object-fit:contain; }

/* Nav yükseklik rezervi */
.nav.header-bottom-nav{ min-height:48px; }

/* Font metric iyileştirmesi (Montserrat) */
:root{ font-size-adjust:.5; }


/* -------------------- 3) GBIST — Discount Badge (CONVERSION OPTIM) -------------------- */
.gbist-discount-badge{
  display:inline-flex; align-items:center; justify-content:center;
  background:#ff6000;                /* TURUNCU – en iyi CTR */
  color:#fff;
  font-size:12px; font-weight:700; line-height:1;
  padding:4px 7px 4px;               /* biraz daha nefesli */
  border-radius:8px;                 /* 5px → 8px daha modern */
  margin-left:8px;                   /* sol boşluk 6→8 */
  vertical-align:middle; white-space:nowrap;
}

.gbist-discount-badge::after{
  content:""; display:inline-block; width:0; height:0; margin-left:6px;
  border-left:5px solid transparent; border-right:5px solid transparent;
  border-top:6px solid rgba(255,255,255,.95);   /* %95 beyaz → daha net */
  position:relative; top:-1px;
}

/* -------------------- 4) Inline listeler (TOC, filtre çipleri) -------------------- */
.gb-inline-list,
.gb-summary-toc-list{
  display:flex; flex-wrap:wrap; gap:10px 16px; padding:0; margin:0; list-style:none;
}
.gb-inline-list a, .gb-summary-toc-list a{ text-decoration:none; border-bottom:1px dashed currentColor; }
.gb-inline-list a:hover, .gb-summary-toc-list a:hover{ border-bottom-style:solid; }

/* -------------------- 5) Mobile Only -------------------- */
@media (max-width:768px){
  div.tayfunnex .nsl-container .nsl-button-default div.nsl-button-label-container{
    font-size:8px !important; line-height:10px !important; margin:0 4px 0 2px !important;
  }
  input#woocommerce-product-search-field-0,
  input#woocommerce-product-search-field-1{
    background:#f7f7f7; padding-block:17px; font-size:10.5px;
  }
  .tayfunaccordion .accordion-title{ font-size:55% !important; }
}

/* -------------------- 6) GBIST — Global Fiyat Renk Politikası -------------------- */
/* Normal fiyatlar orijinal renginde */
.price, .price .amount, .woocommerce-Price-amount{ color:inherit !important; }

/* Eski fiyat */
.price del, .price del .amount{
  color:#777 !important; opacity:.6; text-decoration:line-through;
  text-decoration-color:#999; text-decoration-thickness:1.3px;
}

/* İndirimli fiyat (tüm şablonlarda) */
.price ins, .price ins *,
.products .product-small .price ins *, .related .price ins *,
.upsells .price ins *, .widget .product_list_widget .price ins *{
  color:#1a8f5b !important; font-weight:700;
}

/* Ayuda Lowest Price */
.ayudawp-lowest-price, .ayudawp-lowest-price *,
.price .ayudawp-lowest-price, .price .ayudawp-lowest-price *{
  color:#1a8f5b !important; font-weight:700;
}

/* -------------------- 7) Footer Saklama (isteğe bağlı) -------------------- */
.absolute-footer{ display:none !important; }



/* =========================================================
   GBIST — Hepsiburada-style Ürün Kartı (FINAL v2025-11-09-d)
   Hedef HTML:
   .box-text > .title-wrapper(brand + rating + p.name)  +  .price-wrapper > .price(…)
   ========================================================= */
/* =========================================================
   GBIST — Hepsiburada-style Ürün Kartı (FINAL v2025-11-09-e)
   Hedef DOM: .box-text > .title-wrapper(brand + rating + p.name) + .price-wrapper > .price(...)
   ========================================================= */

/* kart */
.product-small.box{
  border:1px solid #ececec; border-radius:14px; background:#fff; overflow:hidden;
  transition:box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.product-small.box:hover{ box-shadow:0 8px 24px rgba(0,0,0,.06); transform:translateY(-1px); border-color:#e6e6e6; }

/* içerik pedleri — fiyat bloğu dipte bitsin */
.product-small .box-text.box-text-products{ padding:14px 8px 0 !important; }

/* marka + yıldız + başlık hizası */
:root{ --gb-title-inset:12px; } /* başlık-metin sol iç boşluğu → istersen 10–16px ayarla */

.product-small .title-wrapper{
  display:grid !important;
  grid-template-columns:1fr auto;
  padding:0 2px;
  grid-template-areas:
    "brand rate"
    "title title";
  column-gap:8px; row-gap:10px; align-items:center;
  margin-bottom:8px;
}

/* marka chip — başlıkla aynı hizadan, hafif border */
.product-small .title-wrapper .gbist-loop-brand {
    grid-area: brand !important;
    background: transparent;
    color: #111;
    font-weight:600;
    font-size: 12px;
    line-height: 1;
    padding: 3px 1px;
    border-radius: 4px;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity:.85;
}


/* tek-yıldız mini metrik (sağ) */
.product-small .title-wrapper .gbist-loop-rating-min{
  grid-area:rate !important; justify-self:end;
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; color:#111; white-space:nowrap; margin-right:0 !important;
}
.product-small .title-wrapper .gbist-loop-rating-min .gb-star{ width:14px; height:14px; flex:0 0 14px; fill:#FF6000; }
.product-small .title-wrapper .gbist-loop-rating-min .gb-score{ font-weight:700; }
.product-small .title-wrapper .gbist-loop-rating-min .gb-count{ opacity:.65; }

/* woo'nun 5-yıldızını kapat */
.product-small .star-rating, .product-small .gbist-loop-rating{ display:none !important; }

/* başlık daima alt satır */
.product-small .title-wrapper .name.product-title{
  grid-area:title !important; display:block !important; width:100% !important; margin:2px 0 8px !important;
}
.product-small .title-wrapper .name.product-title a{
  font-size:14px; line-height:1.3; color:#111; font-weight:600;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
/* =========================================================
   GBIST — PRICE BLOCK (Hepsiburada style FINAL v2025-11-09-F)
   ========================================================= */

/* fiyat şeridi: full-width gri, solda del/ins dikey, sağda rozet */
.product-small .price-wrapper{
  margin:0 !important;
  height:auto !important; /* flatsome inline height override */
}

.product-small .price{
  display:grid !important;
  grid-template-columns:1fr auto;           /* sol fiyat sütunu / sağ rozet */
  grid-template-rows:16px 24px;             /* alt satır biraz daha yüksek */
  grid-template-areas:
      "del  badge"
      "ins  badge";
  align-items:end !important;               /* *** ALT ÇİZGİYE SABİTLEME *** */
  column-gap:8px; row-gap:2px;

  background:#f5f6f7;
  padding:12px 14px;
  margin-inline:-12px !important;           /* yanlara tam otur */
  margin-bottom:0 !important;
  border-radius:0 0 14px 14px;
  min-block-size:62px;                      /* tek fiyat olsa da eşit yükseklik */
}

/* eski fiyat (varsa) üst satır */
.product-small .price del{
  grid-area:del; display:block;
  font-size:11px; color:#777; opacity:.9;
  text-decoration:line-through;
  align-self:end;                           /* alttaki baseline hizasına */
}

/* bazı eklentiler del’i .screen-reader-text ile verir → görünürden çıkar */
.product-small .price .screen-reader-text{
  position:absolute !important;
  width:1px; height:1px; overflow:hidden;
  clip:rect(1px,1px,1px,1px);
}

/* yeni/geçerli fiyat alt satır */
.product-small .price ins{
  grid-area:ins;
  text-decoration:none;
  align-self:end !important;                /* *** ALT HİZA *** */
}
.product-small .price ins .amount,
.product-small .price > .amount,
.product-small .price ins bdi{
  font-size:17px;
  font-weight:800;
  color:#111;
  line-height:1.2;
}

/* lowest price (sende var) → alt satır */
.product-small .price .ayudawp-lowest-price{
  grid-area:ins;
  align-self:end !important;
}
.product-small .price .ayudawp-lowest-price .amount bdi,
.product-small .price .ayudawp-lowest-price bdi{
  font-size:17px;
  font-weight:800;
  color:#111;
  line-height:1.2;
}

/* indirim rozeti — SADECE yerleşim */
.product-small .gbist-discount-badge{
  grid-area:badge;
  justify-self:end;
  align-self:end !important;                /* *** ALT HİZA *** */
  margin-left:8px;
}

/* rozet yoksa bile sağ sütun konumu korunsun */
.product-small .price:not(:has(.gbist-discount-badge))::after{
  content:"";
  grid-area:badge;
  justify-self:end;
  align-self:end;
  width:0; height:0;
}

/* tek fiyatlı ürün: del yoksa üst satır yeri tutulur */
.product-small .price:not(:has(del))::before{
  content:"";
  grid-area:del;
  align-self:end;
}


/* görsel köşeleri */
.product-small .box-image img{ border-radius:12px; }

/* mobil */
@media (max-width:480px){
  .product-small .title-wrapper .gbist-loop-brand{ font-size:11px; padding:5px 0px; }
  .product-small .title-wrapper .gbist-loop-rating-min{ font-size:11px; }
  .product-small .title-wrapper .name.product-title a{ font-size:13px; }
  .product-small .price ins .amount,
  .product-small .price ins bdi,
  .product-small .price .ayudawp-lowest-price .amount bdi,
  .product-small .price .ayudawp-lowest-price bdi{ font-size:16px; }
}
