/* ==========================================================================
   style-v2.css — Template TudoEm mini-site (anunciante)
   Substitui: style_wide.css, settings.css, op.css, styles.css,
              captions.css, flexslider.css, prettyPhoto.css, media_queries_wide.css
   Não depende de Bootstrap. Usa CSS custom properties injetadas pelo PHP.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset básico
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--cor-texto, #333);
    background-color: var(--cor-site, #fff);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#site-content {
    flex: 1;
}

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

a { color: var(--cor-link, #333); text-decoration: none; }
a:hover { opacity: .8; }

ul { list-style: none; }

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Barra superior
   -------------------------------------------------------------------------- */
#top-bar {
    background: var(--cor-menu, #222);
    padding: 7px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.top-bar-inner {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.top-info {
    color: rgba(255,255,255,.6);
    display: flex;
    align-items: center;
    gap: 6px;
}
.top-info a { color: inherit; }
.top-info a:hover { color: rgba(255,255,255,.9); opacity: 1; }
.top-info .fa { font-size: 11px; opacity: .7; }

/* --------------------------------------------------------------------------
   Header / Logo / Nav
   -------------------------------------------------------------------------- */
#site-header {
    background: var(--cor-logo-bg, #2b2b2b);
    position: sticky;
    top: 0;
    z-index: 900;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.header-inner {
    display: flex;
    align-items: stretch;
    min-height: 68px;
    gap: 0;
}

/* Logo com divisória direita */
#logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 10px 28px 10px 0;
    margin-right: 24px;
    border-right: 1px solid rgba(255,255,255,.1);
}
#logo a { display: flex; align-items: center; }
.logo-img { height: 46px; width: auto; object-fit: contain; }

.logo-left  { order: 0; }
.logo-center { order: 0; margin: 0 auto; border-right: none; padding-right: 0; }
.logo-right { order: 2; margin-left: auto; border-right: none; border-left: 1px solid rgba(255,255,255,.1); padding-right: 0; padding-left: 28px; }

/* Nav */
#main-nav {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    color: var(--cor-link, rgba(255,255,255,.8));
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    transition: background .2s, color .2s;
    white-space: nowrap;
    height: 68px;
}
.nav-menu > li > a:hover { background: rgba(255,255,255,.08); color: #fff; opacity: 1; }
.nav-menu > li.current > a {
    color: #fff;
    border-bottom: 2px solid var(--cor-link, #fff);
}

/* Submenu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--cor-logo-bg, #2b2b2b);
    border: 1px solid rgba(255,255,255,.1);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    z-index: 1000;
    padding: 4px 0;
}
.has-submenu:hover .submenu { display: block; }

.submenu li a {
    display: block;
    padding: 9px 16px;
    color: var(--cor-link, rgba(255,255,255,.75));
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: background .15s;
    height: auto;
}
.submenu li:last-child a { border-bottom: none; }
.submenu li a:hover { background: rgba(255,255,255,.08); color: #fff; opacity: 1; }

/* Botão WhatsApp no header */
#header-wp {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-left: 20px;
    margin-left: 8px;
}
.btn-header-wp {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #25d366;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 24px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, transform .15s;
    opacity: 1 !important;
}
.btn-header-wp:hover { background: #1ebe5d; transform: scale(1.04); opacity: 1 !important; }
.btn-header-wp .fa { font-size: 16px; }

/* Hamburger */
#menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    z-index: 950;
}
#menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--cor-link, #fff);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
#menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-toggle.active span:nth-child(2) { opacity: 0; }
#menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Banner / título de página
   -------------------------------------------------------------------------- */
.page-banner {
    background: var(--cor-menu, #333) center/cover no-repeat;
    padding: 48px 0;
    text-align: center;
}
.page-banner h1 {
    color: #fff;
    font-size: clamp(22px, 4vw, 36px);
    text-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.page-banner .breadcrumb {
    color: rgba(255,255,255,.75);
    font-size: 13px;
    margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Conteúdo principal
   -------------------------------------------------------------------------- */
.section {
    padding: 48px 0;
    background: var(--cor-site, #fff);
}

/* Divider decorativo */
.sc-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}
.sc-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: rgba(0,0,0,.1);
}
.sc-divider span {
    position: relative;
    background: var(--cor-site, #fff);
    padding: 0 16px;
    font-size: 18px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Grid de imagens (galeria / equipe)
   -------------------------------------------------------------------------- */
.img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.img-grid a { display: block; border-radius: 6px; overflow: hidden; }
.img-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform .3s;
}
.img-grid a:hover img { transform: scale(1.05); }

/* Grid de slides horizontais (substitui bxSlider) */
.img-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.img-slider::-webkit-scrollbar { height: 4px; }
.img-slider::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 2px; }
.img-slider a {
    flex: 0 0 auto;
    scroll-snap-align: start;
    border-radius: 6px;
    overflow: hidden;
}
.img-slider img { width: 80px; height: 80px; object-fit: cover; }

/* --------------------------------------------------------------------------
   Cards de produto/anúncio
   -------------------------------------------------------------------------- */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.card-produto {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s, box-shadow .25s;
    text-decoration: none;
    color: inherit;
}
.card-produto:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.1);
    opacity: 1;
}

.card-produto-thumb {
    position: relative;
    overflow: hidden;
}
.card-produto-thumb img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform .35s;
    display: block;
}
.card-produto:hover .card-produto-thumb img { transform: scale(1.05); }

/* Barra de cor embaixo da imagem — usa cor do menu do banco */
.card-produto-thumb::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--cor-menu, #333);
}

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

.card-produto-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--cor-menu, #555);
    margin-bottom: 7px;
    opacity: .7;
}

.card-produto-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-produto-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    flex: 1;
}

.card-produto-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.card-produto-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--cor-menu, #333);
}

.card-produto-btn {
    font-size: 11px;
    font-weight: 600;
    color: var(--cor-menu, #333);
    border: 1px solid var(--cor-menu, #333);
    border-radius: 4px;
    padding: 5px 10px;
    transition: background .2s, color .2s;
}
.card-produto:hover .card-produto-btn {
    background: var(--cor-menu, #333);
    color: var(--cor-link, #fff);
}

/* --------------------------------------------------------------------------
   Página de detalhe do anúncio / produto
   -------------------------------------------------------------------------- */
.anuncio-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

/* Galeria principal */
.anuncio-gallery { }
.gallery-main img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    background: #f5f5f5;
    cursor: zoom-in;
}
.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.gallery-thumbs a { display: block; border-radius: 4px; overflow: hidden; border: 2px solid transparent; transition: border-color .2s; }
.gallery-thumbs a:hover,
.gallery-thumbs a.active { border-color: var(--cor-menu, #333); }
.gallery-thumbs img { width: 70px; height: 70px; object-fit: cover; }

/* Info lateral */
.anuncio-info {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 24px;
}
.anuncio-title { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.anuncio-price { font-size: 24px; font-weight: 700; color: var(--cor-menu, #333); margin-bottom: 16px; }
.anuncio-desc { font-size: 14px; line-height: 1.7; color: #444; margin-bottom: 20px; }

/* Formulário de contato do anúncio */
.form-contato label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: #555; }
.form-contato input[type="text"],
.form-contato input[type="email"],
.form-contato textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    margin-bottom: 12px;
    transition: border-color .2s;
}
.form-contato input:focus,
.form-contato textarea:focus {
    outline: none;
    border-color: var(--cor-menu, #666);
}
.form-contato textarea { min-height: 90px; resize: vertical; }
.form-contato .honeypot { display: none !important; }
.btn-enviar {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: var(--cor-menu, #333);
    color: var(--cor-link, #fff);
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: opacity .2s;
}
.btn-enviar:hover { opacity: .85; }

/* Mais produtos */
.mais-produtos { margin-top: 48px; }
.mais-produtos h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

/* --------------------------------------------------------------------------
   Rodapé
   -------------------------------------------------------------------------- */
#site-footer {
    background: var(--cor-rodape, #1e1e1e);
    color: rgba(255,255,255,.7);
    padding: 40px 0 0;
    font-size: 13px;
    line-height: 1.8;
    margin-top: auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-col-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
    margin-bottom: 14px;
}

/* Coluna 1: info da empresa */
.footer-info { color: rgba(255,255,255,.65); }
.footer-info strong { color: rgba(255,255,255,.9); display: block; margin-bottom: 6px; font-size: 14px; }
.footer-info p { margin-bottom: 4px; display: flex; align-items: flex-start; gap: 8px; }
.footer-info .fa { margin-top: 3px; opacity: .45; width: 14px; flex-shrink: 0; }
.footer-info a { color: inherit; }
.footer-info a:hover { color: #fff; opacity: 1; }

/* Coluna 2: navegação */
.footer-nav { display: flex; flex-direction: column; gap: 4px; }
.footer-nav a {
    color: rgba(255,255,255,.55);
    font-size: 13px;
    padding: 2px 0;
    transition: color .15s, padding-left .15s;
    display: block;
}
.footer-nav a:hover { color: #fff; padding-left: 4px; opacity: 1; }

/* Coluna 3: redes sociais */
.footer-social-icons { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-social-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.6);
    font-size: 15px;
    transition: background .2s, color .2s;
    text-decoration: none;
}
.footer-social-icon:hover { background: rgba(255,255,255,.18); color: #fff; opacity: 1; }
.footer-social-icon.fb:hover  { background: #1877f2; }
.footer-social-icon.ig:hover  { background: #e1306c; }
.footer-social-icon.tw:hover  { background: #000; }

.footer-cupom-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,.5);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 4px;
    padding: 5px 10px;
    transition: border-color .2s, color .2s;
}
.footer-cupom-link:hover { border-color: rgba(255,255,255,.4); color: #fff; opacity: 1; }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 11px;
    color: rgba(255,255,255,.25);
    flex-wrap: wrap;
    gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: rgba(255,255,255,.7); opacity: 1; }

/* WhatsApp flutuante */
.wp-float {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    z-index: 800;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
}
.wp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
}

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    #menu-toggle { display: flex; }

    .header-inner { flex-wrap: wrap; min-height: auto; padding: 10px 0; }

    #logo {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
    }

    #header-wp { display: none; }

    #main-nav {
        display: none;
        width: 100%;
        order: 3;
    }
    #main-nav.nav-open { display: flex; }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        background: var(--cor-logo-bg, #2b2b2b);
        border-radius: 0 0 8px 8px;
        padding: 8px 0;
        width: 100%;
        gap: 0;
    }
    .nav-menu > li > a {
        height: auto;
        padding: 10px 16px;
        border-bottom: 1px solid rgba(255,255,255,.06);
        border-radius: 0;
    }
    .nav-menu > li.current > a { border-bottom: none; border-left: 3px solid var(--cor-link, #fff); }

    .submenu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: rgba(0,0,0,.2);
        border-radius: 0;
        padding: 0;
    }
    .submenu-open > .submenu { display: block; }
    .submenu li a { padding-left: 28px; }

    .anuncio-layout { grid-template-columns: 1fr; }

    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
    .produtos-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .img-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .top-bar-inner { justify-content: center; }
}

/* --------------------------------------------------------------------------
   Utilitários
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.clear { clear: both; }

/* Paginação */
.paginacao { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.paginacao a,
.paginacao span {
    display: inline-block;
    padding: 7px 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    transition: background .2s, color .2s;
}
.paginacao a:hover { background: var(--cor-menu, #333); color: #fff; border-color: transparent; }
.paginacao .atual { background: var(--cor-menu, #333); color: #fff; border-color: transparent; }
