/* ===================================
   KINTA LOJA - CSS MODERNO E RESPONSIVO
   =================================== */

/* Reset e Base */
.kinta-loja-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   HERO SECTION
   =================================== */

.kinta-loja-hero {
    background: linear-gradient(135deg, #f8fffe 0%, #e8f5e8 100%);
    padding: 60px 0;
    margin-bottom: 40px;
}

.hero-content {
    text-align: center;
    margin-bottom: 50px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #2c5530;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    font-size: 3.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards de Destaque */
.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.highlight-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.highlight-card:hover::before {
    left: 100%;
}

.highlight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.promo-card {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f5, #ffffff);
}

.bestseller-card {
    border-color: #ffd93d;
    background: linear-gradient(135deg, #fffbf0, #ffffff);
}

.regional-card {
    border-color: #8BC34A;
    background: linear-gradient(135deg, #f8fff8, #ffffff);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.highlight-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c5530;
}

.highlight-card p {
    color: #666;
    margin-bottom: 20px;
}

.btn-highlight {
    background: linear-gradient(135deg, #8BC34A, #689F38);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-highlight:hover {
    background: linear-gradient(135deg, #689F38, #8BC34A);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(139, 195, 74, 0.4);
}

/* ===================================
   FILTROS
   =================================== */

.kinta-filters-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Busca */
.search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.search-box input:focus {
    outline: none;
    border-color: #8BC34A;
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #8BC34A;
    border: none;
    border-radius: 8px;
    padding: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #689F38;
    transform: translateY(-50%) scale(1.1);
}

/* Grade de Filtros */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-weight: 600;
    color: #2c5530;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.filter-icon {
    font-size: 1.1rem;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #8BC34A;
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
}

/* Ações dos Filtros */
.filter-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-apply {
    background: linear-gradient(135deg, #8BC34A, #689F38);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-apply:hover {
    background: linear-gradient(135deg, #689F38, #8BC34A);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 195, 74, 0.4);
}

.btn-clear {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-clear:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: #fff5f5;
}

/* ===================================
   PRODUTOS
   =================================== */

.kinta-products-section {
    margin-bottom: 60px;
}

/* Header da Seção */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.results-info {
    font-weight: 600;
    color: #2c5530;
    font-size: 1.1rem;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options label {
    font-weight: 600;
    color: #666;
}

.sort-options select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-options select:focus {
    outline: none;
    border-color: #8BC34A;
}

/* Loading */
.loading-container {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #8BC34A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Grade de Produtos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Card do Produto */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Imagem do Produto */
.product-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Badges */
.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.badge {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.btn-quick-view {
    background: white;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.product-card:hover .btn-quick-view {
    transform: translateY(0);
}

.btn-quick-view:hover {
    background: #8BC34A;
    color: white;
}

/* Informações do Produto */
.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c5530;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* Avaliação */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 1rem;
}

.star.filled {
    color: #ffd93d;
}

.star.half {
    background: linear-gradient(90deg, #ffd93d 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-text {
    font-size: 0.85rem;
    color: #666;
}

/* Produtor e Localização */
.product-producer,
.product-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.producer-icon,
.location-icon {
    font-size: 1rem;
}

/* Preço */
.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.current-price {
    color: #8BC34A;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Botão Adicionar ao Carrinho */
.btn-add-cart {
    width: 100%;
    background: linear-gradient(135deg, #8BC34A, #689F38);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, #689F38, #8BC34A);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 195, 74, 0.4);
}

.cart-icon {
    font-size: 1.1rem;
}

/* ===================================
   PAGINAÇÃO
   =================================== */

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover {
    border-color: #8BC34A;
    color: #8BC34A;
}

.page-btn.active {
    background: #8BC34A;
    border-color: #8BC34A;
    color: white;
}

/* ===================================
   MODAL
   =================================== */

.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Conteúdo do Modal */
.modal-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.modal-product-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
}

.modal-product-info h2 {
    font-size: 1.8rem;
    color: #2c5530;
    margin-bottom: 15px;
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-producer,
.modal-description {
    margin-bottom: 20px;
}

.modal-producer h4,
.modal-description h4 {
    color: #2c5530;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.modal-producer .location {
    color: #666;
    font-size: 0.9rem;
}

.modal-price {
    margin: 25px 0;
}

.modal-price .current-price {
    font-size: 2rem;
    color: #8BC34A;
    font-weight: 700;
}

.modal-price .original-price {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
    margin-right: 10px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-add-cart-modal,
.btn-contact-producer {
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

.btn-add-cart-modal {
    background: linear-gradient(135deg, #8BC34A, #689F38);
    color: white;
}

.btn-add-cart-modal:hover {
    background: linear-gradient(135deg, #689F38, #8BC34A);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 195, 74, 0.4);
}

.btn-contact-producer {
    background: white;
    color: #8BC34A;
    border: 2px solid #8BC34A;
}

.btn-contact-producer:hover {
    background: #8BC34A;
    color: white;
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .title-icon {
        font-size: 2.5rem;
    }
    
    .hero-highlights {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .highlight-card {
        padding: 25px 20px;
    }
    
    /* Filtros */
    .kinta-filters-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .btn-apply,
    .btn-clear {
        width: 100%;
    }
    
    /* Produtos */
    .products-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .sort-options {
        justify-content: space-between;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Modal */
    .modal-product {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn-add-cart-modal,
    .btn-contact-producer {
        min-width: auto;
        width: 100%;
    }
    
    /* Paginação */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .highlight-card {
        padding: 20px 15px;
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
    
    .kinta-filters-section {
        padding: 15px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .products-grid {
        gap: 15px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-product {
        padding: 15px;
    }
}

/* ===================================
   ANIMAÇÕES E EFEITOS
   =================================== */

/* Fade in para produtos */
.product-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover suave para botões */
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Focus states para acessibilidade */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #8BC34A;
    outline-offset: 2px;
}

/* Estados de carregamento */
.loading-state {
    pointer-events: none;
    opacity: 0.7;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f0f0f0;
    border-top: 2px solid #8BC34A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
/* ===================================
   CORREÇÃO: POSICIONAMENTO CORRETO DOS CARDS NA LOJA
   =================================== */

/* Ocultar ícone de carrinho mal posicionado na página loja */
.page-template-page-loja .cart-icon,
.page-template-page-loja .title-icon {
    display: none !important;
}

/* Ocultar texto "Descubra produtos locais" na página loja */
.page-template-page-loja .hero-content,
.page-template-page-loja .hero-title,
.page-template-page-loja .hero-subtitle {
    display: none !important;
}

/* Ocultar seção hero completa se necessário */
.page-template-page-loja .kinta-loja-hero .hero-content {
    display: none !important;
}

/* CORREÇÃO: Ajustar espaçamento da seção hero para dar espaço aos ícones */
.page-template-page-loja .kinta-loja-hero {
    padding: 80px 0 40px 0 !important;
    margin-top: 20px !important;
}

/* CORREÇÃO: Garantir que os cards de destaque tenham espaço suficiente */
.page-template-page-loja .hero-highlights {
    margin-top: 40px !important;
    padding-top: 20px !important;
}

/* CORREÇÃO: Ajustar posicionamento dos ícones dos cards */
.page-template-page-loja .highlight-card {
    display: block !important;
    margin-top: 20px !important;
    padding-top: 30px !important;
}

/* CORREÇÃO: Garantir que os ícones dos cards sejam visíveis */
.page-template-page-loja .card-icon {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    display: block !important;
}

/* Ocultar qualquer texto residual */
.page-template-page-loja .kinta-loja-hero h1,
.page-template-page-loja .kinta-loja-hero p {
    display: none !important;
}

/* CORREÇÃO: Adicionar espaço extra no container principal */
.page-template-page-loja .kinta-loja-container {
    padding-top: 30px !important;
}

/* CORREÇÃO: Garantir que não há overflow hidden cortando os ícones */
.page-template-page-loja .kinta-loja-hero,
.page-template-page-loja .hero-highlights,
.page-template-page-loja .highlight-card {
    overflow: visible !important;
}

/* CORREÇÃO: Ajustar altura mínima dos cards para acomodar ícones */
.page-template-page-loja .highlight-card {
    min-height: 200px !important;
    position: relative !important;
}

/* CORREÇÃO: Posicionamento específico dos ícones */
.page-template-page-loja .highlight-card .card-icon {
    position: relative !important;
    top: 0 !important;
    transform: none !important;
}

