.gh-container {
    --gh-primary: #1e293b;
    --gh-accent: #2563eb;
    --gh-bg-card: #ffffff;
    --gh-bg-panel: #f8fafc;
    --gh-text-main: #0f172a;
    --gh-text-muted: #64748b;
    --gh-border: #e2e8f0;
    --gh-radius: 10px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    font-family: inherit;
    color: var(--gh-text-main);
    box-sizing: border-box;
}

.gh-container *,
.gh-container *::before,
.gh-container *::after {
    box-sizing: border-box;
}

/* Painel de Pesquisa Compacto (Alinhado à esquerda conforme referência visual) */
.gh-search-panel {
    background: var(--gh-bg-panel);
    padding: 16px;
    border-radius: var(--gh-radius);
    border: 1px solid var(--gh-border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

.gh-search-row-top {
    width: 100%;
    max-width: 680px;
}

.gh-search-row-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
    max-width: 680px;
}

.gh-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: var(--gh-text-main);
}

.gh-filter-author,
.gh-filter-area {
    flex: 1 1 170px;
    max-width: 220px;
    padding: 8px 12px;
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
    color: var(--gh-text-main);
}

.gh-search-input:focus,
.gh-filter-author:focus,
.gh-filter-area:focus {
    outline: none;
    border-color: var(--gh-accent);
}

.gh-reset-btn {
    padding: 8px 18px;
    background: #ffffff;
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    color: var(--gh-text-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.gh-reset-btn:hover {
    background: #e2e8f0;
    color: var(--gh-text-main);
}

.gh-results-count {
    font-size: 13px;
    color: var(--gh-text-muted);
    margin-bottom: 16px;
}

/* Grid de Colunas e Miniaturas */
.gh-grid-obras {
    display: grid;
    gap: 18px;
}

.gh-cols-1 { grid-template-columns: 1fr; }
.gh-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gh-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gh-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gh-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gh-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.gh-card {
    background: var(--gh-bg-card);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gh-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 18px -5px rgba(0, 0, 0, 0.08);
}

.gh-card-image {
    position: relative;
    height: 220px;
    background: #f1f5f9;
    overflow: hidden;
}

.gh-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gh-text-muted);
    font-size: 13px;
}

.gh-badge-year {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
}

.gh-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gh-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.3;
    color: var(--gh-primary);
}

.gh-card-author {
    font-size: 13px;
    margin: 0 0 4px 0;
    color: var(--gh-text-main);
}

.gh-card-meta {
    font-size: 12px;
    color: var(--gh-text-muted);
    margin: 0 0 6px 0;
}

.gh-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.gh-tag {
    background: #eff6ff;
    color: var(--gh-accent);
    border: 1px solid #dbeafe;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
}

.gh-card-desc {
    font-size: 12.5px;
    line-height: 1.45;
    color: #475569;
    margin: 4px 0 12px 0;
    flex-grow: 1;
}

/* Estilo Miniatura Compacta (5x4 / 4x4) */
.gh-style-miniatura .gh-card-image,
.gh-cols-5 .gh-card-image,
.gh-cols-6 .gh-card-image {
    height: 165px;
}

.gh-style-miniatura .gh-card-body,
.gh-cols-5 .gh-card-body,
.gh-cols-6 .gh-card-body {
    padding: 10px;
}

.gh-style-miniatura .gh-card-title,
.gh-cols-5 .gh-card-title,
.gh-cols-6 .gh-card-title {
    font-size: 13.5px;
}

.gh-style-miniatura .gh-card-desc,
.gh-cols-5 .gh-card-desc,
.gh-cols-6 .gh-card-desc {
    font-size: 11.5px;
    margin-bottom: 8px;
}

/* Detalhes Expansíveis */
.gh-card-details {
    margin-bottom: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--gh-border);
    font-size: 12.5px;
    color: #334155;
    line-height: 1.5;
}

.gh-detail-item {
    margin: 0 0 4px 0;
}

.gh-detail-synopsis {
    margin-top: 6px;
}

.gh-detail-synopsis p {
    margin: 4px 0;
}

.gh-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gh-btn-details {
    width: 100%;
    padding: 8px 12px;
    background: #f1f5f9;
    color: var(--gh-primary);
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.gh-btn-details:hover {
    background: #e2e8f0;
}

.gh-btn-action {
    display: block;
    text-align: center;
    background: var(--gh-accent);
    color: #ffffff !important;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12.5px;
}

.gh-btn-action:hover {
    opacity: 0.92;
}

.gh-empty {
    text-align: center;
    padding: 32px;
    background: var(--gh-bg-panel);
    border-radius: var(--gh-radius);
    color: var(--gh-text-muted);
}

/* Lightbox Opcional */
.gh-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.gh-lightbox-overlay.gh-open {
    display: flex;
}

.gh-lightbox-box {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 22px;
    position: relative;
}

.gh-lightbox-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: #f1f5f9;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .gh-cols-4, .gh-cols-5, .gh-cols-6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .gh-search-row-top,
    .gh-search-row-bottom {
        max-width: 100%;
    }
    .gh-filter-author,
    .gh-filter-area {
        max-width: 100%;
        flex: 1 1 100%;
    }
    .gh-reset-btn {
        width: 100%;
    }
    .gh-cols-3, .gh-cols-4, .gh-cols-5, .gh-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .gh-cols-2, .gh-cols-3, .gh-cols-4, .gh-cols-5, .gh-cols-6 {
        grid-template-columns: 1fr;
    }
}
