/* =================================================================
   Weşanên Meyman — Anasayfa stili
   Sıcak kitapçı paleti (kahve / bordo / krem), aydınlık + karanlık tema.
   Tema <html data-theme="light|dark"> ile anahtarlanır.
   ================================================================= */

:root,
[data-theme="light"] {
    --bg:         #fbf6ef;   /* krem */
    --surface:    #ffffff;
    --surface-2:  #f5e9da;   /* sıcak panel */
    --ink:        #4a1b0c;   /* koyu kahve metin */
    --ink-soft:   #8a6a55;
    --accent:     #6b3410;   /* kahve vurgu */
    --accent-ink: #ffffff;
    --accent-2:   #9b2226;   /* bordo / kırmızı ikincil vurgu */
    --border:     #e7d8c6;
    --badge-bg:   #f1e2d1;
    --badge-ink:  #6b3410;
    --shadow:     0 14px 40px rgba(74, 27, 12, .12);
    --header-bg:  rgba(251, 246, 239, .92);
}

[data-theme="dark"] {
    /* Ferah dumanlı gri gece modu — kahve/bordo yok, yumuşak kırmızı aksan */
    --bg:         #292c32;   /* açık dumanlı gri zemin */
    --surface:    #33363d;   /* kartlar/yüzeyler (zeminden hafif açık) */
    --surface-2:  #33363d;   /* üst menü / footer */
    --ink:        #f2f3f6;   /* yumuşak açık metin */
    --ink-soft:   #b4b8c0;   /* ikincil açık gri metin */
    --accent:     #ff5a52;   /* yumuşak kırmızı vurgu (buton, aktif öğe) */
    --accent-ink: #292c32;   /* kırmızı buton üstü koyu metin */
    --accent-2:   #e84840;   /* vurgu hover / fiyat-rozet kırmızısı */
    --border:     #44474f;   /* kenarlık */
    --badge-bg:   #3a3d44;   /* ince hover zemini */
    --badge-ink:  #b4b8c0;
    --shadow:     0 14px 40px rgba(0, 0, 0, .35);
    --header-bg:  rgba(51, 54, 61, .92);  /* ≈ #33363d, sticky blur için hafif şeffaf */
}

* { box-sizing: border-box; }

html { color-scheme: light dark; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Georgia", "Iowan Old Style", "Times New Roman", serif;
    line-height: 1.5;
    transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3 { font-family: "Georgia", serif; }

a { color: inherit; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Üst yardımcı çubuk (dil + tema) ---------- */
.topbar {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-family: system-ui, sans-serif;
}
.topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 38px; gap: 12px;
}
.lang-switch { display: flex; gap: 2px; flex-wrap: wrap; }
.lang-link {
    text-decoration: none; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
    color: var(--ink-soft); padding: 4px 7px; border-radius: 6px;
    transition: all .15s ease;
}
.lang-link:hover { color: var(--accent); background: var(--badge-bg); }
.lang-link.is-active { color: var(--accent-ink); background: var(--accent); }

.theme-toggle { display: flex; gap: 4px; }
.theme-btn {
    display: grid; place-items: center; width: 30px; height: 26px;
    border: 1px solid transparent; background: transparent; color: var(--ink-soft);
    border-radius: 6px; cursor: pointer; transition: all .15s ease;
}
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn:hover { color: var(--accent); background: var(--badge-bg); }
.theme-btn.is-active { color: var(--accent-ink); background: var(--accent); }

/* ---------- Ana üst menü ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    min-height: 76px;
    font-family: system-ui, sans-serif;
}
.nav { display: flex; gap: 22px; }
.nav-left { justify-content: flex-start; }
.nav-right { justify-content: flex-end; }
.nav-link {
    text-decoration: none; font-size: .95rem; font-weight: 600;
    color: var(--ink); padding: 6px 2px; position: relative;
    transition: color .15s ease;
}
.nav-link::after {
    content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
    background: var(--accent-2); transition: width .2s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }

.logo { text-align: center; text-decoration: none; justify-self: center; }
.logo-text {
    font-family: "Georgia", serif; font-weight: 700; font-size: 1.5rem;
    color: var(--accent); letter-spacing: .01em; white-space: nowrap;
}
.logo-img { height: 52px; width: auto; max-width: 220px; display: block; object-fit: contain; }

.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.icon-bar { display: flex; align-items: center; gap: 6px; }
.icon-btn {
    position: relative; display: grid; place-items: center;
    width: 40px; height: 40px; border: none; background: transparent;
    color: var(--ink); border-radius: 10px; cursor: pointer; transition: all .15s ease;
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: var(--badge-bg); color: var(--accent); }
.cart-badge {
    position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px;
    padding: 0 4px; border-radius: 999px; background: var(--accent-2); color: #fff;
    font-size: .68rem; font-weight: 700; display: grid; place-items: center;
    font-family: system-ui, sans-serif;
}

.hamburger { display: none; }

/* ---------- Mobil çekmece ---------- */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60;
}
.drawer {
    position: fixed; top: 0; right: 0; height: 100%; width: min(320px, 86vw);
    background: var(--surface); border-left: 1px solid var(--border);
    z-index: 70; transform: translateX(100%); transition: transform .25s ease;
    display: flex; flex-direction: column; padding: 18px; gap: 14px;
    font-family: system-ui, sans-serif;
}
.drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.drawer-link {
    text-decoration: none; font-weight: 600; color: var(--ink);
    padding: 12px 10px; border-radius: 10px; border-bottom: 1px solid var(--border);
}
.drawer-link:hover { background: var(--badge-bg); color: var(--accent); }
.drawer-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Ortak vurgu öğeleri ---------- */
.lang-badge {
    display: inline-block; font-family: system-ui, sans-serif;
    font-size: .64rem; font-weight: 800; letter-spacing: .05em;
    background: var(--accent-2); color: #fff; padding: 2px 6px; border-radius: 5px;
    vertical-align: middle;
}
.btn-cart {
    font-family: system-ui, sans-serif; font-size: .82rem; font-weight: 700;
    border: none; cursor: pointer; padding: 9px 14px; border-radius: 10px;
    background: var(--accent); color: var(--accent-ink); transition: all .15s ease;
}
.btn-cart:hover { background: var(--accent-2); }
.btn-cart.is-added { background: var(--accent-2); }

/* Kapak yer tutucu */
.cover-ph {
    width: 100%; height: 100%;
    background: linear-gradient(150deg, var(--c1), var(--c2));
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 12px; color: #fff7ee; position: relative;
}
.cover-ph::after {
    content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 3px;
    background: rgba(255,255,255,.25); border-radius: 2px;  /* kitap sırtı çizgisi */
}
.cover-ph-initials { font-family: "Georgia", serif; font-size: 1.6rem; font-weight: 700; opacity: .9; align-self: flex-end; }
.cover-ph-title { font-family: "Georgia", serif; font-size: .92rem; line-height: 1.25; opacity: .95; }
.cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 1) SLIDER ---------- */
.slider { position: relative; margin: 28px auto; }
.slider-viewport { overflow: hidden; border-radius: 18px; }
.slider-track { display: flex; transition: transform .5s ease; }
.slide {
    min-width: 100%;
    display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: center;
    background: var(--surface); border: 1px solid var(--border);
    padding: 34px; box-shadow: var(--shadow);
}
.slide-cover {
    width: 220px; height: 300px; border-radius: 12px; overflow: hidden;
    box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.slide-badges { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.badge-new {
    font-family: system-ui, sans-serif; font-size: .68rem; font-weight: 800;
    letter-spacing: .06em; text-transform: uppercase;
    background: var(--accent); color: var(--accent-ink); padding: 3px 9px; border-radius: 999px;
}
.slide-title { margin: 0 0 6px; font-size: 2rem; line-height: 1.15; color: var(--ink); }
.slide-author { margin: 0 0 22px; color: var(--ink-soft); font-size: 1.1rem; font-style: italic; }
.slide-foot { display: flex; align-items: center; gap: 18px; }
.slide-price { font-size: 1.5rem; font-weight: 700; color: var(--accent-2); font-family: system-ui, sans-serif; }
.slide-foot .btn-cart { font-size: .92rem; padding: 11px 20px; }

.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); color: var(--accent); font-size: 1.7rem; line-height: 1;
    cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow);
    transition: all .15s ease; z-index: 2;
}
.slider-arrow:hover { background: var(--accent); color: var(--accent-ink); }
.slider-arrow.prev { left: -10px; }
.slider-arrow.next { right: -10px; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.slider-dots button {
    width: 9px; height: 9px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--border); padding: 0; transition: all .2s ease;
}
.slider-dots button.is-active { background: var(--accent); width: 26px; border-radius: 6px; }

/* ---------- 2) 3 BÖLMELİ ŞERİT ---------- */
.strips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 44px auto; }
.strip {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 20px;
}
.strip-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.strip-title {
    margin: 0; font-size: 1.15rem; color: var(--ink);
    border-left: 4px solid var(--accent-2); padding-left: 10px;
}
.strip-all { font-family: system-ui, sans-serif; font-size: .8rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.strip-all:hover { color: var(--accent-2); }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.mini-item { display: flex; gap: 12px; align-items: center; }
.mini-cover { width: 48px; height: 66px; border-radius: 6px; overflow: hidden; flex: none; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.mini-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-title { font-weight: 700; font-size: .95rem; color: var(--ink); }
.mini-author { font-size: .82rem; color: var(--ink-soft); font-style: italic; }
.mini-price { font-family: system-ui, sans-serif; font-weight: 700; font-size: .88rem; color: var(--accent-2); }

/* ---------- 3) KATEGORİLER ---------- */
.categories { margin: 44px auto 60px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 26px; }
.chip {
    font-family: system-ui, sans-serif; font-size: .9rem; font-weight: 600;
    text-decoration: none; color: var(--ink);
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 8px 16px; border-radius: 999px; transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.book-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book-cover { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.book-cover .lang-badge { position: absolute; top: 10px; left: 10px; }
.book-body { padding: 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.book-title { margin: 0; font-size: 1.02rem; line-height: 1.25; color: var(--ink); }
.book-author { margin: 0; font-size: .85rem; color: var(--ink-soft); font-style: italic; }
.book-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.book-price { font-family: system-ui, sans-serif; font-weight: 700; color: var(--accent-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 70px; font-family: system-ui, sans-serif; flex-wrap: wrap;
}
.footer-brand { font-family: "Georgia", serif; font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.footer-tag { color: var(--ink-soft); font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .strips { grid-template-columns: 1fr; }
    .book-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    /* Üst menü mobil: hamburger + ortada logo + sepet */
    .nav-left, .nav-right { display: none; }
    .header-right .icon-bar { gap: 2px; }
    .header-inner { grid-template-columns: auto 1fr auto; min-height: 64px; }
    .hamburger {
        display: grid; place-items: center; width: 42px; height: 42px;
        border: none; background: transparent; color: var(--ink); cursor: pointer; border-radius: 10px;
    }
    .hamburger svg { width: 24px; height: 24px; }
    .logo-text { font-size: 1.2rem; }

    .slide { grid-template-columns: 1fr; text-align: center; padding: 24px; gap: 18px; }
    .slide-cover { width: 160px; height: 220px; margin: 0 auto; }
    .slide-title { font-size: 1.4rem; }
    .slide-badges, .slide-foot { justify-content: center; }
    .slider-arrow.prev { left: 2px; }
    .slider-arrow.next { right: 2px; }
}

@media (max-width: 460px) {
    .book-grid { grid-template-columns: 1fr; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    .slider-track { transition: none; }
    * { scroll-behavior: auto; }
}
