﻿/* ═══════════════════════════════════════════════════════════════
   Kitap detay — pages/kitap.css
═══════════════════════════════════════════════════════════════ */

.book-detail .book-gallery {
    position: sticky;
    top: calc(var(--header-h) + 12px);
}

.gallery-main {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 24px;
}
.gallery-main .badge-discount {
    position: absolute;
    top: 14px; left: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.gallery-thumb {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: all .15s ease;
    overflow: hidden;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb:hover { border-color: var(--primary); }
.gallery-thumb.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(239,68,68,0.15); }

/* Bilgi paneli */
.book-publisher-link {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.book-publisher-link:hover { background: var(--primary-light); color: var(--primary); }

.book-title-main {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 8px;
    line-height: 1.2;
}
.book-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 14px;
}
.book-meta span i {
    color: var(--primary);
    margin-right: 6px;
    width: 18px;
    text-align: center;
}
.book-author-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color .15s;
}
.book-author-link:hover { color: var(--primary-dark); text-decoration: underline; }
.book-author-link + .book-author-link::before { content: ", "; color: var(--text-muted); font-weight: 400; }
.book-author-plain { color: var(--text-muted); }

/* Fiyat kartı */
.book-pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}
.price-old-big {
    color: var(--text-light);
    text-decoration: line-through;
    font-size: 16px;
}
.discount-badge-pill {
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}
.price-new-big {
    font-size: 34px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 4px;
}
.price-savings {
    color: var(--success);
    font-size: 13.5px;
    font-weight: 600;
}

/* Kısa özellikler tablosu (fiyat kartı içi) */
.book-specs-mini {
    width: 100%;
    border-top: 1px solid var(--border);
    margin-top: 16px;
    padding-top: 4px;
    font-size: 13.5px;
}
.book-specs-mini tr + tr td,
.book-specs-mini tr + tr th { padding-top: 0; }
.book-specs-mini td,
.book-specs-mini th {
    padding: 5px 0;
    vertical-align: middle;
    border: none;
    background: transparent;
}
.book-specs-mini th {
    width: 90px;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    padding-right: 10px;
}
.book-specs-mini th i {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    color: var(--primary);
    font-size: 12px;
}
.book-specs-mini td {
    color: var(--text);
    font-weight: 500;
}
.book-specs-mini td a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.book-specs-mini td a:hover { text-decoration: underline; }

.stock-info { margin: 16px 0 4px; font-size: 14px; font-weight: 600; }
.stock-info .stock-ok   { color: var(--success); }
.stock-info .stock-ok i { margin-right: 6px; }
.stock-info .stock-low  { color: var(--accent); }
.stock-info .stock-low i { margin-right: 6px; }
.stock-info .stock-out  { color: var(--danger); }
.stock-info .stock-out i { margin-right: 6px; }

.add-cart-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.qty-stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-card);
}
.qty-btn {
    width: 44px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 14px;
    transition: background .15s ease;
}
.qty-btn:hover { background: var(--bg-soft); color: var(--primary); }
.qty-input {
    width: 56px;
    height: 48px;
    border: none;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    background: transparent;
}
.qty-input:focus { outline: none; }

.btn-favorite-big {
    width: 56px;
    border-color: var(--border);
    color: var(--text-muted);
}
.btn-favorite-big:hover, .btn-favorite-big.is-active {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Promo şerit küçük */
.promo-strip-small {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 14px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
}
.promo-strip-small > div { display: flex; align-items: center; gap: 8px; }
.promo-strip-small i { color: var(--primary); }

/* Sekmeler */
.book-tabs .nav-tabs {
    border-bottom: 2px solid var(--border);
    margin-bottom: 0;
}
.book-tabs .nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-weight: 600;
    padding: 14px 20px;
    background: transparent;
    border-radius: 0;
    margin-bottom: -2px;
}
.book-tabs .nav-tabs .nav-link:hover { color: var(--text); }
.book-tabs .nav-tabs .nav-link.active {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

.book-tabs .tab-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    padding: 28px 30px;
    border-radius: 0 0 var(--radius) var(--radius);
    line-height: 1.7;
    color: var(--text);
}
.book-tabs .tab-content h3 { font-size: 18px; margin-top: 16px; }
.book-tabs .tab-content ul, .book-tabs .tab-content ol { padding-left: 22px; }

.spec-table th {
    width: 200px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13.5px;
}
.spec-table td { font-weight: 500; color: var(--text); }

/* Mobil */
@media (max-width: 767px) {
    .book-detail .book-gallery { position: static; }
    .book-title-main { font-size: 22px; }
    .price-new-big { font-size: 28px; }
    .promo-strip-small { grid-template-columns: 1fr; }
    .add-cart-row { flex-wrap: wrap; }
    .add-cart-row .btn-primary { width: 100%; order: 3; }
}
/* ── REVIEWS ────────────────────────────────────────────────── */
.reviews-head {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 28px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.reviews-avg { text-align: center; }
.reviews-avg-value {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
}
.reviews-avg-stars {
    color: #f59e0b;
    font-size: 20px;
    margin: 4px 0 6px;
    letter-spacing: 2px;
}
.reviews-avg-count {
    font-size: 13.5px;
    color: var(--text-muted);
}
.reviews-buckets {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.reviews-bucket {
    display: grid;
    grid-template-columns: 44px 1fr 40px;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
}
.rb-label { color: var(--text-muted); }
.rb-label i { color: #f59e0b; font-size: 11px; }
.rb-bar {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}
.rb-bar > span {
    display: block;
    height: 100%;
    background: #f59e0b;
    border-radius: 4px;
}
.rb-count { color: var(--text-muted); font-size: 12.5px; text-align: right; }

.reviews-write {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 6px;
}

.reviews-list {
    padding-top: 8px;
}
.review-item {
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}
.review-item:last-child { border-bottom: none; }
.review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.review-stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.review-author { font-weight: 700; font-size: 14px; color: var(--text); }
.review-date  { font-size: 12.5px; color: var(--text-muted); }
.review-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    margin: 0 0 6px;
}
.review-body {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}

@media (max-width: 575px) {
    .reviews-head { grid-template-columns: 1fr; gap: 16px; }
}

.rv-stars { font-size: 32px; color: #f59e0b; cursor: pointer; user-select: none; }
.rv-stars i { padding: 0 4px; transition: transform .12s ease; }
.rv-stars i:hover { transform: scale(1.18); }
