/* ============================================================
   Dibra Creative Touch – Botime
   Design-System 2026: Editorial + islamisches Bogen-Motiv
   Tokens: 4px-Raster, feste Radius-/Typo-Skala
   ============================================================ */

:root {
    /* Farben */
    --navy-900: #0d1626;
    --navy-800: #12203a;
    --navy-700: #1b2a4a;
    --navy-600: #2a3d63;
    --gold-700: #7a5f26;
    --gold-600: #a8843a;
    --gold-500: #b8944a;
    --gold-400: #d4b26a;
    --gold-100: #f3e9d2;
    --cream-50: #fdfbf7;
    --cream-100: #f8f4ec;
    --cream-200: #f1eadb;
    --sand-300: #e5dcc8;
    --ink-900: #1c2333;
    --ink-600: #4e5567;
    --ink-400: #667085;
    --line: #e9e2d2;
    --line-strong: #d9cfb8;
    --green-600: #2e7d54;
    --red-600: #b0433a;
    --wa-600: #1da851;
    --wa-700: #178a42;

    /* Radius-Skala */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-xl: 32px;
    --r-pill: 999px;
    --r-arch: 999px 999px 14px 14px; /* Bogen-Signatur */

    /* Abstände (4px-Raster) */
    --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
    --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
    --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-28: 112px;

    /* Schatten */
    --sh-xs: 0 1px 2px rgba(13, 22, 38, 0.05);
    --sh-sm: 0 2px 8px rgba(13, 22, 38, 0.06);
    --sh-md: 0 10px 30px -8px rgba(13, 22, 38, 0.14);
    --sh-lg: 0 24px 60px -16px rgba(13, 22, 38, 0.22);

    /* Typografie */
    --font-display: 'Fraunces', Georgia, serif;
    --font-sans: 'Inter', 'Segoe UI', sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    --text-2xl: clamp(1.6rem, 1.35rem + 1vw, 2.1rem);
    --text-3xl: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
    --text-hero: clamp(2.4rem, 1.6rem + 3.4vw, 4.4rem);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 132px; }

html, body { overflow-x: clip; }

body {
    font-family: var(--font-sans);
    color: var(--ink-900);
    background: var(--cream-100);
    line-height: 1.65;
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--navy-700); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--gold-600); }
button { font-family: inherit; }

::selection { background: var(--gold-400); color: var(--navy-900); }

:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--navy-800);
    font-weight: 520;
    line-height: 1.15;
    letter-spacing: -0.015em;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--navy-800); color: #fff;
    padding: var(--s-3) var(--s-5); z-index: 300; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* Reveal-Animationen (JS setzt .reveal + .is-visible) */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------------- Butonat ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    padding: 12px 24px;
    border: 1.5px solid transparent;
    border-radius: var(--r-pill);
    font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.01em;
    line-height: 1.4;
    cursor: pointer; text-align: center; white-space: nowrap;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
                background 0.2s, color 0.2s, border-color 0.2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(0.97); }
.btn-lg { padding: 16px 32px; font-size: var(--text-base); }
.btn-block { width: 100%; }

.btn-primary { background: var(--navy-700); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--navy-800); color: #fff; transform: translateY(-2px); box-shadow: var(--sh-md); }

.btn-outline { background: transparent; color: var(--navy-700); border-color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: #fff; transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--ink-600); }
.btn-ghost:hover { color: var(--navy-800); background: var(--cream-200); }

.btn-whatsapp { background: var(--wa-600); color: #fff; box-shadow: var(--sh-sm); }
.btn-whatsapp:hover { background: var(--wa-700); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px -8px rgba(23, 138, 66, 0.5); }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: none; border: none; cursor: pointer; color: var(--ink-400);
    border-radius: var(--r-pill);
    transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { color: var(--red-600); background: var(--cream-200); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------------- Header ---------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(253, 251, 247, 0.86);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; gap: var(--s-6);
    padding-top: var(--s-3); padding-bottom: var(--s-3);
}
.brand { display: flex; align-items: center; gap: var(--s-3); flex: none; }
.brand-logo { height: 46px; width: auto; }
.brand-mark {
    width: 44px; height: 44px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--navy-700); color: var(--gold-400);
    border-radius: var(--r-arch);
    transition: transform 0.3s var(--ease);
}
.brand:hover .brand-mark { transform: translateY(-2px); }
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--navy-800); letter-spacing: -0.01em; }
.brand-sub { font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-700); font-weight: 600; }

.header-search {
    flex: 1; display: flex; align-items: center; max-width: 440px; margin: 0 auto;
    min-width: 0;
    border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
    background: #fff; padding-left: var(--s-4);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(184, 148, 74, 0.12); }
.header-search svg.search-lead { width: 17px; height: 17px; color: var(--ink-400); flex: none; }
.header-search input {
    flex: 1; border: none; background: transparent;
    padding: 11px var(--s-3); font-size: var(--text-sm); font-family: var(--font-sans);
    color: var(--ink-900); min-width: 0;
}
.header-search input:focus { outline: none; }
.header-search input::placeholder { color: var(--ink-400); }
.header-search button {
    border: none; background: var(--navy-700); color: #fff;
    margin: 4px; padding: 10px 18px; cursor: pointer;
    border-radius: var(--r-pill); font-weight: 600; font-size: var(--text-xs);
    letter-spacing: 0.04em; text-transform: uppercase;
    transition: background 0.2s;
}
.header-search button:hover { background: var(--navy-800); }

.header-actions { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.header-wa { padding: 10px 18px; }
.header-cart {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; color: var(--navy-700);
    border-radius: var(--r-pill); transition: background 0.2s;
}
.header-cart:hover { background: var(--cream-200); }
.header-cart svg { width: 21px; height: 21px; }
.cart-badge {
    position: absolute; top: 2px; right: 0;
    background: var(--gold-700); color: #fff;
    font-size: 0.66rem; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: var(--r-pill);
    display: flex; align-items: center; justify-content: center; padding: 0 5px;
    box-shadow: 0 0 0 2px var(--cream-50);
}
.nav-toggle {
    display: none; width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: none; border: none; color: var(--navy-700); cursor: pointer;
    border-radius: var(--r-pill);
}
.nav-toggle:hover { background: var(--cream-200); }
.nav-toggle svg { width: 22px; height: 22px; }

.site-nav { border-top: 1px solid var(--line); }
.nav-inner { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.nav-inner a {
    position: relative;
    color: var(--ink-600); padding: 12px var(--s-4);
    font-size: var(--text-sm); font-weight: 550; white-space: nowrap;
}
.nav-inner a::after {
    content: ''; position: absolute; left: var(--s-4); right: var(--s-4); bottom: 6px;
    height: 2px; background: var(--gold-500); border-radius: 2px;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.3s var(--ease);
}
.nav-inner a:hover { color: var(--navy-800); }
.nav-inner a:hover::after { transform: scaleX(1); }
.nav-inner a.is-active { color: var(--navy-800); font-weight: 650; }
.nav-inner a.is-active::after { transform: scaleX(1); }

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    background: var(--navy-800);
    color: #fff;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(60% 80% at 76% 46%, rgba(212, 178, 106, 0.10) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(var(--s-8), 5vw, var(--s-16));
    align-items: center;
    padding-top: clamp(var(--s-12), 7vw, var(--s-28));
    padding-bottom: clamp(var(--s-12), 7vw, var(--s-28));
}
.hero-title {
    color: #fff;
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 470;
    line-height: 1.06;
    letter-spacing: -0.02em;
    margin-bottom: var(--s-6);
    text-wrap: balance;
}
.hero-title em {
    font-style: italic; font-weight: 420;
    color: var(--gold-400);
}
.hero-text {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--text-lg); line-height: 1.7;
    max-width: 30rem; margin-bottom: var(--s-8);
}
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.hero .btn-primary { background: var(--cream-50); color: var(--navy-800); }
.hero .btn-primary:hover { background: #fff; color: var(--navy-900); }

.hero-visual { position: relative; }
.hero-visual > img {
    border-radius: var(--r-arch);
    box-shadow: var(--sh-lg);
    width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
}
.hero-books {
    display: flex; gap: clamp(var(--s-3), 2vw, var(--s-5));
    justify-content: center; align-items: flex-end;
    perspective: 900px;
}
.hero-books img {
    width: 31%; max-width: 168px;
    aspect-ratio: 2 / 3; object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.55);
    transition: transform 0.5s var(--ease);
}
.hero-books img:nth-child(1) { transform: rotateY(9deg) translateY(6px); }
.hero-books img:nth-child(2) { transform: translateY(-20px) scale(1.1); z-index: 1; position: relative; }
.hero-books img:nth-child(3) { transform: rotateY(-9deg) translateY(6px); }
.hero-books:hover img:nth-child(1) { transform: rotateY(4deg) translateY(2px); }
.hero-books:hover img:nth-child(2) { transform: translateY(-26px) scale(1.12); }
.hero-books:hover img:nth-child(3) { transform: rotateY(-4deg) translateY(2px); }

/* ---------------- Seksionet ---------------- */
.section { padding: clamp(var(--s-12), 6vw, var(--s-20)) 0; }
.section-alt { background: var(--cream-50); border-block: 1px solid var(--line); }

.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s-4); margin-bottom: clamp(var(--s-6), 3vw, var(--s-10));
}
.section-head h2 {
    font-size: var(--text-2xl); letter-spacing: -0.02em;
}
.section-link {
    display: inline-flex; align-items: center; gap: var(--s-1);
    font-weight: 600; font-size: var(--text-sm); color: var(--navy-700);
    white-space: nowrap; padding: var(--s-3) 0 var(--s-3) var(--s-2);
    margin: calc(-1 * var(--s-3)) 0;
}
.section-link svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.section-link:hover svg { transform: translateX(4px); }

.page-head {
    background: var(--cream-50); border-bottom: 1px solid var(--line);
    padding: clamp(var(--s-8), 4vw, var(--s-12)) 0;
}
.page-head h1 { letter-spacing: -0.02em; }
.page-sub { color: var(--ink-600); margin-top: var(--s-2); font-size: var(--text-sm); }

/* ---------------- Kartat e librave ---------------- */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(236px, 100%), 1fr));
    gap: clamp(var(--s-4), 2vw, var(--s-6));
}
.book-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh-md);
    border-color: var(--sand-300);
}
.book-card-image {
    display: block; position: relative;
    background: linear-gradient(160deg, var(--cream-200), var(--sand-300));
    aspect-ratio: 3 / 4;
    overflow: hidden;
}
.book-card-image { padding: var(--s-4); }
.book-card-image img {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(13, 22, 38, 0.18));
    transition: transform 0.6s var(--ease);
}
.book-card:hover .book-card-image img { transform: scale(1.045); }
.badge {
    display: inline-flex; align-items: center;
    padding: 4px 12px;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
    border-radius: var(--r-pill); color: #fff;
}
.book-card-image .badge { position: absolute; top: var(--s-3); left: var(--s-3); z-index: 1; }
.badge-sale { background: var(--gold-700); }
.badge-sample { background: var(--ink-600); }

.book-card-body {
    padding: var(--s-4) var(--s-5) var(--s-5);
    display: flex; flex-direction: column; gap: 2px; flex: 1;
}
.book-card-title { font-size: 1rem; font-weight: 580; line-height: 1.35; }
.book-card-title a { color: var(--navy-800); }
.book-card-title a::after { content: ''; position: absolute; inset: 0; }
.book-card-author { color: var(--ink-400); font-size: var(--text-sm); }
.book-card-price {
    margin-top: auto; padding-top: var(--s-3);
    display: flex; align-items: baseline; gap: var(--s-2);
}
.price-current { font-weight: 700; font-size: 1.15rem; color: var(--navy-800); letter-spacing: -0.01em; }
.price-old { color: var(--ink-400); text-decoration: line-through; font-size: var(--text-sm); }

.book-card-actions {
    margin-top: var(--s-4);
    position: relative; z-index: 1;
}
.book-card-actions .btn { padding: 10px 12px; font-size: var(--text-sm); }
.book-card-availability {
    font-size: var(--text-sm); font-weight: 600; color: var(--red-600);
}
.is-available { color: var(--green-600); }
.is-unavailable { color: var(--red-600); }

/* ---------------- Kategoritë ---------------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
    grid-auto-rows: 1fr;
    gap: var(--s-4);
}
.category-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-5);
    display: flex; align-items: center; gap: var(--s-3);
    transition: border-color 0.25s, background 0.25s;
}
.category-card:hover { border-color: var(--navy-700); background: var(--cream-50); }
.category-card img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; flex: none; }
.category-name { font-weight: 600; font-size: 0.98rem; color: var(--navy-800); }

/* ---------------- Info-kartat ---------------- */
.about-section { max-width: 46rem; }
.about-section h2 { margin-bottom: var(--s-6); }
.about-prose p { margin-bottom: var(--s-4); }
.about-prose p:first-child {
    font-size: var(--text-lg); color: var(--navy-700);
}
.about-prose p:last-child { margin-bottom: 0; }

.info-grid, .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.info-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(var(--s-6), 3vw, var(--s-10));
}
.info-card h2 { margin-bottom: var(--s-4); font-size: var(--text-xl); }
.info-card p { color: var(--ink-600); margin-bottom: var(--s-3); font-size: 0.95rem; }
.contact-list { list-style: none; margin-bottom: var(--s-5); }
.contact-list li {
    display: flex; gap: var(--s-3); align-items: baseline;
    padding: var(--s-3) 0; border-bottom: 1px solid var(--line); font-size: 0.95rem;
}
.contact-list li:last-child { border-bottom: none; }

/* ---------------- Lista e librave ---------------- */
.books-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.filters {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-5);
    position: sticky; top: 128px;
}
.filters-toggle { display: none; width: 100%; margin-bottom: 0; }
.filters.is-open .filters-toggle { margin-bottom: var(--s-3); }
.filter-group { margin-bottom: var(--s-5); }
.filter-group > label:not(.check) {
    display: block; font-weight: 650; font-size: var(--text-xs);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: var(--s-2); color: var(--ink-600);
}
.filter-group select, .filter-group input[type="number"] {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
    font-family: var(--font-sans); font-size: var(--text-sm);
    background: var(--cream-50); color: var(--ink-900);
    transition: border-color 0.2s;
}
.filter-group select:focus, .filter-group input:focus {
    outline: none; border-color: var(--gold-500);
    box-shadow: 0 0 0 4px rgba(184, 148, 74, 0.12);
}
.filter-price-row { display: flex; gap: var(--s-2); }
.filter-checks { display: flex; flex-direction: column; gap: var(--s-2); }
.check { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) 0; font-size: var(--text-sm); cursor: pointer; color: var(--ink-600); }
.check input { margin: 0; accent-color: var(--gold-600); width: 18px; height: 18px; flex: none; }
.filter-actions { display: flex; flex-direction: column; gap: var(--s-2); }

.books-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--s-4); margin-bottom: var(--s-6); flex-wrap: wrap;
}
.books-count { color: var(--ink-600); font-size: var(--text-sm); font-weight: 550; }
.sort-form { display: flex; align-items: center; gap: var(--s-2); }
.sort-form label { font-size: var(--text-sm); color: var(--ink-600); }
.sort-form select {
    padding: 8px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
    font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 550;
    background: #fff; color: var(--ink-900); cursor: pointer;
}

.pagination { display: flex; gap: var(--s-2); justify-content: center; margin-top: var(--s-10); }
.page-link {
    min-width: 44px; height: 44px; padding: 0 var(--s-3);
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
    background: #fff; font-weight: 600; font-size: var(--text-sm);
    transition: all 0.2s var(--ease);
}
.page-link:hover { border-color: var(--navy-700); color: var(--navy-800); transform: translateY(-2px); }
.page-link.is-active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.page-link.is-active:hover { transform: none; color: #fff; }

.empty-state {
    text-align: center; padding: var(--s-16) var(--s-5);
    display: flex; flex-direction: column; align-items: center; gap: var(--s-4);
}
.empty-state p { color: var(--ink-600); max-width: 28rem; }
.empty-icon {
    width: 72px; height: 72px; border-radius: var(--r-arch);
    background: var(--cream-200); color: var(--gold-600);
    display: flex; align-items: center; justify-content: center;
}
.empty-icon svg { width: 30px; height: 30px; }
.notfound-code {
    font-family: var(--font-display); font-size: clamp(4rem, 10vw, 7rem);
    color: var(--sand-300); font-weight: 500; line-height: 1;
}

/* ---------------- Detajet e librit ---------------- */
.book-detail {
    display: grid; grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(var(--s-8), 4vw, var(--s-16)); align-items: start;
}
.book-detail-gallery { position: sticky; top: 128px; }
.book-detail-main-image {
    background: linear-gradient(165deg, var(--cream-50), var(--cream-200));
    border: 1px solid var(--line);
    border-radius: var(--r-arch);
    padding: clamp(var(--s-6), 3vw, var(--s-12));
    display: flex; justify-content: center;
}
.book-detail-main-image img {
    max-height: 460px; width: auto;
    box-shadow: var(--sh-lg); border-radius: 6px;
}
.book-detail-thumbs { display: flex; gap: var(--s-2); margin-top: var(--s-4); flex-wrap: wrap; justify-content: center; }
.thumb {
    width: 60px; height: 78px; border: 2px solid var(--line); border-radius: var(--r-sm);
    overflow: hidden; cursor: pointer; background: #fff; padding: 0;
    transition: border-color 0.2s, transform 0.2s var(--ease);
}
.thumb:hover { transform: translateY(-2px); }
.thumb.is-active { border-color: var(--gold-500); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.book-detail-title {
    font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem);
    font-weight: 500; letter-spacing: -0.02em;
    margin: var(--s-2) 0 var(--s-1);
    text-wrap: balance;
}
.book-detail-author { color: var(--ink-600); font-size: var(--text-lg); margin-bottom: var(--s-5); }
.book-detail-price { display: flex; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-2); }
.book-detail-price .price-current { font-size: 1.9rem; }
.book-detail-short { color: var(--ink-600); margin: var(--s-4) 0; line-height: 1.7; }

.purchase-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-6); margin: var(--s-5) 0;
    box-shadow: var(--sh-sm);
}
.book-detail-order label { font-weight: 650; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: var(--s-2); color: var(--ink-600); }
.qty-row { display: flex; gap: var(--s-3); align-items: stretch; }
.qty-row input {
    width: 134px; padding: 12px; text-align: center;
    border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
    font-size: var(--text-base); font-weight: 600; font-family: var(--font-sans); background: var(--cream-50);
    -moz-appearance: textfield; appearance: textfield;
}
.qty-row .btn { flex: 1; }
.purchase-card .btn-whatsapp { margin-top: var(--s-3); }

/* JS-Stepper (+/-) */
.qty-stepper {
    display: inline-flex; align-items: stretch;
    border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
    background: var(--cream-50); overflow: hidden;
}
.qty-stepper input {
    width: 52px; border: none !important; background: transparent !important;
    text-align: center; font-weight: 600; font-size: var(--text-base);
    -moz-appearance: textfield; appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-stepper button {
    width: 44px; border: none; background: transparent; cursor: pointer;
    color: var(--ink-600); font-size: 1.05rem; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.qty-stepper button:hover { background: var(--cream-200); color: var(--navy-800); }
.qty-stepper button:focus-visible { outline-offset: -2px; border-radius: var(--r-sm); }
.qty-stepper svg { width: 15px; height: 15px; }

.book-specs {
    display: grid; grid-template-columns: max-content 1fr; gap: var(--s-2) var(--s-6);
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-6); margin-top: var(--s-5);
}
.book-specs dt { font-weight: 650; color: var(--navy-800); font-size: var(--text-sm); }
.book-specs dd { color: var(--ink-600); font-size: var(--text-sm); }

.book-detail-text h2 { margin-bottom: var(--s-5); font-weight: 520; }
.prose { color: var(--ink-900); max-width: 46rem; line-height: 1.75; }
.prose-excerpt {
    background: #fff; border-left: 3px solid var(--gold-500);
    padding: var(--s-6) var(--s-8);
    border-radius: 0 var(--r-lg) var(--r-lg) 0;
    font-family: var(--font-display); font-size: var(--text-lg); font-style: italic;
    color: var(--navy-700);
}
.legal-text .prose { max-width: 50rem; }

/* ---------------- Shporta ---------------- */
.cart-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.cart-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.cart-table th {
    text-align: left; padding: var(--s-4) var(--s-5);
    font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--ink-400); border-bottom: 1px solid var(--line); font-weight: 650;
}
.cart-table td { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }
.cart-book-cell { display: flex; align-items: center; gap: var(--s-4); }
.cart-book-cell img { width: 54px; height: 72px; object-fit: cover; border-radius: var(--r-sm); flex: none; box-shadow: var(--sh-xs); }
.cart-book-cell a { font-weight: 600; color: var(--navy-800); }
.cart-qty-input {
    width: 72px; padding: 10px; text-align: center;
    border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
    font-family: var(--font-sans); font-weight: 600; background: var(--cream-50);
}
.cart-line-total { font-weight: 700; color: var(--navy-800); }
.cart-actions-row { margin: var(--s-4) 0 var(--s-8); }

.cart-layout {
    display: grid; grid-template-columns: 1.35fr 0.65fr;
    gap: var(--s-8); align-items: start;
}
.cart-summary {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-8);
    box-shadow: var(--sh-sm);
    position: sticky; top: 128px;
}
.cart-summary-row { display: flex; justify-content: space-between; font-size: var(--text-lg); margin-bottom: var(--s-2); }
.cart-summary-hint { color: var(--ink-400); font-size: var(--text-sm); margin-bottom: var(--s-5); }
.cart-summary-actions { display: flex; flex-direction: column; gap: var(--s-2); }

/* ---------------- Checkout ---------------- */
.checkout-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--s-8); align-items: start; }
.checkout-form {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: clamp(var(--s-6), 3vw, var(--s-10));
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.form-field label {
    display: block; font-weight: 650; font-size: var(--text-xs);
    text-transform: uppercase; letter-spacing: 0.07em;
    margin-bottom: var(--s-2); color: var(--ink-600);
}
.form-field input, .form-field select, .form-field textarea {
    width: 100%; padding: 13px 16px;
    border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
    font-family: var(--font-sans); font-size: var(--text-base);
    background: var(--cream-50); color: var(--ink-900);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none; border-color: var(--gold-500); background: #fff;
    box-shadow: 0 0 0 4px rgba(184, 148, 74, 0.12);
}
.form-field-wide { grid-column: 1 / -1; }
.form-field.has-error input, .form-field.has-error select { border-color: var(--red-600); }
.field-error { color: var(--red-600); font-size: var(--text-sm); margin-top: var(--s-1); font-weight: 600; }
.form-hint { color: var(--ink-400); font-size: var(--text-sm); margin: var(--s-4) 0; }
.checkout-agree {
    margin-top: var(--s-6); padding: var(--s-5);
    background: var(--cream-100); border-radius: var(--r-md);
    border: 1px solid var(--line);
}
.checkout-agree.has-error { border-color: var(--red-600); background: #faeeed; }

.checkout-summary {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-8); position: sticky; top: 128px;
    box-shadow: var(--sh-sm);
}
.checkout-summary h2 { margin-bottom: var(--s-5); font-size: var(--text-xl); font-weight: 540; }
.summary-items { list-style: none; margin-bottom: var(--s-4); }
.summary-items li {
    display: flex; justify-content: space-between; gap: var(--s-3);
    padding: var(--s-3) 0; border-bottom: 1px solid var(--line); font-size: var(--text-sm);
}
.summary-qty { color: var(--ink-400); font-size: var(--text-xs); }
.summary-row { display: flex; justify-content: space-between; padding: var(--s-2) 0; font-size: 0.95rem; color: var(--ink-600); }
.summary-total {
    font-size: var(--text-xl); font-weight: 700; color: var(--navy-800);
    border-top: 2px solid var(--line-strong); margin-top: var(--s-3); padding-top: var(--s-4);
}
.summary-note { color: var(--ink-400); font-size: var(--text-sm); margin-top: var(--s-4); }
.summary-muted { color: var(--ink-400); font-style: italic; }

/* ---------------- Alerts ---------------- */
.alert {
    display: flex; align-items: flex-start; gap: var(--s-3);
    padding: var(--s-4) var(--s-5); border-radius: var(--r-md);
    margin-bottom: var(--s-4); font-size: var(--text-sm); font-weight: 500;
}
.alert::before {
    content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%;
    margin-top: 7px; background: currentColor;
}
.alert-info { background: #eef2fa; color: var(--navy-700); border: 1px solid #d5deef; }
.alert-error { background: #faeeed; color: var(--red-600); border: 1px solid #eed3d0; }

/* ---------------- Suksesi ---------------- */
.success-box {
    max-width: 34rem; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: var(--s-4);
}
.success-icon {
    width: 88px; height: 88px; color: var(--green-600);
    background: #e8f4ed; border-radius: var(--r-arch);
    display: flex; align-items: center; justify-content: center;
}
.success-icon svg { width: 40px; height: 40px; }
.success-number { font-size: var(--text-lg); }
.success-number strong { font-family: var(--font-display); font-weight: 650; font-size: 1.3em; color: var(--navy-800); letter-spacing: 0.02em; }
.success-message { color: var(--ink-600); line-height: 1.7; }
.success-hint { color: var(--ink-400); font-size: var(--text-sm); }
.success-links { display: flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; }

/* ---------------- Statusi ---------------- */
.status-box { max-width: 34rem; }
.status-form {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-8); display: flex; flex-direction: column; gap: var(--s-5);
    margin-bottom: var(--s-6); box-shadow: var(--sh-sm);
}
.status-form label { font-weight: 650; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-600); display: block; margin-bottom: var(--s-2); }
.status-form input {
    width: 100%; padding: 13px 16px;
    border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
    font-family: var(--font-sans); font-size: var(--text-base); background: var(--cream-50);
}
.status-form input:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(184, 148, 74, 0.12); }
.status-result { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-8); }
.status-result-row {
    display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
    padding: var(--s-3) 0; border-bottom: 1px solid var(--line);
}
.status-result-row:last-child { border-bottom: none; }
.status-result-row strong { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.status-pill {
    padding: 5px 16px; border-radius: var(--r-pill); font-size: var(--text-sm); font-weight: 600;
    background: var(--cream-200); color: var(--navy-700);
}
.status-e_konfirmuar, .status-e_perfunduar { background: #e8f4ed; color: var(--green-600); }
.status-e_derguar { background: #eef2fa; color: var(--navy-700); }
.status-e_anuluar { background: #faeeed; color: var(--red-600); }

/* ---------------- Footer ---------------- */
.site-footer {
    position: relative;
    background: var(--navy-900); color: rgba(255, 255, 255, 0.72);
    margin-top: var(--s-16);
    overflow: hidden;
}
.footer-grid {
    position: relative;
    display: grid; grid-template-columns: 1.4fr 1fr 0.9fr;
    gap: var(--s-10);
    padding: var(--s-16) clamp(20px, 4vw, 40px) var(--s-12);
    max-width: 1240px; margin: 0 auto;
}
.footer-brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 560; color: #fff; margin-bottom: var(--s-3); }
.footer-title {
    color: var(--gold-400); font-weight: 700; font-size: var(--text-xs);
    text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: var(--s-4);
}
.footer-text { font-size: var(--text-sm); line-height: 1.7; max-width: 22rem; }
.footer-list { list-style: none; }
.footer-list li { padding: 2px 0; font-size: var(--text-sm); }
.footer-list a { display: inline-block; padding: 6px 0; margin: -2px 0; color: rgba(255, 255, 255, 0.72); }
.footer-list a:hover { color: var(--gold-400); }
.footer-social { display: flex; gap: var(--s-4); margin-top: var(--s-5); }
.footer-social a {
    color: var(--gold-400); font-weight: 600; font-size: var(--text-sm);
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
}
.footer-social a svg { width: 16px; height: 16px; }
.footer-social a:hover { color: #fff; }
.footer-bottom {
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding: var(--s-5) 0; font-size: var(--text-xs); color: rgba(255, 255, 255, 0.6);
}

/* ---------------- Toast ---------------- */
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 90px);
    z-index: 200;
    display: flex; align-items: center; gap: var(--s-3);
    background: var(--navy-800); color: #fff;
    padding: var(--s-4) var(--s-6); border-radius: var(--r-pill);
    box-shadow: var(--sh-lg); font-size: var(--text-sm); font-weight: 550;
    opacity: 0;
    transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
    pointer-events: none;
    max-width: min(92vw, 480px);
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 18px; height: 18px; color: var(--gold-400); flex: none; }

/* ---------------- Butonat lundrues ---------------- */
.wa-float {
    position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 90;
    width: 58px; height: 58px; border-radius: var(--r-pill);
    background: var(--wa-600); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 32px -8px rgba(23, 138, 66, 0.6);
    transition: transform 0.3s var(--ease), background 0.2s;
}
.wa-float:hover { background: var(--wa-700); color: #fff; transform: translateY(-4px) scale(1.04); }
.wa-float svg { width: 30px; height: 30px; }

.cart-float {
    position: fixed; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 90;
    display: flex; align-items: center; gap: var(--s-2);
    background: var(--navy-800); color: #fff;
    padding: 14px 22px; border-radius: var(--r-pill);
    box-shadow: var(--sh-lg);
    font-weight: 600; font-size: var(--text-sm);
    transition: transform 0.3s var(--ease), background 0.2s;
}
.cart-float:hover { background: var(--navy-900); color: #fff; transform: translateY(-4px); }
.cart-float svg { width: 19px; height: 19px; }

/* ---------------- Responsive ---------------- */
/* Desktop: der schwebende WhatsApp-Knopf ist redundant zum Header-Knopf */
@media (min-width: 681px) {
    .wa-float { display: none; }
}

@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-text { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { max-width: 460px; margin: 0 auto; }
    .book-detail { grid-template-columns: 1fr; }
    .book-detail-gallery { position: static; }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary { position: static; order: -1; }
    .books-layout { grid-template-columns: minmax(0, 1fr); }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .filters { position: static; }
    .filters-toggle { display: flex; }
    .filters-form { display: none; }
    .filters.is-open .filters-form { display: block; padding-top: var(--s-4); }
    .info-grid, .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
}

@media (max-width: 680px) {
    /* Header: eine Zeile Marke + Icons, Suche darunter */
    .header-inner { flex-wrap: wrap; gap: var(--s-2); }
    .header-search { order: 3; max-width: 100%; flex-basis: 100%; }
    .header-search input { font-size: 16px; } /* kundër auto-zoom në iOS */
    .header-search button { padding: 12px 18px; }
    .header-wa { display: none; } /* WhatsApp mbetet te butoni lundrues */
    .header-actions { margin-left: auto; }
    .brand { gap: var(--s-2); }
    .brand-name { font-size: 1rem; }
    .brand-mark { width: 40px; height: 40px; }
    .nav-toggle { display: flex; }

    /* Menyja mobile: overlay nën header, jo pjesë e rrjedhës */
    .site-nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--cream-50);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--sh-md);
        max-height: calc(100dvh - 140px);
        overflow-y: auto;
    }
    .site-nav.is-open { display: block; }
    .nav-inner { flex-direction: column; flex-wrap: nowrap; padding: var(--s-2) 0; }
    .nav-inner a { padding: var(--s-3) var(--s-5); font-size: var(--text-base); }
    .nav-inner a::after { display: none; }

    .wa-float { display: flex; }
    .toast { bottom: 96px; }

    .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-2); }

    .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
    .book-card-body { padding: var(--s-3) var(--s-4) var(--s-4); }
    .book-card-actions .btn { white-space: normal; padding: 12px 10px; }

    .sort-form select, .filter-group select, .filter-group input[type="number"] { font-size: 16px; }

    .form-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: var(--s-8); }

    /* Tabela e shportës si karta (pa scroll horizontal) */
    .cart-table { min-width: 0; }
    .cart-table thead { display: none; }
    .cart-table tr {
        display: grid; grid-template-columns: 1fr auto auto;
        gap: var(--s-2) var(--s-4); align-items: center;
        padding: var(--s-4) var(--s-5);
        border-bottom: 1px solid var(--line);
    }
    .cart-table tr:last-child { border-bottom: none; }
    .cart-table td { display: block; padding: 0; border: none; }
    .cart-table td:first-child { grid-column: 1 / -1; }
    .cart-summary { max-width: 100%; }

    .btn-lg, .btn-block { white-space: normal; }
    .btn-lg { width: 100%; padding: 14px 20px; }
    .hero-actions .btn-lg { width: auto; flex: 1 1 auto; min-width: 46%; }
    .qty-row { flex-wrap: wrap; }
    .qty-row .btn { flex: 1 1 100%; }
    .purchase-card .btn-lg { font-size: var(--text-sm); }
    .footer-bottom { padding-bottom: calc(var(--s-5) + 78px); }
}

/* Shumë e ngushtë: një kolonë */
@media (max-width: 359px) {
    .book-grid { grid-template-columns: 1fr; }
}
