/* ==========================================================================
   BardakSA — Ürün kartı v2 (woocommerce/content-product.php)
   Kart genişliğine göre (container query) fiyat/buton alanı yan yana veya alt alta dizilir.
   ========================================================================== */
.bs-card {
	--c-brand: #ff6b1f; --c-brand-d: #f2520a; --c-ink: #1c1917; --c-body: #57534e; --c-muted: #78716c;
	--c-line: #ece8e4; --c-soft: #faf8f6; --c-warm: #fff4ec;
	container-type: inline-size;
	display: flex; flex-direction: column; height: 100%;
	background: #fff; border: 1px solid var(--c-line); border-radius: 22px; padding: 10px;
	box-shadow: 0 1px 2px rgba(28, 25, 23, .04);
	transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.bs-card:hover { border-color: #e2dbd4; box-shadow: 0 22px 44px -26px rgba(28, 25, 23, .35); transform: translateY(-2px); }

/* Görsel */
.bs-card__media { position: relative; border-radius: 16px; overflow: hidden; background: var(--c-soft); aspect-ratio: 1 / 1; }
.bs-card__img { display: block; width: 100%; height: 100%; }
.bs-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bs-card:hover .bs-card__img img { transform: scale(1.04); }
.bs-card__noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #d6d3d1; }
.bs-card__badge {
	position: absolute; left: 10px; top: 10px; z-index: 2;
	background: var(--c-brand); color: #fff; font-size: .72rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase;
	padding: .35rem .6rem; border-radius: 8px; box-shadow: 0 6px 14px -6px rgba(242, 82, 10, .7);
}
.bs-card__wa {
	position: absolute; right: 10px; top: 10px; z-index: 2; width: 42px; height: 42px; border-radius: 999px;
	display: flex; align-items: center; justify-content: center; color: #fff; background: #25d366;
	box-shadow: 0 8px 18px -8px rgba(18, 140, 126, .8); transition: transform .2s ease, background .2s ease;
}
.bs-card__wa svg { width: 21px; height: 21px; }
.bs-card__wa:hover { transform: scale(1.08); background: #1ebe5b; }
.bs-card__wa:focus-visible, .bs-card__cta:focus-visible, .bs-card__title a:focus-visible { outline: 3px solid rgba(255, 107, 31, .45); outline-offset: 2px; }

/* Gövde */
.bs-card__body { display: flex; flex-direction: column; flex: 1; padding: 12px 6px 4px; }
.bs-card__meta { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; margin-bottom: 8px; }
.bs-card__chip {
	display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px;
	border: 1px solid var(--c-line); background: #fff; color: var(--c-muted); font-size: .78rem; font-weight: 600; line-height: 1;
	text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.bs-card__chip svg { width: 15px; height: 15px; flex-shrink: 0; }
a.bs-card__chip:hover { border-color: var(--c-brand); color: var(--c-brand); }
.bs-card__chip--cat { background: var(--c-warm); border-color: #ffe0cc; color: #c2410c; }

.bs-card__title { margin: 0 0 10px; font-size: 1.06rem; line-height: 1.32; font-weight: 800; color: var(--c-ink); letter-spacing: -.005em; }
.bs-card__title a { color: inherit; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.64em; }
.bs-card:hover .bs-card__title a { color: var(--c-brand); }

.bs-card__facts {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px;
	margin-top: auto; margin-bottom: 10px; font-size: .86rem; color: var(--c-muted); line-height: 1.35;
}
.bs-card__facts strong { color: var(--c-ink); font-weight: 800; }
.bs-card__min { margin-left: auto; white-space: nowrap; }

/* Dönen avantaj şeridi (3 yazı, açılır menü yok) */
.bs-card__perks {
	position: relative; height: 36px; margin-bottom: 10px; overflow: hidden;
	border-radius: 10px; background: var(--c-warm); border: 1px solid #ffe3d1;
}
.bs-card__perk {
	position: absolute; inset: 0; display: flex; align-items: center; gap: 7px; padding: 0 11px;
	font-size: .84rem; font-weight: 800; color: #c2410c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	opacity: 0; animation: bs-perk 9s cubic-bezier(.4,0,.2,1) infinite backwards;
}
.bs-card__perk svg { width: 16px; height: 16px; flex-shrink: 0; }
.bs-card__perk:nth-child(2) { animation-delay: 3s; }
.bs-card__perk:nth-child(3) { animation-delay: 6s; }
@keyframes bs-perk {
	0% { opacity: 0; transform: translateY(70%); }
	5%, 30% { opacity: 1; transform: none; }
	35%, 100% { opacity: 0; transform: translateY(-70%); }
}
.bs-card:hover .bs-card__perk { animation-play-state: paused; }

/* Referans + video rozetleri (görsel üstü) */
.bs-card__proof { position: absolute; left: 10px; bottom: 10px; right: 10px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.bs-card__pill {
	pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px;
	background: rgba(255,255,255,.93); color: var(--c-ink); font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap;
	box-shadow: 0 4px 12px -6px rgba(28,25,23,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.bs-card__pill svg { width: 14px; height: 14px; flex-shrink: 0; }
.bs-card__pill:hover { color: var(--c-brand); }
.bs-card__pill--video { background: rgba(28,25,23,.86); color: #fff; }
.bs-card__pill--video svg { color: var(--c-brand); }
.bs-card__pill--video:hover { color: #fff; background: var(--c-brand); } .bs-card__pill--video:hover svg { color: #fff; }
.bs-card__code strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .02em; font-size: .95em; }

/* Fiyat + CTA */
.bs-card__buy {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	background: var(--c-soft); border: 1px solid var(--c-line); border-radius: 16px; padding: 10px 10px 10px 14px;
}
.bs-card__price { display: flex; flex-direction: column; min-width: 0; }
.bs-card__price-label { font-size: .76rem; color: var(--c-muted); font-weight: 600; line-height: 1.2; }
.bs-card__price-val { font-size: 1.5rem; line-height: 1.15; font-weight: 900; color: var(--c-ink); letter-spacing: -.02em; white-space: nowrap; }
.bs-card__price-val--ask { font-size: 1.15rem; color: var(--c-body); }
.bs-card__price-sfx { font-size: .72rem; color: var(--c-muted); }
.bs-card__cta {
	flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	height: 44px; padding: 0 16px; border-radius: 12px; background: var(--c-brand); color: #fff;
	font-size: .95rem; font-weight: 800; text-decoration: none; white-space: nowrap;
	box-shadow: 0 10px 20px -12px rgba(242, 82, 10, .9); transition: background .2s ease, transform .2s ease;
}
.bs-card__cta svg { width: 16px; height: 16px; transition: transform .2s ease; }
.bs-card__cta:hover { background: var(--c-brand-d); color: #fff; }
.bs-card__cta:hover svg { transform: translate(2px, -2px); }

.bs-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Dar kartlar: kutu-içinde-kutu görünümü kalkar, öğeler alt alta ve ferah dizilir */
@container (max-width: 270px) {
	.bs-card__body { padding: 12px 4px 2px; }
	.bs-card__title { font-size: 1rem; margin-bottom: 8px; }
	.bs-card__facts { flex-direction: column; gap: 3px; font-size: .82rem; }
	.bs-card__min { margin-left: 0; }
	.bs-card__perks { height: 34px; }
	.bs-card__perk { font-size: .8rem; padding: 0 10px; gap: 6px; }
	.bs-card__buy {
		flex-direction: column; align-items: stretch; gap: 10px;
		background: none; border: 0; border-top: 1px dashed #e7e1db; border-radius: 0; padding: 12px 0 2px;
	}
	.bs-card__price { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
	.bs-card__price-val { font-size: 1.35rem; }
	.bs-card__cta { width: 100%; height: 42px; }
}
@container (max-width: 200px) {
	.bs-card__media { aspect-ratio: 1 / 1.05; }
	.bs-card__wa { width: 34px; height: 34px; right: 8px; top: 8px; } .bs-card__wa svg { width: 18px; height: 18px; }
	.bs-card__badge { left: 8px; top: 8px; font-size: .66rem; padding: .28rem .5rem; }
	.bs-card__proof { left: 8px; bottom: 8px; right: 8px; gap: 4px; }
	.bs-card__pill { height: 24px; padding: 0 8px; font-size: .7rem; gap: 4px; } .bs-card__pill svg { width: 12px; height: 12px; }
	.bs-card__chip { height: 24px; font-size: .72rem; padding: 0 8px; }
	.bs-card__title { font-size: .94rem; }
	.bs-card__facts { font-size: .78rem; }
	.bs-card__perks { height: 40px; }
	.bs-card__perk { font-size: .74rem; line-height: 1.15; padding: 0 8px; gap: 6px; white-space: normal; }
	.bs-card__perk { justify-content: center; text-align: center; }
	.bs-card__perk svg { display: none; }
	.bs-card__price { flex-direction: column; align-items: flex-start; gap: 0; }
	.bs-card__price-label { font-size: .7rem; }
	.bs-card__price-val { font-size: 1.22rem; }
	.bs-card__cta { height: 40px; font-size: .9rem; padding: 0 10px; }
}
@media (max-width: 640px) {
	.bs-card { padding: 7px; border-radius: 18px; }
	.bs-card__media { border-radius: 13px; }
}

/* Ürün ızgarası: kart hiçbir zaman ~240px'in altına sıkışmaz; sütun sayısı alana göre ayarlanır */
@media (min-width: 640px) {
	#products-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 244px), 1fr)) !important; }
}

@media (prefers-reduced-motion: reduce) {
	.bs-card, .bs-card__img img, .bs-card__cta svg { transition: none; }
	.bs-card__perk { animation: none; opacity: 0; } .bs-card__perk:first-child { opacity: 1; }
}

/* ── Ürün detay: adet fiyatı kutusu ─────────────────────────────────── */
.bs-pd-price {
	display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
	margin: 0 0 1.25rem; padding: 14px 14px 14px 18px; border-radius: 18px;
	background: linear-gradient(135deg, #fff4ec 0%, #fff 75%); border: 1px solid #ffd9c2;
}
.bs-pd-price__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bs-pd-price__label { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #c2410c; }
.bs-pd-price__val { margin: 0; font-size: 1.05rem; color: #44403c; line-height: 1.3; }
.bs-pd-price__val strong { font-size: 2rem; font-weight: 900; color: #1c1917; letter-spacing: -.02em; }
.bs-pd-price__val small { font-size: .8rem; color: #78716c; }
.bs-pd-price__note { font-size: .86rem; color: #78716c; }
.bs-pd-price__cta {
	display: inline-flex; align-items: center; height: 46px; padding: 0 18px; border-radius: 12px; white-space: nowrap;
	background: #1c1917; color: #fff; font-weight: 800; font-size: .95rem; text-decoration: none; transition: background .2s;
}
.bs-pd-price__cta:hover { background: #ff6b1f; color: #fff; }
@media (max-width: 640px) { .bs-pd-price__cta { width: 100%; justify-content: center; } .bs-pd-price__val strong { font-size: 1.7rem; } }

/* ── Ürün detay: kod + referans/video satırı ───────────────────────── */
.bs-pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -2px 0 16px; }
.bs-pd-meta__code { font-size: .9rem; color: #78716c; }
.bs-pd-meta__code strong { color: #1c1917; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .02em; }
.bs-pd-meta__pill {
	display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
	border: 1px solid #ece8e4; background: #fff; color: #44403c; font-size: .82rem; font-weight: 700; text-decoration: none; transition: border-color .2s, color .2s;
}
.bs-pd-meta__pill svg { width: 15px; height: 15px; }
.bs-pd-meta__pill:hover { border-color: #ff6b1f; color: #ff6b1f; }
.bs-pd-meta__pill--video { background: #1c1917; border-color: #1c1917; color: #fff; }
.bs-pd-meta__pill--video svg { color: #ff6b1f; }
.bs-pd-meta__pill--video:hover { background: #ff6b1f; border-color: #ff6b1f; color: #fff; } .bs-pd-meta__pill--video:hover svg { color: #fff; }

/* ── Ürün detay: referans işler (fotoğraf + video) ─────────────────── */
.bs-refs { background: #fff; border-top: 1px solid #f1eeea; padding: 2.5rem 0 3rem; scroll-margin-top: 80px; }
.bs-refs__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; max-width: 72rem; margin: 0 auto 18px; }
.bs-refs__eyebrow { margin: 0 0 4px; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #ff6b1f; }
.bs-refs__title { margin: 0; font-size: 1.5rem; line-height: 1.2; font-weight: 900; color: #1c1917; letter-spacing: -.01em; }
.bs-refs__count { margin: 4px 0 0; font-size: .9rem; color: #78716c; }
.bs-refs__cta {
	flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-radius: 12px;
	border: 1px solid #e7e1db; background: #fff; color: #1c1917; font-size: .9rem; font-weight: 800; text-decoration: none; transition: border-color .2s, color .2s;
}
.bs-refs__cta svg { width: 18px; height: 18px; color: #25d366; }
.bs-refs__cta:hover { border-color: #ff6b1f; color: #ff6b1f; }
.bs-refs__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 72rem; margin: 0 auto; }
.bs-refs__item {
	position: relative; display: block; padding: 0; border: 0; cursor: zoom-in; aspect-ratio: 1 / 1;
	border-radius: 14px; overflow: hidden; background: #f5f2ee;
}
.bs-refs__item.is-video { cursor: pointer; }
.bs-refs__item.is-hidden { display: none; }
.bs-refs__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.bs-refs__item:hover img { transform: scale(1.05); }
.bs-refs__item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(28,25,23,.25), transparent 45%); opacity: 0; transition: opacity .25s; }
.bs-refs__item:hover::after { opacity: 1; }
.bs-refs__item:focus-visible { outline: 3px solid rgba(255,107,31,.55); outline-offset: 2px; }
.bs-refs__noimg { position: absolute; inset: 0; background: #1c1917; }
.bs-refs__play {
	position: absolute; left: 50%; top: 50%; z-index: 1; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 999px;
	display: flex; align-items: center; justify-content: center; background: #ff6b1f; color: #fff; box-shadow: 0 10px 24px -8px rgba(242,82,10,.8);
}
.bs-refs__tag {
	position: absolute; left: 8px; top: 8px; z-index: 1; padding: 3px 8px; border-radius: 6px;
	background: rgba(28,25,23,.82); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.bs-refs__play svg { width: 20px; height: 20px; margin-left: 2px; }
.bs-refs__more {
	position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
	background: rgba(28,25,23,.62); color: #fff; font-size: 1.6rem; font-weight: 900;
}
@media (max-width: 1024px) { .bs-refs__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) {
	.bs-refs { padding: 2rem 0 2.25rem; }
	.bs-refs__head { flex-direction: column; align-items: stretch; gap: 12px; }
	.bs-refs__title { font-size: 1.25rem; }
	.bs-refs__cta { justify-content: center; }
	/* mobil: yatay kaydırmalı şerit, dikeyde yer kaplamaz */
	.bs-refs__grid {
		display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
		margin: 0 -16px; padding: 0 16px 6px; scroll-padding: 0 16px; scrollbar-width: none;
	}
	.bs-refs__grid::-webkit-scrollbar { display: none; }
	.bs-refs__item { flex: 0 0 42%; scroll-snap-align: start; border-radius: 12px; }
	.bs-refs__item.is-hidden { display: block; }
	.bs-refs__more { display: none; }
}

/* Lightbox */
.bs-lb { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 56px 16px; background: rgba(12,10,9,.94); }
.bs-lb[hidden] { display: none; }
.bs-lb__stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.bs-lb__media { max-width: min(92vw, 1100px); max-height: 84vh; border-radius: 14px; object-fit: contain; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.bs-lb__media.is-video { width: min(92vw, 1100px); aspect-ratio: 16 / 9; height: auto; border: 0; background: #000; }
.bs-lb__media.is-vertical { width: auto; height: 84vh; max-width: 92vw; aspect-ratio: 9 / 16; }
.bs-lb__btn {
	position: absolute; width: 44px; height: 44px; border: 0; border-radius: 999px; cursor: pointer;
	display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); color: #fff; transition: background .2s;
}
.bs-lb__btn svg { width: 22px; height: 22px; }
.bs-lb__btn:hover { background: rgba(255,255,255,.28); }
.bs-lb__close { top: 14px; right: 14px; }
.bs-lb__prev { left: 14px; top: 50%; margin-top: -22px; }
.bs-lb__next { right: 14px; top: 50%; margin-top: -22px; }
.bs-lb__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.65); font-size: .85rem; }
@media (max-width: 640px) { .bs-lb__prev, .bs-lb__next { top: auto; bottom: 8px; margin: 0; } .bs-lb__prev { left: 16px; } .bs-lb__next { right: 16px; } }
