/* ================================================================
   GPC Mestre das Madeiras — E-commerce
   Paleta: Verde escuro #1B3A2D + Dourado #C8963E + Branco
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body { font-family: 'Open Sans', sans-serif; color: #1a1a1a; background: #fff; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; }

:root {
  --verde: #1B3A2D;
  --verde2: #254d3c;
  --dourado: #C8963E;
  --dourado2: #b07f2e;
  --cinza: #f5f5f5;
  --borda: #e5e5e5;
  --texto: #333;
  --suave: #777;
}

/* ---- TOPBAR ---- */
.topbar { background: var(--verde); color: rgba(255,255,255,.8); font-size: .78rem; padding: .38rem 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .3rem; }
.topbar a { color: rgba(255,255,255,.8); }
.topbar a:hover { color: #fff; }
.topbar-esq, .topbar-dir { display: flex; align-items: center; gap: 1.2rem; }
.topbar-item { display: flex; align-items: center; gap: .35rem; }
.topbar-item svg { width: 13px; height: 13px; }

/* ---- HEADER ---- */
header { background: #fff; border-bottom: 2px solid var(--verde); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.header-inner { display: flex; align-items: center; height: 70px; gap: 1.5rem; }
.logo { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.logo-texto { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--verde); line-height: 1.1; }
.logo-texto span { color: var(--dourado); display: block; font-size: .65rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.busca { flex: 1; max-width: 520px; display: flex; border: 2px solid var(--verde); border-radius: 5px; overflow: hidden; }
.busca input { flex: 1; padding: .6rem 1rem; border: none; outline: none; font-size: .9rem; }
.busca button { background: var(--verde); border: none; padding: 0 1.1rem; cursor: pointer; display: flex; align-items: center; }
.busca button svg { width: 18px; height: 18px; stroke: #fff; fill: none; }
.busca button:hover { background: var(--verde2); }
.header-acoes { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.header-tel { display: flex; align-items: center; gap: .4rem; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .9rem; color: var(--verde); }
.header-tel svg { width: 20px; height: 20px; stroke: var(--verde); fill: none; }
.btn-carrinho { position: relative; display: flex; align-items: center; gap: .4rem; background: var(--verde); color: #fff; padding: .55rem 1.1rem; border-radius: 5px; font-weight: 600; font-size: .85rem; cursor: pointer; border: none; }
.btn-carrinho svg { width: 20px; height: 20px; stroke: #fff; fill: none; }
.btn-carrinho:hover { background: var(--verde2); }
.carrinho-badge { position: absolute; top: -6px; right: -6px; background: var(--dourado); color: #fff; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; }

/* ---- NAV CATEGORIAS ---- */
.nav-cats { background: var(--verde); }
.nav-cats-inner { display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none; }
.nav-cats-inner::-webkit-scrollbar { display: none; }
.nav-cats-inner a { color: rgba(255,255,255,.85); font-size: .8rem; font-family: 'Montserrat', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .7rem 1rem; white-space: nowrap; border-right: 1px solid rgba(255,255,255,.1); transition: background .2s, color .2s; }
.nav-cats-inner a:hover, .nav-cats-inner a.ativa { background: var(--dourado); color: #fff; }

/* ---- HERO ---- */
.hero { position: relative; height: 480px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(27,58,45,.88) 0%, rgba(27,58,45,.5) 55%, transparent 100%); }
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }
.hero-box { max-width: 560px; }
.hero-tag { display: inline-block; background: var(--dourado); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .28rem .8rem; border-radius: 3px; margin-bottom: .9rem; }
.hero-box h1 { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: clamp(1.8rem, 3.5vw, 3rem); color: #fff; line-height: 1.18; margin-bottom: 1rem; }
.hero-box h1 em { color: var(--dourado); font-style: normal; }
.hero-box p { color: rgba(255,255,255,.82); font-size: .96rem; line-height: 1.7; margin-bottom: 1.8rem; max-width: 440px; }
.hero-btns { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---- BOTÕES ---- */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.5rem; border-radius: 5px; font-weight: 700; font-size: .85rem; cursor: pointer; border: none; transition: all .2s; font-family: 'Montserrat', sans-serif; }
.btn-verde { background: var(--verde); color: #fff; }
.btn-verde:hover { background: var(--verde2); }
.btn-dourado { background: var(--dourado); color: #fff; }
.btn-dourado:hover { background: var(--dourado2); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn-wpp { background: #25D366; color: #fff; }
.btn-wpp:hover { background: #1fb956; }
.btn-wpp svg { width: 20px; height: 20px; fill: #fff; }
.btn-sm { padding: .45rem 1rem; font-size: .78rem; }

/* ---- SEÇÃO ---- */
.secao { padding: 3.5rem 0; }
.secao-cinza { background: var(--cinza); }
.secao-titulo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: .5rem; }
.secao-titulo h2 { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--verde); text-transform: uppercase; letter-spacing: .04em; }
.secao-titulo a { font-size: .82rem; font-weight: 600; color: var(--dourado); text-transform: uppercase; letter-spacing: .04em; }

/* ---- ESTATÍSTICAS ---- */
.stats { background: var(--verde); padding: 2rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; text-align: center; }
.stat-item strong { display: block; font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.6rem; color: var(--dourado); }
.stat-item span { font-size: .78rem; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .04em; }

/* ---- CATEGORIAS GRID ---- */
.cats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; }
.cat-card { position: relative; border-radius: 8px; overflow: hidden; height: 180px; cursor: pointer; display: block; }
.cat-card .bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s; }
.cat-card:hover .bg { transform: scale(1.07); }
.cat-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(27,58,45,.9) 0%, rgba(27,58,45,.2) 60%, transparent 100%); }
.cat-info { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: .8rem; }
.cat-info h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .82rem; color: #fff; text-transform: uppercase; margin-bottom: .15rem; }
.cat-info p { font-size: .7rem; color: rgba(255,255,255,.72); }
.cat-ver { display: inline-flex; align-items: center; gap: .25rem; background: var(--dourado); color: #fff; font-size: .68rem; font-weight: 700; padding: .2rem .55rem; border-radius: 3px; margin-top: .35rem; text-transform: uppercase; }
.cat-ver svg { width: 10px; height: 10px; stroke: #fff; fill: none; }

/* ---- PRODUTO CARD ---- */
.produtos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.prod-card { border: 1.5px solid var(--borda); border-radius: 8px; overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.prod-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-2px); }
.prod-img { position: relative; height: 220px; overflow: hidden; background: #f0f0f0; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.prod-card:hover .prod-img img { transform: scale(1.05); }
.prod-badge { position: absolute; top: .6rem; left: .6rem; background: #e53e3e; color: #fff; font-size: .68rem; font-weight: 700; padding: .2rem .55rem; border-radius: 3px; text-transform: uppercase; }
.prod-badge-novo { background: var(--verde); }
.prod-entrega { position: absolute; bottom: .6rem; left: .6rem; background: var(--dourado); color: #fff; font-size: .65rem; font-weight: 700; padding: .18rem .5rem; border-radius: 3px; }
.prod-body { padding: .9rem; flex: 1; display: flex; flex-direction: column; }
.prod-cat { font-size: .7rem; color: var(--suave); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .25rem; }
.prod-nome { font-weight: 700; font-size: .9rem; color: var(--texto); line-height: 1.35; margin-bottom: .5rem; flex: 1; }
.prod-especie { font-size: .75rem; color: var(--suave); margin-bottom: .5rem; }
.prod-preco-orig { font-size: .78rem; color: var(--suave); text-decoration: line-through; }
.prod-preco { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--verde); }
.prod-preco small { font-size: .65rem; font-weight: 600; color: var(--suave); }
.prod-consulta { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .85rem; color: var(--dourado); }
.prod-footer { padding: .75rem .9rem; border-top: 1px solid var(--borda); display: flex; gap: .5rem; }
.btn-add-carrinho { flex: 1; background: var(--verde); color: #fff; border: none; border-radius: 5px; padding: .6rem; font-weight: 700; font-size: .8rem; cursor: pointer; transition: background .2s; font-family: 'Montserrat', sans-serif; }
.btn-add-carrinho:hover { background: var(--verde2); }
.btn-wpp-prod { background: #25D366; color: #fff; border: none; border-radius: 5px; padding: .6rem .8rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.btn-wpp-prod:hover { background: #1fb956; }
.btn-wpp-prod svg { width: 18px; height: 18px; fill: #fff; }

/* ---- CARRINHO LATERAL ---- */
.carrinho-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2000; opacity: 0; pointer-events: none; transition: opacity .3s; }
.carrinho-overlay.aberto { opacity: 1; pointer-events: all; }
.carrinho-panel { position: fixed; top: 0; right: -420px; width: 420px; max-width: 100vw; height: 100vh; background: #fff; z-index: 2001; display: flex; flex-direction: column; transition: right .3s ease; box-shadow: -4px 0 30px rgba(0,0,0,.15); }
.carrinho-panel.aberto { right: 0; }
.carrinho-header { background: var(--verde); color: #fff; padding: 1.2rem 1.4rem; display: flex; justify-content: space-between; align-items: center; }
.carrinho-header h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.05rem; }
.carrinho-fechar { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.carrinho-itens { flex: 1; overflow-y: auto; padding: 1rem; }
.carrinho-vazio { text-align: center; padding: 3rem 1rem; color: var(--suave); }
.carrinho-vazio svg { width: 60px; height: 60px; stroke: var(--borda); fill: none; margin: 0 auto 1rem; }
.item-carrinho { display: flex; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--borda); }
.item-carrinho img { width: 70px; height: 70px; object-fit: cover; border-radius: 5px; flex-shrink: 0; background: #f0f0f0; }
.item-info { flex: 1; min-width: 0; }
.item-nome { font-weight: 600; font-size: .85rem; line-height: 1.3; margin-bottom: .2rem; }
.item-preco { font-size: .82rem; color: var(--verde); font-weight: 700; margin-bottom: .4rem; }
.item-qtd { display: flex; align-items: center; gap: .4rem; }
.item-qtd button { width: 26px; height: 26px; border: 1.5px solid var(--borda); background: #fff; border-radius: 4px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.item-qtd button:hover { border-color: var(--verde); }
.item-qtd span { font-weight: 700; font-size: .9rem; min-width: 20px; text-align: center; }
.item-remover { background: none; border: none; color: #ccc; cursor: pointer; font-size: 1.2rem; align-self: flex-start; }
.item-remover:hover { color: #e53e3e; }
.carrinho-rodape { padding: 1.2rem 1.4rem; border-top: 2px solid var(--borda); }
.carrinho-total { display: flex; justify-content: space-between; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 1rem; }
.carrinho-total span:last-child { color: var(--verde); }
.btn-finalizar { width: 100%; background: #25D366; color: #fff; border: none; border-radius: 6px; padding: .9rem; font-weight: 700; font-size: .95rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .6rem; font-family: 'Montserrat', sans-serif; }
.btn-finalizar:hover { background: #1fb956; }
.btn-finalizar svg { width: 22px; height: 22px; fill: #fff; }
.btn-limpar { width: 100%; background: none; border: 1.5px solid var(--borda); color: var(--suave); border-radius: 6px; padding: .6rem; font-size: .82rem; cursor: pointer; margin-top: .6rem; }
.btn-limpar:hover { border-color: #e53e3e; color: #e53e3e; }

/* ---- FAIXA WPP ---- */
.faixa-wpp { background: var(--verde); padding: 2.5rem 0; text-align: center; }
.faixa-wpp h2 { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.6rem; color: #fff; margin-bottom: .5rem; }
.faixa-wpp h2 span { color: var(--dourado); }
.faixa-wpp p { color: rgba(255,255,255,.75); margin-bottom: 1.4rem; font-size: .95rem; }

/* ---- FOOTER ---- */
footer { background: #0f2219; color: rgba(255,255,255,.7); }
.footer-top { padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2.5rem; }
.footer-logo { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: .8rem; }
.footer-logo span { color: var(--dourado); }
.footer-brand p { font-size: .83rem; line-height: 1.7; max-width: 280px; margin-bottom: 1.2rem; }
.social-row { display: flex; gap: .5rem; }
.social-btn { width: 34px; height: 34px; border-radius: 4px; border: 1px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); transition: all .2s; }
.social-btn:hover { border-color: var(--dourado); color: var(--dourado); }
.social-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }
.footer-col h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul a { font-size: .82rem; color: rgba(255,255,255,.6); transition: color .2s; }
.footer-col ul a:hover { color: var(--dourado); }
.footer-contato li { display: flex; align-items: flex-start; gap: .5rem; font-size: .82rem; margin-bottom: .6rem; }
.footer-contato li svg { width: 14px; height: 14px; stroke: var(--dourado); fill: none; min-width: 14px; margin-top: 2px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1rem 0; font-size: .76rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,.35); }

/* ---- WPP FLUTUANTE ---- */
.wpp-float { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 900; width: 56px; height: 56px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(37,211,102,.45); transition: transform .2s; }
.wpp-float:hover { transform: scale(1.08); }
.wpp-float svg { width: 28px; height: 28px; fill: #fff; }

/* ---- PÁGINA CATEGORIA / BUSCA ---- */
.filtros-bar { background: var(--cinza); border-bottom: 1px solid var(--borda); padding: .8rem 0; }
.filtros-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.filtros-inner .breadcrumb { font-size: .82rem; color: var(--suave); display: flex; align-items: center; gap: .4rem; }
.filtros-inner .breadcrumb a { color: var(--verde); }
.filtros-inner .total { font-size: .82rem; color: var(--suave); }

/* ---- PÁGINA PRODUTO ---- */
.prod-detalhe { padding: 3rem 0; }
.prod-detalhe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.prod-fotos .foto-principal { border-radius: 8px; overflow: hidden; height: 420px; background: #f0f0f0; }
.prod-fotos .foto-principal img { width: 100%; height: 100%; object-fit: cover; }
.prod-fotos .miniaturas { display: flex; gap: .5rem; margin-top: .7rem; }
.prod-fotos .miniatura { width: 80px; height: 80px; border-radius: 5px; overflow: hidden; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; }
.prod-fotos .miniatura.ativa { border-color: var(--verde); }
.prod-fotos .miniatura img { width: 100%; height: 100%; object-fit: cover; }
.prod-info .cat-link { font-size: .78rem; color: var(--dourado); text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }
.prod-info h1 { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.6rem; color: var(--verde); margin: .5rem 0 .3rem; line-height: 1.2; }
.prod-info .especie { font-size: .85rem; color: var(--suave); margin-bottom: 1rem; }
.prod-info .dimensoes { background: var(--cinza); border-radius: 5px; padding: .6rem .9rem; font-size: .85rem; color: var(--texto); margin-bottom: 1rem; display: inline-block; }
.prod-preco-area { margin-bottom: 1.5rem; }
.prod-preco-area .orig { font-size: .9rem; color: var(--suave); text-decoration: line-through; margin-bottom: .2rem; }
.prod-preco-area .atual { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 2rem; color: var(--verde); }
.prod-preco-area .atual small { font-size: .8rem; font-weight: 600; color: var(--suave); }
.prod-preco-area .consulta { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--dourado); }
.qtd-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.qtd-ctrl { display: flex; align-items: center; border: 2px solid var(--borda); border-radius: 6px; overflow: hidden; }
.qtd-ctrl button { width: 38px; height: 38px; background: var(--cinza); border: none; cursor: pointer; font-size: 1.2rem; font-weight: 700; }
.qtd-ctrl input { width: 50px; height: 38px; border: none; text-align: center; font-weight: 700; font-size: 1rem; outline: none; }
.prod-acoes { display: flex; flex-direction: column; gap: .7rem; }
.prod-desc { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--borda); }
.prod-desc h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1rem; color: var(--verde); margin-bottom: .8rem; }
.prod-desc p { font-size: .9rem; color: var(--texto); line-height: 1.8; }

/* ---- MOBILE ---- */
@media (max-width: 1024px) {
  .cats-grid { grid-template-columns: repeat(4, 1fr); }
  .produtos-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .topbar-esq { display: none; }
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
  .produtos-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .busca { display: none; }
  .prod-detalhe-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .produtos-grid { grid-template-columns: 1fr; }
  .hero { height: 360px; }
  .hero-box h1 { font-size: 1.6rem; }
  .carrinho-panel { width: 100vw; }
}
