/* ==========================================================================
   Cupom do Meli — folha de estilo do site público.
   CSS puro, sem framework e sem build. Mobile first: o layout base é o do
   celular e as media queries só acrescentam espaço e colunas.

   Princípio do desenho: o produto é o conteúdo. Tudo que não é foto, título,
   preço ou botão fica discreto — cinza claro, borda fina, sem sombra pesada.
   ========================================================================== */

:root {
    --ink: #16233f;          /* o azul-marinho do logo é a cor do texto forte */
    --ink-soft: #5a657c;
    --ink-faint: #949db1;

    --line: #e6e9f0;
    --line-soft: #eef0f5;

    /* Página cinza-claro e card branco: é o contraste que separa um produto
       do outro sem precisar de borda grossa. */
    --bg: #f3f5f9;
    --card: #ffffff;
    --surface: #f7f8fb;

    --brand: #16233f;
    --brand-soft: #22335a;
    --accent: #ffc107;       /* o âmbar do logo, usado no topo e nos botões */
    --accent-dark: #e9ad00;
    --accent-ink: #3d2a00;

    --hot: #e01b3d;
    --ok: #0e7a45;

    --radius: 14px;
    --radius-sm: 9px;

    --shadow: 0 1px 2px rgba(22, 35, 63, .05), 0 4px 14px rgba(22, 35, 63, .06);
    --shadow-lift: 0 4px 10px rgba(22, 35, 63, .08), 0 16px 34px rgba(22, 35, 63, .14);

    --gutter: 18px;
    --max: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    /* Poppins é a fonte do logo. O resto da lista é o que o navegador usa
       enquanto ela carrega (e se o Google Fonts estiver fora do ar). */
    font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ------------------------------------------------------------------ cabeçalho */

.site-header {
    background: var(--accent);
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 14px;
    /* Só vertical: o padding lateral vem de .wrap e não pode ser
       sobrescrito, senão o cabeçalho cola nas bordas da tela. */
    padding-top: 14px;
    padding-bottom: 14px;
}

.logo {
    display: block;
    flex-shrink: 0;
    line-height: 0;
}

.logo img {
    /* width/height no HTML reservam o espaço e evitam o pulo do layout;
       aqui a altura real manda e a largura acompanha. */
    height: 26px;
    width: auto;
}

@media (min-width: 560px) {
    .logo img {
        height: 32px;
    }
}

.search {
    flex: 1;
    display: flex;
    min-width: 0;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 999px;
    overflow: hidden;
    transition: border-color .15s ease;
}

.search:focus-within {
    border-color: var(--brand);
}

.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 9px 16px;
    font-size: 15px;
    color: var(--ink);
}

.search input:focus {
    outline: none;
}

.search button {
    border: 0;
    /* Azul-marinho: sobre o topo âmbar, um botão âmbar sumiria. */
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 0 20px;
    margin: 3px;
    border-radius: 999px;
}

.search button:hover {
    background: var(--brand-soft);
}

.header-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Branco: duas barras âmbar seguidas empastelariam o topo. */
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.header-nav::-webkit-scrollbar {
    display: none;
}

.header-nav ul {
    display: flex;
    gap: 2px;
    list-style: none;
    padding: 0 var(--gutter);
    white-space: nowrap;
    max-width: var(--max);
    margin: 0 auto;
    /* Centralizado no desktop. No celular a lista é mais larga que a tela,
       então ela rola na horizontal e começa pela esquerda — centralizar ali
       esconderia os primeiros itens. */
    justify-content: flex-start;
}

@media (min-width: 900px) {
    .header-nav ul {
        justify-content: center;
    }
}

.header-nav ul {
    gap: 4px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.header-nav a {
    display: block;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    border-radius: 999px;
}

.header-nav a:hover {
    background: var(--surface);
}

.header-nav a.is-active {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}

/* -------------------------------------------------------------------- conteúdo */

main {
    padding: 28px 0 56px;
}

.page-head {
    margin: 0 0 22px;
    max-width: 680px;
}

.page-head h1 {
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -.7px;
    margin: 0 0 6px;
}

@media (min-width: 700px) {
    .page-head h1 {
        font-size: 31px;
    }
}

.page-head p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 15.5px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin: 40px 0 16px;
}

.section-head:first-child {
    margin-top: 0;
}

.section-head h2 {
    font-size: 19px;
    margin: 0;
    letter-spacing: -.4px;
}

.section-head a {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    flex-shrink: 0;
}

.section-head a:hover {
    color: var(--ink);
}

/* ---------------------------------------------------------------------- filtros */

.chip-row {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    margin-bottom: 14px;
    scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
    display: none;
}

.chip {
    flex-shrink: 0;
    border: 1px solid transparent;
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    color: var(--ink-soft);
    transition: border-color .14s ease, color .14s ease;
}

.chip:hover {
    border-color: var(--ink-faint);
    color: var(--ink);
}

.chip.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
}

.filters label {
    font-size: 13.5px;
    color: var(--ink-faint);
}

.filters select {
    font: inherit;
    font-size: 14px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 14.5px;
    color: var(--ink-soft);
    margin: 0 0 18px;
}

.active-filters .clear {
    color: var(--ink-faint);
    text-decoration: underline;
}

.active-filters .clear:hover {
    color: var(--hot);
}

/* ------------------------------------------------------------------- grade/cards */

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (min-width: 560px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (min-width: 880px) {
    .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 22px;
    }
}

@media (min-width: 1120px) {
    .grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow .18s ease, transform .18s ease;
}

@media (hover: hover) {
    .card:hover {
        box-shadow: var(--shadow-lift);
        transform: translateY(-3px);
    }
}

.card.is-closed {
    opacity: .55;
}

.card-media {
    position: relative;
    display: block;
    background: #fff;
    aspect-ratio: 1 / 1;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.card-media .no-image {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--ink-faint);
    font-size: 13px;
    background: var(--surface);
}

/* Selo de desconto: discreto, canto superior esquerdo, sem gritar. */
.badge-off {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--hot);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: -.2px;
    box-shadow: 0 2px 6px rgba(224, 27, 61, .3);
}

.badge-closed {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .78);
    color: var(--ink);
    font-weight: 600;
    font-size: 13.5px;
    text-align: center;
    padding: 10px;
}

.card-body {
    padding: 12px 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card-title {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    color: var(--ink-soft);
    /* Três linhas no máximo: mantém os cards da fileira do mesmo tamanho. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a:hover {
    color: var(--ink);
}

.price-old {
    font-size: 12.5px;
    color: var(--ink-faint);
    text-decoration: line-through;
    line-height: 1.2;
}

.price-now {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.7px;
    line-height: 1.15;
    color: var(--ink);
}

.price-line {
    display: flex;
    align-items: baseline;
    gap: 7px;
    flex-wrap: wrap;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}

.tag {
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: .1px;
}

.tag-ship {
    background: #eaf6ef;
    color: var(--ok);
}

.tag-coupon {
    background: #fff6e0;
    color: #8a5b00;
}

.tag-cat {
    background: var(--surface);
    color: var(--ink-soft);
    font-weight: 500;
}

/* -------------------------------------------------------------------- botões */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 20px;
    font-size: 14.5px;
    font-weight: 600;
    text-align: center;
    background: var(--brand);
    color: #fff;
    transition: background .14s ease, border-color .14s ease;
}

.btn:hover {
    background: var(--brand-soft);
}

.btn-go {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-go:hover {
    background: var(--accent-dark);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13.5px;
}

.btn-ghost {
    background: #fff;
    color: var(--ink-soft);
    border-color: var(--line);
}

.btn-ghost:hover {
    background: var(--surface);
    color: var(--ink);
}

.btn-wa {
    background: #fff;
    color: #0d7a3f;
    border-color: #bfe3cd;
}

.btn-wa:hover {
    background: #f1faf4;
}

/* -------------------------------------------------------------- página da oferta */

.offer {
    display: grid;
    gap: 24px;
    padding: 0;
}

@media (min-width: 820px) {
    .offer {
        grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
        gap: 48px;
    }
}

.offer-media {
    position: relative;
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.offer-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
}

.offer h1 {
    font-size: 23px;
    line-height: 1.28;
    letter-spacing: -.6px;
    margin: 10px 0 0;
    font-weight: 650;
}

@media (min-width: 820px) {
    .offer h1 {
        font-size: 28px;
    }
}

.offer-price {
    margin: 20px 0;
}

.offer-price .old {
    font-size: 15px;
    color: var(--ink-faint);
    text-decoration: line-through;
}

.offer-price .now {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1.6px;
    line-height: 1;
    display: block;
    margin: 4px 0 6px;
}

.offer-price .savings {
    font-size: 14.5px;
    color: var(--ok);
    font-weight: 600;
}

.offer-desc {
    color: var(--ink-soft);
    font-size: 15.5px;
    margin: 18px 0;
}

.offer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 22px 0;
}

@media (min-width: 560px) {
    .offer-actions {
        flex-direction: row;
    }

    .offer-actions .btn {
        flex: 1;
    }
}

.meta-list {
    list-style: none;
    margin: 20px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink-faint);
    display: grid;
    gap: 7px;
}

.meta-list strong {
    color: var(--ink-soft);
    font-weight: 600;
}

/* ----------------------------------------------------------------------- cupom */

.coupon {
    border: 1px solid #f0dca8;
    background: #fffdf6;
    border-radius: var(--radius);
    padding: 16px;
    margin: 20px 0;
}

.coupon h2 {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #8a5b00;
    margin: 0 0 10px;
    font-weight: 700;
}

.coupon-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.coupon-code {
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1.2px;
    background: #fff;
    border: 1px dashed #e0c98a;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
}

.coupon p {
    margin: 10px 0 0;
    font-size: 13.5px;
    color: var(--ink-soft);
}

.copy-ok {
    color: var(--ok);
    font-weight: 600;
}

/* --------------------------------------------------------------------- avisos */

.affiliate-note {
    font-size: 13px;
    color: var(--ink-faint);
    border-left: 2px solid var(--line);
    padding: 2px 0 2px 12px;
    margin: 20px 0;
    line-height: 1.55;
}

.empty {
    background: var(--card);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    color: var(--ink-soft);
}

.empty strong {
    display: block;
    color: var(--ink);
    font-size: 17px;
    margin-bottom: 6px;
    font-weight: 600;
}

/* ------------------------------------------------------------------ paginação */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
}

.pagination a,
.pagination span {
    display: block;
    min-width: 38px;
    text-align: center;
    padding: 8px 11px;
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: var(--shadow);
    font-size: 14px;
    color: var(--ink-soft);
}

.pagination a:hover {
    color: var(--ink);
}

.pagination .is-current span {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}

.pagination .is-disabled span {
    opacity: .4;
}

/* --------------------------------------------------------------------- rodapé */

.site-footer {
    background: var(--brand);
    color: rgba(255, 255, 255, .72);
    padding: 44px 0 32px;
    font-size: 14.5px;
    margin-top: 48px;
}

.footer-cols {
    display: grid;
    gap: 28px;
    margin-bottom: 30px;
}

@media (min-width: 700px) {
    .footer-cols {
        grid-template-columns: 1.6fr 1fr 1fr;
        gap: 40px;
    }
}

.site-footer h3 {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin: 0 0 12px;
    font-weight: 700;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.site-footer a:hover {
    color: var(--accent);
}

.footer-logo {
    height: 26px;
    width: auto;
    margin-bottom: 12px;
}

.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.social-row a {
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13.5px;
}

.social-row a:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.footer-note {
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding-top: 22px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .6);
}

.footer-note p {
    margin: 0 0 10px;
}

/* ------------------------------------------------------------- banner cookies */

.cookie-bar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 60;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(18, 20, 23, .14);
    padding: 15px;
    display: none;
    gap: 14px;
    align-items: center;
    flex-direction: column;
    font-size: 13.5px;
    color: var(--ink-soft);
}

.cookie-bar.is-visible {
    display: flex;
}

.cookie-bar a {
    color: var(--ink);
    text-decoration: underline;
}

@media (min-width: 640px) {
    .cookie-bar {
        flex-direction: row;
        left: auto;
        right: 20px;
        bottom: 20px;
        max-width: 520px;
    }
}

.cookie-bar .btn {
    flex-shrink: 0;
    width: 100%;
}

@media (min-width: 640px) {
    .cookie-bar .btn {
        width: auto;
    }
}

/* ------------------------------------------------------------ páginas de texto */

.prose {
    max-width: 760px;
    background: var(--card);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 24px;
}

@media (min-width: 760px) {
    .prose {
        padding: 36px 40px;
    }
}

.prose h1 {
    font-size: 29px;
    margin: 0 0 8px;
    letter-spacing: -.8px;
}

.prose h2 {
    font-size: 18px;
    margin: 32px 0 10px;
    letter-spacing: -.3px;
}

.prose p,
.prose li {
    color: var(--ink-soft);
    font-size: 15.5px;
}

.prose ul {
    padding-left: 20px;
}

.prose .updated {
    font-size: 13.5px;
    color: var(--ink-faint);
}
