/* Tóvale — versão renovada (mesmo aspecto do site de 2021, sem Bootstrap/jQuery) */

:root {
  --azul: #0032b4;
  --azul-claro: #3269f1;
  --azul-sombra: rgba(0, 50, 180, .2);
  --texto: #646464;
  --titulo: #121619;
  --cinza-bg: #f8f9fd;
  --branco: #fff;
  --verde-whats: #25d366;
  --f-texto: 'Hind', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-titulo: 'Quattrocento', Georgia, serif;
  --f-botao: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.65;
  color: var(--texto);
  background: var(--branco);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--f-titulo); color: var(--titulo); margin: 0; font-weight: 700; line-height: 1.25; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1170px; margin: 0 auto; padding: 0 16px; }
.section { padding: 110px 0 100px; }
.gray-bg { background: var(--cinza-bg); }

.section-title { text-align: center; max-width: 620px; margin: 0 auto 30px; }
.section-title .sub-title { font-family: var(--f-texto); font-size: 18px; font-weight: 500; color: var(--azul); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.section-title .title { font-size: 35px; text-transform: uppercase; }

/* ---------- Botões ---------- */
.main-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-botao); font-weight: 600; font-size: 16px;
  line-height: 1; padding: 18px 34px; min-height: 54px;
  color: var(--branco); background: var(--azul);
  border: 1px solid var(--azul); border-radius: 0;
  box-shadow: 0 5px 16px rgba(0, 50, 180, .45);
  cursor: pointer; transition: background-color .3s, color .3s, box-shadow .3s;
}
.main-btn:hover, .main-btn:focus-visible { background: var(--branco); color: var(--azul); box-shadow: 0 5px 16px rgba(0, 50, 180, .25); }
.main-btn .icon { font-size: 20px; }
.main-btn--whats { background: var(--verde-whats); border-color: var(--verde-whats); box-shadow: 0 5px 16px rgba(37, 211, 102, .4); }
.main-btn--whats:hover, .main-btn--whats:focus-visible { color: #128c3e; border-color: var(--verde-whats); }
:focus-visible { outline: 3px solid var(--azul-claro); outline-offset: 3px; }

/* ---------- Navegação ---------- */
.nav {
  position: absolute; top: 0; left: 0; width: 100%; z-index: 50;
  padding: 22px 0; transition: padding .3s, background-color .3s, box-shadow .3s;
}
.nav.sticky { position: fixed; background: var(--branco); box-shadow: 0 5px 21px var(--azul-sombra); padding: 10px 0; }
.nav .container { display: flex; align-items: center; gap: 24px; }
.nav-brand { display: block; width: 112px; opacity: 0; visibility: hidden; transition: opacity .3s; }
.nav.sticky .nav-brand { opacity: 1; visibility: visible; }
.nav-links { display: flex; gap: 30px; margin-left: auto; }
.nav-links a {
  font-size: 15px; font-weight: 700; text-transform: uppercase; color: var(--texto);
  padding: 8px 0; transition: color .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--azul); }

/* ---------- WhatsApp flutuante ---------- */
.whats-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 22px 0 16px; border-radius: 30px;
  background: var(--verde-whats); color: var(--branco);
  font-family: var(--f-botao); font-weight: 600; font-size: 16px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .45), 0 2px 6px rgba(0, 0, 0, .15);
  transition: transform .25s, box-shadow .25s, background-color .25s;
}
.whats-float .icon { font-size: 30px; }
.whats-float:hover { transform: translateY(-3px); background: #1ebe5b; box-shadow: 0 10px 26px rgba(37, 211, 102, .55), 0 2px 6px rgba(0, 0, 0, .15); }
.whats-float::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, .6); animation: pulsar 2.4s ease-out infinite;
}
@keyframes pulsar { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); } }
.nav-toggle {
  display: none; margin-left: auto; width: 48px; height: 48px; padding: 12px 9px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--texto); margin: 6px 0; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Topo (banner) ---------- */
.header { position: relative; overflow: hidden; padding-top: 100px; }
.shape { position: absolute; pointer-events: none; z-index: 0; }
.shape-1 { top: 0; left: 0; width: 300px; }
.shape-2 { top: 25px; left: 31%; width: 90px; }
.shape-3 { left: 70px; bottom: 90px; width: 110px; }
.rodar { animation: rodar 15s linear infinite; }
@keyframes rodar { to { transform: rotate(360deg); } }

.hero { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 40px; min-height: 640px; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero-sub { font-size: 20px; font-weight: 500; color: var(--azul); text-transform: uppercase; letter-spacing: .5px; }
.hero-mail {
  position: relative; margin-left: 70px; margin-bottom: 10px;
  font-family: var(--f-botao); font-size: 15px; font-weight: 600; color: var(--azul); text-transform: uppercase;
}
.hero-mail::before { content: ''; position: absolute; left: -70px; top: 50%; width: 60px; height: 2px; background: var(--azul); }
.hero-mail:hover { text-decoration: underline; }
.hero-btns { display: flex; flex-direction: column; gap: 18px; }
.hero-btns .main-btn { min-width: 240px; font-size: 18px; letter-spacing: .5px; }
.hero-logo { width: 100%; max-width: 680px; justify-self: end; }

/* ---------- Mapa ---------- */
.map-area { display: grid; grid-template-columns: 3fr 2fr; height: 560px; }
.map-area iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-photo { background: url(../img/loja.jpg) center / cover no-repeat; }
.map-link {
  display: none; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 16px; font-family: var(--f-botao); font-weight: 600; color: var(--azul); background: var(--cinza-bg);
}

/* ---------- Produtos (carrossel) ---------- */
.products { position: relative; padding: 110px 0 90px; }
.track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 20%;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain;
}
.track::-webkit-scrollbar { display: none; }
.card-prod { position: relative; scroll-snap-align: start; overflow: hidden; margin: 0; }
.card-prod img { width: 100%; aspect-ratio: 360 / 485; object-fit: cover; transition: transform .6s; }
.card-prod figcaption {
  position: absolute; inset: auto 0 0 0; padding: 70px 20px 28px;
  background: linear-gradient(rgba(0, 50, 180, 0) 0%, rgba(0, 50, 180, .92) 70%);
  color: var(--branco); transform: translateY(100%); opacity: 0; transition: transform .4s ease-out, opacity .4s ease-out;
}
.card-prod:hover figcaption, .card-prod:focus-within figcaption { transform: none; opacity: 1; }
.card-prod:hover img { transform: scale(1.04); }
.card-prod h3 {
  position: relative; font-family: var(--f-botao); font-weight: 600; font-size: 21px; color: var(--branco);
  padding-left: 60px; line-height: 1.25;
}
.card-prod h3::before { content: ''; position: absolute; left: 0; top: .65em; width: 50px; height: 1px; background: var(--branco); }
.card-prod p { font-size: 15px; line-height: 1.45; margin-top: 8px; color: rgba(255, 255, 255, .92); }
.track-ctrl { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 30px; }
.track-btn {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--azul); background: var(--branco); color: var(--azul); font-size: 22px; cursor: pointer;
  transition: background-color .3s, color .3s;
}
.track-btn:hover { background: var(--azul); color: var(--branco); }
.track-count { font-family: var(--f-botao); font-weight: 600; min-width: 70px; text-align: center; color: var(--azul); }

/* ---------- Áreas ---------- */
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.area {
  background: var(--branco); padding: 46px 30px; text-align: center;
  transition: background-color .4s, color .4s, box-shadow .4s;
}
.area .icon { font-size: 52px; color: var(--azul); stroke-width: 1.6; transition: color .4s; }
.area h3 { font-family: var(--f-botao); font-weight: 600; font-size: 21px; margin: 18px 0 14px; text-transform: uppercase; transition: color .4s; }
.area:hover { background: var(--azul-claro); box-shadow: 0 10px 30px rgba(0, 50, 180, .25); }
.area:hover .icon, .area:hover h3, .area:hover p { color: var(--branco); }

/* ---------- Chaves ---------- */
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.key-card { text-align: center; }
.key-card img { width: 100%; aspect-ratio: 263 / 300; object-fit: cover; background: var(--branco); }
.key-card .txt { width: 88%; margin: -40px auto 0; position: relative; background: var(--branco); padding: 28px 18px; box-shadow: 0 6px 16px rgba(0, 50, 180, .15); }
.key-card h3 { font-family: var(--f-texto); font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.key-card p { font-size: 15px; line-height: 1.5; }
.key-card p + p { margin-top: 8px; }

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-imgs { position: relative; display: grid; grid-template-columns: repeat(10, 1fr); align-items: start; padding-bottom: 50px; }
.about-imgs::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 375px; height: 350px; transform: translate(-50%, -50%);
  background: url(../img/dots.jpg) center / 100% no-repeat; z-index: -1;
}
.about-imgs .img-a { grid-column: 1 / 7; grid-row: 1; width: 100%; }
.about-imgs .img-b { grid-column: 5 / 11; grid-row: 1; width: 100%; margin-top: 160px; border: 8px solid var(--branco); position: relative; z-index: 2; box-shadow: 0 10px 30px rgba(0, 50, 180, .15); }
.about-badge {
  position: absolute; left: 6%; bottom: 0; z-index: 3;
  font-family: var(--f-botao); font-weight: 700; font-size: 16px; color: var(--branco);
  background: var(--azul); border: 8px solid var(--branco); padding: 12px 34px;
}
.about-badge span { font-size: 35px; margin-left: 6px; }
.about-content h2 { font-family: var(--f-texto); font-size: 24px; color: var(--azul); text-transform: uppercase; font-weight: 600; margin-bottom: 20px; }
.about-content p + p { margin-top: 14px; }

/* ---------- Contacto ---------- */
.form { max-width: 770px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; }
.form input, .form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--titulo);
  background: var(--branco); border: 1px solid #e3e6ef; padding: 0 22px; height: 58px;
  transition: border-color .3s;
}
.form textarea { height: 170px; padding: 18px 22px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--azul); }
.form ::placeholder { color: #999; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .actions { text-align: center; }
.form-msg { grid-column: 1 / -1; text-align: center; font-weight: 600; min-height: 1.6em; }
.form-msg.ok { color: #16833f; }
.form-msg.erro { color: #c0271e; }

/* ---------- Rodapé ---------- */
.footer { padding: 80px 0 60px; border-top: 1px solid #eceff8; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.footer-logo { width: 150px; margin-bottom: 24px; }
.info { display: grid; gap: 18px; }
.info li { display: flex; gap: 14px; align-items: flex-start; }
.info .icon { font-size: 20px; color: var(--azul); margin-top: 3px; }
.info a:hover { color: var(--azul); text-decoration: underline; }
.footer h2 { font-family: var(--f-botao); font-size: 22px; font-weight: 600; margin: 10px 0 18px; display: flex; align-items: center; gap: 10px; }
.footer h2 .icon { color: var(--azul); }
.horario dt { font-weight: 700; color: var(--titulo); }
.horario dd { margin: 0 0 12px; }
.estado { font-family: var(--f-texto); font-size: 13px; font-weight: 600; padding: 3px 12px; border-radius: 20px; margin-left: 4px; }
.estado.aberto { background: #dcf5e5; color: #16833f; }
.estado.fechado { background: #fde4e2; color: #c0271e; }
.livro {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 16px;
  padding: 8px 16px 8px 10px; border: 2px solid #c8102e; border-radius: 6px; background: var(--branco);
  color: #c8102e; font-size: 13px; line-height: 1.2; transition: background-color .3s, color .3s;
}
.livro svg { width: 30px; height: 30px; fill: currentColor; }
.livro strong { font-size: 15px; }
.livro:hover { background: #c8102e; color: var(--branco); }
.livro:hover path[fill] { fill: #c8102e; }
.form-privacidade { font-size: 14px; text-align: center; }
.form-privacidade a, .copy a { color: var(--azul); text-decoration: underline; }
.copy { text-align: center; padding: 22px 16px; background: var(--cinza-bg); font-size: 14px; }

/* ---------- Revelar ao fazer scroll (só com JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s ease-out, transform .9s ease-out; }
.js .reveal.visivel { opacity: 1; transform: none; }

/* ================= Responsivo ================= */
@media (max-width: 1199px) {
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 13px; }
  .track { grid-auto-columns: 25%; }
}

@media (max-width: 991px) {
  :root { --nav-h: 66px; }
  .section, .products { padding: 80px 0 70px; }
  .nav { position: fixed; background: var(--branco); box-shadow: 0 5px 21px var(--azul-sombra); padding: 9px 0; }
  .nav .container { gap: 12px; }
  .nav-brand { opacity: 1; visibility: visible; width: 104px; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--branco); box-shadow: 0 12px 25px var(--azul-sombra);
    padding: 6px 16px 14px; display: none;
  }
  .nav-links.aberto { display: flex; }
  .nav-links a { display: block; font-size: 15px; padding: 13px 4px; border-bottom: 1px solid #eef0f6; }
  .nav-links li:last-child a { border-bottom: 0; }

  .header { padding-top: calc(var(--nav-h) + 30px); padding-bottom: 50px; }
  .shape-1 { width: 200px; }
  .shape-2 { left: 70%; width: 60px; top: 90px; }
  .shape-3 { width: 80px; bottom: 30px; left: 20px; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 30px; }
  .hero-logo { order: -1; justify-self: center; max-width: 520px; }
  .hero-text { align-items: center; text-align: center; }
  .hero-mail { margin-left: 0; }
  .hero-mail::before { display: none; }
  .hero-btns { width: 100%; max-width: 420px; }
  .hero-btns .main-btn { width: 100%; }

  .map-area { grid-template-columns: 1fr; grid-template-rows: 340px auto; height: auto; }
  .map-photo { display: none; }
  .map-link { display: flex; }

  .track { grid-auto-columns: 33.333%; }
  .areas { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .keys { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about-imgs { max-width: 620px; margin: 0 auto; width: 100%; }
}

/* Ecrãs táteis: legenda dos produtos sempre visível */
@media (hover: none) {
  .card-prod figcaption { transform: none; opacity: 1; padding-top: 60px; }
}

@media (max-width: 767px) {
  .section-title .sub-title { font-size: 15px; }
  .section-title .title { font-size: 24px; }
  .track { grid-auto-columns: 50%; }
  .card-prod h3 { font-size: 18px; padding-left: 0; }
  .card-prod h3::before { display: none; }
  .card-prod p { font-size: 14px; }
  .keys { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .form { grid-template-columns: 1fr; gap: 16px; }
  .footer { padding: 50px 0 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 575px) {
  .section, .products { padding: 60px 0 56px; }
  .shape-3 { display: none; }
  .whats-float { right: 16px; bottom: 16px; width: 60px; padding: 0; justify-content: center; }
  .whats-label { display: none; }
  .copy { padding-bottom: 90px; }
  .track { grid-auto-columns: 78%; gap: 10px; padding: 0 16px; scroll-padding: 0 16px; }
  .areas { grid-template-columns: 1fr; gap: 12px; }
  .area { display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; text-align: left; padding: 20px 18px; align-items: start; }
  .area .icon { font-size: 40px; grid-row: span 2; }
  .area h3 { font-size: 17px; margin: 0 0 4px; }
  .area p { font-size: 15px; line-height: 1.5; }
  .about-imgs::before { display: none; }
  .about-imgs .img-b { margin-top: 90px; border-width: 5px; }
  .about-badge { left: 50%; transform: translateX(-50%); bottom: 0; white-space: nowrap; font-size: 14px; padding: 8px 24px; }
  .about-badge span { font-size: 26px; }
  .about-content { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rodar, .whats-float::before { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .track { scroll-behavior: auto; }
}
