/* ==========================================================================
   Productos - EXCLUSIVO de Pages/Productos/Index.razor.
   Clases propias y aisladas (products-*, product-category-*, product-brand-*):
   no reutiliza ni modifica .sc-feature-row/.sc-logo-card ni ningún estilo
   usado por Servicios u otras páginas.
   ========================================================================== */

/* ==========================================================================
   HERO
   ========================================================================== */

.products-hero {
    padding: 64px 0 8px;
    background: var(--background);
}

.products-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

.products-hero__title {
    font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.1;
    margin-bottom: 16px;
}

.products-hero__text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin-bottom: 32px;
}

.products-hero__benefits {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.products-hero__benefit {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 190px;
}

.products-hero__benefit-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(227, 6, 19, 0.06);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .products-hero__benefit-icon svg {
        width: 19px;
        height: 19px;
    }

.products-hero__benefit strong {
    display: block;
    font-size: 0.9rem;
    color: var(--dark);
}

.products-hero__benefit span {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.products-hero__media {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4 / 3.05;
    box-shadow: 0 24px 54px rgba(14, 14, 14, 0.10);
}

    .products-hero__media img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ==========================================================================
   SOFTWARE
   ========================================================================== */

.products-software {
    margin-top: 56px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.products-software__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(227, 6, 19, 0.06);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .products-software__icon svg {
        width: 24px;
        height: 24px;
    }

.products-software__content {
    flex: 0 1 300px;
}

.products-software__eyebrow {
    display: block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.products-software__title {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.products-software__text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.products-software__divider {
    width: 1px;
    align-self: stretch;
    background: var(--border);
    flex-shrink: 0;
}

.products-software__brands {
    flex: 1 1 320px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.products-software__brand {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 14px;
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

    .products-software__brand img {
        max-height: 20px;
        max-width: 76px;
        object-fit: contain;
    }

    .products-software__brand span {
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--text-primary);
        white-space: nowrap;
    }

.products-software__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 12px 20px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

    .products-software__cta svg {
        width: 16px;
        height: 16px;
        transition: transform .2s ease;
    }

    .products-software__cta:hover {
        background: var(--primary);
        color: #fff;
        transform: translateY(-2px);
    }

        .products-software__cta:hover svg {
            transform: translateX(3px);
        }

/* ==========================================================================
   GRID DE CATEGORÍAS
   ========================================================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-top: 56px;
}

.product-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(14, 14, 14, 0.04);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

    .product-category-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 36px rgba(14, 14, 14, 0.08);
        border-color: rgba(227, 6, 19, 0.25);
    }

/* ==========================================================================
   IMAGEN DE CATEGORÍA
   Todas mantienen exactamente la misma altura.
   ========================================================================== */

.product-category-image {
    position: relative;
    width: 100%;
    height: 250px;
    flex-shrink: 0;
    overflow: visible;
}

.product-category-image__clip {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
}

    .product-category-image__clip img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform .35s ease;
    }

.product-category-card:hover .product-category-image__clip img {
    transform: scale(1.03);
}

/* ==========================================================================
   ICONO SUPERPUESTO
   ========================================================================== */

.product-category-icon {
    position: absolute;
    z-index: 3;
    left: 20px;
    bottom: -22px;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(14, 14, 14, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

    .product-category-icon svg {
        width: 24px;
        height: 24px;
    }

/* ==========================================================================
   CRÉDITO DE IMAGEN
   ========================================================================== */

.product-category-credit {
    position: absolute;
    z-index: 4;
    right: 8px;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(14, 14, 14, 0.62);
    color: #fff;
    font-size: 0.6rem;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

    .product-category-credit:hover {
        background: rgba(14, 14, 14, 0.82);
        color: #fff;
    }

/* ==========================================================================
   CONTENIDO DE LAS CARDS
   ========================================================================== */

.product-category-body {
    padding: 42px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .product-category-body h3 {
        font-size: 1.12rem;
        line-height: 1.3;
        color: var(--dark);
        margin-bottom: 8px;
    }

    .product-category-body p {
        color: var(--text-secondary);
        font-size: 0.88rem;
        line-height: 1.55;
        margin-bottom: 16px;
    }

/* ==========================================================================
   LISTA DE PRODUCTOS
   ========================================================================== */

.product-category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
}

    .product-category-list li {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        font-size: 0.86rem;
        line-height: 1.45;
        color: var(--text-secondary);
    }

        .product-category-list li svg {
            width: 15px;
            height: 15px;
            color: var(--primary);
            flex-shrink: 0;
            margin-top: 3px;
        }

/* ==========================================================================
   MARCAS DESTACADAS
   ========================================================================== */

.product-brands {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: auto;
}

.product-brands__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.product-brands__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.product-brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 38px;
    padding: 6px;
    background: var(--background-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* Card de enlace (Huawei eKit): en vez de chips de marcas, cierra con un
   enlace directo a su página dedicada. */
.product-category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.88rem;
    transition: gap .2s ease, color .2s ease;
}

    .product-category-link svg {
        width: 16px;
        height: 16px;
    }

    .product-category-link:hover {
        gap: 12px;
        color: var(--primary-hover);
    }

    .product-brand-item img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .product-brand-item span {
        font-size: 0.68rem;
        font-weight: 700;
        color: var(--text-primary);
        text-align: center;
        line-height: 1.1;
    }

/* ==========================================================================
   RESPONSIVE - TABLET
   ========================================================================== */

@media (max-width: 992px) {
    .products-hero__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .products-hero__media {
        margin-top: 8px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .products-hero {
        padding: 48px 0 8px;
    }

    .products-software {
        margin-top: 40px;
        padding: 24px 22px;
        gap: 20px;
    }

    .products-software__divider {
        display: none;
    }

    .products-software__content {
        flex: 1 1 220px;
    }

    .products-software__brands {
        flex-basis: 100%;
    }

    .products-software__cta {
        width: 100%;
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
        margin-top: 40px;
        gap: 24px;
    }

    .product-category-image,
    .product-category-image__clip {
        height: 240px;
    }
}

/* ==========================================================================
   RESPONSIVE - MOBILE PEQUEÑO
   ========================================================================== */

@media (max-width: 576px) {
    .products-hero__benefits {
        flex-direction: column;
        gap: 16px;
    }

    .products-hero__benefit {
        max-width: none;
    }

    .products-hero__media {
        aspect-ratio: 16 / 11;
    }

    .products-software {
        padding: 22px 18px;
    }

    .products-software__brands {
        gap: 8px;
    }

    .products-software__brand {
        height: 40px;
        padding: 0 10px;
    }

    .product-category-image,
    .product-category-image__clip {
        height: 220px;
    }

    .product-category-body {
        padding: 40px 18px 20px;
    }

    .product-category-icon {
        left: 18px;
        width: 50px;
        height: 50px;
        bottom: -21px;
    }

        .product-category-icon svg {
            width: 22px;
            height: 22px;
        }

    .product-brands__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
