/* =========================================================
   C2 Distribuidora — Design Enhancements
   ========================================================= */

/* Scroll suave global */
html {
  scroll-behavior: smooth;
}

/* ---------------------------------------------------------
   Header — blur + transição suave ao scrollar
   --------------------------------------------------------- */
.header {
  transition: background 350ms ease, padding 350ms ease, box-shadow 350ms ease;
}

@media (min-width: 1024px) {
  .header.min {
    background-color: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 2px 20px rgba(4, 38, 67, 0.12) !important;
  }
}

/* ---------------------------------------------------------
   Botões — micro-interação de elevação
   --------------------------------------------------------- */
.btn {
  transition: background 300ms ease, transform 200ms ease, box-shadow 200ms ease !important;
  border-radius: 2px !important;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(4, 38, 67, 0.25);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ---------------------------------------------------------
   Cards de produto — zoom suave + elevação
   --------------------------------------------------------- */
.section-products .box {
  transition: transform 320ms ease;
}

.section-products a.box:hover,
.section-products .box:hover {
  transform: translateY(-5px);
}

.section-products .box-image {
  aspect-ratio: 1 / 1;  /* garante quadrado em qualquer resolução */
  overflow: hidden;
  border-radius: 3px;
}

.section-products .box-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;    /* preenche o quadrado sem distorcer */
  transition: transform 420ms ease;
  will-change: transform;
}

.section-products .box:hover .box-image img,
.section-products a.box:hover .box-image img {
  transform: scale(1.05);
}

/* ---------------------------------------------------------
   Headings de seção — sublinhado accent
   --------------------------------------------------------- */
.section .text h2,
.section-assistance .text h2 {
  position: relative;
  padding-bottom: 16px;
}

.section .text h2::after,
.section-assistance .text h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: #00b2d1;
  border-radius: 2px;
}

/* ---------------------------------------------------------
   Seção Capachos — borda accent nos itens numerados
   --------------------------------------------------------- */
.section-doormats .items li h3 {
  border-left: 3px solid #00b2d1;
  padding-left: 10px;
  transition: border-color 250ms ease;
}

.section-doormats .items li:hover h3 {
  border-color: #042643;
}

/* ---------------------------------------------------------
   Seção Assistência — card com fundo suave
   --------------------------------------------------------- */
.section-assistance {
  background: linear-gradient(135deg, #f7fafc 0%, #eef4f8 100%);
}

/* ---------------------------------------------------------
   Seção Marcas (brands)
   --------------------------------------------------------- */
.section-brands {
  border-top: 1px solid #e8eef3;
}

/* ---------------------------------------------------------
   Footer — accent no topo
   --------------------------------------------------------- */
.footer {
  border-top: 3px solid #00b2d1;
}

/* Links de navegação — underline animado */
.header-menu ul li > a:not(.header-whats) {
  position: relative;
}

.header-menu ul li > a:not(.header-whats)::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: #00b2d1;
  transition: width 250ms ease;
}

.header-menu ul li:hover > a:not(.header-whats)::after {
  width: 100%;
}

/* ---------------------------------------------------------
   Banner Hero — páginas internas (galeria)
   --------------------------------------------------------- */

/* Wrapper relativo para o overlay funcionar */
.in .banner-hero {
  position: relative;
  min-height: 240px;
  background: linear-gradient(135deg, #042643 0%, #063e70 100%);
  overflow: hidden;
}

/* Garante que a imagem do carousel cubra o hero */
.in .banner-hero .carousel img,
.in .banner-hero img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 420px;
}

/* Overlay sobreposto à imagem — override do estilo original */
.in .section-banner-title {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 5 !important;    /* acima do owl-carousel (z-index: 1) */
  margin-top: 0 !important;
  min-height: auto !important;
  background: linear-gradient(
    to top,
    rgba(4, 38, 67, 0.92) 0%,
    rgba(4, 38, 67, 0.55) 50%,
    transparent 100%
  ) !important;
  padding: 70px 5% 30px !important;
  display: block !important;
  text-align: left !important;
}

/* Título */
.in .section-banner-title h1 {
  font-size: 38px !important;
  line-height: 1.15 !important;
  border-left: 4px solid #00b2d1;
  padding-left: 16px;
  margin-top: 10px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}

/* Breadcrumb */
.banner-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.banner-breadcrumb a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 220ms ease;
}

.banner-breadcrumb a:hover {
  color: #00b2d1;
}

.banner-breadcrumb span {
  color: #00b2d1;
  font-size: 13px;
}

/* Responsivo — mobile */
@media (max-width: 767px) {
  .in .banner-hero {
    min-height: 160px;
  }
  .in .section-banner-title h1 {
    font-size: 26px !important;
  }
  .in .section-banner-title {
    padding: 50px 5% 20px !important;
  }
}

/* ---------------------------------------------------------
   Menu mobile — seta indicadora em itens com dropdown
   --------------------------------------------------------- */
@media (max-width: 1023px) {
  /* Item de menu que tem dropdown: mostra seta ▾ após o texto */
  .header-menu ul li:has(.header-menu-dropdown) > a::after {
    content: " ▾";
    font-size: 12px;
    opacity: 0.6;
  }

  /* Links do dropdown ficam mais compactos no mobile */
  .header-menu .header-menu-dropdown a {
    padding: 10px 15px;
    font-size: 14px;
    border-left: 3px solid #00b2d1;
    margin-left: 10px;
    text-align: left;
  }
}

/* ---------------------------------------------------------
   WhatsApp — ícone visível no header (badge verde preenchido)
   --------------------------------------------------------- */
.header-menu ul li > a.header-whats {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: #25d366 !important;
  border-radius: 50%;
  color: #ffffff !important;
  font-size: 21px !important;
  transition: background 220ms ease, transform 200ms ease;
  margin-left: 4px;
}

.header-menu ul li > a.header-whats:hover {
  background-color: #128c7e !important;
  transform: scale(1.08);
}

/* ---------------------------------------------------------
   Responsivo Mobile — max-width: 766px
   ========================================================= */
@media (max-width: 766px) {

  /* 1. Banner home — conter overflow e mostrar imagem em cover
        main.css força width:767px + left:50% + translateX(-50%): sobrescrevemos */
  .section-banner {
    overflow: hidden;
  }
  .home .section-banner .owl-carousel,
  .home .section-banner .owl-stage-outer,
  .home .section-banner .owl-item {
    height: 210px !important;
    overflow: hidden !important;
  }
  .home .section-banner .owl-carousel .owl-item img {
    position: static !important;
    left: auto !important;
    transform: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 210px !important;
    object-fit: cover;
    object-position: left center;
  }

  /* 2. Sidebar galeria — esconder no mobile
        (subcategorias acessíveis pelo menu de navegação) */
  .in .section-products .aside-menu {
    display: none;
  }

  /* 3. Form WhatsApp lateral — esconder no mobile
        (contato disponível pelo botão WhatsApp no header) */
  .in .section-products form.form {
    display: none;
  }

  /* Quando sidebar some, coluna ocupa largura total */
  .in .section-products .col.md-3 {
    display: none;
  }
  .in .section-products .col.md-9 {
    width: 100% !important;
  }

  /* 4. Capachos home — imagens com width fixo (inline style) */
  .section-doormats .imagens img {
    width: 100% !important;
    height: auto !important;
    margin-bottom: 16px;
  }

  /* 5. Produtos galeria — 1 card por linha em telas pequenas */
  .in .section-products .col.md-9 .row .col {
    width: 100% !important;
  }

  /* 6. Form background WhatsApp — conter imagem de fundo no sidebar */
  form.form {
    background-size: 65px auto;
    background-position: right 5px top -3px;
    padding-right: 80px;
    overflow: hidden;
  }

  /* Seção assistência — stack vertical no mobile */
  .section-assistance .pos-relative {
    margin-bottom: 30px;
  }

  /* Seção assistência — imagem não ultrapassa viewport */
  .section-assistance .assistance-image {
    max-width: 100%;
    position: static !important;
  }

  /* Footer — texto mais legível */
  .footer .col {
    margin-bottom: 24px;
  }

  /* Botão VER TODOS — largura automática no mobile */
  .section .d-flex.jc-center {
    justify-content: center;
  }
}

/* ---------------------------------------------------------
   Animações Motion — estado inicial (evita flash)
   --------------------------------------------------------- */
.motion-hidden {
  opacity: 0;
}
