/* =====================================================
   CATEGORIAS - Layout da navegação de categorias da home
   (movido de includes/nav.php)
   Obs.: a aparência dinâmica (altura/fonte definidas no admin)
   continua inline no nav.php pois depende de variáveis PHP.
===================================================== */

/* =========================
   BLOCO GERAL
========================= */

.main-nav-section {
    background: #ffffff;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid #edf2ee;
    box-shadow: 0 6px 20px rgba(0,0,0,.035);
    margin-bottom: 16px;
}

/* =========================
   AVISO CARTÃO CLEAN
========================= */

.cartao-clean-box {
    width: 100%;
    margin-bottom: 14px;
    padding: 10px 11px;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;

    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 15px;

    text-decoration: none;
    color: #111827;

    box-shadow: 0 4px 14px rgba(0,0,0,.035);

    transition: .2s ease;
}

.cartao-clean-box:hover {
    text-decoration: none;
    color: #111827;
    border-color: #009ee3;
    background: #f8fbff;
    transform: translateY(-1px);
}

.cartao-clean-logo {
    width: 78px;
    height: 40px;
    border-radius: 12px;
    background: #f8fbff;
    border: 1px solid #e2e8f0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 6px;
}

.cartao-clean-logo img {
    max-width: 100%;
    max-height: 28px;
    object-fit: contain;
    display: block;
}

.cartao-clean-texto {
    min-width: 0;
}

.cartao-clean-tag {
    display: inline-flex;
    width: max-content;

    margin-bottom: 3px;
    padding: 3px 7px;

    border-radius: 999px;

    background: #e0f2fe;
    color: #0369a1;

    font-size: 9px;
    font-weight: 900;
    line-height: 1;

    text-transform: uppercase;
    letter-spacing: .35px;
}

.cartao-clean-texto strong {
    display: block;
    font-size: 15px;
    font-weight: 950;
    color: #0f172a;
    line-height: 1.15;
    margin-bottom: 2px;
}

.cartao-clean-texto span:last-child {
    display: block;
    font-size: 11.2px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.3;
}

.cartao-clean-icon {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;

    display: flex;
    align-items: center;
    justify-content: center;
}

.cartao-clean-icon i {
    font-size: 17px;
}

/* =========================
   TÍTULO CATEGORIAS
========================= */

.categoria-header {
    margin-bottom: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Texto "EXPLORE POR" + "Categorias" lado a lado (uma linha só) */
.categoria-header > div {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.categoria-header span {
    display: inline;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 1;
}

.categoria-header strong {
    display: inline;
    margin-top: 0;
    font-size: 18px;
    color: #111827;
    font-weight: 950;
    letter-spacing: -0.4px;
    line-height: 1;
}

.categoria-header i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #28a745;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
}

/* =========================
   CATEGORIAS MAIS DESTACADAS
========================= */

.categories-list-new {
    list-style: none;
    margin: 0;
    padding: 0;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.categories-list-new li {
    display: flex;
}

.category-link-new {
    width: 100%;
    min-height: 76px;

    padding: 10px 6px;

    background: #ffffff;
    border: 1.5px solid #e6f4ea;
    border-radius: 17px;

    color: #166534;
    text-decoration: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 7px;

    box-shadow: 0 5px 14px rgba(40,167,69,.07);

    transition: .2s ease;
}

.category-link-new:hover {
    background: #28a745;
    color: #ffffff;
    border-color: #28a745;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(40,167,69,.20);
}

.category-link-new.destaque {
    background: #ecfdf5;
    border-color: #28a745;
}

/* Mantém o destaque legível no hover (fundo verde + texto branco) */
.category-link-new.destaque:hover {
    background: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.category-icon {
    width: 34px;
    height: 34px;

    border-radius: 13px;
    background: #f0fdf4;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: .2s ease;
}

.category-link-new:hover .category-icon {
    background: rgba(255,255,255,.18);
}

.category-icon i {
    font-size: 18px;
    color: #28a745;
    transition: .2s ease;
}

.category-link-new:hover .category-icon i {
    color: #ffffff;
}

.category-icon img {
    width: 19px;
    height: 19px;
    object-fit: contain;

    filter:
        brightness(0)
        saturate(100%)
        invert(43%)
        sepia(88%)
        saturate(425%)
        hue-rotate(85deg)
        brightness(92%)
        contrast(92%);
}

.category-link-new:hover .category-icon img {
    filter: brightness(0) invert(1);
}

.category-link-new span {
    font-size: 11.5px;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
}

/* =========================
   MOBILE
========================= */

@media(max-width:480px) {

    .main-nav-section {
        padding: 10px;
        border-radius: 16px;
    }

    .cartao-clean-box {
        padding: 9px;
        gap: 8px;
        border-radius: 14px;
        grid-template-columns: auto 1fr;
    }

    .cartao-clean-logo {
        width: 68px;
        height: 37px;
    }

    .cartao-clean-logo img {
        max-height: 25px;
    }

    .cartao-clean-tag {
        font-size: 8.5px;
        padding: 3px 6px;
    }

    .cartao-clean-texto strong {
        font-size: 13.5px;
    }

    .cartao-clean-texto span:last-child {
        font-size: 10.1px;
        line-height: 1.25;
    }

    .cartao-clean-icon {
        display: none;
    }

    .categoria-header {
        margin-bottom: 8px;
    }

    .categoria-header strong {
        font-size: 17px;
    }

    .categoria-header i {
        width: 31px;
        height: 31px;
        border-radius: 11px;
        font-size: 15px;
    }

    .categories-list-new {
        gap: 7px;
    }

    .category-link-new {
        min-height: 66px;
        padding: 8px 4px;
        border-radius: 15px;
        gap: 5px;
    }

    .category-icon {
        width: 30px;
        height: 30px;
        border-radius: 11px;
    }

    .category-icon i {
        font-size: 16px;
    }

    .category-icon img {
        width: 17px;
        height: 17px;
    }

    .category-link-new span {
        font-size: 10px;
    }
}

/* CELULAR MUITO PEQUENO */
@media(max-width:360px) {

    .cartao-clean-logo {
        width: 64px;
    }

    .cartao-clean-texto strong {
        font-size: 12.8px;
    }

    .cartao-clean-texto span:last-child {
        font-size: 9.6px;
    }

    .categories-list-new {
        gap: 5px;
    }

    .category-link-new {
        min-height: 62px;
    }

    .category-link-new span {
        font-size: 9.4px;
    }
}
