/*
Theme Name: G2 Pneus
Theme URI: https://g2pneus.com
Author: G2 Pneus
Author URI: https://g2pneus.com
Description: Tema WordPress personalizado para G2 Pneus - Pneu barato é aqui.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: g2pneus
*/

:root {
  --g2-red: #d50000;
  --g2-yellow: #ffcc00;
  --dark: #111;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: #fff; color: #222; }

/* Header */
.site-header { background: var(--g2-red); color: #fff; padding: 12px 16px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.site-header .brand { display: flex; align-items: center; gap: 12px; }
.site-header .brand img { height: 56px; width: auto; }
.site-title { font-size: 1.25rem; font-weight: 700; margin: 0; }

/* Nav */
.site-nav a { color: #fff; text-decoration: none; font-weight: 700; margin: 0 10px; }
.site-nav a:hover { text-decoration: underline; }

/* Slider */
.slider { position: relative; width: 100%; height: 300px; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; background-size: cover; background-position: center; }
.slide.active { opacity: 1; }
.slider-caption { position: absolute; left: 16px; bottom: 16px; background: rgba(0,0,0,.55); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: bold; }

/* Content */
.container { max-width: 1100px; margin: 0 auto; padding: 24px; text-align: center; }
h1 { margin: .2em 0; }
.hero-cta { display: inline-block; padding: 14px 22px; border-radius: 10px; background: #25d366; color: #fff; text-decoration: none; font-weight: bold; margin-top: 16px; }

/* Footer */
.site-footer { background: #1e1e1e; color: #fff; text-align: center; padding: 24px 16px; }
.site-footer p { margin: 6px 0; }

/* WhatsApp Floating */
.whatsapp-float { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; background: #25d366; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; font-size: 26px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 999; }
.whatsapp-float span { font-size: 24px; line-height: 0; transform: translateY(-1px); }

@media (min-width: 680px) {
  .slider { height: 420px; }
}

.g2-slider{position:relative;overflow:hidden;background:#111}
.g2-slides{display:flex;transition:transform .5s ease}
.g2-slide{min-width:100%;height:600px;background-size:cover;background-position:center center;display:block}
@media (max-width:768px){.g2-slide{height:360px}}
.g2-prev,.g2-next{
  position:absolute;top:50%;transform:translateY(-50%);
  background:rgba(0,0,0,.45);border:0;color:#fff;font-size:34px;
  width:44px;height:44px;line-height:44px;text-align:center;
  border-radius:8px;cursor:pointer;z-index:5
}
.g2-prev{left:12px} .g2-next{right:12px}
.g2-prev:hover,.g2-next:hover{background:rgba(0,0,0,.65)}
.g2-dots{position:absolute;left:0;right:0;bottom:14px;display:flex;gap:8px;justify-content:center;z-index:4}
.g2-dots button{
  width:10px;height:10px;border-radius:50%;border:0;background:rgba(255,255,255,.45);cursor:pointer
}
.g2-dots button.g2-active{background:#fff}
/* Forçar slider ocupar largura total */
.g2-slider {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  background: #111;
}

/* Altura padrão */
.g2-slide {
  height: 600px;
  min-width: 100%;
  background-size: cover;
  background-position: center;
  display: block;
}

/* Altura no celular */
@media (max-width: 768px) {
  .g2-slide {
    height: 360px;
  }
}

/* Ajuste das bolinhas */
.g2-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.g2-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}
.g2-dots button.g2-active {
  background: #fff;
}

/* Ajuste das setas */
.g2-prev, .g2-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 10;
}
.g2-prev { left: 10px; }
.g2-next { right: 10px; }
.g2-prev:hover, .g2-next:hover {
  background: rgba(0,0,0,0.65);
}

/* Botão do WhatsApp acima do slider */
.whatsapp-float {
  z-index: 9999 !important;
}
/*
Theme Name: G2 Pneus
Description: Tema personalizado G2 Pneus
Author: G2
Version: 1.0
*/

/* ===========================
   ESTILOS DO SLIDER PRINCIPAL
   =========================== */
.g2-slider {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  background: #111;
}

.g2-slides {
  display: flex;
  transition: transform .5s ease;
  width: 100%;
}

.g2-slide {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.g2-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;  /* garante que nunca corta */
  background: #111;     /* barras discretas se sobrar espaço */
}

/* Setas de navegação */
.g2-prev, .g2-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 10;
}
.g2-prev { left: 10px; }
.g2-next { right: 10px; }
.g2-prev:hover, .g2-next:hover {
  background: rgba(0,0,0,0.65);
}

/* Bolinhas */
.g2-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 9;
}
.g2-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}
.g2-dots button.g2-active {
  background: #fff;
}
/* ===========================
   BOTÃO WHATSAPP FLUTUANTE
   =========================== */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  z-index: 9999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  background: #20b954;
}
.g2-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #111;
}

.g2-slides {
  display: flex;
  transition: transform .5s ease;
  width: 100%;
}

.g2-slide {
  min-width: 100%;
  height: 600px;
  background-size: cover;
  background-position: center;
  display: block;
}

@media (max-width: 768px) {
  .g2-slide {
    height: 360px;
  }
}

.g2-prev, .g2-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 10;
}
.g2-prev { left: 10px; }
.g2-next { right: 10px; }
.g2-prev:hover, .g2-next:hover {
  background: rgba(0,0,0,.65);
}

.g2-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  gap: 8px;
  justify-content: center;
  z-index: 9;
}
.g2-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.4);
}
.g2-dots button.g2-active {
  background: #fff;
}
/* Slides sem altura fixa */
.g2-slide {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Imagem do slide responsiva */
.g2-slide img {
  width: 100%;
  height: auto;        /* preserva proporção, sem corte */
  display: block;
  object-fit: contain; /* nunca corta */
}
/* ====== FIX UNIVERSAL DO SLIDER ====== */

/* 1) Se o slide ainda usa background-image */
#g2-slider .g2-slide{
  /* cria altura pelo aspecto 1600x600 = 37.5% sem precisar de height fixo */
  position: relative;
  display: block;
  width: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain !important; /* não corta a arte */
  background-color: #111;              /* “barras” discretas quando sobrar espaço */
}
#g2-slider .g2-slide::before{
  content: "";
  display: block;
  padding-top: 37.5%; /* 600/1600 -> mantém proporção do seu banner */
}
/* No mobile, dá um pouco mais de altura para leitura confortável */
@media (max-width:768px){
  #g2-slider .g2-slide::before{ padding-top: 50%; } /* ajuste a gosto (45–60%) */
}

/* 2) Se você já trocou para <img> dentro do slide */
#g2-slider .g2-slide img{
  width: 100% !important;
  height: auto !important;   /* preserva proporção */
  display: block;
  object-fit: contain;        /* evita corte */
  background: #111;
}

/* 3) Remover QUALQUER height anterior que force corte */
#g2-slider .g2-slide,
#g2-slider .g2-slide img{
  max-height: none !important;
}
/* --- FIX para o slider do topo (NÃO cortar imagens) --- */
#g2-slider .g2-slide{ 
  height: auto !important;         /* remove alturas fixas herdadas */
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#g2-slider .g2-slide img{
  width: 100% !important;
  height: auto !important;          /* preserva proporção */
  object-fit: contain !important;   /* nunca corta */
  display: block;
  background: #111;                 /* barras discretas se sobrar espaço */
}

/* Mantém uma proporção agradável mesmo sem altura fixa */
#g2-slider .g2-slide{ aspect-ratio: 16 / 6; }
@media (max-width: 768px){
  #g2-slider .g2-slide{ aspect-ratio: 2 / 1; }  /* mais alto no celular */
}

/* Garantir setas e bolinhas por cima da imagem */
#g2-slider .g2-prev, 
#g2-slider .g2-next, 
#g2-slider .g2-dots{ z-index: 10; }

/* WhatsApp por cima sem cobrir as bolinhas */
.whatsapp-float{ z-index: 9999 !important; }
