/* ===================================================================
   templates.css — Templates da loja (Configurações > Templates)
   -------------------------------------------------------------------
   .tpl-1         Clássico (visual original do drogal.css, intocado)
   .tpl-modern    Base comum dos templates 02 a 06
   .tpl-2 … .tpl-6  O que diferencia cada um

   Todas as cores vêm de Configurações > Identidade Visual (variáveis
   --color-*): trocar a cor principal lá recolore qualquer template.
   O rodapé (.sf) é o mesmo em todos os templates.
   =================================================================== */

/* ---------- Utilitários comuns ---------- */
.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Elementos que só os templates 02–06 exibem. */
.cart-caption, .topbar-links, .cat-nav-icon { display: none; }

/* Template 01: mesmo destaque que "Ofertas" tinha antes (o link mudou de
   /categoria/ofertas, que não existe, para /promocoes). */
.cat-nav-inner a.cat-nav-ofertas { color: #d9251b; font-weight: 700; }


/* ===================================================================
   BASE DOS TEMPLATES 02 A 06
   =================================================================== */
.tpl-modern {
    --t-primary: var(--color-primary);
    --t-primary-soft: color-mix(in srgb, var(--color-primary) 9%, #fff);
    --t-accent: var(--color-tertiary);
    --t-accent-soft: color-mix(in srgb, var(--color-tertiary) 11%, #fff);
    --t-teal: color-mix(in srgb, var(--color-primary) 45%, #0d9488);
    --t-ink: #0f172a;
    --t-muted: #64748b;
    --t-line: #e6eaf0;
    --t-bg: #f5f7fb;
    --t-card: #fff;
    --t-radius: 16px;
    --t-radius-sm: 12px;
    --t-shadow: 0 4px 18px rgba(15, 23, 42, .06);
    --t-shadow-hover: 0 12px 28px rgba(15, 23, 42, .12);
    background: var(--t-bg);
}

/* ---------- Barra do topo ---------- */
.tpl-modern .topbar-yellow {
    min-height: 34px;
    padding: .25rem 1rem;
    border-bottom: 0;
}
.tpl-modern .topbar-yellow-inner { gap: .9rem; }
.tpl-modern .topbar-yellow-left .gen-title { font-size: .82rem; }
.tpl-modern .topbar-yellow-btn { font-size: .7rem; padding: .22rem .75rem; box-shadow: none; }
@media (min-width: 1025px) {
    .tpl-modern .topbar-yellow {
        justify-content: space-between;
        padding-left: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
        padding-right: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
    }
    .tpl-modern .topbar-links { display: flex; align-items: center; gap: 1.1rem; font-size: .76rem; font-weight: 600; }
    .tpl-modern .topbar-links a { color: inherit; opacity: .9; display: inline-flex; align-items: center; gap: .35rem; }
    .tpl-modern .topbar-links a:hover { opacity: 1; text-decoration: underline; }
}

/* ---------- Cabeçalho ---------- */
.tpl-modern .site-header {
    background: #fff;
    padding: 0;
    box-shadow: 0 1px 0 var(--t-line), 0 8px 20px rgba(15, 23, 42, .04);
}
.tpl-modern .header-inner {
    max-width: 1280px;
    margin: 0 auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: .95rem 1rem;
}
.tpl-modern .header-search { max-width: 640px; }
.tpl-modern .header-search input {
    background: #fff;
    border: 1.5px solid var(--t-line);
    border-radius: var(--t-radius-sm);
    padding: .78rem 3.8rem .78rem 1.1rem;
}
.tpl-modern .header-search input:focus { border-color: var(--t-primary); box-shadow: 0 0 0 3px var(--t-primary-soft); }
.tpl-modern .header-search button {
    right: .28rem;
    width: 3rem; height: 2.45rem;
    border-radius: 9px;
}
.tpl-modern .action-link .label { font-weight: 600; color: var(--t-ink); }
.tpl-modern .cart-btn { width: 2.9rem; height: 2.9rem; border-radius: var(--t-radius-sm); }
.tpl-modern .cart-badge { background: var(--t-accent); border-color: #fff; }
@media (min-width: 1025px) {
    .tpl-modern .cart-caption {
        display: block;
        margin-left: -.9rem;
        font-size: .78rem;
        font-weight: 700;
        line-height: 1.15;
        color: var(--t-ink);
    }
}

/* Barra de categorias */
.tpl-modern .cat-nav { background: #fff; border-top: 1px solid var(--t-line); }
.tpl-modern .cat-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: .5rem 1rem;
    gap: 1.2rem;
}
.tpl-modern .cat-nav-inner a.cat-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--t-ink);
}
.tpl-modern .cat-nav-inner a.cat-nav-link:hover { color: var(--t-primary); }
.tpl-modern .cat-nav-icon { display: inline-block; color: var(--t-primary); font-size: .92rem; }
.tpl-modern .all-cats {
    background: var(--t-primary);
    color: #fff;
    border-radius: 10px;
    font-size: .82rem;
    padding: .55rem 1rem;
}
.tpl-modern .all-cats:hover { background: var(--color-primary-hover); }
.tpl-modern .cat-nav-inner a.cat-nav-ofertas {
    margin-left: auto;
    background: var(--t-accent-soft);
    color: var(--t-accent) !important;
    border-radius: 10px;
    padding: .42rem .85rem !important;
}
.tpl-modern .cat-nav-ofertas .cat-nav-icon { color: inherit; }
.tpl-modern .cat-nav-inner a[href="/cupons"] {
    margin-left: 0;
    border: 0;
    border-radius: 10px;
    background: var(--t-primary-soft);
    color: var(--t-primary) !important;
    padding: .42rem .85rem !important;
}

/* ---------- Topo da Home ---------- */
.tpl-hero { padding-top: 1.25rem; }
.tpl-hero-main { position: relative; min-width: 0; }

/* Carrossel */
.tpl-carousel.banner-track-wrap {
    aspect-ratio: 16 / 5;
    border-radius: var(--t-radius);
    box-shadow: var(--t-shadow);
    background: #fff;
}
.tpl-hero--split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: stretch; }
.tpl-hero--split .tpl-carousel.banner-track-wrap { aspect-ratio: 16 / 8.2; height: 100%; }
.tpl-hero-side { display: flex; min-width: 0; }

.tpl-modern .banner-btn { background: #fff; color: var(--t-ink); box-shadow: var(--t-shadow); }
.tpl-modern .banner-dot { background: color-mix(in srgb, var(--t-primary) 25%, #fff); }
.tpl-modern .banner-dot.active { background: var(--t-primary); width: 1.4rem; border-radius: 999px; }

/* Slide desenhado (sem imagem cadastrada) */
.tpl-slide--default,
.tpl-slide--text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 3.5rem;
    overflow: hidden;
}
.tpl-slide--default {
    background:
        radial-gradient(circle at 85% 50%, color-mix(in srgb, var(--t-primary) 14%, #fff) 0 28%, transparent 29%),
        linear-gradient(115deg, var(--t-primary-soft) 0%, #fff 65%);
}
.tpl-slide--text { background: var(--t-primary); color: #fff; }
.tpl-slide-copy { position: relative; z-index: 2; max-width: 560px; }
.tpl-slide-eyebrow {
    display: inline-block;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--t-primary);
    margin-bottom: .6rem;
}
.tpl-slide-title {
    font-size: clamp(1.6rem, 3.2vw, 2.6rem);
    line-height: 1.12;
    font-weight: 800;
    color: var(--t-ink);
    letter-spacing: -.02em;
}
.tpl-slide-title span { display: block; color: var(--t-primary); }
.tpl-slide--text .tpl-slide-title,
.tpl-slide--text .tpl-slide-title span { color: #fff; }
.tpl-slide-text { margin: .8rem 0 1.4rem; font-size: 1rem; color: var(--t-muted); max-width: 440px; }
.tpl-slide--text .tpl-slide-text { color: rgba(255, 255, 255, .9); }
.tpl-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--t-primary);
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    padding: .8rem 1.5rem;
    border-radius: 999px;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--t-primary) 30%, transparent);
    transition: transform .15s, background .15s;
}
.tpl-btn:hover { background: var(--color-primary-hover); transform: translateY(-1px); color: #fff; }
.tpl-slide--text .tpl-btn { background: #fff; color: var(--t-primary); }

.tpl-slide-art { position: relative; width: 38%; height: 100%; flex-shrink: 0; }
.tpl-art-circle { position: absolute; border-radius: 50%; }
.tpl-art-circle--a { width: 70%; aspect-ratio: 1; right: 8%; top: 50%; transform: translateY(-50%); background: color-mix(in srgb, var(--t-primary) 16%, #fff); }
.tpl-art-circle--b { width: 26%; aspect-ratio: 1; right: 4%; top: 8%; background: var(--t-accent-soft); }
.tpl-art-icon {
    position: absolute;
    right: 20%; top: 50%;
    transform: translateY(-50%);
    font-size: clamp(3.5rem, 8vw, 7rem);
    color: var(--t-primary);
    opacity: .9;
}

/* Selos de confiança sobre o banner (template 03) */
.tpl-chips {
    position: absolute;
    left: 1.5rem; bottom: 1.25rem;
    z-index: 3;
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}
.tpl-chip {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(6px);
    border-radius: var(--t-radius-sm);
    padding: .5rem .85rem;
    box-shadow: var(--t-shadow);
    font-size: .74rem;
    color: var(--t-ink);
}
.tpl-chip > i { color: var(--t-primary); font-size: 1.1rem; }
.tpl-chip strong { display: block; font-size: .78rem; }
.tpl-chip small { color: var(--t-muted); }

/* Cards de campanha */
.tpl-cards { display: grid; gap: 1rem; width: 100%; }
.tpl-cards--stack { grid-template-rows: 1fr 1fr; }
.tpl-cards--row { margin-top: 1rem; }
.tpl-cards--row.tpl-cards--n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tpl-cards--row.tpl-cards--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tpl-card {
    --card-bg: var(--t-primary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 150px;
    padding: 1.35rem 1.5rem;
    border-radius: var(--t-radius);
    background: var(--card-bg);
    color: #fff;
    overflow: hidden;
    box-shadow: var(--t-shadow);
    transition: transform .2s, box-shadow .2s;
}
.tpl-card:hover { transform: translateY(-2px); box-shadow: var(--t-shadow-hover); color: #fff; }
.tpl-card--c1 { --card-bg: var(--t-accent); }
.tpl-card--c2 { --card-bg: var(--t-teal); }
.tpl-card--c3 { --card-bg: var(--t-primary); }
.tpl-card-copy { position: relative; z-index: 2; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.tpl-card-eyebrow { font-size: .78rem; font-weight: 600; opacity: .9; }
.tpl-card-title { font-size: 1.3rem; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.tpl-card-text { font-size: .82rem; opacity: .92; }
.tpl-card-cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .6rem;
    background: #fff;
    color: var(--card-bg);
    font-size: .8rem;
    font-weight: 700;
    padding: .45rem 1rem;
    border-radius: 999px;
}
.tpl-card-img { max-height: 130px; max-width: 42%; object-fit: contain; flex-shrink: 0; }
.tpl-card-art {
    width: 92px; height: 92px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    display: grid;
    place-items: center;
    font-size: 2.4rem;
}
.tpl-cards--stack .tpl-card { min-height: 0; }

/* Menu de categorias ao lado do banner (template 05) */
.tpl-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1rem; }
.tpl-hero--institucional .tpl-carousel.banner-track-wrap { aspect-ratio: 16 / 7; height: 100%; }
.tpl-hero-menu {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    background: #fff;
    border-radius: var(--t-radius);
    box-shadow: var(--t-shadow);
    padding: .55rem;
}
.tpl-hero-menu a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .7rem;
    border-radius: 10px;
    color: var(--t-ink);
    font-weight: 600;
    font-size: .86rem;
}
.tpl-hero-menu a:hover { background: var(--t-primary-soft); color: var(--t-primary); }
.tpl-hero-menu a > .bi-chevron-right { margin-left: auto; color: var(--t-muted); font-size: .72rem; }
.tpl-hero-menu-icon {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--t-primary-soft);
    color: var(--t-primary);
    display: grid;
    place-items: center;
}
.tpl-hero-menu a.tpl-hero-menu-all {
    margin-top: auto;
    justify-content: center;
    background: var(--t-primary);
    color: #fff;
}
.tpl-hero-menu a.tpl-hero-menu-all:hover { background: var(--color-primary-hover); color: #fff; }

/* ---------- Seções da Home ---------- */
.tpl-modern .section-heading,
.tpl-modern .showcase-title,
.tpl-modern .s-section-header h2 {
    color: var(--t-ink);
    font-weight: 800;
    letter-spacing: -.01em;
}

/* Destaques: vira grade de categorias com foto */
.tpl-modern .cat-circles-section { padding: 1.5rem 0 .5rem; }
.tpl-modern .cat-circles-wrap { gap: .9rem; justify-content: flex-start; padding-bottom: .4rem; }
.tpl-modern .cat-circle-item {
    flex: 1 0 128px;
    min-width: 128px;
    gap: 0;
    background: var(--t-card);
    border-radius: var(--t-radius);
    box-shadow: var(--t-shadow);
    overflow: hidden;
    color: var(--t-ink);
    transition: transform .2s, box-shadow .2s;
}
.tpl-modern .cat-circle-item:hover { transform: translateY(-2px); box-shadow: var(--t-shadow-hover); }
.tpl-modern .cat-circle-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 0;
    box-shadow: none;
}
.tpl-modern .cat-circle-label {
    width: auto;
    padding: .65rem .5rem .8rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--t-ink);
}

/* Benefícios */
.tpl-modern .advantages-bar { padding: 1.25rem 1rem; }
.tpl-modern .advantages-grid { border-radius: var(--t-radius); box-shadow: var(--t-shadow); padding: 1.1rem 1.25rem; }
.tpl-modern .advantage-item i {
    width: 46px; height: 46px;
    border-radius: 12px;
    font-size: 1.25rem;
    background: var(--t-primary-soft);
    color: var(--t-primary);
}
.tpl-modern .advantage-item h4 { color: var(--t-ink); }

/* Marcas */
.tpl-modern .brands-section { background: transparent; padding: 1.5rem 0; }
.tpl-modern .brand-circle {
    width: 150px; height: 76px;
    border-radius: var(--t-radius-sm);
    border: 0;
    box-shadow: var(--t-shadow);
    padding: .6rem 1rem;
}
.tpl-modern .brand-circle img { max-height: 100%; max-width: 100%; object-fit: contain; }

/* Cards de produto das vitrines */
.tpl-modern .showcase-card {
    border-radius: var(--t-radius);
    border: 1px solid var(--t-line);
    box-shadow: none;
    transition: box-shadow .2s, transform .2s;
}
.tpl-modern .showcase-card:hover { box-shadow: var(--t-shadow-hover); transform: translateY(-2px); }
.tpl-modern .showcase-badge { background: var(--t-accent); border-radius: 8px; }
.tpl-modern .showcase-buy { background: var(--t-primary); border-radius: 10px; }


/* ===================================================================
   O QUE DIFERENCIA CADA TEMPLATE
   =================================================================== */

/* ---------- 02 · Vitrine Dupla ---------- */
/* Base pura: carrossel com dois cards ao lado, categorias com foto. */

/* ---------- 03 · Destaque Família ---------- */
.tpl-3 .tpl-carousel.banner-track-wrap { aspect-ratio: 16 / 5.6; }
.tpl-3 .tpl-slide--default { padding-bottom: 5.5rem; }
.tpl-3 .banner-dots { left: auto; right: 1.5rem; justify-content: flex-end; }
.tpl-3 .tpl-card { min-height: 170px; }

/* ---------- 04 · Clean Moderno ---------- */
.tpl-4 {
    --t-radius: 22px;
    --t-radius-sm: 14px;
    --t-shadow: 0 2px 10px rgba(15, 23, 42, .04);
    --t-bg: #f8fafc;
}
.tpl-4 .header-search input { border-radius: 999px; background: #f5f7fb; border-color: transparent; }
.tpl-4 .header-search button { border-radius: 999px; width: 2.5rem; }
.tpl-4 .all-cats,
.tpl-4 .cat-nav-inner a.cat-nav-ofertas,
.tpl-4 .cat-nav-inner a[href="/cupons"] { border-radius: 999px; }
.tpl-4 .tpl-card { min-height: 180px; padding: 1.6rem 1.8rem; }
.tpl-4 .tpl-card-title { font-size: 1.45rem; }
.tpl-4 .cat-circle-item { box-shadow: none; border: 1px solid var(--t-line); }

/* ---------- 05 · Premium Institucional ---------- */
.tpl-5 .site-header { background: var(--t-primary); box-shadow: none; }
.tpl-5 .drogal-logo img { background: #fff; padding: 4px 10px; border-radius: 10px; }
.tpl-5 .header-search input { border-color: transparent; }
.tpl-5 .header-search button { background: var(--t-accent); }
.tpl-5 .header-search button:hover { background: var(--color-tertiary-hover); }
.tpl-5 .action-link,
.tpl-5 .action-link .label,
.tpl-5 .action-link i,
.tpl-5 .cart-caption,
.tpl-5 .btn-menu { color: #fff; }
.tpl-5 .action-link svg { stroke: #fff; }
.tpl-5 .action-link:hover .label { color: #fff; text-decoration: underline; }
.tpl-5 .cart-btn { background: #fff; color: var(--t-primary); }
.tpl-5 .cart-badge { border-color: var(--t-primary); }
.tpl-5 .btn-logout { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.tpl-5 .cat-nav {
    background: color-mix(in srgb, var(--t-primary) 80%, #000);
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.tpl-5 .cat-nav-inner { gap: .4rem; padding-top: .4rem; padding-bottom: .4rem; }
.tpl-5 .cat-nav-inner a.cat-nav-link {
    flex-direction: column;
    gap: .25rem;
    min-width: 92px;
    padding: .45rem .55rem;
    border-radius: 10px;
    font-size: .72rem;
    color: #fff;
    text-align: center;
}
.tpl-5 .cat-nav-inner a.cat-nav-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.tpl-5 .cat-nav-icon { color: #fff; font-size: 1.15rem; }
.tpl-5 .all-cats { background: rgba(255, 255, 255, .12); }
.tpl-5 .all-cats:hover { background: rgba(255, 255, 255, .2); }
.tpl-5 .cat-nav-inner a.cat-nav-ofertas { background: var(--t-accent); color: #fff !important; }
.tpl-5 .cat-nav-inner a[href="/cupons"] { background: rgba(255, 255, 255, .14); color: #fff !important; flex-direction: row; }
/* Benefícios em faixas coloridas */
.tpl-5 .advantages-grid { background: transparent; box-shadow: none; padding: 0; gap: .9rem; }
.tpl-5 .advantage-item { border-radius: var(--t-radius); padding: 1rem 1.1rem; }
.tpl-5 .advantage-item::before { display: none; }
.tpl-5 .advantage-item:nth-child(4n+1) { background: var(--t-primary); }
.tpl-5 .advantage-item:nth-child(4n+2) { background: var(--t-teal); }
.tpl-5 .advantage-item:nth-child(4n+3) { background: var(--t-accent); }
.tpl-5 .advantage-item:nth-child(4n+4) { background: color-mix(in srgb, var(--t-primary) 70%, #0ea5e9); }
.tpl-5 .advantage-item i { background: rgba(255, 255, 255, .18); color: #fff; }
.tpl-5 .advantage-item h4,
.tpl-5 .advantage-item p { color: #fff; }
.tpl-5 .cat-circle-item { box-shadow: none; border: 1px solid var(--t-line); }

/* ---------- 06 · Lifestyle Colorido ---------- */
.tpl-6 {
    --t-radius: 20px;
    --t-bg: #f7faf9;
}
.tpl-6 .header-search input { border-radius: 999px; }
.tpl-6 .header-search button { border-radius: 999px; width: 2.5rem; }
.tpl-6 .all-cats,
.tpl-6 .cat-nav-inner a.cat-nav-ofertas,
.tpl-6 .cat-nav-inner a[href="/cupons"] { border-radius: 999px; }
.tpl-6 .cart-btn { border-radius: 999px; }
/* Cards em tons suaves, com o título na cor do card */
.tpl-6 .tpl-card { background: color-mix(in srgb, var(--card-bg) 13%, #fff); color: var(--t-ink); box-shadow: none; }
.tpl-6 .tpl-card:hover { color: var(--t-ink); }
.tpl-6 .tpl-card-title { color: var(--card-bg); }
.tpl-6 .tpl-card-eyebrow,
.tpl-6 .tpl-card-text { color: var(--t-muted); opacity: 1; }
.tpl-6 .tpl-card-cta { background: var(--card-bg); color: #fff; }
.tpl-6 .tpl-card-art { background: #fff; color: var(--card-bg); }
/* Destaques em círculos coloridos */
.tpl-6 .cat-circle-item { background: transparent; box-shadow: none; flex: 1 0 104px; min-width: 104px; }
.tpl-6 .cat-circle-item:hover { box-shadow: none; }
.tpl-6 .cat-circle-img {
    width: 88px; height: 88px;
    aspect-ratio: auto;
    margin: 0 auto;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}


/* ===================================================================
   RESPONSIVO DOS TEMPLATES 02 A 06
   =================================================================== */
@media (max-width: 1024px) {
    .tpl-hero--split { grid-template-columns: 1fr; }
    .tpl-hero--split .tpl-carousel.banner-track-wrap { aspect-ratio: 16 / 7; }
    .tpl-hero-side .tpl-cards--stack { grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tpl-hero-grid { grid-template-columns: 1fr; }
    .tpl-hero-menu { display: none; }
    .tpl-slide-art { width: 32%; }
}

@media (max-width: 768px) {
    .tpl-modern .site-header { position: sticky; }
    .tpl-modern .header-inner { padding: .6rem 1rem; }
    .tpl-modern .mobile-search { background: inherit; }
    .tpl-5 .mobile-search input { background: #fff; }

    .tpl-hero { padding-top: .75rem; }
    .tpl-carousel.banner-track-wrap,
    .tpl-hero--split .tpl-carousel.banner-track-wrap,
    .tpl-hero--institucional .tpl-carousel.banner-track-wrap,
    .tpl-3 .tpl-carousel.banner-track-wrap { aspect-ratio: 1.45 / 1; }

    .tpl-slide--default,
    .tpl-slide--text { padding: 1.5rem 1.4rem; }
    .tpl-3 .tpl-slide--default { padding-bottom: 1.5rem; }
    .tpl-slide-art { display: none; }
    .tpl-slide-text { font-size: .88rem; margin: .5rem 0 1rem; }
    .tpl-btn { padding: .65rem 1.2rem; font-size: .85rem; }
    .tpl-chips { display: none; }

    /* Cards viram carrossel com rolagem lateral */
    .tpl-cards--row,
    .tpl-hero-side .tpl-cards--stack {
        grid-template-columns: none !important;
        grid-template-rows: none;
        grid-auto-flow: column;
        grid-auto-columns: 84%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -ms-overflow-style: none; scrollbar-width: none;
        padding-bottom: .25rem;
    }
    .tpl-cards--row::-webkit-scrollbar,
    .tpl-hero-side .tpl-cards--stack::-webkit-scrollbar { display: none; }
    .tpl-card { scroll-snap-align: start; min-height: 132px; padding: 1.1rem 1.2rem; }
    .tpl-card-title { font-size: 1.1rem; }
    .tpl-card-art { width: 68px; height: 68px; font-size: 1.8rem; }
    .tpl-card-img { max-height: 96px; }

    .tpl-modern .cat-circle-item { flex: 0 0 104px; min-width: 104px; }
    .tpl-6 .cat-circle-item { flex: 0 0 84px; min-width: 84px; }
    .tpl-6 .cat-circle-img { width: 68px; height: 68px; }

    /* No celular o template 01 esconde os benefícios; nos novos eles
       continuam, em faixa com rolagem lateral. */
    .tpl-modern .advantages-bar { display: block; padding: .75rem; }
    .tpl-modern .advantages-grid {
        display: grid;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -ms-overflow-style: none; scrollbar-width: none;
        padding: .9rem;
    }
    .tpl-modern .advantages-grid::-webkit-scrollbar { display: none; }
    .tpl-modern .advantage-item { scroll-snap-align: start; padding: 0 1rem; }
    .tpl-modern .advantage-item::before { display: none !important; }
    .tpl-5 .advantages-grid { padding: 0; }
    .tpl-5 .advantage-item { padding: .9rem 1rem; }

    .tpl-modern .brand-circle { width: 120px; height: 64px; }
}


/* ===================================================================
   PRÉ-VISUALIZAÇÃO DE TEMPLATE (só o admin vê)
   =================================================================== */
.tpl-preview-bar {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: .7rem;
    max-width: calc(100% - 2rem);
    padding: .55rem .6rem .55rem 1rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: .8rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
}
.tpl-preview-bar form { margin: 0; }
.tpl-preview-bar .bi { margin-right: .3rem; }
.tpl-preview-btn {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-radius: 999px;
    padding: .42rem .95rem;
    font-weight: 700;
    font-size: .76rem;
    white-space: nowrap;
}
.tpl-preview-btn:hover { background: rgba(255, 255, 255, .22); }
.tpl-preview-btn--primary { background: #10b981; }
.tpl-preview-btn--primary:hover { background: #059669; }
@media (max-width: 768px) {
    .tpl-preview-bar { bottom: 5rem; border-radius: 14px; flex-wrap: wrap; justify-content: center; text-align: center; }
}


/* ===================================================================
   RODAPÉ — igual em todos os templates
   =================================================================== */
.sf {
    --sf-primary: var(--color-primary);
    --sf-soft: color-mix(in srgb, var(--color-primary) 8%, #fff);
    --sf-ink: #0f172a;
    --sf-text: #334155;
    --sf-muted: #64748b;
    --sf-line: #e6eaf0;
    margin-top: 2.5rem;
    background: #f4f7fb;
    border-top: 1px solid var(--sf-line);
    color: var(--sf-text);
}
.sf-main {
    display: grid;
    grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
    gap: 2rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
}
.sf-logo { display: inline-block; }
.sf-logo img { max-height: 64px; width: auto; }
.sf-logo strong { font-size: 1.4rem; color: var(--sf-primary); }
.sf-tagline { margin: .75rem 0 1.1rem; max-width: 250px; font-size: 1.05rem; line-height: 1.35; color: #475569; }

.sf-help {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .95rem 1rem;
    border-radius: 16px;
    background: var(--sf-soft);
}
.sf-help-icon { color: var(--sf-primary); font-size: 1.7rem; line-height: 1; }
.sf-help strong { display: block; color: var(--sf-primary); font-size: .95rem; }
.sf-help span { font-size: .8rem; color: var(--sf-muted); }

.sf-phones {
    margin-top: .75rem;
    padding: .2rem 1rem;
    background: #fff;
    border: 1px solid var(--sf-line);
    border-radius: 16px;
}
.sf-phones li + li { border-top: 1px solid #eef2f6; }
.sf-phones a {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .72rem 0;
    color: var(--sf-ink);
    font-weight: 600;
    font-size: .93rem;
}
.sf-phones a:hover { color: var(--sf-primary); }
.sf-phones a > i:first-child { width: 22px; color: var(--sf-primary); font-size: 1.1rem; }
.sf-arrow { margin-left: auto; font-size: .68rem; color: #94a3b8; }

.sf-title {
    position: relative;
    margin: 0 0 1rem;
    padding-bottom: .55rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--sf-ink);
}
.sf-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 34px; height: 3px;
    border-radius: 3px;
    background: var(--sf-primary);
}
.sf-links + .sf-title,
.sf-links + .sf-title + .sf-payments { margin-top: 1.6rem; }
.sf-col .sf-links + .sf-title { margin-top: 1.6rem; }
.sf-links { display: flex; flex-direction: column; gap: .15rem; }
.sf-links a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .42rem 0;
    font-size: .9rem;
    color: var(--sf-text);
    transition: color .15s;
}
.sf-links a:hover { color: var(--sf-primary); }
.sf-links a > i:first-child { width: 20px; text-align: center; color: var(--sf-primary); font-size: .95rem; }

.sf-payments { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.1rem; }
.sf-pay {
    display: grid;
    place-items: center;
    width: 56px; height: 38px;
    background: #fff;
    border: 1px solid var(--sf-line);
    border-radius: 8px;
    font-size: 1.5rem;
    color: #1a1f71;
}
.sf-pay .fa-cc-mastercard { color: #eb001b; }
.sf-pay .fa-cc-amex { color: #2e77bc; }
.sf-pay--text { font-size: .95rem; font-weight: 900; font-style: italic; color: var(--sf-ink); }
.sf-pay--pix {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    width: auto;
    padding: 0 .65rem;
    font-size: .95rem;
    font-weight: 700;
    color: #32bcad;
}

.sf-secure {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .95rem 1rem;
    border-radius: 16px;
    background: var(--sf-soft);
}
.sf-secure-icon {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--sf-primary);
    color: #fff;
    font-size: 1.15rem;
}
.sf-secure strong { display: block; font-size: .92rem; color: var(--sf-ink); }
.sf-secure span { font-size: .78rem; color: var(--sf-muted); }

.sf-perks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 2rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--sf-line);
    border-radius: 18px;
}
.sf-perk { display: flex; align-items: center; gap: .9rem; padding: 0 1rem; }
.sf-perk + .sf-perk { border-left: 1px solid #eef2f6; }
.sf-perk-icon {
    display: grid;
    place-items: center;
    width: 50px; height: 50px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--sf-soft);
    color: var(--sf-primary);
    font-size: 1.2rem;
}
.sf-perk strong { display: block; font-size: .95rem; color: var(--sf-ink); }
.sf-perk span { font-size: .8rem; color: var(--sf-muted); }

.sf-bottom { background: #fff; border-top: 1px solid var(--sf-line); }
.sf-bottom-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 2rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}
.sf-bottom-logo img { max-height: 44px; width: auto; }
.sf-bottom-logo strong { color: var(--sf-primary); }
.sf-about { max-width: 640px; font-size: .8rem; line-height: 1.55; color: var(--sf-muted); }
.sf-social {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 0 1.5rem;
    border-left: 1px solid #eef2f6;
    border-right: 1px solid #eef2f6;
}
.sf-social span { font-size: .85rem; font-weight: 600; color: var(--sf-ink); }
.sf-social a { font-size: 1.2rem; color: var(--sf-ink); transition: color .15s; }
.sf-social a:hover { color: var(--sf-primary); }
.sf-copy { font-size: .78rem; line-height: 1.5; color: var(--sf-muted); text-align: right; }

@media (max-width: 1100px) {
    .sf-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sf-col--brand { grid-column: 1 / -1; }
    .sf-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; }
    .sf-perk:nth-child(3) { border-left: 0; }
    .sf-bottom-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1rem; }
    .sf-social { border: 0; padding: 0; }
    .sf-copy { text-align: center; }
}

@media (max-width: 768px) {
    .sf { margin-top: 1.5rem; }
    .sf-main { grid-template-columns: 1fr; gap: 1.1rem; padding-top: 2rem; }
    .sf-tagline { max-width: none; }
    /* Listas de links viram sanfona, abertas pelo título */
    .sf-title { cursor: pointer; margin-bottom: .6rem; }
    .sf-title + .sf-links { display: none; }
    .sf-title.open + .sf-links { display: flex; margin-bottom: .5rem; }
    .sf-title + .sf-links + .sf-title,
    .sf-col .sf-links + .sf-title { margin-top: .9rem; }
    .sf-title:has(+ .sf-links)::before {
        content: '+';
        position: absolute;
        right: 0; top: 0;
        font-size: 1.1rem;
        color: var(--sf-muted);
    }
    .sf-title.open:has(+ .sf-links)::before { content: '−'; }
    .sf-perks { grid-template-columns: 1fr; gap: .9rem; }
    .sf-perk { padding: 0; border-left: 0 !important; }
    /* Espaço para a barra de navegação fixa do celular */
    .sf-bottom { padding-bottom: 4.5rem; }
}

/* Destaques sem cadastro: categorias com ícone (todos os templates) */
.cat-circle-img--icon { display: grid; place-items: center; }
.cat-circle-img--icon i { font-size: 1.5rem; color: var(--color-primary); }
.cat-circle-img--offer { background: color-mix(in srgb, var(--color-tertiary) 14%, #fff) !important; }
.cat-circle-img--offer i { color: var(--color-tertiary); }
.tpl-modern .cat-circle-img--icon i { font-size: 2.4rem; }
.tpl-6 .cat-circle-img--icon i { font-size: 1.8rem; }

/* Nome da categoria quebra em duas linhas em vez de ser cortado
   ("Dermocosméticos" em card estreito). */
.tpl-modern .cat-circle-label { white-space: normal; overflow-wrap: anywhere; hyphens: auto; line-height: 1.25; }
@media (max-width: 768px) {
    .tpl-modern .cat-circle-label { font-size: .72rem; padding: .5rem .35rem .6rem; }
}
