/* ============================================================================
   CATEGORIAS — Categorias Section
   Prefixo: .categorias-* | Totalmente modular, isolado e responsivo
   Degradê de destaque com a cor: #2E1318
   ============================================================================ */

/* ── Seção wrapper ──────────────────────────────────────────── */
.categorias-section {
    margin-bottom: 10px !important;
    margin-top: -20px !important;
    position: relative;
}

/* ── Header: Título ─────────────────────────────────────────── */
.categorias-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    margin-bottom: 18px;
    padding: 0 4%;
}

.categorias-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    flex-shrink: 0;
}

.categorias-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: #E63946;
    border-radius: 2px;
    flex-shrink: 0;
    order: 0;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.4);
}

.categorias-title i {
    font-size: 20px;
    color: var(--text-muted, #8E98A5);
    order: -1;
}

/* ── Carousel Container & Botões ────────────────────────────── */
.categorias-carousel-container {
    position: relative;
    width: 100%;
}

.categorias-carousel-container .carousel-btn {
    z-index: 9999 !important;
}

@media (min-width: 769px) {
    .categorias-carousel-container:hover .carousel-btn {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* ── Grid scroll horizontal ─────────────────────────────────── */
@keyframes categoriasFadeIn {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.categorias-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 16px 4% 24px;
    margin: -8px 0 -12px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    animation: categoriasFadeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.categorias-grid::-webkit-scrollbar {
    display: none;
}

.categorias-grid::-webkit-scrollbar-track,
.categorias-grid::-webkit-scrollbar-thumb {
    background: transparent;
}

/* ── Card Wrapper ──────────────────────────────────────────── */
.categorias-card-wrapper {
    position: relative;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* ── Card Banner ───────────────────────────────────────────── */
.categorias-card {
    display: block;
    width: 240px;
    min-width: 240px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-m, 16px);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    background: #111A25;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform var(--dur-slow, 350ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
                box-shadow var(--dur-slow, 350ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
                border-color var(--dur-base, 240ms) ease;
    will-change: transform;
    isolation: isolate;
    text-decoration: none;
}

.categorias-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--dur-slow, 350ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
                filter var(--dur-slow, 350ms) ease;
}

/* Overlay com o degradê contendo a cor #2E1318 */
.categorias-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(46, 19, 24, 0.45) 0%,
        rgba(17, 26, 37, 0.25) 50%,
        rgba(46, 19, 24, 0.65) 100%
    );
    z-index: 2;
    pointer-events: none;
    border-radius: var(--radius-m, 16px);
    transition: opacity var(--dur-base, 240ms) ease, background var(--dur-base, 240ms) ease;
}

/* Borda luminosa no hover */
.categorias-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-m, 16px);
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(46, 19, 24, 0.8), rgba(230, 57, 70, 0.6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 4;
    opacity: 0;
    transition: opacity var(--dur-base, 240ms) ease;
    pointer-events: none;
}

/* Efeito Hover Desktop */
.categorias-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 30px rgba(46, 19, 24, 0.65), 0 4px 16px rgba(230, 57, 70, 0.3);
    border-color: rgba(230, 57, 70, 0.4);
}

.categorias-card:hover::before {
    opacity: 1;
}

.categorias-card:hover img {
    transform: scale(1.08);
    filter: brightness(1.08);
}

.categorias-card:hover::after {
    background: linear-gradient(
        135deg,
        rgba(46, 19, 24, 0.25) 0%,
        transparent 50%,
        rgba(46, 19, 24, 0.50) 100%
    );
}

/* ── Responsividade Mobile ─────────────────────────────────── */
@media (max-width: 768px) {
    .categorias-grid {
        padding: 10px 4% 18px !important;
        gap: 12px !important;
        margin: 0 !important;
    }

    .categorias-card,
    .categorias-card-wrapper {
        width: 175px !important;
        min-width: 175px !important;
    }

    .categorias-card:hover {
        transform: none !important;
    }

    .categorias-card:active {
        transform: scale(0.96) !important;
    }
}

@media (max-width: 480px) {
    .categorias-card,
    .categorias-card-wrapper {
        width: 155px !important;
        min-width: 155px !important;
    }
}
