.bv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0;
    width: 100%;
}
.bv-book-item {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    cursor: pointer;
    background: #222;
}
.bv-book-item:hover {
    z-index: 100;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    transition: transform 0.2s;
}
.bv-book-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}

.bv-sentinel {
    width: 100%;
    height: 1px;
}
.bv-loading-row {
    grid-column: 1 / -1;
    padding: 14px 0;
    text-align: center;
    color: #777;
    font-size: 0.95rem;
}

/* MODAL STYLES */
.bv-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: none; justify-content: center; align-items: center;
    z-index: 99999; backdrop-filter: blur(5px);
}
.bv-modal-content {
    background: #fff; color: #333;
    width: 90%; max-width: 700px;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
    max-height: 85vh;
}
.bv-modal-header {
    padding: 15px 20px; background: #f4f4f4; border-bottom: 1px solid #ddd;
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px;
}
.bv-modal-header h2 { margin: 0; font-size: 1.2rem; color: #222; flex: 1; }
.bv-close-btn { cursor: pointer; font-size: 1.5rem; color: #555; line-height: 1; }
.bv-modal-body { padding: 20px; overflow-y: auto; }

.bv-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
.bv-table td { padding: 8px 0; border-bottom: 1px solid #eee; vertical-align: top; }
.bv-label { width: 100px; font-weight: bold; color: #666; font-size: 0.85rem; text-transform: uppercase; }
.bv-synopsis { font-family: Georgia, serif; line-height: 1.6; color: #444; margin-top: 15px; }

/* Wishlist button in modal */
.bv-wishlist-btn {
    border: 1px solid #ddd;
    background: #fff;
    color: #222;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}
.bv-wishlist-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}
.bv-wishlist-btn.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Floating wishlist icon */
.bv-wishlist-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99998;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    user-select: none;
}
.bv-wishlist-fab:hover { filter: brightness(1.1); }
.bv-wishlist-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    border: 2px solid #111;
    box-sizing: border-box;
}

/* Wishlist popover */
.bv-wishlist-popover {
    position: fixed;
    right: 18px;
    bottom: 80px;
    width: min(360px, calc(100vw - 36px));
    max-height: min(520px, calc(100vh - 140px));
    background: #fff;
    color: #222;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    z-index: 99998;
    display: none;
    overflow: hidden;
}
.bv-wishlist-popover.is-open { display: block; }
.bv-wishlist-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f4f4f4;
    border-bottom: 1px solid #e6e6e6;
}
.bv-wishlist-popover-header strong { font-size: 0.95rem; }
.bv-wishlist-popover-body {
    padding: 10px 10px 12px 10px;
    overflow: auto;
    max-height: inherit;
}
.bv-wishlist-empty {
    padding: 14px;
    color: #666;
    font-size: 0.95rem;
}
.bv-wishlist-item {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}
.bv-wishlist-item:hover { background: #f7f7f7; }
.bv-wishlist-thumb {
    width: 44px;
    height: 66px;
    border-radius: 4px;
    object-fit: cover;
    background: #222;
}
.bv-wishlist-title {
    font-size: 0.92rem;
    line-height: 1.2;
    margin: 0;
}
.bv-wishlist-meta {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}
.bv-wishlist-remove {
    border: 1px solid #ddd;
    background: #fff;
    color: #222;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 0.85rem;
}
.bv-wishlist-remove:hover { background: #fff5f5; border-color: #fecaca; color: #991b1b; }

.bv-wishlist-login-note {
    padding: 12px 14px;
    font-size: 0.9rem;
    color: #444;
}
.bv-wishlist-login-note a { text-decoration: underline; }
