/* Ürün detay sayfası — pages/urun.php */

.pd-layout { display: grid; grid-template-columns: 1fr; gap: 1.75rem; margin: .25rem 0 1rem; }
@media (min-width: 1024px) { .pd-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; } }

/* ---- Galeri ---- */
.pd-main {
  position: relative; aspect-ratio: 1 / 1; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-premium);
  overflow: hidden; box-shadow: var(--shadow-sm); cursor: zoom-in;
}
.pd-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 2rem; transition: transform .25s var(--ease); }
.pd-main:hover img { transform: scale(1.02); }
.pd-zoom {
  position: absolute; right: 1rem; bottom: 1rem; display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: rgba(255,255,255,.95);
  border: 1px solid var(--border); color: #3f3f46; box-shadow: var(--shadow-sm);
}
.pd-thumbs { display: flex; gap: .6rem; margin-top: .75rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumb {
  flex: 0 0 4.5rem; width: 4.5rem; height: 4.5rem; border-radius: .9rem;
  border: 1px solid var(--border); background: #fff; overflow: hidden; padding: .35rem;
  transition: all .15s var(--ease);
}
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumb:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.pd-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(228,17,17,.15); }

/* GLightbox tam ekran galeri tetikleyicileri (görünmez) */
.pd-glightbox-links { display: none; }

/* ---- Lightbox ---- */
.pd-lightbox { position: fixed; inset: 0; z-index: 130; display: none; align-items: center; justify-content: center; padding: 1.5rem; }
.pd-lightbox.open { display: flex; }
.pd-lightbox .lb-overlay { position: absolute; inset: 0; background: rgba(9,9,11,.85); backdrop-filter: blur(4px); }
.pd-lightbox img {
  position: relative; z-index: 1; max-width: min(56rem, 92vw); max-height: 86vh;
  object-fit: contain; background: #fff; border-radius: 1.25rem; padding: 1.5rem; box-shadow: var(--shadow-lg);
}
.pd-lightbox .lb-close { position: absolute; top: 1.25rem; right: 1.25rem; z-index: 2; }

/* ---- Ürün bilgisi ---- */
.pd-brand { font-size: 12px; font-weight: 900; letter-spacing: .25em; text-transform: uppercase; color: var(--primary); margin: 0; }
.pd-title { font-size: 1.7rem; font-weight: 900; letter-spacing: -.035em; line-height: 1.08; margin: .45rem 0 .6rem; }
@media (min-width: 768px) { .pd-title { font-size: 2.15rem; } }
.pd-short { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 .8rem; max-width: 34rem; }
.pd-rating-row { display: flex; align-items: center; gap: .5rem; font-size: 13px; color: var(--muted); margin-bottom: .3rem; }
.pd-rating-row .stars { font-size: 14px; }
.pd-rating-row a { font-weight: 600; }
.pd-rating-row a:hover { color: var(--fg); text-decoration: underline; }
.pd-sku { font-size: 12px; color: var(--muted-light); margin: 0 0 1.1rem; }

.pd-opt { margin-bottom: 1.1rem; }
.pd-opt-label { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #3f3f46; margin: 0 0 .55rem; }
.pd-opt-label b { color: var(--fg); }

.pd-colors { display: flex; gap: .65rem; flex-wrap: wrap; }
.pd-color-dot {
  width: 2.15rem; height: 2.15rem; border-radius: 9999px;
  border: 1px solid rgba(9,9,11,.15); box-shadow: inset 0 0 0 2px #fff;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.pd-color-dot:hover { transform: scale(1.08); }
.pd-color-dot.selected { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--fg); }

.pd-storages { display: flex; gap: .5rem; flex-wrap: wrap; }
.pd-storage {
  border: 1px solid var(--border-strong); background: #fff; border-radius: 9999px;
  padding: .5rem 1.15rem; font-size: 13px; font-weight: 700; color: #3f3f46;
  transition: all .15s var(--ease);
}
.pd-storage:hover { border-color: var(--fg); color: var(--fg); }
.pd-storage.selected { background: var(--fg); color: #fff; border-color: var(--fg); }

.pd-badges { display: flex; align-items: center; gap: .5rem; margin: .3rem 0 .8rem; }
.pd-badges .badge { font-size: 12px; padding: .35rem .8rem; }
.pd-old-price { font-size: 15px; color: var(--muted-light); text-decoration: line-through; font-weight: 600; }
.pd-price { font-size: 2.3rem; font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.pd-installment { font-size: 13px; color: var(--muted); font-weight: 600; margin: .55rem 0 1.35rem; }

/* ---- Güven rozetleri ---- */
.pd-trust { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.35rem; }
.pd-trust-item {
  display: flex; gap: .6rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--border); border-radius: .9rem; padding: .8rem .9rem;
}
.pd-trust-item .icon { color: var(--emerald); flex-shrink: 0; margin-top: .1rem; }
.pd-trust-item b { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: -.01em; }
.pd-trust-item span { font-size: 11px; color: var(--muted); line-height: 1.4; }
@media (max-width: 420px) { .pd-trust { grid-template-columns: 1fr; } }

/* ---- Satın alma ---- */
.pd-buy { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .75rem; }
.pd-qty {
  display: inline-flex; align-items: center; height: 3.15rem;
  border: 1px solid var(--border-strong); border-radius: 9999px; background: #fff; overflow: hidden;
}
.pd-qty button { width: 2.8rem; height: 100%; display: grid; place-items: center; color: #3f3f46; transition: background .15s; }
.pd-qty button:hover { background: var(--surface-subtle); color: var(--fg); }
.pd-qty [data-qty] { min-width: 2.1rem; text-align: center; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.pd-buy .btn-lg { flex: 1 1 auto; min-width: 10.5rem; }
@media (max-width: 640px) { .pd-buy .btn-lg { min-width: 100%; } }
.pd-secondary { display: flex; gap: .6rem; flex-wrap: wrap; }
.pd-secondary .btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ---- Açıklama ---- */
.pd-desc { padding: 1.75rem; font-size: 14.5px; line-height: 1.75; color: #3f3f46; overflow-x: auto; }
@media (min-width: 768px) { .pd-desc { padding: 2.25rem; } }
.pd-desc h2, .pd-desc h3, .pd-desc h4 { color: var(--fg); margin: 1.3rem 0 .5rem; }
.pd-desc h2:first-child, .pd-desc h3:first-child, .pd-desc p:first-child { margin-top: 0; }
.pd-desc img { border-radius: .9rem; margin: .75rem 0; }
.pd-desc table { border-collapse: collapse; width: 100%; margin: .75rem 0; }
.pd-desc td, .pd-desc th { border: 1px solid var(--border); padding: .5rem .75rem; font-size: 13px; text-align: left; }
.pd-desc th { background: var(--surface-subtle); font-weight: 700; }
.pd-desc ul, .pd-desc ol { padding-left: 1.25rem; }

/* ---- Yorumlar ---- */
.rv-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem 2rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm);
}
.rv-summary-score { display: flex; align-items: center; gap: 1.25rem; flex-shrink: 0; }
.rv-avg { font-size: 2.6rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.rv-summary .stars { font-size: 16px; }
.rv-count { font-size: 13px; color: var(--muted); margin: .25rem 0 0; }

/* ---- Puan dağılımı grafiği ---- */
.rv-dist { flex: 1 1 17rem; min-width: 0; display: flex; flex-direction: column; gap: .32rem; }
@media (min-width: 560px) { .rv-dist { padding-left: 2rem; border-left: 1px solid var(--border); } }
.rv-dist-row { display: grid; grid-template-columns: 2.4rem 1fr 2.2rem; align-items: center; gap: .65rem; }
.rv-dist-label {
  display: inline-flex; align-items: center; gap: .2rem; justify-content: flex-end;
  font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums;
}
.rv-dist-label svg { color: var(--amber); flex-shrink: 0; }
.rv-dist-track { position: relative; height: .55rem; background: var(--surface-subtle); border-radius: 9999px; overflow: hidden; }
.rv-dist-fill {
  position: absolute; inset: 0 auto 0 0; height: 100%;
  background: var(--amber); border-radius: 9999px;
  transition: width .4s var(--ease);
}
.rv-dist-count { font-size: 12px; font-weight: 700; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

.rv-dist-empty { flex-direction: row; align-items: center; gap: .6rem; color: var(--muted-light); }
.rv-dist-empty svg { color: var(--amber); flex-shrink: 0; }
.rv-dist-empty p { font-size: 12.5px; font-weight: 600; margin: 0; }

:root[data-theme="dark"] .rv-summary { background: #18181b; }

.rv-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 1024px) { .rv-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: start; } }

.rv-list { display: flex; flex-direction: column; gap: .75rem; }
.rv-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); }
.rv-head { display: flex; align-items: center; gap: .75rem; }
.rv-avatar {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 9999px;
  background: var(--surface-subtle); font-weight: 900; font-size: 14px; color: #3f3f46; flex-shrink: 0;
}
.rv-name { font-size: 13.5px; font-weight: 800; margin: 0; }
.rv-date { font-size: 11px; color: var(--muted-light); margin: 0; }
.rv-stars { margin-left: auto; }
.rv-title { font-size: 14px; font-weight: 800; margin: .55rem 0 .2rem; }
.rv-text { font-size: 13.5px; color: #3f3f46; line-height: 1.6; margin: .35rem 0 0; }

.rv-empty { text-align: center; padding: 2.75rem 1.5rem; }
.rv-empty h3 { font-size: 1.15rem; font-weight: 800; }
.rv-empty p { color: var(--muted); font-size: 13.5px; margin: .5rem auto 0; max-width: 24rem; }
.rv-empty .es-icon { display: inline-grid; place-items: center; width: 4rem; height: 4rem; border-radius: 9999px; background: var(--surface-subtle); color: var(--muted); margin-bottom: 1rem; }

.rv-form-panel { position: sticky; top: 8.5rem; }
.rv-form-title { font-size: 1.1rem; font-weight: 800; margin: 0; }
.rv-form-sub { font-size: 12.5px; color: var(--muted); margin: .3rem 0 1.1rem; }
.rv-form-user { display: flex; align-items: center; gap: .4rem; font-size: 13px; color: #3f3f46; background: var(--surface-subtle); border-radius: .75rem; padding: .6rem .9rem; margin: 0 0 1rem; }

.rf-stars { display: flex; gap: .3rem; }
.rf-stars button { color: #d4d4d8; transition: transform .12s var(--ease), color .12s; line-height: 0; }
.rf-stars button svg { fill: none; }
.rf-stars button:hover { transform: scale(1.12); }
.rf-stars button.on { color: var(--amber); }
.rf-stars button.on svg { fill: currentColor; }

/* ============================================================
   EK ÖZELLİKLER — aciliyet, taksit, paylaşım, bildirim, S&C
   ============================================================ */

/* ---- Stok aciliyeti + görüntülenme ---- */
.pd-urgency { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.15rem; }
.pd-last-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa;
  font-size: 12px; font-weight: 800; letter-spacing: -.01em;
  padding: .38rem .8rem; border-radius: 9999px;
}
.pd-last-badge svg { color: #ea580c; }
.pd-viewers { display: inline-flex; align-items: center; gap: .38rem; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pd-viewers svg { color: var(--muted-light); }
.pd-viewers b { color: var(--fg); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---- Taksit tablosu ---- */
.pd-installments {
  border: 1px solid var(--border); border-radius: var(--radius-card); background: #fff;
  margin-bottom: 1.35rem; overflow: hidden; box-shadow: var(--shadow-sm);
}
.pd-installments > summary {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .9rem 1.1rem; cursor: pointer; list-style: none;
  font-size: 13.5px; font-weight: 800; color: var(--fg); user-select: none;
}
.pd-installments > summary::-webkit-details-marker { display: none; }
.pd-installments > summary > span { display: inline-flex; align-items: center; gap: .5rem; }
.pd-installments > summary > span svg { color: var(--primary); }
.pd-inst-chevron { color: var(--muted); transition: transform .2s var(--ease); flex-shrink: 0; }
.pd-installments[open] .pd-inst-chevron { transform: rotate(180deg); }
.pd-inst-wrap { padding: 0 1.1rem 1rem; }
.pd-inst-table { width: 100%; border-collapse: collapse; }
.pd-inst-table th, .pd-inst-table td { text-align: left; padding: .6rem .5rem; font-size: 13px; border-bottom: 1px solid var(--border); }
.pd-inst-table th { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pd-inst-table td:first-child { font-weight: 700; color: #3f3f46; }
.pd-inst-table td:nth-child(2) { font-weight: 900; color: var(--fg); font-variant-numeric: tabular-nums; }
.pd-inst-table td:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.pd-inst-table tr:last-child td { border-bottom: 0; }
.pd-inst-note { font-size: 11.5px; color: var(--muted-light); margin: .55rem 0 0; }

/* ---- Sosyal paylaşım ---- */
.pd-share { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.pd-share-label { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-right: .15rem; }
.pd-share-btn {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  border: 1px solid var(--border-strong); background: #fff; color: #3f3f46;
  transition: transform .15s var(--ease), background .15s, color .15s, border-color .15s;
}
.pd-share-btn:hover { transform: translateY(-2px); }
.pd-share-btn.wa:hover { background: #25d366; border-color: #25d366; color: #fff; }
.pd-share-btn.x:hover { background: #000; border-color: #000; color: #fff; }
.pd-share-btn.fb:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.pd-share-btn.copy:hover { background: var(--fg); border-color: var(--fg); color: #fff; }
.pd-share-btn.copied { background: var(--emerald); border-color: var(--emerald); color: #fff; }

/* ---- Stok / fiyat bildirimleri ---- */
.pd-alerts { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px dashed var(--border-strong); }
.pd-alert-lead { display: flex; align-items: center; gap: .45rem; font-size: 13px; font-weight: 700; color: #c2410c; margin: 0 0 .7rem; }
.pd-alert-lead .icon { color: #ea580c; }
.pd-alert-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pd-alert-toggle {
  display: inline-flex; align-items: center; gap: .4rem; font-size: 12.5px; font-weight: 700; color: #3f3f46;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 9999px; padding: .5rem 1rem;
  transition: all .15s var(--ease);
}
.pd-alert-toggle:hover { border-color: var(--fg); color: var(--fg); }
.pd-alert-toggle[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.pd-alert-toggle.primary { border-color: var(--primary); color: #fff; background: var(--primary); }
.pd-alert-toggle.primary:hover { filter: brightness(.95); color: #fff; }
.pd-alert-form { margin-top: .75rem; }
.pd-alert-form label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: .4rem; }
.pd-alert-field { display: flex; gap: .5rem; flex-wrap: wrap; }
.pd-alert-field .form-input { flex: 1 1 12rem; min-width: 0; }
.pd-alert-field .pd-alert-target { flex: 0 1 9.5rem; }
.pd-alert-field .btn { flex: 0 0 auto; }

/* ---- Yorum: onaylı alışveriş rozeti + foto + faydalı ---- */
.rv-verified {
  display: inline-flex; align-items: center; gap: .25rem; vertical-align: middle;
  font-size: 10.5px; font-weight: 800; letter-spacing: .01em; text-transform: none;
  color: var(--emerald); background: var(--emerald-soft); border: 1px solid #a7f3d0;
  border-radius: 9999px; padding: .1rem .45rem; margin-left: .4rem;
}
.rv-photo { display: inline-block; margin-top: .65rem; border-radius: .75rem; overflow: hidden; border: 1px solid var(--border); width: 5.5rem; height: 5.5rem; }
.rv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-foot { margin-top: .8rem; }
.rv-helpful {
  display: inline-flex; align-items: center; gap: .4rem; font-size: 12px; font-weight: 700; color: var(--muted);
  background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 9999px; padding: .4rem .85rem;
  transition: all .15s var(--ease);
}
.rv-helpful:hover { color: var(--fg); border-color: var(--border-strong); }
.rv-helpful:disabled { cursor: default; }
.rv-helpful.voted { color: var(--emerald); border-color: #a7f3d0; background: var(--emerald-soft); }
.rv-helpful.voted svg { fill: currentColor; }

/* ---- Soru & Cevap ---- */
.qa-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 1024px) { .qa-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: start; } }
.qa-list { display: flex; flex-direction: column; gap: .75rem; }
.qa-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); }
.qa-q, .qa-a { display: flex; gap: .7rem; align-items: flex-start; }
.qa-a { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.qa-q p { margin: 0; font-size: 14px; font-weight: 700; color: var(--fg); line-height: 1.5; }
.qa-a p { margin: 0; font-size: 13.5px; color: #3f3f46; line-height: 1.6; }
.qa-tag { flex-shrink: 0; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 9999px; font-size: 12px; font-weight: 900; }
.qa-tag-q { background: var(--surface-subtle); color: #3f3f46; }
.qa-tag-a { background: var(--primary-soft); color: var(--primary); }
.qa-by { display: block; margin-top: .35rem; font-size: 11px; font-weight: 700; color: var(--muted-light); }
.qa-form-panel { position: sticky; top: 8.5rem; }

/* ---- Son gezilenler: review .rv-card ile çakışmayı düzelt ---- */
.recently-viewed .rv-card { padding: 0; }

/* ---- Karanlık tema uyumları ---- */
:root[data-theme="dark"] .pd-installments,
:root[data-theme="dark"] .pd-share-btn,
:root[data-theme="dark"] .pd-alert-toggle,
:root[data-theme="dark"] .qa-item { background: #18181b; }
:root[data-theme="dark"] .pd-last-badge { background: rgba(234,88,12,.12); border-color: rgba(234,88,12,.4); color: #fdba74; }
:root[data-theme="dark"] .pd-last-badge svg { color: #fb923c; }
:root[data-theme="dark"] .pd-alert-lead { color: #fdba74; }
