/* ===== CSS Variables ===== */
:root {
    --cream: #faf8f3;
    --dark: #1a1208;
    --brown: #5c3d1e;
    --brown-light: #8b6340;
    --accent: #c0392b;
    --accent-hover: #a93226;
    --gold: #d4ac0d;
    --border: #e8dcc8;
    --text: #2c1d0e;
    --text-muted: #7a6352;
    --card-bg: #fffef9;
    --shadow: 0 2px 12px rgba(92,61,30,0.12);
    --shadow-lg: 0 8px 32px rgba(92,61,30,0.18);
}

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

body {
    font-family: 'Lato', sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Header ===== */
.site-header {
    background: var(--dark);
    padding: 1rem 0;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--cream); }
.logo-icon { font-size: 1.6rem; }
.logo-text { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { color: #c8b89a; text-decoration: none; font-weight: 300; transition: color .2s; }
.main-nav a:hover { color: var(--cream); }
.cart-link { display: flex; align-items: center; gap: .3rem; position: relative; }
.cart-badge {
    background: var(--accent); color: white; border-radius: 50%;
    width: 18px; height: 18px; font-size: .7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* ===== Main ===== */
.main-content { min-height: calc(100vh - 130px); padding-bottom: 3rem; }

/* ===== Alert ===== */
.alert-success {
    background: #d4edda; border: 1px solid #c3e6cb; color: #155724;
    padding: .75rem 1rem; border-radius: 6px; margin: 1rem 0;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--brown) 100%);
    padding: 5rem 0;
    position: relative; overflow: hidden;
}
.hero::before {
    content: '📖'; font-size: 18rem; opacity: .05;
    position: absolute; right: -2rem; top: -2rem; line-height: 1;
}
.hero-inner { position: relative; }
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--cream); line-height: 1.2; margin-bottom: 1rem;
}
.hero-title em { color: var(--gold); font-style: italic; }
.hero-sub { color: #c8b89a; font-size: 1.1rem; margin-bottom: 2rem; font-weight: 300; }

/* ===== Buttons ===== */
.btn {
    display: inline-block; padding: .65rem 1.4rem; border-radius: 4px;
    text-decoration: none; font-weight: 700; font-size: .9rem;
    cursor: pointer; border: 2px solid transparent; transition: all .2s;
}
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--brown); border-color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: white; }
.btn-sm { padding: .4rem .9rem; font-size: .8rem; }
.btn-full { width: 100%; text-align: center; margin-top: .5rem; }
.btn-large { padding: 1rem; font-size: 1rem; }

/* ===== Section ===== */
.featured { padding: 3rem 0; }
.section-title, .page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem; color: var(--dark); margin-bottom: 1.5rem;
}

/* ===== Book Grid ===== */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}
.book-card {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden; box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.book-cover-placeholder {
    height: 200px; background: var(--brown);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-size: 4rem;
    color: rgba(255,255,255,0.4); text-decoration: none;
}
.book-cover-link { display: block; }
.book-cover-placeholder.large { height: 360px; font-size: 7rem; border-radius: 8px; }

.book-info { padding: 1rem; }
.book-genre { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brown-light); font-weight: 700; }
.book-info h3 { margin: .3rem 0 .2rem; font-family: 'Playfair Display', serif; font-size: 1rem; }
.book-info h3 a { color: var(--dark); text-decoration: none; }
.book-info h3 a:hover { color: var(--accent); }
.book-author { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }
.book-footer { display: flex; align-items: center; justify-content: space-between; }
.book-price { color: var(--accent); font-size: 1.1rem; font-weight: 700; }

/* ===== Catalog page ===== */
.catalog-page { padding-top: 2rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; align-items: center; }
.search-input, .select-input {
    padding: .6rem .9rem; border: 1px solid var(--border);
    border-radius: 4px; font-family: 'Lato', sans-serif; font-size: .9rem;
    background: white; color: var(--text);
}
.search-input { flex: 1; min-width: 200px; }
.result-count { margin-bottom: 1rem; color: var(--text-muted); font-size: .9rem; }
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }

/* ===== Detail page ===== */
.detail-page { padding: 2rem 0; }
.back-link { color: var(--brown-light); text-decoration: none; font-size: .9rem; display: inline-block; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: start; }
.detail-title { font-family: 'Playfair Display', serif; font-size: 2.2rem; margin: .5rem 0; }
.detail-author { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 1.05rem; }
.detail-description { line-height: 1.8; margin-bottom: 2rem; font-weight: 300; color: #3d2c1a; }
.detail-purchase { display: flex; flex-direction: column; gap: .75rem; }
.detail-price { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stock-ok { color: #27ae60; font-size: .9rem; }
.stock-out { color: var(--accent); font-size: .9rem; }
.add-to-cart-form { margin-top: .5rem; }
.qty-row { display: flex; align-items: center; gap: 1rem; }
.qty-input { width: 70px; padding: .5rem; border: 1px solid var(--border); border-radius: 4px; text-align: center; font-size: 1rem; }
.qty-input.small { width: 60px; font-size: .85rem; }

/* ===== Cart page ===== */
.cart-page { padding: 2rem 0; }
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
    display: flex; align-items: center; gap: 1rem;
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 8px; padding: 1rem;
}
.cart-item-cover {
    width: 60px; height: 80px; border-radius: 4px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-size: 1.8rem; color: rgba(255,255,255,.4);
}
.cart-item-info { flex: 1; }
.cart-item-info strong { display: block; font-family: 'Playfair Display', serif; }
.cart-item-info span { display: block; font-size: .85rem; color: var(--text-muted); }
.item-price-unit { font-weight: 700; color: var(--text-muted) !important; }
.cart-item-actions { display: flex; align-items: center; gap: .75rem; }
.item-total { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.inline-form { display: inline; }
.btn-remove {
    background: none; border: 1px solid #ddd; color: #999; cursor: pointer;
    width: 28px; height: 28px; border-radius: 50%; font-size: .8rem;
    transition: all .2s;
}
.btn-remove:hover { background: var(--accent); border-color: var(--accent); color: white; }

/* Cart summary */
.cart-summary {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 8px; padding: 1.5rem; box-shadow: var(--shadow);
}
.cart-summary h3 { font-family: 'Playfair Display', serif; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: .5rem; font-size: .9rem; }
.summary-total { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 700; padding-top: .75rem; border-top: 2px solid var(--border); margin-top: .75rem; }
.free-shipping-hint { font-size: .8rem; color: var(--brown-light); margin: .5rem 0 1rem; }
.summary-item { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .9rem; }

/* ===== Checkout page ===== */
.checkout-page { padding: 2rem 0; max-width: 900px; }
.checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.checkout-form h2, .order-summary h2 { font-family: 'Playfair Display', serif; margin-bottom: 1.2rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: .4rem; color: var(--brown); }
.form-group input, .form-group textarea {
    width: 100%; padding: .75rem; border: 1px solid var(--border);
    border-radius: 4px; font-family: 'Lato', sans-serif; font-size: .95rem;
    transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--brown); }
.form-group textarea { min-height: 100px; resize: vertical; }
.field-error { color: var(--accent); font-size: .8rem; }
.order-summary {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 8px; padding: 1.5rem; box-shadow: var(--shadow);
}
.order-summary hr { border: none; border-top: 1px solid var(--border); margin: .75rem 0; }

/* ===== Confirmation ===== */
.confirmation-page { padding: 3rem 0; max-width: 600px; margin: 0 auto; }
.confirmation-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 2.5rem; text-align: center; box-shadow: var(--shadow-lg); }
.confirmation-icon { font-size: 4rem; color: #27ae60; margin-bottom: 1rem; }
.confirmation-box h1 { font-family: 'Playfair Display', serif; margin-bottom: 1rem; }
.confirmation-box p { color: var(--text-muted); margin-bottom: .5rem; }
.confirmation-items { text-align: left; margin: 1.5rem 0; padding: 1.5rem; background: var(--cream); border-radius: 8px; }
.confirmation-items h3 { font-family: 'Playfair Display', serif; margin-bottom: 1rem; }
.confirmation-items hr { border: none; border-top: 1px solid var(--border); margin: .5rem 0; }

/* ===== Footer ===== */
.site-footer { background: var(--dark); color: #8a7060; padding: 1.5rem 0; text-align: center; font-size: .85rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .detail-grid, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .detail-cover { max-width: 260px; }
    .hero-title { font-size: 2rem; }
    .cart-item { flex-wrap: wrap; }
}

/* ===== Header search ===== */
.header-search { display: flex; align-items: center; gap: 0; }
.header-search-input {
    padding: .4rem .8rem; border: 1px solid rgba(255,255,255,.2);
    border-right: none; border-radius: 4px 0 0 4px;
    background: rgba(255,255,255,.1); color: var(--cream);
    font-family: 'Lato', sans-serif; font-size: .85rem; width: 160px;
    transition: all .2s;
}
.header-search-input::placeholder { color: rgba(255,255,255,.4); }
.header-search-input:focus { outline: none; background: rgba(255,255,255,.18); width: 200px; }
.header-search-btn {
    padding: .4rem .7rem; background: var(--brown-light); border: none;
    border-radius: 0 4px 4px 0; cursor: pointer; font-size: .85rem; transition: background .2s;
}
.header-search-btn:hover { background: var(--accent); }

/* ===== Author page ===== */
.author-page { padding: 2rem 0; }
.author-header {
    display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem;
    align-items: start; margin-bottom: 3rem;
}
.author-photo-wrap { width: 220px; }
.author-photo {
    width: 220px; height: 280px; object-fit: cover; object-position: center top;
    border-radius: 8px; display: block; box-shadow: var(--shadow-lg);
}
.author-photo-placeholder {
    width: 220px; height: 280px; background: var(--brown);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-size: 5rem; color: rgba(255,255,255,.3);
}
.author-name { font-family: 'Playfair Display', serif; font-size: 2.2rem; margin-bottom: .75rem; }
.author-facts { display: flex; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.author-facts span { color: var(--text-muted); font-size: .9rem; }
.author-bio { line-height: 1.8; color: #3d2c1a; font-weight: 300; max-width: 680px; }

/* Author link in book detail */
.author-link { color: var(--brown); text-decoration: none; font-weight: 700; border-bottom: 1px dotted var(--brown-light); }
.author-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Author grid (search results) */
.author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.author-card {
    display: flex; align-items: center; gap: 1rem;
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 8px; padding: 1rem; text-decoration: none; color: var(--text);
    box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.author-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.author-card-photo { width: 64px; height: 80px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.author-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-card-photo .author-photo-placeholder { width: 64px; height: 80px; font-size: 1.8rem; border-radius: 4px; }
.author-card-info { display: flex; flex-direction: column; gap: .2rem; }
.author-card-info strong { font-family: 'Playfair Display', serif; font-size: 1rem; }
.author-card-info span { font-size: .8rem; color: var(--text-muted); }

/* Loose author tags */
.loose-authors { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.loose-author-tag {
    background: #f0ece4; color: var(--brown); padding: .4rem .9rem;
    border-radius: 20px; text-decoration: none; font-size: .85rem; font-weight: 700;
    border: 1px solid var(--border); transition: all .2s;
}
.loose-author-tag:hover { background: var(--brown); color: white; }

@media (max-width: 768px) {
    .author-header { grid-template-columns: 1fr; }
    .author-photo-wrap { max-width: 160px; }
}

/* ===== Live search ===== */
.search-wrap { position: relative; }

.header-search { display: flex; align-items: center; }
.header-search-input {
    padding: .45rem 1rem; border: 1px solid rgba(255,255,255,.2);
    border-right: none; border-radius: 4px 0 0 4px;
    background: rgba(255,255,255,.1); color: var(--cream);
    font-family: 'Lato', sans-serif; font-size: .88rem; width: 240px;
    transition: all .2s;
}
.header-search-input::placeholder { color: rgba(255,255,255,.4); }
.header-search-input:focus { outline: none; background: rgba(255,255,255,.18); width: 280px; }
.header-search-btn {
    padding: .45rem .8rem; background: var(--brown-light); color: white;
    border: none; border-radius: 0 4px 4px 0; cursor: pointer;
    font-size: .9rem; transition: background .2s;
}
.header-search-btn:hover { background: var(--accent); }

/* Dropdown */
.search-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); left: 0;
    width: 420px; background: white; border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.18);
    z-index: 1000; max-height: 520px; overflow-y: auto;
}
.search-dropdown.open { display: block; }

.sd-section-label {
    padding: .5rem 1rem .25rem; font-size: .7rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--text-muted); font-weight: 700;
    border-top: 1px solid var(--border);
}
.sd-section-label:first-child { border-top: none; }

.sd-item {
    display: flex; align-items: center; gap: .85rem;
    padding: .65rem 1rem; text-decoration: none; color: var(--text);
    transition: background .12s; cursor: pointer;
}
.sd-item:hover, .sd-item.active { background: #faf7f2; }

/* Book item */
.sd-cover {
    width: 42px; height: 56px; flex-shrink: 0; border-radius: 3px;
    overflow: hidden; background: #e8e0d0;
    display: flex; align-items: center; justify-content: center;
}
.sd-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-placeholder {
    width: 100%; height: 100%; background: var(--brown);
    align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-size: 1.3rem;
    color: rgba(255,255,255,.4);
}
.sd-book-info { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.sd-title { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-author { font-size: .8rem; color: var(--text-muted); }
.sd-meta { display: flex; align-items: center; gap: .6rem; margin-top: .1rem; }
.sd-price { font-weight: 700; font-size: .85rem; color: var(--accent); }
.sd-stock { font-size: .75rem; padding: .1rem .45rem; border-radius: 10px; font-weight: 700; }
.sd-stock.ok  { background: #d1fae5; color: #065f46; }
.sd-stock.low { background: #fef3c7; color: #92400e; }
.sd-stock.out { background: #fee2e2; color: #991b1b; }

/* Author item */
.sd-author-img {
    width: 38px; height: 48px; flex-shrink: 0; border-radius: 3px;
    overflow: hidden; background: #e8e0d0;
    display: flex; align-items: center; justify-content: center;
}
.sd-author-info strong { font-size: .92rem; }

/* All results link */
.sd-all {
    display: block; padding: .7rem 1rem; text-align: center;
    font-size: .85rem; color: var(--brown); text-decoration: none;
    border-top: 1px solid var(--border); background: #faf7f2;
    transition: background .12s; border-radius: 0 0 8px 8px;
}
.sd-all:hover, .sd-all.active { background: #f0ece4; color: var(--accent); }

.sd-empty { padding: 1rem; text-align: center; color: var(--text-muted); font-size: .9rem; }

/* ===== Checkout formulář ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-bottom: .5rem;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

    .delivery-option:has(input:checked) {
        border-color: var(--brown);
        background: #faf7f2;
    }

    .delivery-option input[type="radio"] {
        accent-color: var(--brown);
    }

.delivery-option-body {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

    .delivery-option-body strong {
        font-size: .95rem;
    }

    .delivery-option-body span {
        font-size: .82rem;
        color: var(--text-muted);
    }

.form-hint {
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: -.5rem;
}

    .form-hint a {
        color: var(--brown);
    }

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Stránkování ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-block;
    padding: .5rem .9rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--brown);
    font-size: .9rem;
    transition: all .15s;
}

    .page-btn:hover {
        background: var(--brown);
        color: white;
        border-color: var(--brown);
    }

    .page-btn.active {
        background: var(--dark);
        color: white;
        border-color: var(--dark);
        font-weight: 700;
    }

.page-dots {
    color: var(--text-muted);
    padding: 0 .3rem;
}

/* ===== Info stránky ===== */
.info-page {
    padding: 2rem 0 3rem;
    max-width: 900px;
}

.info-updated {
    color: var(--text-muted);
    font-size: .85rem;
    margin-bottom: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

    .info-card h2 {
        font-family: 'Playfair Display', serif;
        font-size: 1.15rem;
        margin-bottom: 1rem;
        color: var(--dark);
    }

    .info-card p {
        line-height: 1.7;
        color: #3d2c1a;
        font-weight: 300;
    }

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

    .info-table th {
        text-align: left;
        padding: .5rem .75rem;
        border-bottom: 2px solid var(--border);
        font-size: .8rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--text-muted);
    }

    .info-table td {
        padding: .6rem .75rem;
        border-bottom: 1px solid #f0ece4;
    }

    .info-table tr:last-child td {
        border-bottom: none;
    }

.highlight-row td {
    background: #fef9e7;
    font-weight: 700;
    color: var(--brown);
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

    .info-list li {
        font-size: .95rem;
    }

    .info-list a {
        color: var(--brown);
        text-decoration: none;
    }

        .info-list a:hover {
            color: var(--accent);
        }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* Footer */
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem 0 1.5rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

    .footer-col p {
        font-size: .85rem;
        color: #8a7060;
        margin-top: .3rem;
        font-weight: 300;
    }

    .footer-col strong {
        color: #c8b89a;
        font-size: .85rem;
        text-transform: uppercase;
        letter-spacing: .06em;
        margin-bottom: .3rem;
    }

    .footer-col a {
        color: #8a7060;
        text-decoration: none;
        font-size: .9rem;
        transition: color .15s;
    }

        .footer-col a:hover {
            color: var(--cream);
        }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 1rem 0;
    text-align: center;
}

    .footer-bottom p {
        color: #5a4a3a;
        font-size: .82rem;
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ===== Announcement bar ===== */
.announcement-bar {
    background: var(--brown);
    color: #f0e8d8;
    text-align: center;
    padding: .55rem 1rem;
    font-size: .85rem;
    font-weight: 400;
    letter-spacing: .01em;
}

/* ===== Podobné knihy ===== */
.similar-books {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* ===== Badges ===== */
.book-card {
    position: relative;
}

.book-badges {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .7rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    backdrop-filter: blur(4px);
    animation: badgeFadeIn .4s ease both;
}

@keyframes badgeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/*.badge.new {
    background: #166534;
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.35);
}

.badge.bestseller {
    background: #9d174d;
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(157, 23, 77, 0.35);
}

.badge.discount {
    background: #b45309;
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.35);
}*/
.badge.new {
    background: linear-gradient(135deg, #a8a49d, #e8d5a3);
    color: #3d2c0a;
    border: none;
    box-shadow: 0 2px 8px rgba(180, 140, 40, 0.4);
}

.badge.bestseller {
    background: linear-gradient(135deg, #b8972a, #d4b96a);
    color: #3d2c0a;
    border: none;
    box-shadow: 0 2px 8px rgba(180, 140, 40, 0.4);
}

.badge.discount {
    background: linear-gradient(135deg, #d4a017, #f0c84a);
    color: #3d2c0a;
    border: none;
    box-shadow: 0 2px 8px rgba(180, 140, 40, 0.4);
}
/* Na kartičce – přes obrázek */
.book-cover-link {
    position: relative;
}

    .book-cover-link .book-badges {
        position: absolute;
        bottom: .6rem;
        right: .6rem;
        z-index: 2;
        flex-direction: column;
        align-items: flex-end;
    }

/* Při hoveru na kartu se badge lehce zvětší */
.book-card:hover .badge {
    transform: scale(1.2);
    transition: transform .2s ease;
}

/* Ceny se slevou */
.price-wrap {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.book-price-original {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 400;
}

    .book-price-original.large {
        font-size: 1rem;
    }

.book-price.discounted {
    color: #9d174d;
}

.detail-price.discounted {
    color: #9d174d;
}

/* ===== Carousel ===== */
.carousel-section {
    overflow: hidden;
}

.carousel {
    position: relative;
    width: 100%;
    height: 480px;
    background: var(--dark);
}

/* Track není potřeba pro pozicování */
.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Každý slide je absolutně pozicovaný přes celý carousel */
.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .7s ease;
    pointer-events: none;
}

    .carousel-slide.active {
        opacity: 1;
        pointer-events: auto;
    }

/* Rozmazané pozadí */
.carousel-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.carousel-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px) brightness(.45) saturate(1.3);
    transform: scale(1.08);
    display: block;
}

.carousel-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(15,8,3,.8) 35%, rgba(15,8,3,.2));
}

/* Obsah slidu */
.carousel-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 2rem 5rem;
    max-width: 1100px;
    margin: 0 auto;
    left: 0;
    right: 0;
}

.carousel-cover {
    flex-shrink: 0;
    width: 190px;
    height: 270px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.carousel-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-info {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    color: white;
    max-width: 500px;
}

.carousel-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 2.8vw, 2.4rem);
    line-height: 1.25;
    color: white;
    margin: 0;
}

.carousel-subtitle {
    font-size: .95rem;
    color: rgba(255,255,255,.7);
    font-weight: 300;
    margin: 0;
}

.carousel-price {
    display: flex;
    align-items: baseline;
    gap: .75rem;
}

.carousel-price-current {
    font-size: 1.7rem;
    font-weight: 700;
    color: #e8c84a;
}

.carousel-price-original {
    font-size: .95rem;
    color: rgba(255,255,255,.45);
    text-decoration: line-through;
}

.carousel-btn {
    align-self: flex-start;
    margin-top: .25rem;
}

/* Šipky */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    padding: 0;
}

    .carousel-arrow:hover {
        background: rgba(255,255,255,.28);
    }

    .carousel-arrow.prev {
        left: 1.5rem;
    }

    .carousel-arrow.next {
        right: 1.5rem;
    }

/* Tečky */
.carousel-dots {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .45rem;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all .3s;
}

    .carousel-dot.active {
        background: white;
        width: 26px;
        border-radius: 4px;
    }

@media (max-width: 768px) {
    .carousel {
        height: 380px;
    }

    .carousel-content {
        padding: 1.5rem 2rem;
        gap: 1.5rem;
    }

    .carousel-cover {
        width: 110px;
        height: 155px;
    }

    .carousel-arrow.prev {
        left: .5rem;
    }

    .carousel-arrow.next {
        right: .5rem;
    }
}

/* ===== Výpůjčky ===== */
.rental-banner {
    background: linear-gradient(135deg, #1a4a6b 0%, #2d6a9f 100%);
    padding: .9rem 0;
}

.rental-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.rental-banner-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.rental-banner-icon {
    font-size: 1.8rem;
}

.rental-banner-text strong {
    display: block;
    font-size: 1rem;
}

.rental-banner-text span {
    font-size: .88rem;
    opacity: .85;
}

.rental-banner-example {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: rgba(255,255,255,.12);
    padding: .5rem 1rem;
    border-radius: 6px;
    color: white;
    font-size: .88rem;
    flex-wrap: wrap;
}

    .rental-banner-example strong {
        color: #a8d8ff;
    }

.btn-rental {
    background: #1a4a6b;
    color: white;
    border-color: #1a4a6b;
}

    .btn-rental:hover {
        background: #0f3352;
        border-color: #0f3352;
    }

.btn-rental-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,.5);
    padding: .3rem .8rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: .82rem;
    transition: background .2s;
}

    .btn-rental-outline:hover {
        background: rgba(255,255,255,.15);
    }

.purchase-options {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.purchase-option {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.purchase-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    font-weight: 700;
}

.rent-price {
    color: #1a4a6b;
}

.rent-note {
    font-size: .78rem;
    color: var(--text-muted);
}

.rental-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    font-size: .75rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 4px;
    margin-bottom: .2rem;
}

@media (max-width: 768px) {
    .rental-banner-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== Catalog layout se sidebarem ===== */
.catalog-page {
    padding-top: 2rem;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Sidebar */
.catalog-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-block {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: .8rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border);
}

.genre-filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.genre-filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .6rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: .88rem;
    transition: background .15s, color .15s, transform .15s;
}

    .genre-filter-item:hover {
        background: #f0ece4;
        transform: translateX(2px);
    }

    .genre-filter-item.active {
        background: var(--brown);
        color: white;
        font-weight: 700;
    }

        .genre-filter-item.active .genre-count {
            background: rgba(255,255,255,.25);
            color: white;
        }

.genre-count {
    background: #ece4d4;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: 12px;
    min-width: 22px;
    text-align: center;
}

/* Toolbar nad gridem */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: .75rem;
}

.sort-form {
    display: flex;
}

/* Aktivní filtry – tagy */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: #f0ece4;
    color: var(--brown);
    border: 1px solid var(--border);
    padding: .35rem .8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 700;
    transition: all .15s;
}

    .filter-tag:hover {
        background: var(--accent);
        color: white;
        border-color: var(--accent);
    }

    .filter-tag.clear-all {
        background: transparent;
        border: 1px dashed var(--text-muted);
        color: var(--text-muted);
    }

        .filter-tag.clear-all:hover {
            background: var(--dark);
            color: white;
            border-color: var(--dark);
        }

/* Hover efekt na kartě – rychlé přidání do košíku */
.book-cover-link {
    position: relative;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
    display: block;
}

.book-cover-wrap {
    transition: transform .35s ease;
}

.book-card:hover .book-cover-wrap {
    transform: scale(1.06);
}

.quick-add-form {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 3;
    transform: translateY(100%);
    transition: transform .3s ease;
}

.book-card:hover .quick-add-form {
    transform: translateY(0);
}

.quick-add-btn {
    width: 100%;
    border: none;
    background: rgba(26, 18, 8, 0.88);
    color: white;
    padding: .65rem;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .2s;
}

    .quick-add-btn:hover {
        background: var(--accent);
    }

@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-sidebar {
        position: static;
    }
}
/* ===== Background decoration ===== */
.bg-decoration {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-decoration-left,
.bg-decoration-right {
    position: absolute;
    top: 0;
    height: 130vh;
    width: calc((100vw - 1100px) / 2 + 60px);
    min-width: 180px;
    will-change: transform;
}

.bg-decoration-left {
    left: 0;
}

.bg-decoration-right {
    right: 0;
}

@media (max-width: 1300px) {
    .bg-decoration {
        display: none;
    }
}

/* ===== Cookie banner ===== */
.cookie-page {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 320px;
    min-height: 260px;
    background: #faf6ed;
    border-radius: 4px 8px 8px 4px;
    padding: 1.6rem 1.5rem 1.2rem;
    z-index: 9999;
    box-shadow: 2px 2px 8px rgba(0,0,0,.15), 4px 4px 16px rgba(0,0,0,.1), 0 0 0 1px rgba(92,61,30,.12);
    /* Linka jako stránka knihy vlevo */
    border-left: 4px solid #d4b896;
    /* Subtilní linkování jako stránka */
    background-image: repeating-linear-gradient( transparent, transparent 27px, rgba(92,61,30,.07) 27px, rgba(92,61,30,.07) 28px );
    transform: translateX(calc(100% + 3rem)) rotate(3deg);
    opacity: 0;
    transition: transform .6s cubic-bezier(.34,1.4,.64,1), opacity .4s ease;
    transform-origin: left center;
}

    .cookie-page.visible {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }

    .cookie-page.page-turn {
        transform: translateX(calc(100% + 3rem)) rotate(-8deg);
        opacity: 0;
        transition: transform .7s ease-in, opacity .5s ease;
    }

/* Page curl roh vpravo dole */
.cookie-curl {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 2;
    background: linear-gradient( 225deg, #e8dcc8 45%, rgba(92,61,30,.15) 50%, #faf6ed 52% );
    border-radius: 4px 0 8px 0;
    transition: width .3s ease, height .3s ease, box-shadow .3s ease;
    box-shadow: -2px -2px 6px rgba(0,0,0,.1);
}

.cookie-page:hover .cookie-curl,
.cookie-page.curling .cookie-curl {
    width: 60px;
    height: 60px;
    box-shadow: -4px -4px 12px rgba(0,0,0,.18);
    background: linear-gradient( 225deg, #d4c4a8 45%, rgba(92,61,30,.2) 50%, #faf6ed 52% );
}

/* Obsah */
.cookie-page-content {
    position: relative;
    z-index: 1;
}

.cookie-book-icon {
    font-size: 1.8rem;
    margin-bottom: .6rem;
    display: block;
    animation: bookWobble 3s ease-in-out infinite;
}

@keyframes bookWobble {
    0%, 100% {
        transform: rotate(-4deg) scale(1);
    }

    50% {
        transform: rotate(4deg) scale(1.05);
    }
}

.cookie-title {
    font-family: 'Playfair Display', serif;
    font-size: .98rem;
    color: var(--dark);
    margin-bottom: .5rem;
    line-height: 1.35;
    font-style: italic;
}

.cookie-text {
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1rem;
    font-weight: 300;
}

.cookie-link {
    color: var(--brown);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dotted var(--brown-light);
}

    .cookie-link:hover {
        color: var(--accent);
    }

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.cookie-btn {
    width: 100%;
    padding: .55rem 1rem;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    border: none;
    text-align: center;
}

    .cookie-btn.accept {
        background: var(--brown);
        color: #faf6ed;
    }

        .cookie-btn.accept:hover {
            background: var(--dark);
        }

    .cookie-btn.decline {
        background: transparent;
        color: var(--text-muted);
        border: 1px solid var(--border);
    }

        .cookie-btn.decline:hover {
            background: #f0ece4;
            color: var(--text);
        }

/* Číslo stránky */
.cookie-page-number {
    text-align: center;
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: .9rem;
    font-style: italic;
    opacity: .6;
}

@media (max-width: 480px) {
    .cookie-page {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 1rem;
    }
}
code {
    font-family: 'Courier New', monospace;
    font-size: .82rem;
    background: #f0ece4;
    color: var(--brown);
    padding: .1rem .4rem;
    border-radius: 3px;
}


/* ===== Demo popup ===== */
.demo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 8, 3, .65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

    .demo-overlay.visible {
        opacity: 1;
        pointer-events: auto;
    }

.demo-modal {
    background: var(--cream);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 420px;
    width: calc(100% - 2rem);
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,.3);
    transform: scale(.92) translateY(12px);
    transition: transform .35s cubic-bezier(.34,1.4,.64,1);
}

.demo-overlay.visible .demo-modal {
    transform: scale(1) translateY(0);
}

.demo-modal-icon {
    font-size: 3rem;
    margin-bottom: .75rem;
}

.demo-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: .75rem;
}

.demo-modal-text {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: .75rem;
    font-weight: 300;
}

.demo-modal-hint {
    font-size: .8rem;
    color: var(--brown-light);
    background: #f0ece4;
    border-radius: 6px;
    padding: .6rem 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.demo-modal-btn {
    background: var(--brown);
    color: white;
    border: none;
    padding: .7rem 2rem;
    border-radius: 6px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s;
}

    .demo-modal-btn:hover {
        background: var(--dark);
    }

/* ===== Hamburger – knihy na sobě ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background .2s;
}

    .hamburger:hover {
        background: rgba(255,255,255,.1);
    }

.book-spine {
    display: block;
    height: 5px;
    border-radius: 1px;
    transition: all .35s cubic-bezier(.4,0,.2,1);
    transform-origin: left center;
}

    /* Tři různě barevné a různě dlouhé „hřbety knih" */
    .book-spine:nth-child(1) {
        width: 28px;
        background: linear-gradient(90deg, #c0392b, #e74c3c);
    }

    .book-spine:nth-child(2) {
        width: 22px;
        background: linear-gradient(90deg, #d4ac0d, #f1c40f);
    }

    .book-spine:nth-child(3) {
        width: 26px;
        background: linear-gradient(90deg, #5c3d1e, #8b6340);
    }

/* Animace při otevření – knihy se „rozlétnou" */
.hamburger.active .book-spine:nth-child(1) {
    transform: rotate(45deg) translateY(1px);
    width: 26px;
    background: linear-gradient(90deg, #c0392b, #e74c3c);
}

.hamburger.active .book-spine:nth-child(2) {
    transform: scaleX(0);
    opacity: 0;
}

.hamburger.active .book-spine:nth-child(3) {
    transform: rotate(-45deg) translateY(-1px);
    width: 26px;
}

/* ===== Mobilní overlay ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,8,3,.5);
    backdrop-filter: blur(3px);
    z-index: 200;
    opacity: 0;
    transition: opacity .3s ease;
}

    .mobile-overlay.open {
        display: block;
        opacity: 1;
    }

/* ===== Mobilní drawer ===== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    background: #faf6ed;
    z-index: 201;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Efekt stránky knihy */
    border-left: 5px solid #d4b896;
    box-shadow: -8px 0 32px rgba(0,0,0,.2);
    /* Jemné linkování jako stránka */
    background-image: repeating-linear-gradient( transparent, transparent 35px, rgba(92,61,30,.06) 35px, rgba(92,61,30,.06) 36px );
}

    .mobile-nav.open {
        transform: translateX(0);
    }

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 2px solid #e8d8c0;
    background: var(--dark);
    flex-shrink: 0;
}

.mobile-nav-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--cream);
    font-weight: 700;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: #9e8a78;
    font-size: 1.1rem;
    cursor: pointer;
    padding: .3rem;
    transition: color .2s;
}

    .mobile-nav-close:hover {
        color: var(--cream);
    }

/* Vyhledávání */
.mobile-search {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e8d8c0;
    flex-shrink: 0;
}

.mobile-search-input {
    width: 100%;
    padding: .65rem .9rem;
    border: 1px solid #d4b896;
    border-radius: 4px 4px 0 0;
    font-family: 'Lato', sans-serif;
    font-size: .9rem;
    background: white;
    color: var(--text);
    border-bottom: none;
}

    .mobile-search-input:focus {
        outline: none;
        border-color: var(--brown);
    }

.mobile-search-btn {
    width: 100%;
    padding: .6rem;
    background: var(--brown);
    color: white;
    border: none;
    border-radius: 0 0 4px 4px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    transition: background .2s;
}

    .mobile-search-btn:hover {
        background: var(--dark);
    }

/* Navigační odkazy */
.mobile-nav-links {
    list-style: none;
    padding: .5rem 0;
    flex: 1;
}

    .mobile-nav-links li a {
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: .85rem 1.5rem;
        text-decoration: none;
        color: var(--text);
        font-size: .95rem;
        transition: background .15s, padding-left .15s;
        border-bottom: 1px solid rgba(92,61,30,.06);
    }

        .mobile-nav-links li a:hover {
            background: rgba(92,61,30,.06);
            padding-left: 1.9rem;
        }

.mobile-nav-divider {
    height: 1px;
    background: #d4b896;
    margin: .5rem 1.2rem;
}

.mobile-cart-badge {
    margin-left: auto;
}

/* Footer draweru */
.mobile-nav-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e8d8c0;
    flex-shrink: 0;
}

    .mobile-nav-footer p {
        font-size: .75rem;
        color: var(--text-muted);
        text-align: center;
        font-style: italic;
    }

/* ===== Responzivita ===== */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* ===== Admin záložka ===== */
.admin-tab {
    position: fixed;
    left: 0;
    bottom: 120px;
    z-index: 500;
    display: flex;
    align-items: flex-end;
    transform: translateX(calc(-100% + 44px));
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
    filter: drop-shadow(4px 4px 12px rgba(0,0,0,.25));
}

    .admin-tab:hover,
    .admin-tab.open {
        transform: translateX(0);
    }

/* Vertikální popisek – záložka */
.admin-tab-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 44px;
    padding: 1rem .5rem;
    background: linear-gradient(180deg, #d4ac0d 0%, #8b6340 60%, #5c3d1e 100%);
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    flex-shrink: 0;
    order: 2;
    writing-mode: horizontal-tb;
}

.admin-tab-handle-icon {
    font-size: 1.2rem;
    animation: gearSpin 8s linear infinite;
}

@keyframes gearSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.admin-tab-handle-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    color: white;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* Panel obsahu */
.admin-tab-panel {
    width: 280px;
    background: linear-gradient(135deg, #2c1d0e 0%, #5c3d1e 50%, #8b6340 100%);
    border-radius: 0 12px 12px 0;
    padding: 1.4rem 1.2rem;
    order: 1;
    position: relative;
    overflow: hidden;
}

    /* Dekorativní prvek pozadí */
    .admin-tab-panel::before {
        content: '⚙';
        position: absolute;
        right: -20px;
        bottom: -20px;
        font-size: 8rem;
        opacity: .05;
        line-height: 1;
    }

.admin-tab-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .75rem;
}

.admin-tab-badge {
    background: var(--gold);
    color: var(--dark);
    font-size: .65rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 12px;
    letter-spacing: .08em;
}

.admin-tab-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--cream);
    font-weight: 700;
}

.admin-tab-text {
    font-size: .8rem;
    color: rgba(255,255,255,.65);
    line-height: 1.6;
    margin-bottom: .9rem;
    font-weight: 300;
}

.admin-tab-url {
    background: rgba(0,0,0,.25);
    border-radius: 6px;
    padding: .5rem .75rem;
    margin-bottom: .9rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.admin-tab-url-label {
    font-size: .7rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.admin-tab-url-code {
    font-family: 'Courier New', monospace;
    font-size: .78rem;
    color: var(--gold);
    background: none;
    padding: 0;
    word-break: break-all;
}

.admin-tab-btn {
    display: block;
    width: 100%;
    padding: .6rem 1rem;
    background: linear-gradient(90deg, var(--gold), #e8c84a);
    color: var(--dark);
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: .85rem;
    transition: all .2s;
    margin-bottom: .9rem;
}

    .admin-tab-btn:hover {
        background: linear-gradient(90deg, #e8c84a, var(--gold));
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(212,172,13,.4);
    }

.admin-tab-features {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

    .admin-tab-features span {
        font-size: .72rem;
        color: rgba(255,255,255,.55);
        background: rgba(255,255,255,.08);
        padding: .2rem .5rem;
        border-radius: 12px;
    }

@media (max-width: 768px) {
    .admin-tab {
        bottom: 80px;
    }

    .admin-tab-panel {
        width: 240px;
    }
}


/* ===== Mobilní detail knihy, autora a podobné knihy ===== */
@media (max-width: 768px) {

    /* Detail knihy */
    .detail-page {
        padding: 1rem 1rem 2rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .detail-cover {
        display: flex;
        justify-content: center;
    }

    .book-cover-wrap.large {
        width: 180px;
        height: 260px;
        margin: 0 auto;
    }

    .detail-info {
        text-align: center;
        padding: 0 .5rem;
    }

    .detail-title {
        font-size: 1.6rem;
    }

    .detail-author {
        justify-content: center;
    }

    .detail-purchase {
        align-items: center;
    }

    .purchase-options {
        justify-content: center;
    }

    .qty-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stock-ok,
    .stock-out {
        text-align: center;
    }

    /* Detail autora */
    .author-page {
        padding: 1rem 1rem 2rem;
    }

    .author-header {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        text-align: center;
    }

    .author-photo-wrap {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .author-photo,
    .author-photo-placeholder {
        width: 160px;
        height: 200px;
        margin: 0 auto;
    }

    .author-name {
        font-size: 1.7rem;
    }

    .author-facts {
        justify-content: center;
    }

    .author-bio {
        text-align: left;
    }

    /* Podobné knihy */
    .similar-books {
        padding: 1.5rem 0;
    }

        .similar-books .book-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }

        .similar-books .book-info {
            padding: .75rem;
        }

            .similar-books .book-info h3 {
                font-size: .88rem;
            }

    /* Obecný padding kontejneru na mobilu */
    .container {
        padding: 0 1rem;
    }

    .back-link {
        margin-left: .25rem;
    }
}