/* =========================================
   PRODUCTS PAGE — Soares de Sousa
   Ficheiro: assets/css/products.css
   Descrição: Estilos da página Produtos e Soluções.
   Inclui hero, filtros responsivos, cartões de produto
   com imagem única ou carrossel automático, estado vazio,
   CTA e adaptação para tablet e mobile.
   ========================================= */

.products-hero {
    padding: 64px 0 44px;
    background: #f5f7fa;
    border-bottom: 1px solid var(--line);
}

.products-hero-content {
    max-width: 760px;
}

.products-hero-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #123a63;
}

.products-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    color: #16212b;
}

.products-hero p {
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
    color: #57646f;
}

/* =========================================
   FILTERS — RESPONSIVE CHIPS
   ========================================= */

.products-filters-section {
    padding: 28px 0 10px;
}

.product-filters {
    display: grid;
    gap: 16px;
}

.filter-group {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: start;
    gap: 14px;
}

.filter-label {
    padding-top: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #5a6572;
    white-space: nowrap;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border: 1px solid #d9e0e8;
    border-radius: 6px;
    background: #ffffff;
    color: #22303c;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.filter-chip:hover {
    border-color: #9db4c8;
    background: #f6f9fc;
}

.filter-chip.is-active {
    background: #123a63;
    border-color: #123a63;
    color: #ffffff;
}

/* =========================================
   PRODUCT CARDS
   ========================================= */

.products-grid-section {
    padding: 24px 0 64px;
}

.featured-products {
    display: grid;
    margin-bottom: 26px;
}

.featured-products .product-card {
    min-height: 320px;
}

.featured-products .product-card-title {
    font-size: 28px;
}

.featured-products .product-card-text {
    font-size: 17px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.product-card {
    height: 100%;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 35, 55, .05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: #c9d6e2;
    box-shadow: 0 12px 28px rgba(15, 35, 55, .09);
}

.product-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.product-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.product-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
}

/* =========================================
   PRODUCT CARD CAROUSEL
   Descrição: Permite mostrar várias imagens
   em rotação automática dentro de cada cartão.
   ========================================= */

.product-card-carousel {
    position: relative;
}

.product-card-carousel .product-card-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
    opacity: 0;
    transition: opacity .55s ease;
    pointer-events: none;
}

.product-card-carousel .product-card-slide.is-active {
    opacity: 1;
}

.product-card-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.product-card-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(18, 58, 99, .25);
    transition: background .2s ease;
}

.product-card-dot.is-active {
    background: #123a63;
}

.product-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.product-card-tag {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 5px 10px;
    border-radius: 5px;
    background: #eaf1f8;
    color: #123a63;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.product-card-title {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.25;
    color: #16212b;
}

.product-card-text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.55;
    color: #57646f;
}

.product-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    font-size: 14px;
    font-weight: 600;
    color: #123a63;
}

.product-card-arrow {
    transition: transform .18s ease;
}

.product-card:hover .product-card-arrow {
    transform: translateX(4px);
}

/* =========================================
   EMPTY STATE
   ========================================= */

.products-empty {
    padding: 56px 28px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    text-align: center;
}

.products-empty h2 {
    margin: 0 0 12px;
    font-size: 24px;
    color: #16212b;
}

.products-empty p {
    max-width: 520px;
    margin: 0 auto 22px;
    color: #57646f;
}

/* =========================================
   CTA
   ========================================= */

.products-cta {
    padding: 0 0 72px;
}

.products-cta-card {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    align-items: center;
    gap: 32px;
    padding: 40px;
    border-radius: 12px;
    background: #123a63;
    color: #ffffff;
}

.products-cta-content h2 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    line-height: 1.2;
}

.products-cta-content p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
}

.products-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.products-cta-actions .btn {
    width: 100%;
    text-align: center;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 980px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-cta-card {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px;
    }

    .products-cta-actions {
        flex-direction: row;
    }

    .products-cta-actions .btn {
        width: auto;
    }
}

@media (max-width: 640px) {
    .products-hero {
        padding: 44px 0 32px;
    }

    .products-hero p {
        font-size: 16px;
    }

    .products-filters-section {
        padding: 20px 0 6px;
    }

    .product-filters {
        gap: 12px;
    }

    .filter-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .filter-label {
        padding-top: 0;
        font-size: 12px;
    }

    .filter-chips {
        gap: 7px;
    }

    .filter-chip {
        padding: 9px 13px;
        font-size: 13px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .featured-products .product-card {
        min-height: auto;
    }

    .featured-products .product-card-title {
        font-size: 23px;
    }

    .featured-products .product-card-text {
        font-size: 15px;
    }

    .products-cta-card {
        padding: 26px 20px;
    }

    .products-cta-actions {
        flex-direction: column;
    }

    .products-cta-actions .btn {
        width: 100%;
    }
}