/* ============================================================
   product.css — ürün detay sayfası (yorum + öneri)
   styles.css + auth.css + shop.css token/sınıflarını kullanır
   ============================================================ */

.product-shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 28px) 20px 64px;
}
.product-crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 20px; }
.product-crumb a { color: var(--ink-2); text-decoration: none; }
.product-crumb a:hover { color: var(--ink); }

/* ---- üst: galeri + bilgi ---- */
.product-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
.product-gallery { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.product-gallery-main {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-soft), #ececea);
  display: grid; place-items: center;
}
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery-glyph { font-size: clamp(80px, 16vw, 160px); font-weight: 800; color: var(--ink-3); }
.product-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.product-thumb {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; padding: 0; background: var(--bg-soft);
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb.is-active { border-color: #4f1e23; }

.product-info { padding: 4px 0; min-width: 0; }
.product-cat { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 0 0 10px; }
.product-title { margin: 0 0 12px; font-size: clamp(24px, 4vw, 34px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.product-rating-line { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
.product-price { font-size: 28px; font-weight: 800; color: var(--ink); margin: 0 0 8px; }
.product-stock { font-size: 13px; margin: 0 0 18px; color: #2a6b4e; }
.product-stock.is-out { color: var(--accent); }
.product-desc { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0 0 24px; }

.product-buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qty-stepper {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.qty-stepper button {
  width: 34px; height: 34px; border: 0; background: transparent;
  font-size: 18px; color: var(--ink-2); border-radius: 999px; cursor: pointer;
}
.qty-stepper button:hover { background: var(--bg-soft); color: var(--ink); }
.qty-stepper .qty-value { min-width: 28px; text-align: center; font-weight: 600; }
.product-fav {
  width: 46px; height: 46px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink-2); cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.product-fav[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.product-fav[aria-pressed="true"] svg { fill: var(--accent); }

/* ---- yıldızlar ---- */
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 16px; height: 16px; }
.star-on { color: #e8b54a; fill: #e8b54a; }
.star-off { color: var(--line); fill: var(--line); }

/* ---- bölümler ---- */
.product-section { margin-top: 48px; }
.product-section h2 { font-size: 20px; font-weight: 700; margin: 0 0 18px; letter-spacing: -0.01em; }

/* yorumlar */
.review-summary { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.review-avg { font-size: 38px; font-weight: 800; line-height: 1; }
.review-count { font-size: 13px; color: var(--ink-3); }
.review-list { display: flex; flex-direction: column; gap: 14px; }
.review-item { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--card); }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.review-author { font-weight: 600; font-size: 14px; }
.review-date { font-size: 12px; color: var(--ink-3); }
.review-comment { font-size: 14px; line-height: 1.55; color: var(--ink-2); margin: 6px 0 0; white-space: pre-wrap; }
.review-empty { color: var(--ink-3); font-size: 14px; }

/* yorum formu */
.review-form {
  margin-top: 22px; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; background: var(--bg);
  display: flex; flex-direction: column; gap: 12px; max-width: 560px;
}
.review-form h3 { margin: 0; font-size: 16px; font-weight: 700; }
.review-stars-input { display: inline-flex; gap: 4px; }
.review-stars-input button { background: transparent; border: 0; cursor: pointer; padding: 2px; line-height: 0; }
.review-stars-input svg { width: 28px; height: 28px; color: var(--line); fill: var(--line); transition: color var(--t-fast) var(--ease), fill var(--t-fast) var(--ease); }
.review-stars-input button.on svg { color: #e8b54a; fill: #e8b54a; }
.review-form textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 80px;
  padding: 12px 14px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
.review-form textarea:focus { outline: none; border-color: #4f1e23; box-shadow: 0 0 0 3px rgba(79,30,35,0.12); }
.review-note { font-size: 13px; color: var(--ink-3); }

/* önerilen ürünler */
.rec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rec-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.rec-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); }
.rec-media { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--bg-soft), #ececea); display: grid; place-items: center; }
.rec-media img { width: 100%; height: 100%; object-fit: cover; }
.rec-media span { font-size: 44px; font-weight: 800; color: var(--ink-3); }
.rec-body { padding: 12px 14px; }
.rec-name { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.rec-price { font-size: 14px; color: var(--ink-2); }

@media (min-width: 768px) {
  .product-shell { padding: calc(var(--header-h) + 40px) 32px 80px; }
  .product-main { grid-template-columns: 1.05fr 1fr; gap: 44px; }
  /* masaüstünde görsel daha büyük/uzun (sağ kolonla dengelensin) */
  .product-gallery { position: sticky; top: calc(var(--header-h) + 24px); }
  .product-gallery-main { aspect-ratio: 3 / 4; }
  .rec-grid { grid-template-columns: repeat(4, 1fr); }
}
