/* ============================================================
   Mais Pilar do Sul — folha de estilo
   ============================================================ */
:root {
    --brand:        #10896b;
    --brand-dark:   #0b6b53;
    --brand-soft:   #e6f4ef;
    --accent:       #ff3b57;   /* ofertas / preço / CTA */
    --accent-dark:  #e02744;
    --hot:          #ff6a13;
    --cold:         #3b82f6;
    --yellow:       #ffcf33;
    --ink:          #1a2530;
    --muted:        #6a7683;
    --line:         #e7ebef;
    --bg:           #f3f5f7;
    --card:         #ffffff;
    --radius:       14px;
    --radius-sm:    9px;
    --shadow:       0 2px 10px rgba(20,35,50,.06);
    --shadow-lg:    0 12px 34px rgba(20,35,50,.13);
    --maxw:         1180px;
    --font:         'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* --------------------------------------------------- Botões */
.btn {
    display: inline-flex; align-items: center; gap: .45em;
    font: inherit; font-weight: 700; cursor: pointer;
    border: none; border-radius: 999px;
    padding: .7em 1.35em; transition: .16s ease;
    line-height: 1; white-space: nowrap;
}
.btn-sm { padding: .55em 1em; font-size: .9rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { opacity: .9; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linklike { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; padding: .5em; }
.linklike:hover { color: var(--accent); }
.inline { display: inline; }

/* --------------------------------------------------- Cabeçalho */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
}
.header-inner {
    display: flex; align-items: center; gap: 18px;
    padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: .5em; font-size: 1.28rem; font-weight: 700; }
.brand-mark {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff; font-weight: 800; font-size: 1.5rem;
}
.brand-text { color: var(--ink); font-weight: 500; }
.brand-text strong { font-weight: 800; }

.search { flex: 1; display: flex; max-width: 520px; position: relative; }
.search input {
    width: 100%; font: inherit; padding: .7em 3em .7em 1.1em;
    border: 1.6px solid var(--line); border-radius: 999px;
    background: var(--bg); transition: .15s;
}
.search input:focus { outline: none; border-color: var(--brand); background: #fff; }
.search button {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    border: none; background: var(--brand); color: #fff;
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1rem;
}
.main-nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.main-nav > a { font-weight: 600; color: var(--ink); }
.main-nav > a:hover { color: var(--brand); }
.nav-login { color: var(--muted) !important; }

/* Barra de categorias */
.cat-bar { border-top: 1px solid var(--line); background: #fff; }
.cat-scroll {
    display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px;
    scrollbar-width: thin;
}
.cat-scroll::-webkit-scrollbar { height: 6px; }
.cat-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.cat-chip {
    display: inline-flex; align-items: center; gap: .4em;
    padding: .45em .95em; border-radius: 999px;
    background: var(--bg); font-size: .87rem; font-weight: 600;
    white-space: nowrap; color: var(--ink); border: 1px solid transparent;
    transition: .14s;
}
.cat-chip:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* --------------------------------------------------- Flash */
.flash-wrap { margin-top: 16px; }
.flash {
    padding: .85em 1.1em; border-radius: var(--radius-sm);
    font-weight: 600; margin-bottom: 10px; border: 1px solid;
}
.flash-sucesso { background: #e8f7ef; color: #12784f; border-color: #b9e6cd; }
.flash-erro    { background: #fdecee; color: #c02a3f; border-color: #f6c7cf; }

/* --------------------------------------------------- Seções */
.site-main { padding: 26px 0 50px; }
.section { margin-bottom: 42px; }
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 16px; gap: 10px;
}
.section-head h2 { font-size: 1.5rem; }
.section-head a { color: var(--brand); font-weight: 700; font-size: .92rem; }

/* --------------------------------------------------- Hero */
.hero {
    background: linear-gradient(120deg, var(--brand), var(--brand-dark));
    color: #fff; border-radius: 20px; padding: 44px 40px;
    margin-bottom: 34px; position: relative; overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; right: -60px; top: -60px;
    width: 260px; height: 260px; border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.hero h1 { font-size: 2.3rem; max-width: 15ch; }
.hero p { font-size: 1.1rem; opacity: .92; max-width: 46ch; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.24); }
.hero-stats { display: flex; gap: 28px; margin-top: 26px; }
.hero-stats b { font-size: 1.6rem; display: block; }
.hero-stats span { opacity: .85; font-size: .9rem; }

/* --------------------------------------------------- Grid de ofertas */
.offer-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}
.offer-card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
    display: flex; flex-direction: column; transition: .16s;
    border: 1px solid var(--line);
}
.offer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.offer-thumb {
    position: relative; aspect-ratio: 1 / 1; background: #f0f2f4;
    display: grid; place-items: center; overflow: hidden;
}
.offer-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.offer-thumb .placeholder { font-size: 3rem; opacity: .35; }
.badge-discount {
    position: absolute; top: 10px; left: 10px;
    background: var(--accent); color: #fff; font-weight: 800;
    font-size: .82rem; padding: .3em .6em; border-radius: 8px;
}
.badge-featured {
    position: absolute; top: 10px; right: 10px;
    background: var(--yellow); color: #6b4e00; font-weight: 800;
    font-size: .72rem; padding: .3em .55em; border-radius: 8px;
}
.offer-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.offer-store { display: flex; align-items: center; gap: .4em; font-size: .78rem; color: var(--muted); font-weight: 600; }
.offer-store .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; font-size: .7rem; overflow: hidden; }
.offer-store .dot img { width: 100%; height: 100%; object-fit: cover; }
.offer-title { font-size: .96rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.offer-title:hover { color: var(--brand); }
.offer-price { margin-top: auto; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .82rem; }
.price-new { color: var(--accent); font-weight: 800; font-size: 1.32rem; }
.offer-coupon {
    display: inline-flex; align-items: center; gap: .4em; margin-top: 4px;
    border: 1.5px dashed var(--brand); color: var(--brand-dark);
    border-radius: 7px; padding: .25em .6em; font-size: .78rem; font-weight: 700;
    background: var(--brand-soft);
}
.offer-foot {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid var(--line); padding-top: 9px; margin-top: 4px;
    font-size: .76rem; color: var(--muted);
}
.hot-badge { display: inline-flex; align-items: center; gap: .3em; font-weight: 700; color: var(--hot); }

/* --------------------------------------------------- Grid de empresas */
.biz-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.biz-card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line);
    transition: .16s; display: flex; flex-direction: column;
}
.biz-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.biz-cover { height: 92px; background: linear-gradient(120deg, var(--brand-soft), #dbeee7); position: relative; }
.biz-cover img { width: 100%; height: 100%; object-fit: cover; }
.biz-logo {
    width: 58px; height: 58px; border-radius: 14px; background: #fff;
    box-shadow: var(--shadow); display: grid; place-items: center;
    position: absolute; left: 16px; bottom: -26px; font-size: 1.6rem; overflow: hidden;
    border: 2px solid #fff;
}
.biz-logo img { width: 100%; height: 100%; object-fit: cover; }
.biz-body { padding: 34px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.biz-body h3 { font-size: 1.08rem; }
.biz-cat { font-size: .8rem; color: var(--brand-dark); font-weight: 700; }
.biz-desc { font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.biz-meta { display: flex; gap: 12px; font-size: .78rem; color: var(--muted); margin-top: auto; padding-top: 8px; }

/* --------------------------------------------------- Filtros */
.toolbar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 14px; margin-bottom: 22px;
}
.toolbar select, .toolbar input {
    font: inherit; padding: .5em .8em; border: 1.5px solid var(--line);
    border-radius: 8px; background: #fff;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    padding: .4em .9em; border-radius: 999px; background: #fff;
    border: 1.5px solid var(--line); font-size: .85rem; font-weight: 600;
}
.chip.active, .chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* --------------------------------------------------- Página oferta */
.offer-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 26px; }
.offer-detail .big-thumb { background: #f5f6f8; border-radius: var(--radius); aspect-ratio: 1/1; display: grid; place-items: center; overflow: hidden; }
.offer-detail .big-thumb img { object-fit: contain; padding: 20px; }
.offer-detail h1 { font-size: 1.6rem; }
.detail-price { display: flex; align-items: baseline; gap: 12px; margin: 14px 0; }
.detail-price .price-new { font-size: 2.1rem; }
.vote-box { display: flex; gap: 10px; align-items: center; margin: 18px 0; }
.vote-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: .55em 1.1em; font-weight: 700; cursor: pointer; font: inherit; }
.vote-btn.hot { color: var(--hot); } .vote-btn.hot:hover { background: #fff3ea; border-color: var(--hot); }
.vote-btn.cold { color: var(--cold); } .vote-btn.cold:hover { background: #eef4ff; border-color: var(--cold); }
.vote-score { font-weight: 800; font-size: 1.3rem; }

/* --------------------------------------------------- Página empresa */
.biz-hero { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; margin-bottom: 26px; }
.biz-hero-cover { height: 190px; background: linear-gradient(120deg, var(--brand), var(--brand-dark)); position: relative; }
.biz-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.biz-hero-body { padding: 0 26px 24px; display: flex; gap: 20px; align-items: flex-end; margin-top: -46px; position: relative; flex-wrap: wrap; }
.biz-hero-logo { width: 96px; height: 96px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-lg); display: grid; place-items: center; font-size: 2.6rem; overflow: hidden; border: 3px solid #fff; }
.biz-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.biz-hero-info { flex: 1; padding-bottom: 4px; }
.biz-hero-info h1 { font-size: 1.7rem; margin-bottom: 2px; }
.biz-contacts { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.info-item .label { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.info-item .value { font-weight: 600; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.gallery img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); width: 100%; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 16px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-card .p-thumb { aspect-ratio: 1/1; background: #f5f6f8; display: grid; place-items: center; overflow:hidden; }
.product-card .p-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .p-body { padding: 10px 12px; }
.product-card h4 { font-size: .95rem; margin-bottom: 2px; }
.product-card .p-price { color: var(--accent); font-weight: 800; }

/* --------------------------------------------------- Auth / formulários */
.auth-wrap { max-width: 440px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.auth-wrap.wide { max-width: 620px; }
.auth-wrap h1 { font-size: 1.5rem; }
.form-group { margin-bottom: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
label .req { color: var(--accent); }
input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], input[type=date], input[type=search], select, textarea {
    width: 100%; font: inherit; padding: .65em .9em;
    border: 1.6px solid var(--line); border-radius: 9px; background: #fff; transition: .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 90px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.field-file { border: 1.5px dashed var(--line); border-radius: 9px; padding: 14px; text-align: center; background: var(--bg); }

/* --------------------------------------------------- Painel (layout) */
.dash { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.dash-side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; position: sticky; top: 130px; }
.dash-side a { display: flex; align-items: center; gap: .6em; padding: .65em .8em; border-radius: 9px; font-weight: 600; color: var(--ink); font-size: .93rem; }
.dash-side a:hover { background: var(--bg); }
.dash-side a.active { background: var(--brand-soft); color: var(--brand-dark); }
.dash-main { min-width: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat b { font-size: 1.9rem; display: block; color: var(--brand); }
.stat span { color: var(--muted); font-size: .88rem; }

/* Status badges */
.status { display: inline-block; padding: .28em .7em; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.status-approved { background: #e8f7ef; color: #12784f; }
.status-pending  { background: #fff4e0; color: #a86400; }
.status-rejected { background: #fdecee; color: #c02a3f; }

/* Tabelas */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.actions-inline { display: flex; gap: 6px; flex-wrap: wrap; }

/* Empty state */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 3rem; margin-bottom: 8px; }

/* --------------------------------------------------- Responsivo */
@media (max-width: 900px) {
    .offer-detail { grid-template-columns: 1fr; }
    .dash { grid-template-columns: 1fr; }
    .dash-side { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
    .dash-side a { flex: 1; justify-content: center; }
}
@media (max-width: 720px) {
    .header-inner { flex-wrap: wrap; }
    .search { order: 3; max-width: 100%; flex-basis: 100%; }
    .main-nav { gap: 10px; }
    .main-nav > a:not(.btn) { display: none; }
    .hero { padding: 30px 22px; }
    .hero h1 { font-size: 1.7rem; }
    .form-row, .info-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------- Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 40px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: .95rem; margin-bottom: 10px; }
.footer-grid a { display: block; color: var(--muted); font-size: .9rem; padding: 3px 0; }
.footer-grid a:hover { color: var(--brand); }
.brand-footer { font-size: 1.1rem; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px; font-size: .85rem; }
