/* stufflebox - Mobile First CSS */

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

:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --success: #2a9d8f;
    --warning: #f4a261;
    --bg: #f8f9fa;
    --white: #ffffff;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 100px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Burger Button (mobile only) */
.burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px 6px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.2s;
}

.header-wishlist-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 15px;
    color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
    font-weight: 600;
    transition: border-color 0.2s;
}

.header-wishlist-btn:hover {
    border-color: var(--primary);
}

.header-cart-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 15px;
    color: var(--success);
    cursor: pointer;
    flex-shrink: 0;
    font-weight: 600;
    transition: border-color 0.2s;
}

.header-cart-btn:hover {
    border-color: var(--success);
}

.header-cart-btn.has-items {
    border-color: var(--success);
    background: var(--success);
    color: var(--white);
}

.search-wrapper {
    flex: 1;
    position: relative;
}

.search-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search-wrapper input:focus {
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
}

/* Genre Filter Bar */
.genre-filter {
    background: var(--white);
    padding: 10px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: calc(var(--header-height, 56px) - 1px);
    z-index: 90;
}

.genre-btn {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.genre-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.genre-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.genre-dropdown-btn.open {
    border-color: var(--primary);
    color: var(--primary);
}

/* Genre Overlay */
.genre-overlay {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: calc(var(--header-height, 56px) + 45px);
    z-index: 89;
    padding: 12px 16px 16px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.genre-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.genre-overlay-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.genre-overlay-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.genre-overlay-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

@media (min-width: 400px) {
    .genre-overlay-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (min-width: 600px) {
    .genre-overlay-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .genre-overlay-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.genre-overlay-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.genre-overlay-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.genre-overlay-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.genre-overlay-item.active .genre-overlay-item-count {
    color: rgba(255,255,255,0.7);
}

.genre-overlay-item-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.genre-overlay-item-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 6px;
}

.genre-overlay-item-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.genre-overlay-item-arrow {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
}

.genre-overlay-item.active .genre-overlay-item-arrow {
    color: rgba(255,255,255,0.7);
}

/* Sub-genre bar (inline below genre filter) */
.genre-sub-bar {
    background: var(--white);
    padding: 8px 16px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: calc(var(--header-height, 56px) + 44px);
    z-index: 89;
}

.genre-sub-bar::-webkit-scrollbar {
    display: none;
}

.genre-sub-btn {
    padding: 6px 12px;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}

.genre-sub-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.genre-sub-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Main Content */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 80px 20px 40px;
    color: var(--text-muted);
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 280px;
    margin: 0 auto 24px;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0.25;
    transition: opacity 0.4s;
}

.loading-step.active {
    opacity: 1;
}

.loading-step.done {
    opacity: 0.5;
}

.loading-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-step.done .spinner {
    animation: none;
    border-color: var(--success);
    border-top-color: var(--success);
    position: relative;
}

.loading-step.done .spinner::after {
    content: '\2713';
    position: absolute;
    font-size: 16px;
    color: var(--success);
    font-weight: 700;
}

.loading-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    text-align: left;
}

.loading-step:not(.active):not(.done) .loading-label {
    color: var(--text-muted);
}

.loading-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .book-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Book Card */
.book-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.book-card.in-cart {
    box-shadow: 0 0 0 3px var(--success);
}

.book-card.in-cart::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: var(--success);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.book-card.unavailable {
    opacity: 0.5;
    pointer-events: none;
}

.book-cover {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: #e9ecef;
}

.book-info {
    padding: 10px;
}

.book-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.book-author {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-stock {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--warning);
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* Cart Bar */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 200;
}

.cart-progress {
    flex: 1;
    min-width: 0;
}

/* Mobile: Kompakte Anzeige mit Fortschrittsbalken statt 10 Slots */
.cart-slots {
    display: none;
}

.cart-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.cart-progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.cart-info {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-timer {
    color: var(--warning);
    font-weight: 600;
}

.cart-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.checkout-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.checkout-btn:hover:not(:disabled) {
    background: var(--primary-dark);
}

.checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkout-btn.ready {
    background: var(--success);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Desktop: Slots zeigen */
@media (min-width: 600px) {
    .cart-bar {
        padding: 12px 16px;
        gap: 12px;
    }

    .cart-slots {
        display: flex;
        gap: 4px;
        margin-bottom: 6px;
    }

    .cart-slot {
        width: 20px;
        height: 20px;
        border-radius: 4px;
        background: var(--border);
        transition: background 0.2s;
    }

    .cart-slot.filled {
        background: var(--success);
    }

    .cart-progress-bar {
        display: none;
    }

    .cart-price {
        font-size: 20px;
    }

    .checkout-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
    z-index: 300;
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.cart-drawer.open {
    transform: translateY(0);
    pointer-events: auto;
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--white);
}

.cart-drawer-header h3 {
    font-size: 18px;
}

.close-drawer {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.cart-items {
    padding: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--bg);
}

.cart-item img {
    width: 50px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-author {
    font-size: 11px;
    color: var(--text-muted);
}

.cart-item-timer {
    font-size: 11px;
    color: var(--warning);
    font-weight: 600;
    margin-top: 2px;
}

.cart-item-timer.urgent {
    color: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.cart-drawer-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    background: var(--white);
}

.drawer-checkout-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    background: var(--border);
    color: var(--text-muted);
}

.drawer-checkout-btn.ready {
    background: var(--success);
    color: var(--white);
    animation: pulse 1.5s infinite;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 250;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 400;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    background: var(--primary);
}

.toast.success {
    background: var(--success);
}

/* Book Detail Modal */
.book-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.25);
    z-index: 350;
    max-height: 85vh;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.book-modal.open {
    transform: translateY(0);
    pointer-events: auto;
}

.book-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.book-modal-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.book-modal-content {
    padding: 20px;
    padding-bottom: 12px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.book-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-modal-body {
    display: flex;
    gap: 16px;
}

.book-modal-image {
    width: 120px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--bg);
}

.book-modal-info {
    flex: 1;
    min-width: 0;
}

.book-modal-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
    color: var(--text);
}

.book-modal-author {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.book-modal-description {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 16px;
}

/* Quantity Selector im Modal */
.modal-quantity {
    margin-bottom: 12px;
}

.modal-quantity-label {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.modal-quantity-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.qty-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Sticky Action Buttons */
.book-modal-actions {
    position: sticky;
    bottom: 0;
    background: var(--white);
    padding: 12px 20px 20px;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.book-modal-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.book-modal-actions-row .book-modal-similar-btn,
.book-modal-actions-row .book-modal-wishlist-btn {
    flex: 1;
    margin-top: 0;
}

.book-modal-cart-btn {
    width: 100%;
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.book-modal-cart-btn:hover {
    background: #238b7e;
}

.book-modal-cart-btn:active {
    transform: scale(0.98);
}

.book-modal-cart-btn.in-cart {
    background: var(--primary);
}

.book-modal-cart-btn:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Tablet+ Layout für Modal */
@media (min-width: 600px) {
    .book-modal {
        left: 50%;
        right: auto;
        bottom: 50%;
        transform: translate(-50%, 50%) scale(0.9);
        opacity: 0;
        border-radius: 16px;
        max-width: 500px;
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        display: block;
    }

    .book-modal.open {
        transform: translate(-50%, 50%) scale(1);
        opacity: 1;
    }

    .book-modal-image {
        width: 140px;
        height: 210px;
    }

    .book-modal-content {
        padding-bottom: 12px;
        overflow: visible;
    }

    .book-modal-actions {
        position: static;
        box-shadow: none;
        border-top: none;
        padding-top: 0;
    }
}

/* --- Ähnliche Bücher Button im Modal --- */
.book-modal-similar-btn {
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.book-modal-similar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.book-modal-similar-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* --- Ähnliche Bücher Banner über Grid --- */
.similar-banner {
    background: var(--white);
    padding: 12px 16px;
    margin: 0 8px 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.similar-back-btn {
    background: var(--bg);
    border: 2px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
    flex-shrink: 0;
}

.similar-back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.similar-banner-text {
    font-size: 14px;
    color: var(--text-muted);
}

.similar-banner-text strong {
    color: var(--text);
}

/* --- Wishlist Herz auf Book Card --- */
.book-wishlist {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
}

.book-wishlist:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.15);
}

.book-wishlist.active {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
}

/* --- Wishlist Button im Modal --- */
.book-modal-wishlist-btn {
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.book-modal-wishlist-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.book-modal-wishlist-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* --- Search Hint Banner --- */
.search-hint {
    background: #fff3cd;
    color: #664d03;
    padding: 10px 16px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.4;
}

.search-hint a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.search-hint a:hover {
    color: var(--primary-dark);
}

.search-hint strong {
    font-weight: 600;
}

/* --- Burger Menu Drawer --- */
.burger-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    background: var(--white);
    z-index: 500;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    pointer-events: none;
}

.burger-menu.open {
    transform: translateX(0);
    pointer-events: auto;
}

.burger-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 450;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.burger-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.burger-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.burger-menu-logo {
    height: 36px;
    width: auto;
    flex: 1;
}

.burger-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.burger-menu-items {
    padding: 8px 0;
}

.burger-menu-item {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.burger-menu-item:hover {
    background: var(--bg);
}

.burger-menu-small {
    font-size: 13px;
    color: var(--text-muted);
    padding: 10px 20px;
}

.burger-menu-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* --- Info Modal --- */
.info-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.25);
    z-index: 550;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.info-modal.open {
    transform: translateY(0);
    pointer-events: auto;
}

.info-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.info-modal-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.info-modal-content {
    padding: 24px 20px 40px;
}

.info-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
    padding-right: 40px;
}

.info-modal-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.info-modal-body ol {
    padding-left: 20px;
    margin: 12px 0;
}

.info-modal-body li {
    margin-bottom: 8px;
}

.info-modal-action-btn {
    width: 100%;
    background: var(--border);
    color: var(--text-muted);
    border: 2px solid var(--border);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.info-modal-action-btn:hover {
    border-color: var(--text-muted);
}

/* Tablet+ Layout für Info Modal */
@media (min-width: 600px) {
    .info-modal {
        left: 50%;
        right: auto;
        bottom: 50%;
        transform: translate(-50%, 50%) scale(0.9);
        opacity: 0;
        border-radius: 16px;
        max-width: 480px;
        width: 90%;
        max-height: 80vh;
    }

    .info-modal.open {
        transform: translate(-50%, 50%) scale(1);
        opacity: 1;
    }
}

/* Utility */
.hidden {
    display: none !important;
}
