/* =====================================================
   Grid + Filtros unificados — Dellarte
   Versão 1.7 – 2026-05
   ===================================================== */

/* =====================================================
   1. FILTER — Categorias e Cidades (estilo busca/home)
   ===================================================== */

.wpe-filter-nav { display: block; }
.wpe-filter-label { display: none; }

.wpbuscacategoria,
.wpbuscacidade {
    list-style: none !important;
    margin: 0;
    padding: 0 !important;
}

.lista-categoria,
.lista-cidade-filter {
    text-decoration: none !important;
    font-family: "Montserrat", "Sans Serif";
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
    list-style: none;
}

a.link-categoria,
a.link-cidade-filter {
    display: block;
    color: #3C3C3C !important;
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
    padding: 5px 10px;
    border-radius: 3px;
}

a.link-categoria:hover,
a.link-cidade-filter:hover {
    text-decoration: underline;
    -webkit-text-decoration-color: #F3C143;
    text-decoration-color: #F3C143;
    color: #3C3C3C !important;
}

a.link-categoria:focus,
a.link-cidade-filter:focus {
    background-color: #F3C143;
    outline: none;
}

a.link-categoria.is-active,
a.link-cidade-filter.is-active {
    background-color: #F3C143;
    color: #1a1a1a !important;
}

/* Nav menu lateral de cidades (Elementor Nav Menu widget — sm-vertical) */
.menu-item-object-cidade .elementor-item {
    transition: color 0.15s;
}

.menu-item-object-cidade .elementor-item.is-active {
    color: #F3C143 !important;
    font-weight: 700 !important;
    position: relative;
    padding-left: 16px !important;
}

.menu-item-object-cidade .elementor-item.is-active::before {
    content: '›';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    color: #F3C143;
    font-weight: 700;
    font-size: 1.1em;
    line-height: 1;
}

/* Espaçamento vertical entre itens do nav menu de cidades */
.menu-item-object-cidade {
    margin-bottom: 2px !important;
}

.cat-count { display: none; }

/* Heading de seção dentro da sidebar —
   Elementor não propaga css_classes ao <h5> interno,
   então usamos seletor estrutural do container f4a5b6c. */
.wpe-sidebar-heading,
.elementor-element-f4a5b6c .elementor-heading-title {
    font-family: "Montserrat", "Sans Serif" !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #aaa !important;
    margin: 0 0 8px 10px !important;
}
/* Espaço antes do segundo heading (Categorias) */
.elementor-element-f4a5b6c .elementor-widget-shortcode + .elementor-widget-heading .elementor-heading-title {
    margin-top: 24px !important;
}

/* Accordion mobile — filtros Cidades / Categorias (widget 97d8875) */
.elementor-element-97d8875 .elementor-tab-content {
    padding-top: 8px !important;
    padding-bottom: 12px !important;
}

.elementor-element-97d8875 .elementor-tab-content p {
    margin: 0 0 4px !important;
}

.elementor-element-97d8875 .elementor-tab-content .wpbuscacidade,
.elementor-element-97d8875 .elementor-tab-content .wpbuscacategoria {
    padding: 0 !important;
    margin: 0 !important;
}

.elementor-element-97d8875 .elementor-tab-content .link-cidade-filter,
.elementor-element-97d8875 .elementor-tab-content .link-categoria {
    line-height: 1.45 !important;
    padding: 6px 10px !important;
}

.elementor-element-97d8875 .elementor-tab-content .lista-cidade-filter,
.elementor-element-97d8875 .elementor-tab-content .lista-categoria {
    margin-bottom: 2px !important;
}

/* =====================================================
   2. RESULTS GRID
   Seletores duplos: .resultado (AJAX target) +
   article.wpecards / #eventsContainer (output do shortcode)
   ===================================================== */

.resultado .wpecard,
article.wpecards .wpecard,
#eventsContainer .wpecard {
    flex-basis: auto !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0 16px 0 !important;
    background-color: transparent !important;
}

.resultado .wpeimg,
article.wpecards .wpeimg,
#eventsContainer .wpeimg {
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
}

.resultado .espetaculo,
article.wpecards .espetaculo,
#eventsContainer .espetaculo {
    font-size: 16px;
    line-height: 1.35;
    margin: 10px 0 6px;
}

.resultado .wpecidade,
article.wpecards .wpecidade,
#eventsContainer .wpecidade {
    font-size: 13px;
    margin: 2px 0 !important;
}

/* Mobile: 1 coluna */
@media (max-width: 767px) {
    .resultado .wpecards,
    article.wpecards,
    #eventsContainer {
        display: grid !important;
        grid-template-columns: 1fr !important;
        column-gap: 0 !important;
        row-gap: 20px !important;
        align-items: start;
        flex-wrap: unset;
    }
}

/* Tablet: 2 colunas */
@media (min-width: 768px) and (max-width: 1199px) {
    .resultado .wpecards,
    article.wpecards,
    #eventsContainer {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        column-gap: 20px !important;
        row-gap: 24px !important;
        align-items: start;
        flex-wrap: unset;
    }
}

/* Desktop: 2 colunas */
@media (min-width: 1200px) {
    .resultado .wpecards,
    article.wpecards,
    #eventsContainer {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        column-gap: 24px !important;
        row-gap: 28px !important;
        align-items: start;
        flex-wrap: unset;
    }
}

/* =====================================================
   3. LOADING STATE (shimmer)
   ===================================================== */

.resultado {
    transition: opacity 0.2s ease;
    position: relative;
    min-height: 80px;
}

.resultado.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

.resultado.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.55) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: wpe-shimmer 1s linear infinite;
    z-index: 1;
}

@keyframes wpe-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================================================
   4. ACTIVE FILTER BANNER
   ===================================================== */

.wpe-active-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    color: #555;
    margin-bottom: 20px;
    padding: 8px 12px;
    background: #fdf7e3;
    border-left: 3px solid #F3C143;
    border-radius: 0 4px 4px 0;
}

.wpe-active-filter strong {
    color: #1a1a1a;
    font-weight: 700;
}

.wpe-clear-filter {
    background: none;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 3px 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    margin-left: auto;
}

.wpe-clear-filter:hover {
    background: #F3C143;
    border-color: #F3C143;
    color: #1a1a1a;
}

/* =====================================================
   5. EMPTY STATE
   ===================================================== */

.wpe-empty-state {
    padding: 48px 24px;
    text-align: center;
    color: #666;
    font-size: 1rem;
}

.wpe-empty-state p { margin-bottom: 16px; }

.wpe-empty-link {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid currentColor;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.wpe-empty-link:hover { opacity: 0.7; }
