/* 
 * ESTILOS DO CATÁLOGO DIGITAL (REVISTA)
 * Migrado da antiga pasta revista
 */

:root {
    --primary-blue: #004a99;
    --secondary-red: #e31d1a;
    --bg-light: #f3f4f6;
    --surface-white: #ffffff;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.catalogo-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    background-color: var(--bg-light);
}

.toolbar {
    width: 100%;
    max-width: 1024px;
    background-color: var(--surface-white);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background-color: #eff6ff;
    color: var(--primary-blue);
}

.page-indicator {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

.page-indicator span {
    color: var(--primary-blue);
    font-weight: 700;
}

.download-btn,
.share-btn {
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    height: 2.5rem;
    min-height: 2.5rem;
    white-space: nowrap;
}

.download-btn {
    background-color: var(--primary-blue);
}

.download-btn:hover {
    background-color: #003a7a;
    transform: translateY(-1px);
}

.share-btn {
    background-color: var(--secondary-red);
}

.share-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.viewer-container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    margin: 0 auto;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 100;
    color: var(--primary-blue);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn .material-symbols-outlined {
    font-size: 32px !important;
    font-weight: 600;
}

.nav-btn:hover {
    transform: translateY(-50%) scale(1.15);
    background-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    color: var(--text-gray);
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.5);
}

.nav-prev { left: 1.5rem; }
.nav-next { right: 1.5rem; }

.book-spread {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    max-width: 100%;
}

.page {
    width: 450px;
    aspect-ratio: 1/1.414;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.page.single {
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page.left {
    border-radius: 4px 0 0 4px;
    border-right: 1px solid #eee;
}

.page.right {
    border-radius: 0 4px 4px 0;
}

.page-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbs-container {
    width: 100%;
    max-width: 1200px;
    margin-top: 2rem;
    padding: 1rem 0;
    overflow-x: auto;
    display: flex;
    gap: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.thumbs-container::-webkit-scrollbar { height: 8px; }
.thumbs-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.thumb {
    flex-shrink: 0;
    width: 80px;
    height: 112px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-gray);
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.thumb:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

.thumb.active {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    font-weight: 700;
}

.blank-page {
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
}

/* Responsividade solicitada */

/* Desktop grande: ≥1200px */
@media (min-width: 1200px) {
    .page { width: 500px; }
    .nav-prev { left: 2rem; }
    .nav-next { right: 2rem; }
}

/* Desktop pequeno: 992px-1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    .page { width: 450px; }
    .nav-prev { left: 1rem; }
    .nav-next { right: 1rem; }
    .material-symbols-outlined { font-size: 22px; }
}

/* Tablets: 768px-991px */
@media (min-width: 768px) and (max-width: 991px) {
    .page { width: 400px; }
    .nav-prev { left: 0.5rem; }
    .nav-next { right: 0.5rem; }
    .material-symbols-outlined { font-size: 20px; }
}

/* Mobile/tablets médios: 578px-767px */
@media (min-width: 578px) and (max-width: 767px) {
    .page { width: 350px; }
    .book-spread { flex-direction: column; }
    .page.left, .page.right { border-radius: 4px; border: none; margin-bottom: 1rem; }
    .material-symbols-outlined { font-size: 18px; }
}

/* Mobile: 320px-577px */
@media (min-width: 320px) and (max-width: 577px) {
    .page { width: 90vw; max-width: 400px; }
    .book-spread { flex-direction: column; }
    .page.left, .page.right { border-radius: 4px; border: none; margin-bottom: 1rem; }
    .toolbar { flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
    .material-symbols-outlined { font-size: 16px; }
    .download-btn, .share-btn { padding: 0.375rem 0.5rem; font-size: 0.75rem; height: 2.25rem; min-height: 2.25rem; gap: 0.25rem; }
}

/* Mobile pequeno: ≤320px */
@media (max-width: 320px) {
    .page { width: 95vw; max-width: 300px; }
    .nav-btn { width: 44px; height: 44px; }
    .nav-btn .material-symbols-outlined { font-size: 24px !important; }
    .nav-prev { left: 0.25rem; }
    .nav-next { right: 0.25rem; }
    .material-symbols-outlined { font-size: 14px; }
    .download-btn, .share-btn { padding: 0 0.5rem; height: 2rem; min-height: 2rem; width: 2.5rem; justify-content: center; }
    .download-btn span:not(.material-symbols-outlined),
    .share-btn span:not(.material-symbols-outlined) { display: none; }
    .toolbar { padding: 0.5rem; gap: 0.25rem; }
}
