/* ============================================================
   MHDCommerce — Departamento & Categoria
   Adicionar ao final do site.css
   ============================================================ */

/* ── HERO DO DEPARTAMENTO / CATEGORIA ── */
.dept-hero { background: linear-gradient(115deg, var(--brand-dark) 0%, #0e3d23 100%); }
.dept-hero-inner { max-width: 1320px; margin: 0 auto; padding: 28px 32px; }
.dept-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: rgba(255,255,255,.5); margin-bottom: 10px;
}
.dept-breadcrumb a { color: rgba(255,255,255,.5); text-decoration: none; transition: color .15s; }
.dept-breadcrumb a:hover { color: #7de0a8; }
.dept-breadcrumb span { color: rgba(255,255,255,.3); }
.dept-hero-title {
    font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 700; color: #fff;
    display: flex; align-items: center; gap: 12px;
}
.dept-hero-emoji { font-size: 32px; line-height: 1; }
.dept-hero-count { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 6px; }

/* ── PILLS BAR ── */
.cat-pills-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 68px; /* altura do header */
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.cat-pills-bar-inner {
    max-width: 1320px; margin: 0 auto;
    padding: 10px 32px;
    display: flex; align-items: center; gap: 8px;
}

/* Separador vertical */
.pills-sep {
    width: 1px; height: 28px;
    background: var(--border); flex-shrink: 0; margin: 0 4px;
}

/* Botão "Todas as categorias" */
.cat-all-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 16px; border-radius: var(--radius-sm);
    background: var(--brand); color: #fff;
    font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700;
    border: none; cursor: pointer; white-space: nowrap; flex-shrink: 0;
    transition: background .15s; position: relative;
}
.cat-all-btn:hover { background: var(--brand-mid); }
.cat-all-btn.open  { background: var(--brand-dark); }
.cat-all-btn svg { width: 13px; height: 13px; }
.cat-all-btn .arrow { transition: transform .2s; }
.cat-all-btn.open .arrow { transform: rotate(180deg); }

/* Pills Top 8 — fixas, sem scroll */
.cat-pills-list { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.cat-pill {
    display: inline-flex; align-items: center;
    padding: 6px 16px; border-radius: 99px;
    font-size: 13px; font-weight: 600; white-space: nowrap;
    cursor: pointer; text-decoration: none;
    border: 1.5px solid var(--border); color: var(--text-2);
    background: var(--white); transition: all .15s; flex-shrink: 0;
}
.cat-pill:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-xlight); }
.cat-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── FLYOUT DE CATEGORIAS ── */
.cat-flyout-wrap { position: relative; flex-shrink: 0; }
.cat-flyout {
    position: absolute; top: calc(100% + 10px); left: 0;
    width: 700px; background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(0,0,0,.14);
    opacity: 0; pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
    z-index: 300; overflow: hidden;
}
.cat-flyout.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.cat-flyout-header {
    background: var(--brand-xlight); padding: 13px 22px;
    border-bottom: 1px solid var(--border);
    font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700;
    color: var(--brand-dark); display: flex; align-items: center; gap: 8px;
}
.cat-flyout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px; }
.cat-flyout-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px; border-radius: var(--radius-sm);
    text-decoration: none; color: var(--text-2);
    font-size: 13px; font-weight: 500;
    transition: background .12s, color .12s; cursor: pointer;
}
.cat-flyout-item:hover { background: var(--brand-light); color: var(--brand); }
.cat-flyout-item.active { background: var(--brand-light); color: var(--brand); font-weight: 700; }
.cfi-icon { font-size: 17px; width: 24px; text-align: center; flex-shrink: 0; }
.cfi-name { flex: 1; }
.cfi-count {
    margin-left: auto; font-size: 11px; color: var(--muted);
    background: var(--bg); border-radius: 99px; padding: 1px 7px; flex-shrink: 0;
}
.cat-flyout-footer {
    border-top: 1px solid var(--border); padding: 11px 22px;
    background: #fafaf8; font-size: 12px; color: var(--muted);
    display: flex; align-items: center; justify-content: space-between;
}
.cat-flyout-footer a { color: var(--brand); font-weight: 700; text-decoration: none; }
.cat-flyout-footer a:hover { text-decoration: underline; }

/* Overlay flyout categorias */
.cat-overlay { display: none; position: fixed; inset: 0; z-index: 99; }
.cat-overlay.active { display: block; }

/* ── SCROLL LOADER ── */
.scroll-loader { display: flex; justify-content: center; align-items: center; padding: 32px 0; }
.scroll-loader-dots { display: flex; gap: 8px; }
.scroll-loader-dots span {
    width: 10px; height: 10px; border-radius: 99px; background: var(--brand);
    animation: loaderBounce .6s ease-in-out infinite;
}
.scroll-loader-dots span:nth-child(2) { animation-delay: .1s; }
.scroll-loader-dots span:nth-child(3) { animation-delay: .2s; }
@keyframes loaderBounce {
    0%, 100% { transform: translateY(0); opacity: .4; }
    50%       { transform: translateY(-8px); opacity: 1; }
}

/* ── FIM DA LISTAGEM ── */
.scroll-fim { text-align: center; padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
.scroll-fim a { color: var(--brand); font-weight: 600; text-decoration: none; margin-left: 6px; }
.scroll-fim a:hover { text-decoration: underline; }

/* ── BARRA DE ORDENAÇÃO ── */
.sort-bar { background: var(--white); border-bottom: 1px solid var(--border); }
.sort-bar-inner {
    max-width: 1320px; margin: 0 auto;
    padding: 10px 32px;
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px;
}
.sort-label {
    font-size: 13px; font-weight: 600; color: var(--muted);
    white-space: nowrap; flex-shrink: 0;
}
.sort-pills { display: flex; align-items: center; gap: 6px; }
.sort-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 99px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
    cursor: pointer; text-decoration: none;
    border: 1.5px solid var(--border); color: var(--text-2);
    background: var(--white); transition: all .15s; flex-shrink: 0;
}
.sort-pill:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-xlight); }
.sort-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.sort-pill svg { width: 12px; height: 12px; }
.sort-count {
    font-size: 13px; color: var(--muted);
    white-space: nowrap; flex-shrink: 0;
}
.sort-count strong { color: var(--text); }
