/**
 * Kitap Galerisi — Stiller
 * Hero kart + alt grid yapısı, koyu tema, mobil responsive
 * tokens.css yüklü olmalı (var(--brand-500) vs.)
 */

/* ============================================================
   SECTION KAPSAYICI — krem/bej zemin, sıcak kitap temalı renkler
   ============================================================ */
.gs-kitap-galerisi {
    background: #faf6f1;
    color: #2a2018;
    /* Üst dar, alt geniş — başlık kırmızı çizgiye yaklaşsın */
    padding: clamp(20px, 3vw, 36px) clamp(16px, 4vw, 32px) clamp(40px, 6vw, 80px);
    margin: 48px 0 0 0;
    position: relative;
    overflow: hidden;
    /* Üst-altta marka rengi ince çizgisi */
    border-top: 3px solid var(--brand-500, #b71c1a);
    border-bottom: 1px solid #e8ddd0;
}

.gs-kitap-galerisi__inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================================
   ÜST BAŞLIK SATIRI
   ============================================================ */
.gs-kg-header {
    margin-bottom: clamp(16px, 2.5vw, 28px);
}

.gs-kg-etiket {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-600, #9a1715);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(122, 17, 16, 0.18);
}

.gs-kg-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.gs-kg-baslik {
    font-family: var(--font-display, 'Manrope', system-ui, sans-serif);
    font-size: clamp(1.875rem, 1rem + 2.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-transform: uppercase;
    color: #1a1410;
    margin: 0;
}

.gs-kg-tum {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1.5px solid #1a1410;
    border-radius: 4px;
    color: #1a1410;
    background: transparent;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: border-color .2s, background .2s, color .2s;
    white-space: nowrap;
}
.gs-kg-tum:hover {
    background: var(--brand-500, #b71c1a);
    border-color: var(--brand-500, #b71c1a);
    color: #fff;
}

/* ============================================================
   HERO KART
   ============================================================ */
.gs-kg-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    padding: clamp(24px, 4vw, 40px) 0;
    border-top: 1px solid rgba(122, 17, 16, 0.12);
    border-bottom: 1px solid rgba(122, 17, 16, 0.12);
}

.gs-kg-hero__kapak {
    display: block;
    aspect-ratio: 3 / 4;
    background: transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: transform .3s ease, filter .3s ease;
}
.gs-kg-hero__kapak:hover {
    transform: translateY(-4px);
    filter: drop-shadow(0 24px 50px rgba(42, 32, 24, 0.22));
}
.gs-kg-hero__kapak img {
    width: 100%;
    height: 100%;
    /* Görsel tam görünsün, kenardan kırpılmasın */
    object-fit: contain;
    object-position: center;
    display: block;
    filter: drop-shadow(0 16px 36px rgba(42, 32, 24, 0.22));
}

.gs-kg-rozet {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brand-600, #9a1715);
    margin-bottom: 12px;
}

.gs-kg-hero__baslik {
    font-family: var(--font-display, 'Manrope', system-ui, sans-serif);
    font-size: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px 0;
    letter-spacing: -0.015em;
}
.gs-kg-hero__baslik a {
    color: #1a1410;
    text-decoration: none;
}
.gs-kg-hero__baslik a:hover {
    color: var(--brand-500, #b71c1a);
}

.gs-kg-hero__aciklama {
    font-size: 15px;
    line-height: 1.65;
    color: #4a3d33;
    margin: 0 0 24px 0;
    max-width: 60ch;
    /* Satır sınırı + otomatik ellipsis (...) */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .gs-kg-hero__aciklama {
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
}

.gs-kg-hero__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 20px;
    margin: 0 0 28px 0;
    padding: 16px 0;
    border-top: 1px solid rgba(122, 17, 16, 0.12);
    border-bottom: 1px solid rgba(122, 17, 16, 0.12);
}
.gs-kg-hero__meta > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gs-kg-hero__meta dt {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #8a7a6a;
}
.gs-kg-hero__meta dd {
    font-size: 14px;
    font-weight: 600;
    color: #1a1410;
    margin: 0;
}

.gs-kg-hero__aksiyonlar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gs-kg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: background .2s, border-color .2s, transform .15s;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
}
.gs-kg-btn:active { transform: translateY(1px); }

.gs-kg-btn--primary {
    background: var(--brand-500, #b71c1a);
    color: #fff;
    border-color: var(--brand-500, #b71c1a);
}
.gs-kg-btn--primary:hover {
    background: var(--brand-700, #7a1110);
    border-color: var(--brand-700, #7a1110);
}

.gs-kg-btn--ghost {
    background: transparent;
    color: #1a1410;
    border-color: #1a1410;
}
.gs-kg-btn--ghost:hover {
    background: #1a1410;
    color: #fff;
}

/* ============================================================
   ALT GRID — DAHA FAZLA KİTAP
   ============================================================ */
.gs-kg-alt {
    padding: clamp(12px, 2vw, 24px) 0 0;
}

.gs-kg-alt__baslik {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a7a6a;
    margin-bottom: 18px;
}

.gs-kg-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(12px, 2vw, 24px);
}

.gs-kg-kart {
    display: flex;
    flex-direction: column;
}

.gs-kg-kart__kapak {
    display: block;
    aspect-ratio: 3 / 4;
    background: transparent;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    transition: transform .25s ease, filter .25s ease;
}
.gs-kg-kart__kapak:hover {
    transform: translateY(-4px);
    filter: drop-shadow(0 12px 24px rgba(42, 32, 24, 0.22));
}
.gs-kg-kart__kapak img {
    width: 100%;
    height: 100%;
    /* Görsel tamamen görünsün, kırpma yok — sidebar widget mantığı */
    object-fit: contain;
    object-position: center;
    display: block;
    filter: drop-shadow(0 6px 14px rgba(42, 32, 24, 0.18));
}

.gs-kg-kart__baslik {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 4px 0;
}
.gs-kg-kart__baslik a {
    color: #1a1410;
    text-decoration: none;
}
.gs-kg-kart__baslik a:hover {
    color: var(--brand-500, #b71c1a);
}

.gs-kg-kart__meta {
    font-size: 11px;
    color: #6b5d50;
    line-height: 1.4;
}
.gs-kg-kart__sep { margin: 0 4px; opacity: .5; }

/* ============================================================
   KAPAK FALLBACK — görsel yoksa
   ============================================================ */
.gs-kg-kapak-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-700, #7a1110), var(--brand-500, #b71c1a));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.3;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .gs-kg-grid { grid-template-columns: repeat(3, 1fr); }
    .gs-kg-hero { grid-template-columns: 1fr; text-align: left; }
    .gs-kg-hero__kapak { max-width: 240px; margin: 0 auto 8px; }
}

@media (max-width: 600px) {
    .gs-kitap-galerisi { margin: 32px 0 0 0; padding: 32px 16px; }
    .gs-kg-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .gs-kg-header-row { flex-direction: column; align-items: flex-start; }
    .gs-kg-tum { align-self: stretch; justify-content: center; }
    .gs-kg-hero__meta { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .gs-kg-hero__aksiyonlar .gs-kg-btn { flex: 1 1 auto; justify-content: center; }
}
