/* ============================================================
   /blog/vitrine.css
   ============================================================ */

/* ── Card base ─────────────────────────────────────────────── */

.achados-ml {
    border-radius: 6px;
    background-color: #ffe600;
    padding: 10px;
}

.card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e2e2;
}

.card-img.cat-card-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: #efefef;
    min-height: 140px;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform .3s;
}

.vitrine-ml-wrapper a {
    text-decoration: none;
    font-weight: normal;
}

.card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body a {text-decoration: none;}

.card-btn { display: none; }

.card-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 4px;
    background-color: #ff7f00;
    width: max-content;
    padding: 3px 6px 2px;
    border-radius: 2px;
    display: flex;
    gap: 6px;
}

.badge-0 { background: #FFEB3B; color: #000; }
.badge-2 { background: #4a4a4a; color: #fff; }
.badge-3 { background: #2d42b7; color: #fff; }

.card-name {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 7px;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    color: #000;
}

.card-text {
    margin-top: -8px;
    padding: 0;
    font-size: 15px;
    color: #686868;
}

.card-price-cat {
    font-size: 18px;
    font-weight: 800;
    margin-top: 6px;
}

.price-from {
    font-size: 12px;
    color: #000;
    font-weight: 400;
}

.price-value {
    font-size: 22px;
    color: #000;
    font-weight: 500;
    padding: 0 0 8px;
    display: flex;
}

span.symbol { padding-right: 4px; }

.decimals {
    font-size: 12px;
    margin-top: 3px;
    color: #000000;
    font-weight: 100;
    padding-left: 2px;
}

.cupom {
    background-color: #d9dfff;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    color: #5973ff;
    width: max-content;
    padding: 0px 5px;
    align-items: center;
    display: flex;
    gap: 6px;
}

.price-extra {
    font-size: 14px;
    color: #00a650;
    font-weight: 600;
    margin-top: 14px;
}

/* ── Vitrine rodapé wrapper ─────────────────────────────────── */
.vitrine-ml-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
    margin-top: 10px;
}

/* ── Vitrine antiga (compatibilidade) ──────────────────────── */
.vitrine {

    margin: 0 auto;
    font-size: 17px;
    padding: 0 16px;
}

/* ============================================================
   LAYOUT DO POST: artigo (esquerda) + sidebar sticky (direita)

   Por que o sticky pode falhar mesmo com HTML correto:
   ─────────────────────────────────────────────────────────────
   1. overflow:hidden/auto/scroll em qualquer ANCESTRAL do
      .sidebar-sticky → cria novo scroll container e mata sticky.
      Corrigido abaixo forçando overflow:visible nos ancestrais.

   2. align-items não definido (default = stretch) no grid pai →
      .post-sidebar estica até a altura de .post-main e nunca
      tem espaço para rolar. Corrigido com align-items:start.

   3. Altura insuficiente no pai → não acontece aqui pois o grid
      cresce com o conteúdo.
   ============================================================ */

/* Neutraliza overflow em todos os ancestrais prováveis.
   Se o seu styles.css tiver "main { overflow:hidden }" isto
   sobrescreve. Adicione !important se ainda assim não funcionar. */
.post-layout,
.post-main,
.post-sidebar {
    overflow: visible;
}


.post-main {
    min-width: 0;                /* impede overflow horizontal no grid */
}

/* ── Sidebar ───────────────────────────────────────────────── */

.sidebar-logo {
    text-align: center;
    margin-bottom: 12px;
}

.post-sidebar .card {
    width: 100%;
    box-sizing: border-box;
}

/* ── Vitrine rodapé ────────────────────────────────────────── */
.vitrine-footer {
   /*  max-width: 1160px; */
    margin: 40px auto 0;
    padding: 0 16px 40px;
    font-size: 17px;
}

.vitrine-footer .achados-ml {
    text-align: center;
    margin-bottom: 16px;
}

/* ── Tablet ─────────────────────────────────────────────────── */
@media (min-width: 861px) and (max-width: 1100px) {
    .post-layout {
        grid-template-columns: 1fr 260px;
    }
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 860px) {

    .post-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .post-main    { order: 1; }
    .post-sidebar { order: 2; padding: 0 16px; }

    .sidebar-sticky {
        position: static;   /* sem sticky em mobile */
    }

    .post-sidebar .card {
      /*   max-width: 340px; */
        margin: 0 auto;
    }

    .vitrine-ml-wrapper {
        display: block;
    }

    .card {
        width: 100%;
        margin: 20px auto;
    }

      .card-body {padding: 10px;
    }
    .card-name {margin-bottom: 0;}
    .card-text {display: none;}

    .card a {display: flex !important;
        flex-direction: row !important;
        align-items: stretch;
        width: 100%;}

    .card-img img { height: 200px; }    
    .card-img.cat-card-img { width: 190px;}
    .vitrine-footer .achados-ml {display: none;}
    .vitrine-footer {margin:0;} 
}