/* ==========================================================================
   BANNERS, SLIDESHOW, RÉGUA & MOSAICO - TRAY 3.0 (CANÔNICO)
   Meticulosamente idêntico ao Tema Padrão 3.0 da Tray
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO SLIDESHOW (leve respiro lateral e cantos arredondados)
   -------------------------------------------------------------------------- */
.section-slideshow.banner {
  margin: 0;
  padding: 1.25rem 0;
  position: relative;
  width: 100%;
  background-color: var(--color_background); /* branco, não o cinza de .container */
}

.section-slideshow.banner > .banner-hero-inset {
  position: relative;
  padding: 0 1.25rem; /* igual ao respiro vertical da seção (1.25rem) */
}

.section-slideshow .item a,
.section-slideshow .item-image {
  display: block;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  transition: opacity ease-out 0.2s;
}

/* Visibilidade alternada Desktop x Mobile */
.banner-desktop,
.banner-mobile {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.banner-desktop {
  display: block;
  width: 100%;
}

.banner-mobile {
  display: none;
  width: 100%;
}

@media (max-width: 767px) {
  .banner-desktop {
    display: none !important;
  }
  .banner-mobile {
    display: block !important;
  }
}

@media (min-width: 768px) {
  .banner-desktop {
    display: block !important;
  }
  .banner-mobile {
    display: none !important;
  }
}

/* Slider Track & Slides */
.slideshow-track,
.swiper-wrapper {
  display: flex;
  width: 100%;
  transition: transform 0.45s ease-out;
}

.swiper-slide,
.slide-item {
  flex-shrink: 0;
  min-width: 100%;
  width: 100%;
  position: relative;
}

/* Proporções Canônicas dos Banners */
.slide-image-desktop {
  width: 100%;
  height: auto;
  aspect-ratio: 1915 / 637;
  object-fit: cover;
  display: block;
}

.slide-image-mobile {
  width: 100%;
  height: auto;
  aspect-ratio: 412 / 482;
  object-fit: cover;
  display: block;
}

/* Dots Oficiais do Tema Padrão 3.0: 12x12px a 28px da base */
.section-slideshow .swiper-container .dots,
.section-slideshow .slideshow-dots {
  margin: 0;
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.swiper-container .dots .dot,
.slideshow-dots .slideshow-dot {
  width: 12px;
  height: 12px;
  margin: 0 5px;
  cursor: pointer;
  padding: 5px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
}

.swiper-container .dots .dot:after,
.slideshow-dots .slideshow-dot:after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 8px;
  border: 1px solid var(--color_border);
  background-color: transparent;
  transition: ease-out 0.2s;
  box-sizing: border-box;
}

.swiper-container .dots .dot.dot-active:after,
.slideshow-dots .slideshow-dot.active:after {
  background-color: var(--color_base);
  border-color: var(--color_base);
}

/* Setas Sutis (Estilo Tray) */
.section-slideshow .prev,
.section-slideshow .next,
.section-slideshow .slideshow-nav-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  height: 48px;
  cursor: pointer;
  background-color: var(--color_secondary_medium);
  color: var(--color_font_inverted);
  z-index: 3;
  border-radius: 2px;
  line-height: 48px;
  text-align: center;
  margin: auto;
  opacity: 0;
  transition: opacity ease-out 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.section-slideshow:hover .prev,
.section-slideshow:hover .next,
.section-slideshow:hover .slideshow-nav-btn {
  opacity: 0.85;
}

.section-slideshow .prev:hover,
.section-slideshow .next:hover,
.section-slideshow .slideshow-nav-btn:hover {
  opacity: 1;
}

.section-slideshow .prev,
.section-slideshow .slideshow-prev {
  left: 0;
}

.section-slideshow .next,
.section-slideshow .slideshow-next {
  right: 0;
}

@media (max-width: 767px) {
  .section-slideshow .prev,
  .section-slideshow .next,
  .section-slideshow .slideshow-nav-btn {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   2. RÉGUA DE VANTAGENS (INFO RULER)
   -------------------------------------------------------------------------- */
.section-info-ruler {
  background-color: var(--color_background);
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 .5rem;
}

.section-info-ruler .info-ruler-grid,
.section-info-ruler .swiper-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.75rem, 1.25vw, 1.25rem);
  align-items: stretch;
  width: 100%;
}

.section-info-ruler .ruler-item,
.section-info-ruler .item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  padding: clamp(1.25rem, 1.6vw, 1.75rem);
  border: 1px solid var(--color_border);
  border-radius: 1.125rem;
  background: white;
  box-shadow: 0 4px 16px rgba(20, 35, 55, .025);
  min-width: 0;
}

.section-info-ruler .ruler-icon,
.section-info-ruler .item .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: .875rem;
  background: color-mix(in srgb, var(--color_base) 6%, white);
  color: var(--color_primary);
  flex-shrink: 0;
}

.section-info-ruler .ruler-icon svg,
.section-info-ruler .item .icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--color_primary);
  stroke-width: 1.8;
  fill: none;
}

.section-info-ruler .ruler-text,
.section-info-ruler .item .text {
  display: block;
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--color_font_secondary);
}

.section-info-ruler .ruler-text .featured,
.section-info-ruler .item .text .featured {
  font-size: clamp(.9375rem, 1.05vw, 1.0625rem);
  font-weight: 600;
  display: block;
  color: var(--color_font);
  line-height: 1.35;
  margin-bottom: .375rem;
}

@media (max-width: 991px) {
  .section-info-ruler .info-ruler-grid,
  .section-info-ruler .swiper-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: .875rem;
  }
}

@media (max-width: 550px) {
  .section-info-ruler .info-ruler-grid,
  .section-info-ruler .swiper-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
  }
  .section-info-ruler .ruler-item,
  .section-info-ruler .item {
    padding: 1rem;
    gap: .875rem;
  }
}

/* --------------------------------------------------------------------------
   3. BANNERS EM LINHA (4 MINI BANNERS)
   -------------------------------------------------------------------------- */
.section-banners-grid.banner.banner-line,
.section-banners-line {
  padding: 2rem 0;
}

.banner-line .container,
.banners-line-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.banner-line .item,
.banner-line-card {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  display: block;
}

.banner-line .item-image,
.banner-line .item-image img,
.banner-line-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.banner-line .item:hover img,
.banner-line-card:hover img {
  transform: scale(1.03);
}

.banner-line .item-image { position: relative; overflow: hidden; }
.banner-line .item-image::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(15, 20, 27, .75)); pointer-events: none; }
.banner-line .category-cover-label { position: absolute; z-index: 1; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: clamp(.875rem, 1.5vw, 1.5rem); color: white; font-size: clamp(.875rem, 1.1vw, 1.125rem); font-weight: 600; line-height: 1.35; }
.category-cover-label i { flex-shrink: 0; font-size: 1.125rem; }
@media (prefers-reduced-motion: reduce) { .banner-line .item-image img { transition: none; } }

@media (max-width: 767px) {
  .banner-line .container,
  .banners-line-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   4. MOSAICO DE BANNERS (1 GRANDE + 2 METADES) - CANÔNICO TRAY 3.0
   -------------------------------------------------------------------------- */
.section-banners-grid.banner:not(.banner-line),
.section-banners-mosaic {
  padding: 2rem 0;
}

.section-banners-grid .\31-big-2-half,
.section-banners-grid [class*="1-big-2-half"],
.section-banners-grid .mosaic-grid,
.mosaic-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr 1fr !important;
  gap: 1rem !important;
  width: 100%;
}

.section-banners-grid .\31-big-2-half .item,
.section-banners-grid [class*="1-big-2-half"] .item,
.section-banners-grid .mosaic-grid .item,
.mosaic-grid .item {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
}

/* O primeiro item (Grande) ocupa as 2 linhas na esquerda e estabelece a altura */
.section-banners-grid .\31-big-2-half .item:first-child,
.section-banners-grid [class*="1-big-2-half"] .item:first-child,
.section-banners-grid .mosaic-grid .item:first-child,
.mosaic-grid .item:first-child {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  position: relative;
  height: 100%;
}

.section-banners-grid .\31-big-2-half .item:first-child .item-image,
.section-banners-grid [class*="1-big-2-half"] .item:first-child .item-image,
.mosaic-grid .item:first-child .item-image {
  display: block;
  width: 100%;
  height: 100%;
}

.section-banners-grid .\31-big-2-half .item:first-child img,
.section-banners-grid [class*="1-big-2-half"] .item:first-child img,
.mosaic-grid .item:first-child img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

/* Os dois banners médios da direita ficam empilhados (um na linha 1, outro na linha 2) */
.section-banners-grid .\31-big-2-half .item:nth-child(2),
.section-banners-grid [class*="1-big-2-half"] .item:nth-child(2),
.mosaic-grid .item:nth-child(2) {
  grid-column: 2 !important;
  grid-row: 1 !important;
  position: relative;
  height: 100%;
}

.section-banners-grid .\31-big-2-half .item:nth-child(3),
.section-banners-grid [class*="1-big-2-half"] .item:nth-child(3),
.mosaic-grid .item:nth-child(3) {
  grid-column: 2 !important;
  grid-row: 2 !important;
  position: relative;
  height: 100%;
}

.section-banners-grid .\31-big-2-half .item:not(:first-child) .item-image,
.section-banners-grid [class*="1-big-2-half"] .item:not(:first-child) .item-image,
.mosaic-grid .item:not(:first-child) .item-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.section-banners-grid .\31-big-2-half .item:not(:first-child) img,
.section-banners-grid [class*="1-big-2-half"] .item:not(:first-child) img,
.mosaic-grid .item:not(:first-child) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.section-banners-grid .item:hover img {
  transform: scale(1.02);
}

@media (max-width: 767px) {
  .section-banners-grid .\31-big-2-half,
  .section-banners-grid [class*="1-big-2-half"],
  .section-banners-grid .mosaic-grid,
  .mosaic-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .section-banners-grid .\31-big-2-half .item,
  .section-banners-grid [class*="1-big-2-half"] .item,
  .mosaic-grid .item {
    width: 100% !important;
    position: relative !important;
    height: auto !important;
  }

  .section-banners-grid .\31-big-2-half .item .item-image,
  .section-banners-grid [class*="1-big-2-half"] .item .item-image,
  .mosaic-grid .item .item-image {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .section-banners-grid .\31-big-2-half .item:first-child img,
  .section-banners-grid [class*="1-big-2-half"] .item:first-child img,
  .mosaic-grid .item:first-child img {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: auto !important;
  }

  .section-banners-grid .\31-big-2-half .item:not(:first-child) img,
  .section-banners-grid [class*="1-big-2-half"] .item:not(:first-child) img,
  .mosaic-grid .item:not(:first-child) img {
    aspect-ratio: 700 / 337 !important;
    width: 100% !important;
    height: auto !important;
  }
}
