/* Stellantis category description and horizontally scrollable brand index. */
.g1-archive-header-text {
    min-width: 0 !important;
}

.categoria-stellantis-wrapper {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
}

.stellantis-category-description {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.5;
}

.scroll-wrapper-desktop-fix {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.scroll-wrapper-desktop-fix::after {
    content: "\2192";
    position: absolute;
    z-index: 5;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 60px;
    height: 100%;
    padding-right: 10px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 30%);
    color: #c00;
    font-size: 24px;
    font-weight: 700;
    pointer-events: none;
    animation: scrollHint 1.5s 3 ease-in-out;
}

@keyframes scrollHint {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(5px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-wrapper-desktop-fix::after {
        animation: none;
    }
}

.category-brand-grid {
    display: flex;
    flex-wrap: nowrap;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 10px 0 20px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-brand-grid::-webkit-scrollbar {
    display: none;
}

.brand-link {
    flex: 0 0 auto;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f8f8f8;
    color: #333 !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
        transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-link:hover {
    border-color: #c00;
    background-color: #c00;
    color: #fff !important;
    box-shadow: 0 5px 12px rgba(204, 0, 0, 0.15);
    transform: translateY(-3px);
}

@media (min-width: 992px) {
    .scroll-wrapper-desktop-fix::after {
        display: none;
    }

    .category-brand-grid {
        justify-content: space-between;
        padding-bottom: 0;
        gap: 4px;
        overflow-x: visible;
    }

    .brand-link {
        flex: 1 1 auto;
        min-width: 0;
        padding: 8px 2px;
        overflow: hidden;
        font-size: 13px;
        text-align: center;
        text-overflow: ellipsis;
    }
}

@media (max-width: 768px) {
    .stellantis-category-description {
        font-size: 15px;
    }

    .brand-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}
