#agenda-cultural-calendar {
    margin-top: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    min-height: 600px;
}

#agenda-filters {
    margin-bottom: 20px;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
}

#agenda-filters label {
    font-weight: 600;
    cursor: pointer;
    margin-right: 20px;
    display: inline-flex;
    align-items: center;
    color: #444;
}

#agenda-filters input[type="checkbox"] {
    margin-right: 8px;
}

/* Popover Styles */
.agenda-popover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: none;
}

.agenda-popover-content {
    position: absolute;
    background: #fff;
    width: 90%;
    max-width: 450px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.agenda-popover-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.agenda-popover-content h3 {
    margin: 0 0 15px 0;
    font-size: 22px;
    color: #222;
}

.agenda-popover-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
}

.agenda-popover-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.agenda-btn {
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.agenda-btn-primary {
    background: #007cba;
    color: #fff !important;
}

.agenda-btn-primary:hover {
    background: #006799;
}

.agenda-btn-secondary {
    background: #f0f0f1;
    color: #3c434a !important;
    border: 1px solid #dcdcde;
}

.agenda-btn-secondary:hover {
    background: #e0e0e1;
}

/* FullCalendar Customization */
.fc-event {
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
}

/* SOLUÇÃO PARA UNIFORMIDADE DE IMAGENS E REMOÇÃO DE CATEGORIAS (v29) */
/* Layout horizontal sem equalize_box para evitar expansão vertical dos textos; garantimos object-fit: cover */
.ux-products .box-image img,
.woocommerce ul.products li.product .product-small .box-image img {
    object-fit: cover !important; /* Garante que a imagem preenche o espaço sem distorcer */
    width: 100% !important;
    height: 100% !important;
    image-rendering: -webkit-optimize-contrast !important;
}

/* Ajuste específico para o layout horizontal para permitir imagem lateral */
.agenda-horizontal-layout .product-small .box-image {
    height: 350px !important; /* Mantemos a altura fixa para o layout horizontal */
    width: 48% !important;
}

.agenda-horizontal-layout .product-small .box-image img {
    height: 350px !important;
    width: 100% !important;
}

/* Corrigir layout horizontal em mobile */
@media (max-width: 768px) {
    .agenda-horizontal-layout .product-small .box-image {
        width: 100% !important;
        height: auto !important;
    }
    
    .agenda-horizontal-layout .product-small .box-image img {
        height: auto !important;
        width: 100% !important;
    }
}

/* Remover categorias, caso o Flatsome as injete via CSS */
.ux-products .product-small .box-text .category,
.ux-products .product-small .box-text .product-category {
    display: none !important;
}

/* Suporte para monitores Retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .ux-products .box-image img,
    .woocommerce ul.products li.product .product-small .box-image img {
        image-rendering: auto !important;
    }
}

/* Correcao para imagens em mobile - nao ficar cortadas */
@media (max-width: 768px) {
    .ux-products,
    .woocommerce ul.products {
        width: 100% !important;
    }
    
    .ux-products .product-small,
    .woocommerce ul.products li.product,
    .product-small.col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .ux-products .box-image,
    .woocommerce ul.products li.product .product-small .box-image {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    .ux-products .box-image img,
    .woocommerce ul.products li.product .product-small .box-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        display: block !important;
    }
}

@media (max-width: 480px) {
    .ux-products,
    .woocommerce ul.products {
        width: 100% !important;
    }
    
    .ux-products .product-small,
    .woocommerce ul.products li.product,
    .product-small.col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .ux-products .box-image,
    .woocommerce ul.products li.product .product-small .box-image {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    .ux-products .box-image img,
    .woocommerce ul.products li.product .product-small .box-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        display: block !important;
    }
}

/* ESTILOS PARA CAMPOS ACF (v31) */
.agenda-campos-acf {
    margin: 10px 0;
    line-height: 1.4;
}

.agenda-acf-titulo-2 {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.agenda-acf-titulo-3 {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 8px;
}

.agenda-acf-datas-evento {
    font-size: 1em;
    font-weight: 700;
    color: #51a1e8; /* Azul conforme imagem */
    margin-bottom: 10px;
}

/* Estilo para data sobreposta na categoria 'exposicoes' */
.product-small .box-image {
    position: relative;
    overflow: visible;
}

/* Label de data posicionada dentro da imagem - SOBREPOSTA */
.agenda-data-label-positioned {
    position: absolute !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: #0066cc !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    font-size: 0.9em !important;
    font-weight: 700 !important;
    z-index: 1000 !important;
    white-space: nowrap !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
    margin: 0 !important;
}

/* Garante que o container da imagem tenha espaço para a data sobreposta */
.product-small .box-image {
    margin-bottom: 5px;
}

/* Ajuste para garantir que o botão 'Ler Mais' fique abaixo dos campos ACF */
.product-small .box-text .add-to-cart-button,
.product-small .box-text .view-details-button,
.product-small .box-text .button {
    margin-top: 10px;
    clear: both;
}

/* Garantir que os campos ACF não fiquem escondidos */
.agenda-campos-acf {
    clear: both;
    display: block;
}

/* ========================================
   ALTURAS IGUAIS DAS IMAGENS (v47)
   Força imagens numa mesma linha a terem a mesma altura
   Apenas para colunas (não afeta layout horizontal)
   ======================================== */

/* Alturas iguais - Profissional como WooCommerce */
.product-small:not(.agenda-horizontal-layout) .box-image {
    aspect-ratio: 4 / 3 !important;
    overflow: hidden !important;
    width: 100% !important;
}

/* Imagem preenche o contentor com aspect-ratio */
.product-small:not(.agenda-horizontal-layout) .box-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}


/* ========================================
   BOTÃO ADD TO CART (v46 - MINIMALISTA)
   Forçar a exibição do botão quando show_add_to_cart="true"
   ======================================== */

/* Forçar exibição do botão Add to Cart na classe agenda-show-add-to-cart */
.agenda-show-add-to-cart .product-small .button,
.agenda-show-add-to-cart .product-small .add-to-cart-button {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* ========================================
   LAYOUT COM EVENTO EM DESTAQUE (v53)
   Shortcode: [eventos_decorrer_destaque]
   Primeiro evento: largura total. Restantes: grelha normal.
   ======================================== */

.agenda-layout-destaque {
    width: 100%;
    clear: both;
}

.agenda-layout-destaque .agenda-destaque-principal {
    margin-bottom: 36px;
}

.agenda-layout-destaque .agenda-destaque-principal .product-small,
.agenda-layout-destaque .agenda-destaque-principal .box {
    width: 100% !important;
    max-width: 100% !important;
}

.agenda-layout-destaque .agenda-destaque-principal .box-image {
    width: 100% !important;
    max-width: 100% !important;
}

.agenda-layout-destaque .agenda-destaque-principal .box-text,
.agenda-layout-destaque .agenda-destaque-principal .box-text * {
    text-align: center !important;
}

.agenda-layout-destaque .agenda-destaque-principal .box-text {
    min-height: 130px !important;
    padding: 18px 20px 24px !important;
}

.agenda-layout-destaque .agenda-destaque-principal .product-title,
.agenda-layout-destaque .agenda-destaque-principal .woocommerce-loop-product__title {
    font-weight: 700 !important;
    margin-bottom: 14px !important;
}

.agenda-layout-destaque .agenda-destaque-lista {
    clear: both;
}
