/*==============================================================
  Site geneli görünüm düzeltmeleri (Ekim 2026)
  header.php'de EN SON yüklenir (inter-font.css ve header.css'ten
  sonra). Eski tema dosyalarına (style.css / demo-1.css) dokunmadan
  ezer; <link> kaldırılırsa site eski görünümüne döner.
  Marka renkleri header.css ile aynı: pembe #e6007e, mavi #1FA9E0.
==============================================================*/

/* ---------------------------------------------------------------
   1) Yazı tipi: her yerde Inter
   inter-font.css yalnız etiket seçicileri (h1, a, div…) kullanıyor;
   aşağıdaki sınıf+etiket kuralları ondan özgül olduğu için başlıklar
   Poppins'te ya da (Manrope @font-face geçersiz → hiç yüklenmiyor)
   Arial'de kalıyordu. Seçiciler style.css/demo-1.css ile birebir.
--------------------------------------------------------------- */
.gi-breadcrumb .gi-breadcrumb-title,
.gi-footer .footer-top .gi-footer-widget .gi-footer-heading,
.gi-side-cart .gi-cart-inner .gi-cart-title .cart_title,
.gi-product-inner .gi-pro-content .gi-pro-title a,
.gi-all-product-inner .gi-pro-content .gi-pro-title a,
.gi-shop-sidebar .gi-sb-title h3,
.gi-shop-sidebar-2 .gi-sb-title h3,
.gi-blogs-sidebar .gi-sb-title h3,
.gi-service-desc h3,
.gi-accordion.style-1 .gi-accordion-item .gi-accordion-header,
.gi-blog .blog-info .detail h3 a,
.gi-blog-section .blog-info .detail h3 a,
.gi-cat-dropdown .gi-cat-tab .tab-content .gi-col-title,
.gi-category .gi-category-block .gi-cat-box .gi-cat-icon .gi-cat-detail .gi-cat-title,
.gi-category .gi-category-block-2 .gi-cat-box .gi-cat-icon .gi-cat-detail .gi-cat-title,
.gi-checkout-summary .gi-checkout-summary-total .text-left,
.gi-checkout-summary .gi-checkout-summary-total .text-right,
.gi-tools-sidebar .gi-tools-detail .gi-tools-block h3,
.section-title .section-detail h2,
.section-title-2 h2,
.section-title-3 h2,
.gi-about .gi-about-detail .section-title h2 {
  font-family: var(--font-sans);
}

/* ---------------------------------------------------------------
   2) Bootstrap mavisi → marka renkleri (Bootstrap 5.3 değişkenleri)
   Birincil buton = pembe CTA ("Sepete Ekle" ile aynı dil);
   çizgili buton, text/bg/border-primary yardımcıları = marka mavisi.
--------------------------------------------------------------- */
:root {
  --bs-primary: #1FA9E0;
  --bs-primary-rgb: 31, 169, 224;
}
.btn-primary {
  --bs-btn-bg: #e6007e;
  --bs-btn-border-color: #e6007e;
  --bs-btn-hover-bg: #c4006b;
  --bs-btn-hover-border-color: #c4006b;
  --bs-btn-active-bg: #a8005c;
  --bs-btn-active-border-color: #a8005c;
  --bs-btn-disabled-bg: #e6007e;
  --bs-btn-disabled-border-color: #e6007e;
  --bs-btn-focus-shadow-rgb: 230, 0, 126;
}
.btn-outline-primary {
  --bs-btn-color: #1FA9E0;
  --bs-btn-border-color: #1FA9E0;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1FA9E0;
  --bs-btn-hover-border-color: #1FA9E0;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #1891c2;
  --bs-btn-active-border-color: #1891c2;
  --bs-btn-disabled-color: #1FA9E0;
  --bs-btn-disabled-border-color: #1FA9E0;
  --bs-btn-focus-shadow-rgb: 31, 169, 224;
}
.form-check-input:checked {
  background-color: #1FA9E0;
  border-color: #1FA9E0;
}

/* ---------------------------------------------------------------
   3) Çerez bandı (footer.php #cookieConsent)
--------------------------------------------------------------- */
.cookie-consent {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 18px 20px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, .2);
}
.cookie-consent__text {
  flex: 1 1 60%;
  color: #333;
  font-size: .95rem;
}
.cookie-consent[hidden] {
  display: none;
}
.cookie-consent__text a {
  color: #1FA9E0;
  text-decoration: underline;
}
.cookie-consent__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}
/* Reddet, Kabul Et ile aynı boyutta ve aynı kolaylıkta (KVKK: reddetmek kabul etmek kadar kolay) */
.cookie-consent__btn.cookie-consent__btn--ghost {
  background: #fff;
  color: #e6007e;
  box-shadow: inset 0 0 0 1.5px #e6007e;
}
.cookie-consent__btn.cookie-consent__btn--ghost:hover {
  background: #fdf0f7;
}
.cookie-consent__btn {
  padding: 8px 22px;
  border: 0;
  border-radius: 6px;
  background: #e6007e;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.cookie-consent__btn:hover {
  background: #c4006b;
}
.cookie-consent__link {
  padding: 8px 6px;
  border: 0;
  background: none;
  color: #4b5563;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cookie-consent__link:hover {
  color: #e6007e;
}

/* Çerez tercih penceresi (footer.php #cookiePrefs) — bant üstünde, kategori anahtarlı */
.cookie-prefs {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 24, 39, .55);
}
.cookie-prefs[hidden] {
  display: none;
}
body.cookie-prefs-open {
  overflow: hidden;
}
.cookie-prefs__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.cookie-prefs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-top: 4px solid #e6007e;
  border-bottom: 1px solid #e8e9ed;
}
.cookie-prefs__title {
  margin: 0;
  color: #222;
  font-size: 1.15rem;
  font-weight: 700;
}
.cookie-prefs__close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f7;
  color: #4b5563;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.cookie-prefs__close:hover {
  background: #fdf0f7;
  color: #e6007e;
}
.cookie-prefs__body {
  padding: 16px 22px;
  overflow-y: auto;
}
.cookie-prefs__intro {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: .9rem;
  line-height: 1.55;
}
.cookie-prefs__intro a {
  color: #1FA9E0;
  text-decoration: underline;
}
.cookie-prefs__cat {
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid #e8e9ed;
  border-radius: 10px;
}
.cookie-prefs__cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cookie-prefs__cat-title {
  flex: 1 1 auto;
  margin: 0;
  color: #222;
  font-size: .98rem;
  font-weight: 700;
  cursor: pointer;
}
.cookie-prefs__always {
  color: #1385b3;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.cookie-prefs__cat-desc {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: .85rem;
  line-height: 1.5;
}
.cookie-prefs__details {
  margin-top: 8px;
}
.cookie-prefs__details summary {
  color: #1FA9E0;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.cookie-prefs__list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.cookie-prefs__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 6px 0;
  border-top: 1px dashed #e8e9ed;
  color: #3f4652;
  font-size: .8rem;
}
.cookie-prefs__list code {
  padding: 1px 6px;
  border-radius: 4px;
  background: #fdf0f7;
  color: #e6007e;
  font-size: .75rem;
}
.cookie-prefs__list small {
  margin-left: auto;
  color: #9ca3af;
}
.cookie-prefs__foot {
  display: flex;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid #e8e9ed;
  background: #fafafb;
}
.cookie-prefs__foot .cookie-consent__btn {
  flex: 1 1 0;
  padding: 10px 12px;
  font-size: .88rem;
}

/* Aç/kapa anahtarı: gerçek checkbox görünmez ama erişilebilir kalır */
.cookie-switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
}
.cookie-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.cookie-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d1d5db;
  transition: background .2s ease;
}
.cookie-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.cookie-switch input:checked + .cookie-switch__track {
  background: #e6007e;
}
.cookie-switch input:checked + .cookie-switch__track::after {
  transform: translateX(20px);
}
.cookie-switch input:disabled {
  cursor: not-allowed;
}
.cookie-switch input:disabled + .cookie-switch__track {
  background: #f39acb;
}
.cookie-switch input:focus-visible + .cookie-switch__track {
  box-shadow: 0 0 0 3px rgba(230, 0, 126, .3);
}

@media (max-width: 767.98px) {
  /* Mobilde pencere alttan açılan sayfa (bottom sheet) */
  .cookie-prefs {
    align-items: flex-end;
    padding: 0;
  }
  .cookie-prefs__panel {
    max-width: none;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
  }
  .cookie-prefs__head,
  .cookie-prefs__body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .cookie-prefs__foot {
    flex-wrap: wrap;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .cookie-prefs__foot .cookie-consent__btn[data-cerez-hepsi="1"] {
    flex-basis: 100%;
    order: -1;
  }
  .cookie-consent__link {
    flex: 0 0 auto;
    padding: 8px 4px;
    font-size: .85rem;
  }
}

@media (max-width: 767.98px) {
  .cookie-consent {
    left: 8px;
    right: 8px;
    bottom: 8px;
    gap: 8px;
    padding: 10px 12px;
  }
  .cookie-consent__text {
    flex-basis: 100%;
    font-size: .8rem;
    line-height: 1.35;
  }
  .cookie-consent__actions {
    flex: 1 1 100%;
  }
  .cookie-consent__btn {
    flex: 1 1 0;
    padding: 8px 14px;
  }
  /* Ürün sayfasındaki sabit satın-alma çubuğunun üstüne otur */
  body.has-sticky-buy .cookie-consent {
    bottom: calc(var(--pd-buy-height, 112px) + 8px);
  }
  body.has-sticky-buy .gi-back-to-top {
    bottom: calc(var(--pd-buy-height, 112px) + 15px);
  }
}

/* ---------------------------------------------------------------
   4) Mobil: modallar tam genişliğe yakın, iOS odak yakınlaştırması yok
--------------------------------------------------------------- */
@media (max-width: 575.98px) {
  /* style.css %90 genişlik + 35px dikey boşluk veriyordu */
  .modal-dialog {
    width: auto;
    margin: .5rem;
    padding: 0;
  }
}
@media (max-width: 767.98px) {
  /* 16px altı girdilerde iOS Safari sayfayı yakınlaştırıyor */
  input.form-control,
  input.form-control-sm,
  select.form-select,
  select.form-select-sm,
  textarea.form-control {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------------
   5) İstek listesi (istek-listesi.php): 700px zorunlu genişlik → mobil kart
--------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .gi-wishlist .gi-vendor-card-header,
  .gi-wishlist .gi-vendor-card-body {
    min-width: 0;
    padding: 16px;
  }
  .gi-wishlist .gi-vendor-card-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .gi-wishlist .gi-table thead {
    display: none;
  }
  .gi-wishlist .gi-table,
  .gi-wishlist .gi-table tbody,
  .gi-wishlist .gi-table tr,
  .gi-wishlist .gi-table td {
    display: block;
    width: 100%;
  }
  .gi-wishlist .gi-table tr {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
  }
  .gi-wishlist .gi-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border: 0;
    text-align: right;
  }
  .gi-wishlist .gi-table td::before {
    color: #6b7280;
    font-weight: 600;
    text-align: left;
  }
  .gi-wishlist .gi-table td:nth-child(1)::before { content: "Resim"; }
  .gi-wishlist .gi-table td:nth-child(2)::before { content: "Ürün"; }
  .gi-wishlist .gi-table td:nth-child(3)::before { content: "Fiyat"; }
  .gi-wishlist .gi-table td:nth-child(4)::before { content: "Stok"; }
  .gi-wishlist .gi-table td:nth-child(5)::before { content: "Eklenme"; }
  .gi-wishlist .gi-table td:nth-child(6)::before { content: ""; }
  .gi-wishlist .gi-table td:nth-child(6) {
    justify-content: flex-end;
  }
}

/* ---------------------------------------------------------------
   6) Karşılaştırma (karsilastirma.php): geniş görsel taşmasın, açıklama kesilmesin
--------------------------------------------------------------- */
.gi-compare-box .gi-compare-cell img {
  max-width: 100%;
  object-fit: contain;
}
.gi-compare-box .gi-compare-cell .desc,
.gi-compare-box .gi-compare-cell .desc p {
  height: auto;
  min-height: 115px;
}

/* ---------------------------------------------------------------
   7) Sipariş takibi sekmeleri (siparis-takibi.php .order-tabs):
   mobilde 3-4 satıra kırılmak yerine tek satır yatay kaydırma
--------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .nav-tabs.order-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .nav-tabs.order-tabs .nav-link {
    white-space: nowrap;
  }
}

/* ---------------------------------------------------------------
   8) Sipariş detayı ürün tablosu (siparis_takip_detay.php .order-items-table):
   11 sütun mobilde yana kaydırılıyordu → her ürün etiketli bir kart
--------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .order-items-table thead {
    display: none;
  }
  .order-items-table,
  .order-items-table tbody,
  .order-items-table tfoot,
  .order-items-table tr,
  .order-items-table td {
    display: block;
    width: 100%;
  }
  .order-items-table {
    border: 0;
  }
  .order-items-table tr {
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }
  .order-items-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 12px !important;
    border: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    text-align: right !important;
  }
  .order-items-table td::before {
    flex: 0 0 auto;
    color: #6b7280;
    font-weight: 600;
    text-align: left;
  }
  .order-items-table tbody td:nth-child(1) {
    display: block;
    text-align: left !important;
    background: #f9fafb;
  }
  .order-items-table tbody td:nth-child(2)::before { content: "Stok"; }
  .order-items-table tbody td:nth-child(3)::before { content: "Liste Fiyatı (KDV Hariç)"; }
  .order-items-table tbody td:nth-child(4)::before { content: "KDV"; }
  .order-items-table tbody td:nth-child(5)::before { content: "Baskı"; }
  .order-items-table tbody td:nth-child(6)::before { content: "Adet"; }
  .order-items-table tbody td:nth-child(7)::before { content: "Birim Fiyat (KDV Hariç)"; }
  .order-items-table tbody td:nth-child(8)::before { content: "Baskı Bedeli (KDV Hariç)"; }
  .order-items-table tbody td:nth-child(9)::before { content: "Baskı Dahil Birim"; }
  .order-items-table tbody td:nth-child(10)::before { content: "KDV Hariç Toplam"; }
  .order-items-table tbody td:nth-child(11)::before { content: "KDV Dahil Toplam"; }
  /* Kartvizit önizleme satırı tek hücre: etiketsiz, tam genişlik */
  .order-items-table tbody tr.kv-order-preview-row td {
    display: block;
    background: #fff;
  }
  .order-items-table tbody tr.kv-order-preview-row td::before {
    content: none;
  }
  .order-items-table tfoot td:nth-child(1) {
    display: block;
    text-align: left !important;
  }
  .order-items-table tfoot td:nth-child(3),
  .order-items-table tfoot td:nth-child(5) {
    display: none;
  }
  .order-items-table tfoot td:nth-child(2)::before { content: "Toplam Adet"; }
  .order-items-table tfoot td:nth-child(4)::before { content: "Baskı Bedeli"; }
  .order-items-table tfoot td:nth-child(6)::before { content: "KDV Hariç"; }
  .order-items-table tfoot td:nth-child(7)::before { content: "KDV Dahil"; }
}
