/* Estilos específicos para a página de catálogos */

/* Seção Hero de Catálogos */
.catalog-hero {
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #17A649;
}

.hero-content {
    text-align: center;
    align-items: center;
    position: relative;
    z-index: 2;

}

.hero-text {
    animation: slideInFromLeft 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 204, 102, 0.5);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.hero-description {
    font-size: 1.3rem;
    color: #ccc;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.stat-item:nth-child(2) {
    animation-delay: 0.7s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.9s;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 204, 102, 0.6);
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: #ccc;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-image {
    animation: slideInFromRight 1s ease-out 0.3s both;
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    filter: drop-shadow(0 20px 60px rgba(0, 204, 102, 0.582));
    transition: transform 0.3s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* Grid de Catálogos */
.catalogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
    justify-content: center;
    justify-items: center;
}

.catalogs-grid.grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
}

.catalog-card {
    border-radius: 10px;
    max-width: 320px;
    /* Reduced from 400px */
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    animation: fadeInUp 0.8s ease-out both;
}

.catalog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.catalog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.catalog-card:nth-child(3) {
    animation-delay: 0.3s;
}

.catalog-card:nth-child(4) {
    animation-delay: 0.4s;
}

.catalog-card:nth-child(5) {
    animation-delay: 0.5s;
}

.catalog-card:nth-child(6) {
    animation-delay: 0.6s;
}

.catalog-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 204, 102, 0.05) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.catalog-card:hover::after {
    transform: translateX(100%);
}

.catalog-card:hover {
    transform: translateY(-10px) scale(1.02);
    /* Slightly less float */
    border-color: var(--primary);
}

.catalog-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

/* Container que alinha a busca e as tags */
.container-filtros {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    /* Espaço entre a caixa de busca e os botões */
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* --- Botões de Filtro/Tags --- */
.tags-container {
    flex-wrap: wrap;
    gap: 20px;
}

.tag-button {
    background-color: white;
    color: #5a627d;
    /* Cor do texto (Roxo/Azul escuro na imagem) */
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    /* Bordas bem arredondadas (pílula) */
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    white-space: nowrap;
    /* Evita que o texto quebre a linha dentro do botão */
}

.tag-button:hover {
    background-color: #f0f0f0;
}

/* Estilo para o botão principal/ativo ("Todos os Produtos") */
.tag-button.primary {
    background-color: #28a745;
    /* Cor de fundo verde */
    color: white;
    border-color: #28a745;
    font-weight: bold;
}

.catalog-image {
    height: 400px;
    /* Reduced from 550px */
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    /* Background for transparent images */
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-image img {
    width: 100%;
    height: 100%;
    /* Fill container */
    object-fit: cover;
    /* Default to cover for all content images */
    transition: transform 0.8s ease;
    padding: 0;
}

.catalog-image img.img-contain {
    object-fit: contain !important;
    padding: 30px !important;
}

.catalog-card:hover .catalog-image img {
    transform: scale(1.1);
}

.catalog-info {
    padding: 25px;
}

.catalog-category {
    color: #5a627d;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.catalog-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #000011;
}

.catalog-description {
    color: #5a627d;
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.catalog-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.spec-item {
    border-radius: 8px;
    text-align: start;
    font-size: 13px;
    font-weight: 600;
    color: #5a627d;
}

.catalog-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    align-items: center;
}

.catalog-actions .btn {
    width: 100%;
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.catalog-actions .btn:hover::before {
    left: 100%;
}

.catalog-actions .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: #e0e0e0;
    box-shadow: 0 8px 25px rgba(0, 204, 102, 0.4);
}

.btn-mark {
    width: 100%;
    flex: 1;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-mark:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 204, 102, 0.4);
}

.help {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 40px 0;
    margin-top: 20px;
    z-index: -1;
}

.help p,
.help h2 {
    color: #f2f2ff;
}

/* Animações */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleGlow {
    from {
        text-shadow: 0 0 10px rgba(0, 204, 102, 0.5);
    }

    to {
        text-shadow: 0 0 20px rgba(0, 204, 102, 0.8), 0 0 30px rgba(0, 204, 102, 0.4);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-stats {
        justify-content: center;
        gap: 30px;
    }

    .catalogs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .catalog-actions {
        flex-direction: column;
    }

    .catalog-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .catalog-hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* --- Modal Styles (Adapted from Products) --- */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    padding: 20px;
}

.product-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-modal-content {
    background: white;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 20px;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.product-modal-overlay.active .product-modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1010;
    /* Above modal content */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    color: #333;
}

.modal-close-btn:hover {
    transform: scale(1.1);
}

.modal-image-container {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 300px;
    overflow: hidden;
    /* For zoom */
}

.modal-image-container img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    transition: transform 0.5s ease;
    cursor: zoom-in;
}

.modal-image-container img:hover {
    transform: scale(1.6);
}

.modal-info-container {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: white;
}

.modal-product-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.modal-product-category {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.modal-product-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 0;
}

.modal-section {
    margin-bottom: 30px;
}

.modal-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-product-description {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
}

.modal-specs {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.modal-specs p {
    margin-bottom: 10px;
    color: #555;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.modal-specs p:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.modal-specs strong {
    color: #333;
}

.modal-actions {
    margin-top: auto;
    display: grid;
    gap: 15px;
}

.btn-primary-custom {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-outline-custom:hover {
    background: rgba(0, 204, 102, 0.1);
    transform: translateY(-2px);
    color: var(--primary);
}

/* Loading State */
.modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-loading.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Modal */
@media (max-width: 900px) {
    .product-modal-content {
        flex-direction: column;
        width: 95%;
        max-height: 95vh;
        overflow-y: auto;
    }

    .modal-image-container {
        min-height: 250px;
        padding: 20px;
    }

    .modal-image-container img {
        max-height: 300px;
    }

    .modal-info-container {
        padding: 25px;
        overflow-y: visible;
    }
}