/* ============================================================
   BGC WooCommerce CSS — arşiv, loop kartı, toolbar, kategori bulutu,
   sayfalama, sipariş seçici
   Canlı referans: https://www.bugramobilya.com.tr/urun-kategori/sandalye
   ============================================================ */

/* ── Shop wrapper ─────────────────────────────────────────── */
.bgc-shop {
  padding-block: 0 48px;
}

/* ── HERO: koyu #212121 band — başlık + kategori bulutu birlikte ── */
.bgc-archive-hero {
  background: var(--bgc-dark);
  padding-block: 48px 28px;
  text-align: center;
  margin-bottom: 32px;
}
.bgc-archive-hero__title {
  font-family: var(--bgc-font-head);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 26px;
}

/* ── KATEGORİ BULUTU (koyu hero içinde, beyaz/gri metin) ──── */
.bgc-cat-cloud {
  background: transparent;
  border: 0;
  margin: 0;
}
.bgc-cat-cloud__list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 30px;
  justify-content: center;
  align-items: flex-start;
  list-style: none;
  margin: 0 auto;
  padding-inline: 16px;
}
.bgc-cat-cloud__item {
  display: block;
}
.bgc-cat-cloud__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: var(--bgc-font-head);
  text-align: center;
  transition: color .2s;
}
.bgc-cat-cloud__name {
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.2;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.bgc-cat-cloud__count {
  font-size: .72rem;
  font-weight: 400;
  color: rgba(255, 255, 255, .55);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.1;
}
.bgc-cat-cloud__link:hover .bgc-cat-cloud__name {
  color: var(--bgc-primary);
}
.bgc-cat-cloud__item.is-active .bgc-cat-cloud__name {
  color: var(--bgc-primary);
  border-bottom-color: var(--bgc-primary);
}
/* "Tüm Ürünler" — ızgara ikonlu ilk hücre */
.bgc-cat-cloud__item--all .bgc-cat-cloud__link {
  flex-direction: column;
}
.bgc-cat-cloud__icon {
  color: #fff;
  margin-bottom: 2px;
}
.bgc-cat-cloud__item--all.is-active .bgc-cat-cloud__icon,
.bgc-cat-cloud__item--all .bgc-cat-cloud__link:hover .bgc-cat-cloud__icon {
  color: var(--bgc-primary);
}

/* ── BREADCRUMB (ol.bgc-breadcrumb — yatay, numara yok) ────── */
.bgc-breadcrumb-wrap { margin-bottom: 16px; }
.bgc-breadcrumb {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: .85rem;
  color: var(--bgc-muted);
}
.bgc-breadcrumb__item {
  display: inline-flex;
  align-items: center;
}
.bgc-breadcrumb__link,
.bgc-breadcrumb a {
  color: var(--bgc-muted);
  text-decoration: none;
}
.bgc-breadcrumb__link:hover,
.bgc-breadcrumb a:hover {
  color: var(--bgc-primary);
}
.bgc-breadcrumb__item--active { color: var(--bgc-ink); }
.bgc-breadcrumb__sep {
  margin-inline: .5em;
  color: var(--bgc-line);
}
.bgc-bc-sep {
  margin-inline: .4em;
  color: var(--bgc-line);
}

/* ── TOOLBAR ──────────────────────────────────────────────── */
.bgc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 12px 16px;
  border-bottom: 1px solid var(--bgc-line);
  margin-bottom: 24px;
}
.bgc-toolbar__left {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: .85rem;
  color: var(--bgc-muted);
}
.bgc-toolbar__label {
  margin-right: 8px;
  font-weight: 500;
  color: var(--bgc-ink);
}
.bgc-toolbar__sep {
  color: var(--bgc-line);
  margin-inline: 4px;
}
.bgc-toolbar__pp {
  font-size: .85rem;
  color: var(--bgc-muted);
  transition: color .2s;
  padding: 2px 4px;
}
.bgc-toolbar__pp:hover,
.bgc-toolbar__pp.is-active {
  color: var(--bgc-primary);
  font-weight: 600;
}

/* Grid toggle */
.bgc-toolbar__center {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bgc-toolbar__grid-btn {
  background: none;
  border: 1px solid var(--bgc-line);
  border-radius: 3px;
  padding: 5px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: border-color .2s, background .2s;
  line-height: 1;
}
.bgc-toolbar__grid-btn:hover,
.bgc-toolbar__grid-btn.is-active {
  border-color: var(--bgc-primary);
  background: var(--bgc-primary);
}
.bgc-toolbar__grid-btn:hover .bgc-grid-icon,
.bgc-toolbar__grid-btn.is-active .bgc-grid-icon {
  background-color: #fff;
}
/* Grid icons via box-shadow trick */
.bgc-grid-icon {
  display: inline-grid;
  gap: 2px;
  background-color: var(--bgc-muted);
  width: 14px;
  height: 14px;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}
.bgc-grid-icon--2 {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='0' y='0' width='6' height='6'/%3E%3Crect x='8' y='0' width='6' height='6'/%3E%3Crect x='0' y='8' width='6' height='6'/%3E%3Crect x='8' y='8' width='6' height='6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='0' y='0' width='6' height='6'/%3E%3Crect x='8' y='0' width='6' height='6'/%3E%3Crect x='0' y='8' width='6' height='6'/%3E%3Crect x='8' y='8' width='6' height='6'/%3E%3C/svg%3E");
}
.bgc-grid-icon--3 {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='0' y='0' width='3.5' height='3.5'/%3E%3Crect x='5.25' y='0' width='3.5' height='3.5'/%3E%3Crect x='10.5' y='0' width='3.5' height='3.5'/%3E%3Crect x='0' y='5.25' width='3.5' height='3.5'/%3E%3Crect x='5.25' y='5.25' width='3.5' height='3.5'/%3E%3Crect x='10.5' y='5.25' width='3.5' height='3.5'/%3E%3Crect x='0' y='10.5' width='3.5' height='3.5'/%3E%3Crect x='5.25' y='10.5' width='3.5' height='3.5'/%3E%3Crect x='10.5' y='10.5' width='3.5' height='3.5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='0' y='0' width='3.5' height='3.5'/%3E%3Crect x='5.25' y='0' width='3.5' height='3.5'/%3E%3Crect x='10.5' y='0' width='3.5' height='3.5'/%3E%3Crect x='0' y='5.25' width='3.5' height='3.5'/%3E%3Crect x='5.25' y='5.25' width='3.5' height='3.5'/%3E%3Crect x='10.5' y='5.25' width='3.5' height='3.5'/%3E%3Crect x='0' y='10.5' width='3.5' height='3.5'/%3E%3Crect x='5.25' y='10.5' width='3.5' height='3.5'/%3E%3Crect x='10.5' y='10.5' width='3.5' height='3.5'/%3E%3C/svg%3E");
}
.bgc-grid-icon--4 {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='0' y='0' width='2.5' height='2.5'/%3E%3Crect x='3.83' y='0' width='2.5' height='2.5'/%3E%3Crect x='7.67' y='0' width='2.5' height='2.5'/%3E%3Crect x='11.5' y='0' width='2.5' height='2.5'/%3E%3Crect x='0' y='3.83' width='2.5' height='2.5'/%3E%3Crect x='3.83' y='3.83' width='2.5' height='2.5'/%3E%3Crect x='7.67' y='3.83' width='2.5' height='2.5'/%3E%3Crect x='11.5' y='3.83' width='2.5' height='2.5'/%3E%3Crect x='0' y='7.67' width='2.5' height='2.5'/%3E%3Crect x='3.83' y='7.67' width='2.5' height='2.5'/%3E%3Crect x='7.67' y='7.67' width='2.5' height='2.5'/%3E%3Crect x='11.5' y='7.67' width='2.5' height='2.5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='0' y='0' width='2.5' height='2.5'/%3E%3Crect x='3.83' y='0' width='2.5' height='2.5'/%3E%3Crect x='7.67' y='0' width='2.5' height='2.5'/%3E%3Crect x='11.5' y='0' width='2.5' height='2.5'/%3E%3Crect x='0' y='3.83' width='2.5' height='2.5'/%3E%3Crect x='3.83' y='3.83' width='2.5' height='2.5'/%3E%3Crect x='7.67' y='3.83' width='2.5' height='2.5'/%3E%3Crect x='11.5' y='3.83' width='2.5' height='2.5'/%3E%3Crect x='0' y='7.67' width='2.5' height='2.5'/%3E%3Crect x='3.83' y='7.67' width='2.5' height='2.5'/%3E%3Crect x='7.67' y='7.67' width='2.5' height='2.5'/%3E%3Crect x='11.5' y='7.67' width='2.5' height='2.5'/%3E%3C/svg%3E");
}

/* Toolbar right */
.bgc-toolbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.bgc-toolbar__count {
  font-size: .8rem;
  color: var(--bgc-muted);
  margin: 0;
}
/* WC ordering select */
.woocommerce-ordering select,
.woocommerce-ordering .orderby {
  border: 1px solid var(--bgc-line);
  padding: 6px 12px;
  font-size: .85rem;
  color: var(--bgc-ink);
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
}

/* ── PRODUCTS GRID ────────────────────────────────────────── */
/* Varsayılan: 3 sütun — canlı siteyle birebir.
   WC columns-* sınıflarını bgc-cols-* ile override ediyoruz. */
ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* WC loop_shop_columns(3) → ul.products.columns-3 */
ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
ul.products.columns-4 { grid-template-columns: repeat(3, 1fr); }
/* Toolbar grid toggle sınıfları (shop.js ekler) */
ul.products.bgc-cols-2,
ul.products.columns-2 { grid-template-columns: repeat(2, 1fr); }
ul.products.bgc-cols-3 { grid-template-columns: repeat(3, 1fr); }
ul.products.bgc-cols-4,
ul.products.columns-5 { grid-template-columns: repeat(4, 1fr); }

/* WC eklenti stil sayfası (woocommerce-layout.css) bizden SONRA yükleniyor;
   li.product'a float + %30.75 genişlik ve ul'a clearfix ::before/::after
   veriyor. Bu hem kartları daraltıyor (124px) hem de clearfix pseudo'su
   ilk grid hücresini işgal edip ürünleri 1 sütun kaydırıyordu.
   Eşit specificity'de WC kazandığı için !important şart. */
.woocommerce ul.products li.product,
ul.products li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  clear: none !important;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after,
ul.products::before,
ul.products::after { content: none !important; display: none !important; }

/* ── LOOP KARTI ───────────────────────────────────────────── */
.bgc-product-card {
  position: relative;
  list-style: none;
  background: #fff;
  /* Kenarlıksız — canlı site ile eşleşiyor */
}

/* Görsel kutusu — live: portrait 3:4 ratio (200×267px) */
.bgc-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #f8f8f8;
}
.bgc-card__img-link {
  display: block;
  width: 100%;
  height: 100%;
}
.bgc-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .35s ease;
}
.bgc-card__img--secondary {
  position: absolute;
  inset: 0;
  opacity: 0;
}
/* Hover: ikincil görsel göster — YALNIZCA ikincil görsel varsa ana görseli
   gizle (--has-hover). Tek görselli üründe hover'da boş zemin = "beyaz" bug. */
.bgc-product-card:hover .bgc-card__media--has-hover .bgc-card__img--primary {
  opacity: 0;
}
.bgc-product-card:hover .bgc-card__img--secondary {
  opacity: 1;
}

/* Sale badge */
.bgc-badge--sale {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--bgc-dark);
  color: #fff;
  font-family: var(--bgc-font-accent);
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: .02em;
}

/* Aksiyon ikonları (sağ üst, hover'da görünür) */
.bgc-card__actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.bgc-product-card:hover .bgc-card__actions {
  opacity: 1;
  transform: translateX(0);
}
.bgc-card__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #fff;
  border: 1px solid var(--bgc-line);
  border-radius: 50%;
  color: var(--bgc-ink);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  text-decoration: none;
}
.bgc-card__action-btn:hover {
  background: var(--bgc-primary);
  border-color: var(--bgc-primary);
  color: #fff;
}
.bgc-card__action-btn .bgc-icon {
  width: 16px;
  height: 16px;
}

/* ATC overlay (alt orta, hover'da görünür) */
.bgc-card__atc-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
  text-align: center;
}
.bgc-product-card:hover .bgc-card__atc-overlay {
  opacity: 1;
  transform: translateY(0);
}
.bgc-card__atc-btn,
.bgc-card__atc-overlay .add_to_cart_button,
.bgc-card__atc-overlay .button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: var(--bgc-primary);
  color: #fff;
  font-family: var(--bgc-font-accent);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: center;
  border: 0;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
}
.bgc-card__atc-overlay .add_to_cart_button:hover,
.bgc-card__atc-overlay .button:hover,
.bgc-card__atc-btn:hover {
  background: var(--bgc-primary-dark);
  color: #fff;
}

/* Kart metin alanı */
.bgc-card__body {
  padding: 14px 12px 16px;
  text-align: center;
}
.bgc-card__title {
  font-family: var(--bgc-font-head);
  font-size: 1rem;
  font-weight: 500;
  color: var(--bgc-ink);
  margin: 0 0 8px;
  line-height: 1.3;
}
.bgc-card__title a {
  color: inherit;
  text-decoration: none;
}
.bgc-card__title a:hover {
  color: var(--bgc-primary);
}

/* Fiyat alanı — canlı: "₺ 4.842,42 KDV Dahildir" tek satır, ortalı */
.bgc-card__price-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 6px;
}
.bgc-card__price-wrap .woocommerce-Price-amount,
.bgc-card__price-wrap .price {
  color: var(--bgc-primary);
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--bgc-font-head);
}
.bgc-card__price-wrap .price del {
  color: #bbbbbb;  /* live: rgb(187,187,187) lighter strikethrough */
  font-weight: 400;
  font-size: .85em;
  margin-right: 4px;
}
.bgc-card__price-wrap .price ins {
  text-decoration: none;
}
.bgc-card__kdv {
  font-size: .78rem;
  color: var(--bgc-muted);
  display: inline;
  white-space: nowrap;
}

/* ── SAYFALAMA ────────────────────────────────────────────── */
.woocommerce-pagination,
.bgc-pagination {
  margin-top: 40px;
  text-align: center;
}
.woocommerce-pagination ul,
.bgc-pagination ul {
  display: inline-flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span,
.bgc-pagination a,
.bgc-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--bgc-line);
  color: var(--bgc-ink);
  font-size: .9rem;
  border-radius: 3px;
  transition: background .2s, border-color .2s, color .2s;
  text-decoration: none;
}
.woocommerce-pagination ul li a:hover {
  background: var(--bgc-primary);
  border-color: var(--bgc-primary);
  color: #fff;
}
.woocommerce-pagination ul li span.current {
  background: var(--bgc-primary);
  border-color: var(--bgc-primary);
  color: #fff;
}

/* ── WC BİLDİRİMLERİ (added-to-cart vb.) ──────────────────────
   FIX: WC'nin ✓ ::before ikonu sol padding yetersiz olunca metnin
   üstüne biniyordu ("kayma"). Sol padding 46px + ikon konumu sabit. */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  position: relative;
  padding: 13px 18px 13px 46px;
  margin: 0 0 16px;
  font-family: var(--bgc-font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--bgc-ink);
  background: #f7f9f1;
  border: 1px solid #dde7c5;
  border-left: 4px solid #7cb342;
  border-radius: 6px;
  list-style: none;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  left: 16px;
  top: 50%;
  margin: 0;
  transform: translateY(-50%);
}
.woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-info {
  background: #f2f5fb; border-color: #d2def0; border-left-color: #303F9F;
}
.woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-error {
  background: #fdf3f2; border-color: #f3c9c6; border-left-color: #D32F2F;
}
/* "Sepetim" / forward butonu */
.woocommerce-message .button,
.woocommerce-message a.button,
.woocommerce-info .button {
  float: right;
  margin: -1px 0 0 12px;
  padding: 7px 14px;
  background: var(--bgc-dark);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-family: var(--bgc-font-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.woocommerce-message .button:hover,
.woocommerce-info .button:hover { background: var(--bgc-primary); color: #fff; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1280px) {
  ul.products { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 1024px) {
  ul.products { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  ul.products.bgc-cols-3,
  ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  ul.products.bgc-cols-4,
  ul.products.columns-4 { grid-template-columns: repeat(2, 1fr); }
  .bgc-toolbar { gap: 8px; }
  .bgc-toolbar__center { display: none; }
}
@media (max-width: 480px) {
  ul.products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  ul.products.bgc-cols-2,
  ul.products.columns-2 { grid-template-columns: repeat(2, 1fr); }
}
