/* Estilos do Plugin Inspire-se */

/* Grid de Galerias - Agora com suporte responsivo */
.cpc-inspirese-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns-mobile, 1), 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Breakpoints responsivos para o grid */
@media (min-width: 768px) {
    .cpc-inspirese-grid {
        grid-template-columns: repeat(var(--columns-tablet, 2), 1fr);
    }
}

@media (min-width: 1024px) {
    .cpc-inspirese-grid {
        grid-template-columns: repeat(var(--columns-desktop, 3), 1fr);
    }
}

/* Item da Galeria */
.cpc-inspirese-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cpc-inspirese-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.cpc-inspirese-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Imagem */
.cpc-inspirese-image {
    position: relative;
    padding-bottom: 75%; /* Aspect ratio 4:3 */
    overflow: hidden;
    background: #f5f5f5;
}

.cpc-inspirese-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cpc-inspirese-item:hover .cpc-inspirese-image img {
    transform: scale(1.05);
}

/* Contador de Galeria */
.cpc-gallery-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cpc-gallery-count i {
    font-size: 16px;
}

/* Informações */
.cpc-inspirese-info {
    padding: 20px;
}

.cpc-inspirese-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
    line-height: 1.4;
}

.cpc-inspirese-category {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 10px;
}

.cpc-inspirese-location {
    width: 100%;
    font-family: Sinkin Sans;
    color: #606060;
    font-size: 13px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpc-inspirese-location i {
    font-size: 16px;
}

/* Decoradores */
.cpc-inspirese-decorators {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
}

.cpc-inspirese-decorators i {
    font-size: 16px;
    color: #999;
}

/* ============================= */
/* NAVEGAÇÃO - PAGINAÇÃO E LOAD MORE */
/* ============================= */

/* Container da Navegação */
.cpc-navigation-wrapper {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Paginação */
.cpc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.cpc-pagination a,
.cpc-pagination .current,
.cpc-pagination .dots {
    font-family: Sinkin Sans;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #616262;
    background-color: transparent;
    transition: all 0.3s ease;
    font-size: 16px;
}

.cpc-pagination .current {
    font-weight: 700 !important;
}

.cpc-pagination a:hover {
    color: #DA802E;
}

.cpc-pagination .current {
    color: #DA802E;
}

.cpc-pagination .dots {
    border: none;
    background: none;
    color: #616262;
    cursor: default;
}

.cpc-pagination .prev,
.cpc-pagination .next {
    font-size: 16px;
    color: #616262;
    font-weight: 700;
}

.cpc-pagination .prev:hover,
.cpc-pagination .next:hover {
    color: #DA802E;
}

.cpc-pagination .page-numbers {
    margin: 0 5px;
}

.cpc-pagination .prev {
    margin: 0 !important;
    margin-right: 5px;
}
.cpc-pagination .next {
    margin: 0 !important;
    margin-left: 5px;
}


/* Botão Carregar Mais */
.cpc-load-more-wrapper {
    text-align: center;
    margin-top: 40px;
}

.cpc-load-more {
    display: inline-block;
    background: #333;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cpc-load-more:hover {
    background: #555;
    transform: translateY(-2px);
    color: #fff;
}

.cpc-load-more:disabled,
.cpc-load-more.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.cpc-load-more.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsividade da Navegação */
@media (max-width: 768px) {
    .cpc-pagination {
        gap: 3px;
    }
    
    .cpc-pagination a,
    .cpc-pagination .current {
        min-width: 35px;
        height: 35px;
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .cpc-load-more {
        padding: 10px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .cpc-pagination a,
    .cpc-pagination .current {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .cpc-pagination .prev,
    .cpc-pagination .next {
        font-size: 11px;
    }
}

/* ============================= */
/* FILTROS - PADRÃO E-COMMERCE  */
/* ============================= */

/* Variáveis CSS para customização */
.cpc-inspirese-filter {
    --cpc-filter-text-color: #606060;
    --cpc-filter-border-color: #C1C1C1;
    --cpc-filter-background: transparent;
    --cpc-filter-font-size: clamp(0.9375rem, 0.8065rem + 0.1613vw, 1rem);
    --cpc-filter-padding: 12px;
    --cpc-filter-content-padding: 5px 13px;
    --cpc-filter-font-family: inherit;
}

/* Container principal */
.cpc-inspirese-filter {
    min-width: 255px;
    position: relative;
    width: 100%;
    color: var(--cpc-filter-text-color);
}

/* Título do Widget */
.cpc-filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpc-filter-title i {
    font-size: 16px;
}

/* Container dos Filtros */
.cpc-filter-items {
    border: none;
    border-radius: 4px;
    overflow: hidden;
    background: var(--cpc-filter-background);
}

/* Item do Filtro */
.cpc-filter-item {
    background: var(--cpc-filter-background);
    border-bottom: 1px solid var(--cpc-filter-border-color);
}

.cpc-filter-item:last-child {
    border-bottom: none;
}

.cpc-filter-item:not(.collapsed) {
    padding-bottom: 10px;
}

/* Cabeçalho do Filtro (Accordion) */
.cpc-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    background: var(--cpc-filter-background);
}

.cpc-filter-header span {
    color: #F48120 !important;
    font-size: 12px !important;
    font-family: Sinkin Sans !important;
    font-weight: 500 !important;
    padding: var(--cpc-filter-padding) var(--cpc-filter-padding);
    display: block;
    width: 100%;
}

.cpc-filter-item:first-child .cpc-filter-header {
    border-top: none;
}

.cpc-filter-header:hover {
    background-color: #f8f8f8;
}

/* Ícone do Toggle */
.cpc-filter-toggle {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: var(--cpc-filter-text-color);
    padding-right: var(--cpc-filter-padding);
}

/* Conteúdo do Filtro */
.cpc-filter-content {
    padding: var(--cpc-filter-content-padding);
    background: var(--cpc-filter-background);
    max-height: 150px !important;
    overflow: auto;
    transition: display 0.3s ease, padding 0.3s ease;
}

.cpc-filter-item.collapsed .cpc-filter-content {
    display: none;
    padding: 0 13px;
    overflow: hidden;
}

/* Opções de Filtro */
.cpc-filter-option {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    color: var(--cpc-filter-text-color);
    font-size: 14px;
    transition: color 0.2s ease;
}

.cpc-filter-option:hover {
    color: #333;
}

.cpc-filter-option input[type="checkbox"] {
    width: 12px;
    height: 12px;
    margin: 0;
    margin-right: 10px;
    cursor: pointer;
}

.cpc-filter-option .cpc-filter-label {
    flex: 1;
    font-size: 10px;
}

.cpc-filter-count {
    color: #999;
    font-size: 13px;
    margin-left: auto;
}

/* Botão Limpar */
.cpc-filter-reset {
    width: 100%;
    padding: 12px 20px;
    margin-top: 20px;
    background: #F48120;
    border: 1px solid #F48120;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #FFF;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none; /* Hidden by default, shown via JS when filters are active */
}

.cpc-filter-reset:hover {
    background: #FFF;
    color: #F48120;
}

/* Loading state */
.cpc-inspirese-filter.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsividade Geral - Removendo o CSS antigo que conflitava */
@media (max-width: 991px) {
    /* O grid agora usa variáveis CSS e é controlado pelo widget */
}

@media (max-width: 767px) {
    .cpc-inspirese-info {
        padding: 15px;
    }
    
    .cpc-inspirese-title {
        font-size: 16px;
    }
    
    .cpc-gallery-count {
        font-size: 13px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .cpc-inspirese-info {
        padding: 12px;
    }
    
    .cpc-inspirese-title {
        font-size: 15px;
    }
    
    .cpc-inspirese-category {
        font-size: 12px;
        padding: 3px 10px;
    }
    
    .cpc-inspirese-location,
    .cpc-inspirese-decorators {
        font-size: 13px;
    }
}

/* Estados de Loading */
.cpc-inspirese-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

.cpc-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* CSS Admin */
.cpc-gallery-metabox .description {
    margin-bottom: 15px;
}

.cpc-details-metabox p {
    margin-bottom: 20px;
}

.cpc-details-metabox label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cpc-inspirese-item {
    animation: fadeIn 0.5s ease;
}

/* ===== FIM Filtros ===== */

/* ===== Single Gallery Widget ===== */
.cpc-single-gallery-wrapper {
    width: 100%;
}

.cpc-single-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Fallback responsivo caso os controles do Elementor não funcionem */
@media (max-width: 767px) {
    .cpc-single-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .cpc-single-gallery-grid {
        grid-template-columns: 1fr !important;
    }
}

.cpc-single-gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cpc-single-gallery-item img {
    width: 410px;
    height: 271px;
    /* width: 100%;
    height: 100%; */
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Efeitos Hover */
.cpc-hover-zoom .cpc-single-gallery-item:hover img {
    transform: scale(1.1);
}

.cpc-hover-opacity .cpc-single-gallery-item:hover img {
    opacity: 0.8;
}

/* ===== Widgets Individuais ===== */

/* Base para widgets de taxonomia */
.cpc-category-wrapper,
.cpc-decorator-wrapper,
.cpc-style-wrapper {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
}

.cpc-category-icon,
.cpc-decorator-icon,
.cpc-style-icon {
    display: inline-flex;
    align-items: center;
}

.cpc-category-prefix,
.cpc-decorator-prefix,
.cpc-style-prefix {
    font-weight: 600;
}

.cpc-category-name,
.cpc-decorator-name,
.cpc-style-name {
    display: inline-block;
}

.cpc-category-name a,
.cpc-decorator-name a,
.cpc-style-name a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.cpc-category-name a:hover,
.cpc-decorator-name a:hover,
.cpc-style-name a:hover {
    text-decoration: underline;
}

/* ===== Widget Descrição de Taxonomia ===== */
.cpc-taxonomy-description-wrapper {
    width: 100%;
}

.cpc-taxonomy-title {
    margin: 0 0 20px 0;
}

.cpc-taxonomy-description {
    line-height: 1.6;
}

.cpc-taxonomy-description p {
    margin: 0 0 1em 0;
}

.cpc-taxonomy-description p:last-child {
    margin-bottom: 0;
}

/* ============================= */
/* MELHORIAS DE ACESSIBILIDADE */
/* ============================= */

/* Focus states para navegação por teclado */
.cpc-pagination a:focus,
.cpc-load-more:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Melhor contraste para elementos ativos */
.cpc-pagination .current {
    font-weight: 600;
}

/* Indicador visual para loading */
.cpc-load-more[aria-busy="true"] {
    position: relative;
}

/* Estados para screen readers */
.cpc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================= */
/* UTILITÁRIOS */
/* ============================= */

/* Classes helper para alinhamento da navegação */
.cpc-navigation-wrapper.text-left {
    text-align: left;
}

.cpc-navigation-wrapper.text-center {
    text-align: center;
}

.cpc-navigation-wrapper.text-right {
    text-align: right;
}

/* Print styles */
@media print {
    .cpc-navigation-wrapper,
    .cpc-load-more-wrapper {
        display: none;
    }
}