/* ============================================
   Medicale — Vitrine Pública (vitrine.css)
   ============================================ */

/* ── Layout global ──────────────────────────── */
.vitrine-page {
    background: #F4F7FB;
}

/* ── Header ─────────────────────────────────── */
.med-header {
    background: var(--primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.med-header .med-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.med-logo {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.med-logo span { color: var(--accent); }
.med-logo:hover { text-decoration: none; opacity: 0.9; }
.med-nav { display: flex; gap: 1.5rem; align-items: center; }
.med-nav a {
    color: rgba(255,255,255,0.8);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.med-nav a:hover { color: #fff; text-decoration: none; }

/* ── Container ──────────────────────────────── */
.med-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Hero ────────────────────────────────────── */
.med-hero {
    background: linear-gradient(110deg, var(--navy) 0%, var(--blue-dark) 55%, var(--red-dark) 100%);
    padding: 3.5rem 0 2.5rem;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.med-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(200,69,90,0.2) 0%, transparent 65%);
    pointer-events: none;
}
.med-hero h1 {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.6rem;
    position: relative;
}
.med-hero-sub {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 1.8rem;
    position: relative;
}
.med-search-bar {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.med-search-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.med-search-input:focus {
    box-shadow: 0 4px 20px rgba(0,0,0,0.2), 0 0 0 3px rgba(200,69,90,0.35);
}

/* ── Body (sidebar + main) ──────────────────── */
.med-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.8rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
    align-items: start;
}

/* ── Filtros ─────────────────────────────────── */
.med-filters {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.3rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 76px;
}
.filter-group { margin-bottom: 1.3rem; }
.filter-title {
    font-family: var(--font-head);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary);
    margin-bottom: 0.6rem;
}
.filter-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
    padding: 0.25rem 0;
    cursor: pointer;
}
.filter-opt input { cursor: pointer; accent-color: var(--accent); }

/* ── Filtros mobile (dropdowns em linha) ─────── */
.med-filters-mobile { display: none; }
.mf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}
.mf-select {
    width: 100%;
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    padding-right: 2rem;
}
.mf-clear {
    display: inline-block;
    margin-top: 0.7rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ── Result header ───────────────────────────── */
.med-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.med-result-count { font-size: 0.88rem; color: var(--text-muted); }
.med-sort { font-size: 0.82rem; color: var(--text-light); }

/* ── Grid de cards ───────────────────────────── */
.med-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}

/* ── Card de produto ─────────────────────────── */
.produto-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.produto-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.produto-card.urgente {
    border-color: #FCA5A5;
}
.produto-card.destaque {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(200,69,90,0.13);
}
.card-badge-top {
    position: absolute;
    top: 10px; left: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    z-index: 2;
}
.badge-destaque {
    background: var(--accent);
    color: #fff;
}
.card-badge-desc {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 99px;
    z-index: 2;
}
.card-img {
    height: 160px;
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.card-img img {
    max-height: 140px;
    max-width: 90%;
    object-fit: contain;
}
.card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-cat {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent-dark);
    margin-bottom: 0.3rem;
}
.card-nome {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-lab {
    font-size: 0.77rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-preco {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.4rem 0;
}
.preco-de {
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: line-through;
}
.preco-por {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}
.card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.77rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}
.text-danger { color: var(--danger) !important; font-weight: 600; }

/* ── Selos de urgência de vencimento (proximidade real da data) ── */
.selo-urgencia {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 99px;
    white-space: nowrap;
}
.urgencia-media    { background: #FEF3C7; color: #92400E; }
.urgencia-alta      { background: #FFEDD5; color: #C2410C; }
.urgencia-critica   { background: #FEE2E2; color: #991B1B; }
.urgencia-critica.pulsa { animation: pulsa-urgencia 1.8s ease-in-out infinite; }
@keyframes pulsa-urgencia {
    0%, 100% { box-shadow: 0 0 0 0 rgba(153,27,27,0.30); }
    50%      { box-shadow: 0 0 0 6px rgba(153,27,27,0); }
}

/* ── Selos de escassez de estoque ─────────────────────────── */
.selo-escassez {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 99px;
    white-space: nowrap;
}
.escassez-media    { background: #FFF7ED; color: #C2410C; }
.escassez-critica  { background: #FEE2E2; color: #991B1B; }

/* ── Contador regressivo (página de produto) ──────────────── */
.contador-vencimento {
    margin: 0.9rem 0;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #FEF3C7;
    border: 1.5px solid #FDE68A;
}
.contador-vencimento.nivel-alta    { background: #FFEDD5; border-color: #FED7AA; }
.contador-vencimento.nivel-critica { background: #FEE2E2; border-color: #FECACA; }
.contador-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #92400E;
    margin-bottom: 0.5rem;
}
.nivel-alta .contador-label    { color: #C2410C; }
.nivel-critica .contador-label { color: #991B1B; }
.contador-blocos {
    display: flex;
    gap: 0.6rem;
}
.contador-bloco {
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    text-align: center;
    min-width: 54px;
}
.contador-num {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.contador-unid {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.card-lojista {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.btn-wpp {
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.6rem;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-wpp:hover { background: #1ebe5d; text-decoration: none; color: #fff; }

/* ── Paginação ───────────────────────────────── */
.med-pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    background: #fff;
    text-decoration: none;
    transition: all 0.15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Página de detalhe ───────────────────────── */
.produto-detalhe {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2.5rem;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
}
.detalhe-foto {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #F8FAFC;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}
.detalhe-foto img {
    max-height: 300px;
    max-width: 100%;
    object-fit: contain;
}
.detalhe-badge-desc {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--danger);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 99px;
}
.detalhe-nome {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    margin: 0.5rem 0 0.3rem;
}
.detalhe-lab { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.detalhe-preco-bloco {
    background: #F8FAFC;
    border-radius: var(--radius);
    padding: 1.2rem;
    border: 1px solid var(--border);
    margin: 1rem 0;
}
.detalhe-pmc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.pmc-riscado { text-decoration: line-through; color: var(--danger); font-weight: 600; }
.detalhe-preco-por {
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.detalhe-economia {
    font-size: 0.85rem;
    color: var(--accent-dark);
    font-weight: 600;
    margin-top: 0.4rem;
}
.detalhe-grid-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}
.dgi-item { text-align: center; }
.dgi-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.dgi-val {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}
.detalhe-obs {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    color: #78350F;
    margin: 0.8rem 0;
}
.detalhe-lojista {
    margin-top: 1.2rem;
    padding: 1rem;
    background: #F8FAFC;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.lojista-nome {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}
.lojista-end { font-size: 0.83rem; color: var(--text-muted); }

/* Mini cards */
.produto-card-mini {
    background: #fff;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    padding: 0.9rem;
    display: block;
    text-decoration: none;
    transition: all 0.15s;
}
.produto-card-mini:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    text-decoration: none;
    transform: translateY(-2px);
}
.mini-nome {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
.mini-preco { font-family: var(--font-head); font-weight: 700; color: var(--text); font-size: 0.9rem; }
.mini-venc { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── Footer ─────────────────────────────────── */
.med-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 1.2rem 0;
    font-size: 0.82rem;
    margin-top: 1rem;
}
.med-footer .med-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.med-footer a { color: var(--accent); text-decoration: none; }
.med-footer a:hover { text-decoration: underline; }

/* ── SVG placeholder ─────────────────────────── */
/* Produto default via CSS fallback */

/* ── Responsivo ─────────────────────────────── */
@media (max-width: 1024px) {
    .produto-detalhe { grid-template-columns: 1fr; }
    .detalhe-foto { min-height: 200px; }
}
@media (max-width: 768px) {
    .med-body { grid-template-columns: 1fr; }
    .med-filters { display: none; }
    .med-filters-mobile { display: block; margin-bottom: 1.2rem; }
    .med-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .detalhe-grid-info { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .med-search-bar { flex-direction: column; }
    .med-nav a:first-child { display: none; }
}

/* ════════════════════════════════════════════
   HEADER + FOOTER padrão LANDING (aplicado à vitrine)
   Mantém consistência visual com index.php (landing)
   ════════════════════════════════════════════ */

/* ── Header claro sticky ───────────────────── */
.hdr{position:sticky;top:0;z-index:100;background:rgba(255,255,255,0.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--border);}
.hdr-in{display:flex;align-items:center;justify-content:space-between;height:68px;gap:1.5rem;}
.hdr .logo{display:flex;align-items:center;}
.hdr .nav-logo-img{height:44px;width:auto;display:block;}

.nav-search{display:none;}
@media(min-width:980px){
  .nav-search{
    display:flex;align-items:center;gap:0.5rem;
    flex:1;max-width:340px;margin:0 1rem;
    background:var(--bg);border:1.5px solid var(--border);border-radius:99px;
    padding:0.5rem 1rem;color:var(--text-muted);transition:border-color .15s;
  }
  .nav-search:focus-within{border-color:var(--blue);background:#fff;}
  .nav-search svg{flex-shrink:0;}
  .nav-search input{border:none;outline:none;background:transparent;font-family:var(--font-body);font-size:0.85rem;width:100%;color:var(--text);}
}

.nav-desk{display:flex;align-items:center;gap:2rem;}
.nav-desk a{font-size:0.88rem;font-weight:500;color:var(--text-muted);transition:color .15s;text-decoration:none;}
.nav-desk a:hover{color:var(--navy);text-decoration:none;}
.nav-cta{background:var(--navy);color:#fff!important;padding:0.6rem 1.3rem;border-radius:99px;font-weight:600;font-size:0.85rem;transition:transform .15s,box-shadow .15s;}
.nav-cta:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(28,46,61,0.25);text-decoration:none;}

/* Dropdown "Entrar" */
.nav-login{position:relative;}
.nav-login-btn{display:inline-flex;align-items:center;gap:0.35rem;cursor:pointer;border:none;font-family:inherit;}
.nav-login-btn svg{transition:transform .2s;}
.nav-login.open .nav-login-btn svg{transform:rotate(180deg);}
.nav-login-menu{position:absolute;top:calc(100% + 0.5rem);right:0;min-width:210px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-lg);padding:0.4rem;display:none;flex-direction:column;gap:0.1rem;z-index:120;}
.nav-login.open .nav-login-menu{display:flex;}
.nav-login-menu a{display:flex;align-items:center;gap:0.6rem;padding:0.65rem 0.8rem;border-radius:8px;font-size:0.86rem;font-weight:500;color:var(--text)!important;text-decoration:none;}
.nav-login-menu a:hover{background:var(--bg);text-decoration:none;}
.nav-login-menu .nlm-ico{font-size:1.05rem;line-height:1;}
.nav-login-menu .nlm-sep{height:1px;background:var(--border);margin:0.25rem 0.4rem;}
.mob-menu .mob-sub-title{font-size:0.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--text-muted);padding:0.6rem 0.5rem 0.2rem;}

.ham{display:none;flex-direction:column;gap:4px;background:none;border:none;padding:6px;cursor:pointer;}
.ham span{width:22px;height:2px;background:var(--navy);border-radius:2px;transition:all .25s;}
.ham.open span:nth-child(1){transform:translateY(6px) rotate(45deg);}
.ham.open span:nth-child(2){opacity:0;}
.ham.open span:nth-child(3){transform:translateY(-6px) rotate(-45deg);}

.mob-menu{display:none;position:absolute;top:100%;left:0;right:0;background:#fff;border-bottom:1px solid var(--border);box-shadow:var(--shadow-lg);flex-direction:column;padding:0.6rem 1.5rem 1rem;gap:0.2rem;}
.mob-menu.open{display:flex;}
.mob-menu a{padding:0.7rem 0.5rem;font-size:0.9rem;font-weight:500;color:var(--text);border-radius:8px;text-decoration:none;}
.mob-menu a:hover{background:var(--bg);text-decoration:none;}
.mob-menu .mob-cta{background:var(--navy);color:#fff;text-align:center;font-weight:700;margin-top:0.4rem;}
.mob-menu .mob-cta:hover{color:#fff;}

@media(max-width:980px){
  .nav-desk{display:none;}
  .ham{display:flex;}
}

/* ── Footer completo (5 colunas) ───────────── */
.foot{background:var(--navy);color:rgba(255,255,255,0.6);padding:3rem 0 0;font-size:0.85rem;margin-top:1rem;}
.foot-main{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr 1fr;gap:2rem;padding-bottom:2.2rem;}
.foot-brand{padding-right:1rem;}
.foot-logo{width:130px;height:auto;margin-bottom:0.9rem;}
.foot-desc{font-size:0.8rem;color:rgba(255,255,255,0.5);line-height:1.6;max-width:280px;}
.foot-col-title{font-family:var(--font-head);font-size:0.72rem;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#fff;margin-bottom:0.9rem;}
.foot-col{display:flex;flex-direction:column;gap:0.6rem;}
.foot-col a{font-size:0.82rem;color:rgba(255,255,255,0.6);transition:color .15s;text-decoration:none;}
.foot-col a:hover{color:var(--gold);text-decoration:underline;}
.foot-admin{color:var(--gold)!important;font-weight:700;}
.foot-admin:hover{color:#fff!important;}
.foot-bottom{border-top:1px solid rgba(255,255,255,0.1);padding:1.2rem 0;display:flex;justify-content:space-between;flex-wrap:wrap;gap:0.6rem;font-size:0.72rem;color:rgba(255,255,255,0.4);}
.foot-credit-inline a{color:rgba(255,255,255,0.65);font-weight:600;text-decoration:none;}
.foot-credit-inline a:hover{color:var(--gold);text-decoration:underline;}

@media(max-width:980px){
  .foot-main{grid-template-columns:1fr 1fr;gap:1.8rem;}
  .foot-brand{grid-column:1/-1;padding-right:0;}
  .foot-desc{max-width:100%;}
}
@media(max-width:600px){
  .foot-main{grid-template-columns:1fr;gap:1.6rem;text-align:center;}
  .foot-brand{display:flex;flex-direction:column;align-items:center;}
  .foot-bottom{flex-direction:column;text-align:center;}
}

/* ── Logo-imagem dentro do med-header navy (páginas produto/consumidor) ── */
.med-logo-img{
    height:38px;width:auto;display:block;
    background:#fff;border-radius:9px;padding:5px 9px;
}
