:root {
  --brand-red: #c0102a;
  --brand-white: #ffffff;
}
body { background: #f7f7f9; color: #222; }
.top-bar { background: var(--brand-red); }
.text-brand { color: var(--brand-red) !important; }
.btn-brand { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.btn-brand:hover { background: #9c0c22; border-color: #9c0c22; color: #fff; }
.btn-outline-brand { border: 1px solid var(--brand-red); color: var(--brand-red); background: #fff; }
.btn-outline-brand:hover { background: var(--brand-red); color: #fff; }

.hero {
  background: linear-gradient(135deg, var(--brand-red), #8c0c1f);
  color: #fff;
  border-radius: 1rem;
}

.product-card {
  border: 1px solid #eee;
  border-radius: .75rem;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,.08); }
.product-card .price-old { text-decoration: line-through; color: #999; font-size: .85rem; }
.product-card .price-now { color: var(--brand-red); font-weight: 700; font-size: 1.15rem; }

.category-pill {
  border: 1px solid #eee;
  border-radius: 2rem;
  padding: .4rem 1rem;
  background: #fff;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}
.category-pill:hover { border-color: var(--brand-red); color: var(--brand-red); }

.badge-promo { background: var(--brand-red); color: #fff; z-index: 2; }

/* As etiquetas (oferta/receita/controlado) ficam DENTRO do .product-card,
   posicionadas em absolute. A caixa de imagem do Bootstrap (.ratio) também
   é position:relative e vem depois no HTML — sem z-index explícito nas
   etiquetas, o navegador desenha a caixa de imagem por cima delas. */
.product-card .badge.position-absolute { z-index: 2; }
.product-card .ratio { z-index: 1; }

.checkout-step { border-radius: .75rem; border: 1px solid #eee; background: #fff; }

/* ===== Carrossel controlado (categorias e vídeos) ===== */
.carousel-wrap { position: relative; }
.carousel-track {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  /* esconde a scrollbar nativa em todos os navegadores */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; height: 0; }
.carousel-track.is-dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.carousel-track > * { scroll-snap-align: start; flex-shrink: 0; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #eee;
  background: #fff;
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  cursor: pointer;
  transition: visibility .15s ease;
}
.carousel-arrow:hover { background: var(--brand-red); color: #fff; }
.carousel-arrow.prev { left: -6px; }
.carousel-arrow.next { right: -6px; }
@media (max-width: 767px) {
  .carousel-arrow { display: none; } /* mobile navega só por gesto/toque */
}

.category-card {
  border: 1px solid #eee;
  border-radius: .9rem;
  background: #fff;
  padding: .9rem 1.2rem;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
  min-width: 150px;
  text-align: center;
}
.category-card:hover, .category-card:focus {
  border-color: var(--brand-red);
  color: var(--brand-red);
  box-shadow: 0 4px 14px rgba(192,16,42,.12);
  outline: none;
}

/* Caixa de tamanho fixo: qualquer logo enviada (retangular, quadrada, redonda,
   grande ou pequena) é encaixada dentro da MESMA área via object-fit: contain.
   Isso evita ter que redimensionar a imagem antes de cadastrar a marca. */
.brand-card {
  border: 1px solid #eee;
  border-radius: .9rem;
  background: #fff;
  text-decoration: none;
  color: #333;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 96px;
  padding: .75rem 1rem;
  text-align: center;
  flex-shrink: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.brand-card:hover, .brand-card:focus {
  border-color: var(--brand-red);
  box-shadow: 0 4px 14px rgba(192,16,42,.12);
  outline: none;
}
.brand-card-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.brand-card-name {
  font-weight: 600;
  color: #333;
  white-space: normal;
  font-size: .9rem;
}

/* ===== Banners administráveis da Home ===== */
.banner-track { scroll-snap-type: x mandatory; }
.banner-track .banner-slide { scroll-snap-align: center; flex: 0 0 100%; }

.banner-slide {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: #f1f1f1;
}
.banner-slide-img {
  width: 100%;
  height: clamp(200px, 32vw, 380px);
  object-fit: cover;
  display: block;
}
.banner-slide-content {
  position: absolute;
  left: 0; bottom: 0;
  padding: 1.5rem 1.75rem;
  max-width: 560px;
  background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0));
  color: #fff;
  width: 100%;
}
.banner-slide-title { font-weight: 800; font-size: clamp(1.3rem, 3vw, 2rem); margin-bottom: .35rem; }
.banner-slide-subtitle { font-size: clamp(.9rem, 1.6vw, 1.1rem); margin-bottom: 1rem; opacity: .95; }
@media (max-width: 767px) {
  .banner-slide-content { padding: 1rem 1.1rem; }
  .banner-slide-title { font-size: 1.15rem; }
  .banner-slide-subtitle { font-size: .85rem; margin-bottom: .75rem; }
}

/* ===== Vitrine de vídeos ===== */
.video-card {
  position: relative;
  width: 160px;
  aspect-ratio: 9 / 16;
  border-radius: .9rem;
  overflow: hidden;
  border: none;
  padding: 0;
  background: #111;
  cursor: pointer;
  flex-shrink: 0;
}
.video-card-thumb, .video-card-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card-preview { opacity: 0; transition: opacity .2s ease; }
.video-card-preview.is-active { opacity: 1; }
.video-card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--brand-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  pointer-events: none;
  transition: opacity .15s ease;
}
.video-card:hover .video-card-play { opacity: 0; }
.video-card-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .5rem .6rem .6rem;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  text-align: left;
  line-height: 1.2;
}

.video-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,12,.96);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-overlay[hidden] { display: none; }
.video-overlay-stage {
  position: relative;
  width: min(420px, 92vw);
  height: min(90vh, 760px);
  border-radius: 1rem;
  overflow: hidden;
  background: #000;
}
.video-overlay-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.video-overlay-close, .video-overlay-nav {
  position: absolute;
  z-index: 1060;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}
.video-overlay-close:hover, .video-overlay-nav:hover { background: var(--brand-red); }
.video-overlay-close { top: 16px; right: 16px; }
.video-overlay-nav.prev { top: 16px; right: 66px; }
.video-overlay-nav.next { top: 16px; right: 116px; }
@media (min-width: 768px) {
  .video-overlay-nav.prev { top: 50%; left: -60px; right: auto; transform: translateY(-50%); }
  .video-overlay-nav.next { top: 50%; right: -60px; transform: translateY(-50%); }
}

.video-overlay-product {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  background: rgba(255,255,255,.96);
  border-radius: .8rem;
  padding: .6rem .7rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.video-overlay-product img {
  width: 44px; height: 44px;
  object-fit: cover;
  border-radius: .5rem;
  background: #f1f1f1;
  flex-shrink: 0;
}
.video-overlay-product-info { flex: 1; min-width: 0; font-size: .82rem; }
.video-overlay-product-info > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Rodapé ===== */
.site-footer { background: #0a3a67; }
.site-footer a { transition: color .15s ease; }
.site-footer a:hover, .site-footer a:focus { color: #fff !important; }
.footer-link-accent { color: var(--brand-red) !important; font-weight: 600; }
.footer-link-accent:hover { color: #fff !important; }

/* Texto secundário do rodapé: cinza padrão do Bootstrap (text-secondary) tem
   contraste ruim sobre fundo colorido — usamos branco semitransparente, que
   funciona bem sobre qualquer uma das cores do rodapé. */
.footer-muted { color: rgba(255,255,255,.75) !important; }
.footer-muted:hover, .footer-muted:focus { color: #fff !important; }

.footer-newsletter {
  background: #014f79;
  border: 1px solid rgba(255,255,255,.12);
}
.footer-newsletter input.form-control {
  min-height: 44px;
}

.footer-bottom-bar {
  background: #026296;
}

.footer-whatsapp { color: #25d366 !important; }
.footer-whatsapp .fw-semibold { color: #fff; }
.footer-whatsapp:hover, .footer-whatsapp:focus { color: #25d366 !important; }

.footer-map iframe { display: block; filter: grayscale(.15); }

.footer-social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  text-decoration: none;
}
.footer-social-icon:hover, .footer-social-icon:focus {
  background: var(--brand-red);
  color: #fff !important;
}

.site-footer .accordion-button { min-height: 44px; }

@media (max-width: 767px) {
  .footer-newsletter { text-align: center; }
  .footer-newsletter form { justify-content: center; }
}

/* ===== Indicadores (bolinhas) do carrossel de banners ===== */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d9d9d9;
  cursor: pointer;
  transition: background-color .2s ease, width .2s ease, border-radius .2s ease;
}
.carousel-dot:hover { background: #b9b9b9; }
.carousel-dot.is-active {
  background: var(--brand-red);
  width: 22px;
  border-radius: 4px;
}

/* ===== Consentimento de cookies (LGPD) ===== */
.cookie-consent-banner {
  position: fixed;
  z-index: 1050;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1c1c1c;
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 18px rgba(0,0,0,.25);
}
.cookie-consent-banner-text { flex: 1 1 320px; }
.cookie-consent-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  flex-shrink: 0;
}

.cookie-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-consent-modal-dialog {
  background: #fff;
  border-radius: .9rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.cookie-consent-modal-header,
.cookie-consent-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}
.cookie-consent-modal-footer { flex-wrap: wrap; gap: .5rem; border-top: 1px solid #eee; }
.cookie-consent-modal-body { padding: 0 1.25rem 1rem; }
.cookie-consent-category {
  padding: .75rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.cookie-consent-category:last-of-type { border-bottom: none; }

@media (max-width: 767px) {
  .cookie-consent-banner { flex-direction: column; align-items: stretch; }
  .cookie-consent-banner-actions { justify-content: stretch; }
  .cookie-consent-banner-actions .btn { flex: 1; }
}

/* ===== Galeria da página de produto: zoom ao passar o mouse + troca por miniatura ===== */
.product-gallery-main {
  position: relative;
  background: #f8f9fa;
  cursor: zoom-in;
}
.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease-out;
  will-change: transform;
}
.product-gallery-main.is-zoomed img {
  transform: scale(2.2);
  transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
  transition: none;
}
.product-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  cursor: pointer;
  opacity: .65;
  border-width: 2px !important;
  transition: opacity .15s ease, border-color .15s ease;
}
.product-thumb:hover,
.product-thumb.active {
  opacity: 1;
  border-color: var(--brand-red) !important;
}
