/* =====================================================================
   Comex Evolution - catalogo B2B
   Direcao: catalogo de exportacao premium. Verde profundo + dourado,
   fundo papel, tipografia com caracter (Fraunces display / Archivo corpo).
   ===================================================================== */

:root {
    --paper:      #f7f4ec;
    --paper-2:    #efe9dc;
    --ink:        #1b1a16;
    --ink-soft:   #514c40;
    --green:      #0f3d2e;
    --green-700:  #155040;
    --green-300:  #4e8b73;
    --gold:       #b8893b;
    --gold-soft:  #e7cf9b;
    --line:       #ddd5c4;
    --white:      #fffdf8;
    --danger:     #9c3b2e;
    --radius:     14px;
    --shadow:     0 10px 30px -12px rgba(15,61,46,.28);
    --shadow-sm:  0 4px 14px -8px rgba(15,61,46,.35);
    --maxw:       1200px;
    --font-disp:  "Fraunces", Georgia, serif;
    --font-body:  "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(900px 500px at 88% -8%, rgba(184,137,59,.10), transparent 60%),
        radial-gradient(800px 600px at -5% 0%, rgba(15,61,46,.07), transparent 55%),
        var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-disp); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -.01em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--ink-soft); }

/* ---------- Botoes ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-body); font-weight: 600; font-size: .92rem;
    padding: .7rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-700); }
.btn-gold { background: var(--gold); color: #2a1d05; }
.btn-gold:hover { background: #caa052; }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green-300); background: var(--white); }
.btn-sm { padding: .45rem .85rem; font-size: .82rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Topbar + Header ---------- */
.topbar {
    background: var(--green); color: var(--gold-soft);
    font-size: .78rem; letter-spacing: .03em;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar a { color: var(--gold-soft); opacity: .9; }
.topbar a:hover { opacity: 1; color: var(--white); }
.langsel { display: flex; gap: .15rem; align-items: center; }
.langsel a { padding: .1rem .4rem; border-radius: 6px; text-transform: uppercase; font-weight: 600; }
.langsel a.on { background: rgba(255,255,255,.14); color: var(--white); }

.header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(247,244,236,.86); backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 1.4rem; height: 70px; }
.brand { font-family: var(--font-disp); font-size: 1.5rem; font-weight: 600; color: var(--green); white-space: nowrap; }
.brand b { color: var(--gold); font-weight: 600; }
.nav { display: flex; gap: 1.1rem; align-items: center; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--green); }
.searchbar { margin-left: auto; flex: 1; max-width: 420px; position: relative; }
.searchbar input {
    width: 100%; padding: .6rem 1rem .6rem 2.5rem; border-radius: 999px;
    border: 1px solid var(--line); background: var(--white); font: inherit; color: var(--ink);
}
.searchbar input:focus { outline: none; border-color: var(--green-300); box-shadow: 0 0 0 3px rgba(78,139,115,.18); }
.searchbar svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.header-actions { display: flex; gap: .6rem; align-items: center; }
.cart-link { position: relative; }
.cart-badge {
    position: absolute; top: -7px; right: -9px; background: var(--gold); color: #2a1d05;
    font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px;
    display: grid; place-items: center; padding: 0 4px;
}
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--green); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { padding-top: 64px; padding-bottom: 64px; display: grid; gap: 2.5rem; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.hero-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); margin: 1rem 0; color: var(--green); }
.hero p { font-size: 1.08rem; color: var(--ink-soft); max-width: 36ch; margin-bottom: 1.6rem; }
.hero-art {
    aspect-ratio: 4/3; border-radius: 20px; background:
        linear-gradient(135deg, var(--green) 0%, var(--green-700) 55%, #1c6b53 100%);
    position: relative; box-shadow: var(--shadow); overflow: hidden;
}
.hero-art::after {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(420px 220px at 78% 12%, rgba(184,137,59,.45), transparent 60%),
        repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 26px);
}
.hero-art span { position: absolute; right: 22px; bottom: 18px; font-family: var(--font-disp); color: var(--gold-soft); font-size: 1.1rem; letter-spacing: .12em; z-index: 2; }

/* ---------- Selos de confianca ---------- */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }
.trust-item { padding: 1.4rem 1.2rem; }
.trust-item h4 { font-family: var(--font-body); font-weight: 700; font-size: .95rem; margin: 0 0 .2rem; color: var(--green); }
.trust-item p { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.trust-item:not(:last-child) { border-right: 1px solid var(--line); }

/* ---------- Secoes ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.6rem; }
.section-head h2 { font-size: 1.9rem; color: var(--green); }
.section-head a { font-weight: 600; color: var(--gold); font-size: .9rem; }
.section-head a:hover { color: var(--green); }

/* ---------- Grid de categorias ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card {
    position: relative; border-radius: var(--radius); padding: 1.5rem; min-height: 120px;
    background: linear-gradient(150deg, var(--white), var(--paper-2));
    border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between;
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold-soft); }
.cat-card h3 { font-size: 1.2rem; color: var(--green); }
.cat-card .count { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.cat-card .arrow { align-self: flex-end; color: var(--gold); font-size: 1.3rem; }

/* ---------- Grid de produtos ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-soft); }
.card-img { aspect-ratio: 1; background: var(--paper-2); position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--green-300); opacity: .5; }
.card-tag { position: absolute; top: 10px; left: 10px; background: var(--gold); color: #2a1d05; font-size: .68rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.card-body { padding: .95rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card-brand { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); }
.card-name { font-family: var(--font-body); font-weight: 600; font-size: .95rem; color: var(--ink); line-height: 1.3; min-height: 2.5em; }
.card-code { font-size: .75rem; color: var(--ink-soft); }
.card-price { margin-top: auto; padding-top: .6rem; border-top: 1px dashed var(--line); }
.price-row { display: flex; justify-content: space-between; align-items: baseline; }
.price-row .lbl { font-size: .72rem; color: var(--ink-soft); }
.price-row .val { font-family: var(--font-disp); font-weight: 600; color: var(--green); }
.price-row .val.big { font-size: 1.25rem; }
.price-locked { font-size: .8rem; color: var(--ink-soft); display: flex; align-items: center; gap: .4rem; }
.price-locked a { color: var(--gold); font-weight: 600; }

/* ---------- Marcas ---------- */
.brand-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-chip {
    background: var(--white); border: 1px solid var(--line); border-radius: 999px;
    padding: .55rem 1.1rem; font-weight: 600; font-size: .9rem; color: var(--green-700);
    transition: all .18s ease;
}
.brand-chip:hover { border-color: var(--gold); color: var(--green); transform: translateY(-2px); }
.brand-chip span { color: var(--ink-soft); font-weight: 500; font-size: .8rem; }

/* ---------- CTA cadastro ---------- */
.cta-band { background: var(--green); color: var(--paper); border-radius: 20px; padding: 3rem; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; box-shadow: var(--shadow); }
.cta-band h2 { color: var(--white); font-size: 2rem; }
.cta-band p { color: var(--gold-soft); max-width: 48ch; margin: .6rem 0 0; }

/* ---------- Vitrine (listagem + filtros) ---------- */
.page-head { padding: 34px 0 10px; }
.page-head h1 { font-size: 2.1rem; color: var(--green); }
.breadcrumb { font-size: .82rem; color: var(--ink-soft); margin-bottom: .5rem; }
.breadcrumb a:hover { color: var(--gold); }
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding-bottom: 60px; }
.filters { align-self: start; position: sticky; top: 90px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.filters h3 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 .7rem; }
.filter-group { margin-bottom: 1.3rem; }
.filter-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; }
.filter-list li { margin: .15rem 0; }
.filter-list a { display: flex; justify-content: space-between; font-size: .88rem; padding: .3rem .4rem; border-radius: 8px; color: var(--ink-soft); }
.filter-list a:hover { background: var(--paper-2); color: var(--green); }
.filter-list a.on { background: var(--green); color: var(--white); }
.filter-list a.on .qty { color: var(--gold-soft); }
.filter-list .qty { font-size: .78rem; opacity: .8; }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.result-bar .count { font-size: .9rem; color: var(--ink-soft); }
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; align-items: center; }
.pagination a, .pagination span { padding: .5rem .9rem; border-radius: 10px; border: 1px solid var(--line); font-weight: 600; font-size: .88rem; background: var(--white); }
.pagination a:hover { border-color: var(--green-300); }
.pagination .cur { background: var(--green); color: var(--white); border-color: var(--green); }
.empty { text-align: center; padding: 5rem 1rem; color: var(--ink-soft); }

/* ---------- Pagina de produto ---------- */
.prod { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 30px 0 60px; }
.gallery .main { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .main .card-ph { width: 100%; height: 100%; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.thumbs img.on { border-color: var(--gold); }
.prod-info .card-brand { font-size: .82rem; }
.prod-info h1 { font-size: 2rem; color: var(--green); margin: .3rem 0 .2rem; }
.prod-info .code { color: var(--ink-soft); font-size: .9rem; margin-bottom: 1.2rem; }
.spec-table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; }
.spec-table th, .spec-table td { text-align: left; padding: .6rem .2rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.spec-table th { color: var(--ink-soft); font-weight: 600; width: 45%; }
.spec-table td { color: var(--ink); font-weight: 600; }
.price-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; margin: 1.3rem 0; }
.price-box .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.price-box .lbl { font-size: .75rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.price-box .big { font-family: var(--font-disp); font-size: 1.8rem; color: var(--green); }
.buy-row { display: flex; gap: .8rem; align-items: center; margin-top: 1rem; }
.qty-input { width: 90px; }
.qty-input input { width: 100%; padding: .65rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; text-align: center; }
.flag-pt { display: inline-block; }

/* ---------- Cotacao ---------- */
.quote-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.quote-table th, .quote-table td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; }
.quote-table th { background: var(--paper-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.quote-table input[type=number] { width: 70px; padding: .4rem; border: 1px solid var(--line); border-radius: 8px; text-align: center; font: inherit; }
.quote-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; padding: 24px 0 60px; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; position: sticky; top: 90px; }
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .25rem; }
.field input, .field textarea { width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--paper); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green-300); box-shadow: 0 0 0 3px rgba(78,139,115,.15); }

/* ---------- Flash ---------- */
.flash { padding: .8rem 1.1rem; border-radius: 12px; font-weight: 600; font-size: .9rem; margin: 16px 0; }
.flash.ok { background: #e7f1ea; color: var(--green); border: 1px solid var(--green-300); }
.flash.erro { background: #f6e3df; color: var(--danger); border: 1px solid #d8a99f; }

/* ---------- Rodape ---------- */
.footer { background: var(--green); color: var(--gold-soft); margin-top: 40px; }
.footer .wrap { padding: 3rem 22px 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer h4 { font-family: var(--font-disp); color: var(--white); margin: 0 0 .8rem; }
.footer a { display: block; color: var(--gold-soft); opacity: .85; padding: .2rem 0; font-size: .9rem; }
.footer a:hover { opacity: 1; color: var(--white); }
.footer .brand { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom .wrap { padding: 1rem 22px; display: flex; justify-content: space-between; font-size: .8rem; opacity: .8; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-art { order: -1; max-height: 240px; }
    .prod-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .trust .wrap { grid-template-columns: repeat(2, 1fr); }
    .trust-item:nth-child(2) { border-right: 0; }
    .layout, .prod, .quote-grid { grid-template-columns: 1fr; }
    .filters, .form-card { position: static; }
    .footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .nav, .searchbar { display: none; }
    .menu-toggle { display: block; margin-left: auto; }
    .nav.open { display: flex; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; background: var(--paper); padding: 1rem 22px; border-bottom: 1px solid var(--line); }
    .prod-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-band { grid-template-columns: 1fr; text-align: center; }
    .section-head h2 { font-size: 1.5rem; }
}

/* ---------- Autenticacao / conta ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 50px 22px 80px; }
.auth-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.8rem; color: var(--green); margin-bottom: .3rem; }
.auth-card .sub { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.4rem; }
.auth-foot { text-align: center; margin-top: 1.2rem; font-size: .88rem; color: var(--ink-soft); }
.auth-foot a { color: var(--gold); font-weight: 600; }
.auth-foot a:hover { color: var(--green); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.label-link { display: flex; justify-content: space-between; align-items: baseline; }
.label-link a { font-size: .76rem; color: var(--gold); font-weight: 600; }

.conta-grid { display: grid; grid-template-columns: 300px 1fr; gap: 26px; padding: 26px 0 60px; }
.conta-side { background: var(--green); color: var(--paper); border-radius: var(--radius); padding: 1.6rem; align-self: start; }
.conta-side h2 { color: var(--white); font-family: var(--font-disp); font-size: 1.3rem; }
.conta-side .row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .88rem; }
.conta-side .row span:first-child { color: var(--gold-soft); }
.conta-side .desc-badge { background: var(--gold); color: #2a1d05; border-radius: 10px; padding: .8rem; text-align: center; margin: 1rem 0; font-weight: 700; }
.conta-side .desc-badge b { font-family: var(--font-disp); font-size: 1.6rem; display: block; }
.status-pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.status-novo { background: #e7f1ea; color: var(--green); }
.status-pendente { background: #f3ead2; color: var(--gold); }
/* Enquadramento das imagens de produto (contain + fundo branco) */
.card-img img { object-fit: contain !important; padding: 10px; background: #fff; }
.gallery .main img { object-fit: contain !important; padding: 14px; background: #fff; }
.thumbs img { object-fit: contain !important; background: #fff; }

/* Adicionar a cotacao direto no card (grade) */
.card-buy { display:flex; gap:.5rem; align-items:center; margin-top:.7rem; }
.card-buy input[type=number]{ width:64px; padding:.42rem .5rem; border:1px solid var(--line); border-radius:8px; font-family:var(--font-body); font-size:.9rem; background:var(--white); color:var(--ink); }
.card-buy .btn{ flex:1; justify-content:center; padding:.5rem .6rem; }

/* Logo no cabecalho (Secao 3 - imagem real PNG) */
.header .brand{ display:inline-flex; align-items:center; gap:12px; text-decoration:none; }
.header .brand-logo{ height:40px; width:auto; display:block; }
.header .brand-word{ font-family:"Fraunces",Georgia,serif; font-weight:500; font-size:1.25rem; line-height:1; color:#0f3d2e; }
.header .brand-word b{ font-weight:600; color:#b8893b; }
@media (max-width:640px){ .header .brand-word{ font-size:1.05rem; } .header .brand-logo{ height:30px; } }


/* ============ SPEC-mobile: responsividade do cabecalho e grids ============ */

/* §6 trava global anti-overflow (sem mexer no max-width do .wrap) */
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* §4 grids podem encolher dentro do container + cards nao estouram */
.cat-grid, .prod-grid { min-width: 0; }
.cat-grid > *, .prod-grid > * { min-width: 0; max-width: 100%; }
.card { min-width: 0; max-width: 100%; }
.card-name, .card-code { overflow-wrap: anywhere; word-break: break-word; }

/* §2 base: botao de menu e drawer ocultos no desktop */
.menu-toggle { display: none; }
.mobile-menu { display: none; }

/* §2 cabecalho mobile: hamburguer a ESQUERDA + drawer (Cotacao/Entrar/idioma) */
@media (max-width: 960px) {
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 8px; margin: 0; order: -1;
    border: 0; background: transparent; cursor: pointer; color: var(--green);
  }
  .header .wrap { flex-wrap: nowrap; gap: .6rem; }
  .header .brand-logo { height: 34px; }
  .header .brand-word { font-size: 1.05rem; }
  /* tira do topo o que vai para o drawer */
  .header .nav, .header .searchbar, .header .header-actions { display: none; }

  .mobile-menu.open {
    display: flex; flex-direction: column; gap: .25rem;
    padding: .8rem 1rem 1.1rem; border-top: 1px solid var(--line);
    background: var(--paper);
  }
  .mobile-menu a, .mobile-menu .btn { width: 100%; padding: .7rem .2rem; box-sizing: border-box; }
  .mobile-menu .langsel-mobile { display: flex; flex-direction: row; flex-wrap: wrap; gap: .3rem; padding-top: .5rem; }
  .mobile-menu .langsel-mobile a { width: auto; padding: .15rem .45rem; }
  .mobile-menu .langsel-mobile a.on { background: var(--green); color: var(--white); }
}

/* §3 faixa do slogan + idioma (topbar): slogan toma a linha, idioma quebra abaixo */
@media (max-width: 640px) {
  .topbar .wrap { flex-wrap: wrap; gap: 4px 12px; height: auto; padding-top: 6px; padding-bottom: 6px; }
  .topbar .wrap > span { flex: 1 1 100%; min-width: 0; }
  .langsel { flex-wrap: wrap; }
}

/* §4 cair para 1 coluna em telas estreitas */
@media (max-width: 600px) { .cat-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .prod-grid { grid-template-columns: 1fr; } }

/* §5 painel de filtros nao vaza; item ativo respeita a largura */
@media (max-width: 960px) {
  .filters { position: static; width: 100%; max-width: 100%; box-sizing: border-box; }
  .filter-list a { max-width: 100%; box-sizing: border-box; }
  .filter-list a.on { max-width: 100%; box-sizing: border-box; }
}
/* ============ /SPEC-mobile ============ */
