/* pbs-frontend.css - IDA Cosmic Blues & Accessible */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --ida-bg: #0b132b;
    --ida-panel: #1c2541;
    --ida-text: #f8f9fa;
    --ida-text-muted: #cbd5e1;
    --ida-accent-cyan: #00f0ff;
    --ida-accent-pink: #ff007f;
    --ida-focus: #ffaa00;
}

body, .pbs-single-book-wrapper {
    background-color: var(--ida-bg);
    color: var(--ida-text);
    font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
    line-height: 1.6;
    font-size: 1.125rem;
}

.pbs-single-book-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism for panels */
.pbs-glass-panel {
    background: rgba(28, 37, 65, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 2px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 2.5rem;
}

/* Focus states for accessibility */
*:focus-visible {
    outline: 3px solid var(--ida-focus) !important;
    outline-offset: 4px;
}

/* Hero Section */
.pbs-hero {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.pbs-hero-image {
    flex: 1 1 300px;
    max-width: 400px;
}

.pbs-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pbs-hero-content {
    flex: 2 1 500px;
}

.pbs-book-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.pbs-book-blurb {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--ida-text);
    margin-bottom: 2rem;
}

/* Buttons */
.pbs-btn {
    padding: 16px 32px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pbs-format-btn {
    background: var(--ida-panel);
    color: var(--ida-accent-cyan);
    border: 2px solid var(--ida-accent-cyan);
}

.pbs-format-btn:hover, .pbs-format-btn:focus {
    background: var(--ida-accent-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.pbs-btn-primary {
    background: var(--ida-accent-pink);
    color: #fff;
    border: 2px solid var(--ida-accent-pink);
}

.pbs-btn-primary:hover, .pbs-btn-primary:focus {
    background: transparent;
    color: var(--ida-accent-pink);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.5);
}

.pbs-btn-buy-direct {
    background: linear-gradient(135deg, #00f0ff 0%, #0055ff 100%);
    color: #000;
    width: 100%;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-radius: 10px;
    font-weight: 800;
}

.pbs-btn-buy-direct:hover, .pbs-btn-buy-direct:focus {
    filter: brightness(1.2);
}

.pbs-btn-retailer {
    background: #111;
    color: #fff;
    border: 2px solid #333;
    width: 100%;
    margin-bottom: 0.75rem;
}

.pbs-btn-retailer:hover, .pbs-btn-retailer:focus {
    border-color: var(--ida-accent-cyan);
    background: var(--ida-panel);
}

.pbs-highlight-badge {
    background: var(--ida-accent-pink);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1rem;
}

/* Links */
a {
    color: var(--ida-accent-cyan);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}
a:hover, a:focus {
    color: var(--ida-accent-pink);
}

/* Modals */
.pbs-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(4, 11, 22, 0.85);
    backdrop-filter: blur(12px);
}

.pbs-modal-content {
    margin: 8vh auto;
    width: 90%;
    max-width: 500px;
    background: var(--ida-panel);
    border: 2px solid var(--ida-accent-cyan);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    color: var(--ida-text);
}

.pbs-close {
    color: var(--ida-text-muted);
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.pbs-close:hover, .pbs-close:focus {
    color: var(--ida-accent-pink);
}

/* Books Gallery Grid */
.pbs-books-gallery {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}
.pbs-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pbs-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.pbs-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.pbs-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }

.pbs-book-item {
    transition: transform 0.3s ease;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

.pbs-book-item:hover, .pbs-book-item:focus-within {
    transform: translateY(-5px);
    border-color: var(--ida-accent-cyan);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.15);
}

.pbs-gallery-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
}

.pbs-gallery-title {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    color: #fff;
}

@media (max-width: 768px) {
    .pbs-books-gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    }
}