/**
 * Estilos para Templates de Taxonomia - Layout Clean
 *
 * @package ZazoSimpleCatalog
 */

/* ==========================================================================
   ESTRUTURA PRINCIPAL
   ========================================================================== */

.zazo-taxonomy-archive {
    background: #ffffff;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   CABEÇALHO DA TAXONOMIA
   ========================================================================== */

/* ====== MELHORIA DE ESPAÇAMENTOS DO HEADER ====== */

.zazo-taxonomy-header {
    background: #fff;
    padding: 2.5rem 0 2rem 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 2.5rem;
}

.zazo-taxonomy-breadcrumb {
    margin-bottom: 0.5rem;
    margin-top: 0.25rem;
}

.zazo-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.zazo-breadcrumb a {
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.zazo-breadcrumb a:hover {
    color: #005a87;
}

.zazo-breadcrumb-separator {
    color: #ccc;
}

.zazo-breadcrumb-current {
    color: #495057;
    font-weight: 500;
}

.zazo-taxonomy-content {
    text-align: left;
}

.zazo-taxonomy-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #222;
    letter-spacing: -0.5px;
}

.zazo-taxonomy-title i {
    margin-right: 0.5rem;
    color: #007cba;
}

.zazo-taxonomy-description {
    font-size: 1.08rem;
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
    color: #6c757d;
    max-width: 600px;
}

.zazo-taxonomy-meta {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 500;
}

/* ==========================================================================
   SEÇÃO DE BUSCA E CONTROLES
   ========================================================================== */

.zazo-search-section {
    background: #ffffff;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.zazo-search-form {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
}

.zazo-search-wrapper {
    display: flex;
    max-width: 100%;
}

.zazo-taxonomy-header-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2.5rem;
    width: 100%;
}

.zazo-taxonomy-header-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1.25rem;
    width: 100%;
}

.zazo-search-input-group {
    width: 300px;
}

.zazo-search-input {
    flex: 1;
    background: transparent;
    outline: none;
}

.zazo-search-input::placeholder {
    color: #6c757d;
}

.zazo-search-button {
    background: #007cba;
    border: none;
    padding: 0.75rem 1rem;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.zazo-search-button:hover {
    background: #005a87;
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */

.zazo-main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   ÁREA PRINCIPAL
   ========================================================================== */

.zazo-products-main {
    background: white;
    padding: 0;
}

.zazo-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.zazo-products-count {
    font-size: 1rem;
    color: #495057;
}

.zazo-showing-results {
    font-weight: 500;
}

.zazo-category-name,
.zazo-group-name {
    color: #007cba;
    font-weight: 600;
}

.zazo-taxonomy-sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.zazo-taxonomy-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zazo-taxonomy-sidebar-item {
    margin-bottom: 8px;
}

.zazo-taxonomy-sidebar-item a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.zazo-taxonomy-sidebar-item a:hover {
    background: #f3f4f6;
    color: #1f2937;
    border-left-color: #3b82f6;
    transform: translateX(2px);
}

.zazo-taxonomy-sidebar-item.active a {
    background: #eff6ff;
    color: #1d4ed8;
    border-left-color: #3b82f6;
    font-weight: 600;
}

.zazo-taxonomy-sidebar-item a:before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    margin-right: 8px;
    opacity: 0.5;
}

/* ==========================================================================
   GRID DE PRODUTOS
   ========================================================================== */

.zazo-product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.zazo-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.zazo-product-thumb {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8f9fa;
}

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

.zazo-product-card:hover .zazo-product-thumb img {
    transform: scale(1.05);
}

.zazo-product-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-size: 2rem;
}

.zazo-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 124, 186, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.zazo-product-overlay i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.zazo-product-overlay span {
    font-size: 0.9rem;
    font-weight: 500;
}

.zazo-product-info {
    padding: 1rem;
}

.zazo-product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
    line-height: 1.4;
}

.zazo-product-excerpt {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.zazo-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.zazo-product-category,
.zazo-product-group,
.zazo-product-brand {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #495057;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.zazo-product-actions {
    padding: 0 1rem 1rem;
}

.zazo-add-to-quote {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.zazo-add-to-quote:hover {
    background: #005a87;
}

/* ==========================================================================
   ESTADO VAZIO
   ========================================================================== */

.zazo-no-products {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.zazo-no-products-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.zazo-no-products h3 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    color: #495057;
}

.zazo-no-products p {
    font-size: 1rem;
    margin: 0 0 2rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

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

.zazo-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.zazo-pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 0.25rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
}

.zazo-pagination-wrapper .page-numbers:hover,
.zazo-pagination-wrapper .page-numbers.current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.zazo-pagination-wrapper .prev,
.zazo-pagination-wrapper .next {
    width: auto;
    padding: 0 1rem;
}

/* ====== LAYOUT RESPONSIVO COM SIDEBAR ====== */

.zazo-taxonomy-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}

.zazo-taxonomy-sidebar {
    width: 260px;
    min-width: 200px;
    max-width: 320px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
    position: sticky;
    top: 2rem;
    z-index: 2;
}

.zazo-taxonomy-sidebar-content {
    width: 100%;
}

.zazo-taxonomy-sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6b7a3c;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.zazo-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

/* ====== MOBILE/TABLET ====== */
@media (max-width: 1024px) {
    .zazo-taxonomy-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    .zazo-taxonomy-sidebar {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: static;
        top: unset;
        margin-bottom: 0.5rem;
        box-shadow: none;
        border-radius: 8px;
        padding: 1rem 0.5rem;
    }
    .zazo-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    .zazo-main-content {
        padding: 0 0.75rem;
    }
    .zazo-taxonomy-header-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    .zazo-taxonomy-header-column {
        gap: 1rem;
    }
    .zazo-taxonomy-header {
        padding: 1.5rem 0 1.25rem 0;
        margin-bottom: 1.5rem;
    }
    .zazo-taxonomy-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .zazo-taxonomy-sidebar {
        padding: 0.5rem 0.25rem;
        border-radius: 6px;
    }
    .zazo-taxonomy-sidebar-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    .zazo-products-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .zazo-main-content {
        padding: 0 0.5rem;
    }
    .zazo-taxonomy-header {
        padding: 1rem 0 1rem 0;
        margin-bottom: 1rem;
    }
    .zazo-taxonomy-title {
        font-size: 1.15rem;
    }
}

@media (min-width: 1025px) {
    .zazo-taxonomy-sidebar {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    .zazo-main-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ====== AJUSTES GERAIS ====== */
.zazo-taxonomy-sidebar ul,
.zazo-taxonomy-sidebar-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zazo-taxonomy-sidebar li {
    margin-bottom: 0.5rem;
}

.zazo-taxonomy-sidebar li:last-child {
    margin-bottom: 0;
}

.zazo-taxonomy-sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.zazo-taxonomy-sidebar a:hover,
.zazo-taxonomy-sidebar a.active {
    background: #e9ecef;
    color: #007cba;
}

/* ====== FIM DOS AJUSTES DE SIDEBAR E GRID ====== */

/* ==========================================================================
   ANIMAÇÕES
   ========================================================================== */

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

.zazo-product-card {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* ==========================================================================
   ACESSIBILIDADE
   ========================================================================== */

.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;
}

/* Foco visível para navegação por teclado */
.zazo-btn:focus,
.zazo-search-input:focus,
.zazo-add-to-quote:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Contraste melhorado para leitores de tela */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====== AJUSTES DE SIDEBAR E LAYOUT PARA DESKTOP ====== */
@media (min-width: 1024px) {
    .zazo-taxonomy-sidebar-content {
        padding-left: 1rem !important;
    }
    .zazo-taxonomy-sidebar {
        display: block !important;
        position: sticky;
        top: 2rem;
        width: 260px;
        min-width: 220px;
        max-width: 320px;
        height: auto;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        border: 1px solid #f0f0f0;
        border-radius: 10px;
        padding: 1.5rem 1rem;
        margin-left: 0 !important;
        padding-left: 0 !important;
        margin-bottom: 2rem;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .zazo-taxonomy-sidebar[hidden] {
        display: block !important;
    }
    .zazo-sidebar-toggle {
        display: none !important;
    }
    .zazo-main-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* ====== LAYOUT FLEX COM GAP ENTRE SIDEBAR E GRID ====== */
.zazo-taxonomy-row {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
}

/* ====== MOBILE/TABLET: SIDEBAR COLAPSÁVEL ====== */
@media (max-width: 1023px) {
    .zazo-taxonomy-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    .zazo-taxonomy-sidebar[hidden] {
        display: none !important;
    }
    .zazo-taxonomy-sidebar {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: static;
        box-shadow: none;
        background: none;
        border-radius: 8px;
        border: 1px solid #f0f0f0;
        padding: 1rem 0.5rem;
        margin-bottom: 0.5rem;
    }
    .zazo-sidebar-toggle {
        display: inline-flex !important;
        margin-bottom: 1rem;
    }
    .zazo-main-content {
        padding: 0 0.75rem;
    }
}

/* ====== REMOVE QUALQUER MARGIN/PADDING À ESQUERDA DA SIDEBAR EM DESKTOP ====== */
@media (min-width: 1024px) {
    .zazo-taxonomy-sidebar {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}
