/* Ürün tekil sayfası (single-product.php). Şekil kuralı products.css ile aynı: etkileşimli öğeler hap, kartlar 8px, gölge yok.
   Seçiciler .pdp altında yazıldı. */

.pdp { --pdp-stage: #fbf6ef; padding-bottom: 5rem; }
/* Açıklama metinlerinin kontrastı: genel --color-text (#73738c, beyazda 4.6:1) ve --color-muted (3.9:1) uzun okuma için zayıf; bu sayfada koyulaştırıldı (8.6:1 ve 5.3:1) */
.pdp { --color-text: #4a4a63; --color-muted: #6a6a7c; }

/* --- Breadcrumb --- */
.pdp .breadcrumb { padding: 20px 0 8px; font-size: 13px; }
.pdp .breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; color: var(--color-muted); }
.pdp .breadcrumb li + li::before { content: "/"; margin: 0 10px; color: var(--color-border); }
.pdp .breadcrumb a { color: var(--color-text); }
.pdp .breadcrumb a:hover { color: var(--color-primary-dark); }
.pdp .breadcrumb [aria-current] { color: var(--color-navy); font-weight: 500; }

/* --- Hero: galeri + bilgi --- */
.pdp-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; padding: 16px 0 64px; }

.pdp-gallery { position: sticky; top: calc(var(--header-h-sm) + 24px); }
.pdp-gallery__stage { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-white); }
.pdp-gallery__slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; opacity: 0; transition: opacity .35s ease; }
.pdp-gallery__slide.is-active { opacity: 1; }
.pdp-gallery__slide img { width: 100%; height: 100%; object-fit: contain; }
.pdp-gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.pdp-gallery__thumbs[hidden] { display: none; }
.pdp-gallery__thumbs::-webkit-scrollbar { display: none; }
.pdp .pdp-gallery__thumb { flex: none; width: 76px; height: 76px; padding: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-white); transition: border-color .2s; }
.pdp .pdp-gallery__thumb:hover { border-color: var(--color-muted); background: var(--color-white); }
.pdp .pdp-gallery__thumb.is-active { border-color: var(--color-navy); box-shadow: inset 0 0 0 1px var(--color-navy); }
.pdp-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.pdp-info { min-width: 0; }
.pdp .pdp-eyebrow { margin: 0 0 12px; font-family: var(--font-heading); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary-dark); }
.pdp .pdp-title { margin: 0 0 14px; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--color-navy); }

/* Yıldızlar: 5 yıldızlık maske, dolgu genişliği puana göre. */
.stars {
	--star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Cg id='s'%3E%3Cpath d='M10 1.2l2.6 5.6 6.1.7-4.5 4.2 1.2 6L10 14.6 4.6 17.7l1.2-6L1.3 7.5l6.1-.7z'/%3E%3C/g%3E%3Cuse href='%23s' x='20'/%3E%3Cuse href='%23s' x='40'/%3E%3Cuse href='%23s' x='60'/%3E%3Cuse href='%23s' x='80'/%3E%3C/svg%3E");
	position: relative;
	display: inline-block;
	flex: none;
	width: 90px;
	height: 18px;
	background: #e6e1d8;
	-webkit-mask: var(--star) center / 100% 100% no-repeat;
	mask: var(--star) center / 100% 100% no-repeat;
}
.stars__fill { position: absolute; inset: 0 auto 0 0; background: #ffb400; }

.pdp-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 20px; font-size: 14px; color: var(--color-text); }
.pdp-rating__text strong { color: var(--color-navy); }
.pdp-rating__link { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--color-border); }
.pdp-rating__link:hover { color: var(--color-primary-dark); text-decoration-color: currentColor; }

.pdp-summary { margin: 0 0 20px; font-size: 1rem; line-height: 1.65; color: var(--color-text); }
.pdp-summary p:last-child { margin-bottom: 0; }

.pdp-flavors, .pdp-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.pdp-flavor { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 10px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); font-size: 14px; font-weight: 500; color: var(--color-navy); }
.pdp-flavor img { width: 20px; height: 20px; object-fit: contain; }
.pdp-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 28px; }
.pdp-badges li { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-white); font-size: 13px; font-weight: 500; line-height: 1.3; text-align: center; color: var(--color-navy); }
@media (min-width: 768px) { .pdp-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Satın alma kutusu */
.pdp-buy { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-white); }
.pdp .pdp-price { margin: 0; font-family: var(--font-heading); font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--color-navy); }
.pdp-price .woocommerce-Price-currencySymbol { margin-left: 2px; font-size: .6em; font-weight: 600; }

.pdp .btn--lg { height: 54px; padding: 0 28px; font-size: 16px; }
.pdp .pdp-buy__cta { width: 100%; background: var(--color-trendyol); }
.pdp .pdp-buy__cta:hover, .pdp .pdp-buy__cta:focus-visible { background: var(--color-primary-dark); box-shadow: 0 8px 20px rgba(242, 122, 26, .3); }
.pdp .pdp-buy__note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--color-muted); }

.pdp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; margin: 24px 0 0; border-top: 1px solid var(--color-border); }
.pdp-facts > div { padding: 16px 16px 0 0; }
.pdp-facts dt { margin: 0 0 2px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); }
.pdp-facts dd { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--color-navy); }

/* --- Bölümler --- */
.pdp-section { padding: 64px 0; }
.pdp-section--tint { background: var(--pdp-stage); }
.pdp .pdp-section :is(.container, .pdp-related__head) > h2 { margin: 0 0 28px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.25; letter-spacing: -.01em; color: var(--color-navy); }
.pdp-prose > *, .pdp-faq > * { max-width: 820px; }
.pdp-prose .entry-content { font-size: 1.0625rem; line-height: 1.75; color: var(--color-text); }
.pdp-prose .entry-content > :last-child { margin-bottom: 0; }

/* Besin tablosu (TablePress çıktısı) */
.pdp-table { overflow-x: auto; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-white); }
.pdp-table .tablepress { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 15px; }
.pdp-table .tablepress th, .pdp-table .tablepress td { padding: 14px 20px; border: 0; border-top: 1px solid var(--color-border); text-align: left; background: none; color: var(--color-body); vertical-align: top; }
.pdp-table .tablepress thead th { border-top: 0; background: var(--color-navy); color: var(--color-white); font-family: var(--font-heading); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.pdp-table .tablepress tbody tr:nth-child(even) td { background: #fdfaf6; }
.pdp-table .tablepress tbody td:first-child { font-weight: 500; color: var(--color-navy); }

/* Nasıl kullanılır */
.pdp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.pdp-steps li { position: relative; padding: 28px 24px 24px; border: 1px solid var(--color-border); border-radius: 8px; counter-increment: step; }
.pdp-steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 18px; border-radius: 50%; background: var(--color-primary-bg); font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: var(--color-primary-dark); }
.pdp .pdp-steps h3 { margin: 0 0 6px; font-size: 1.0625rem; color: var(--color-navy); }
.pdp-steps p { margin: 0; color: var(--color-text); line-height: 1.6; }


/* Benzer ürünler */
.pdp-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.pdp .pdp-related__head h2 { margin: 0; }
.pdp-related__all { flex: none; font-size: 14px; font-weight: 600; color: var(--color-navy); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--color-border); }
.pdp-related__all:hover { color: var(--color-primary-dark); text-decoration-color: currentColor; }

.pdp-disclaimer { max-width: 820px; margin: 0; padding-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--color-muted); }

/* --- Mobil sabit satın alma çubuğu (JS hero butonu ekran dışına çıkınca gösterir) --- */
.pdp-bar { position: fixed; inset: auto 0 0; z-index: 90; display: none; align-items: center; justify-content: space-between; gap: 14px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--color-border); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); transform: translateY(100%); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.pdp-bar.is-visible { transform: none; }
.pdp-bar__info { display: grid; min-width: 0; }
.pdp-bar__title { overflow: hidden; font-size: 12.5px; color: var(--color-muted); text-overflow: ellipsis; white-space: nowrap; }
.pdp-bar__price { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 700; color: var(--color-navy); }
.pdp-bar .btn { flex: none; background: var(--color-trendyol); }

/* --- Duyarlı --- */
@media (max-width: 1024px) {
	.pdp-hero { grid-template-columns: 1fr; gap: 32px; padding-bottom: 48px; }
	.pdp-gallery { position: static; }
	.pdp-gallery__stage { aspect-ratio: 4 / 3.4; }
	.pdp-section { padding: 48px 0; }
}
@media (max-width: 767px) {
	.pdp { padding-bottom: 6rem; }
	.pdp-bar { display: flex; }
	.pdp-bar[hidden] { display: none; }
	.pdp-steps { grid-template-columns: 1fr; }
	.pdp-buy { padding: 18px; }
	.pdp .pdp-price { font-size: 1.75rem; }
	.pdp .pdp-gallery__thumb { width: 64px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
	.pdp-gallery__slide, .pdp-bar, .pdp .pdp-gallery__thumb { transition: none; }
}
