/**
 * Brasa – página inicial
 *
 * Herói em dois cartões, vantagens com ícones, prateleiras de 5 produtos
 * (até 3 filas), seletor de combustível, guia e orçamento.
 */

/* ---------- 1. Herói ---------- */
.bx-hero {
  padding: 20px 0 8px;
}

.bx-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 20px;
}

.bx-hero-grid--full {
  grid-template-columns: minmax(0, 1fr);
}

.bx-slider {
  position: relative;
  display: grid;
  min-height: clamp(380px, 38vw, 520px);
  overflow: hidden;
  border-radius: 14px;
  background: var(--bx-navy);
}

.bx-slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s;
}

.bx-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.bx-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bx-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(var(--bx-primary-dark-rgb), 0.82) 0%, rgba(var(--bx-primary-dark-rgb), 0.45) 55%, rgba(var(--bx-primary-dark-rgb), 0.05) 100%);
}

.bx-slide-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: clamp(28px, 4vw, 56px);
}

.bx-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bx-amber);
  color: var(--bx-on-accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bx-slide-title {
  margin: 0 0 14px;
  color: #FFFFFF;
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 700;
  line-height: 1.08;
}

.bx-slide-text {
  margin: 0 0 24px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.6;
}

.bx-slide .bx-btn--navy {
  background: #FFFFFF;
  color: var(--bx-navy) !important;
}

.bx-slide .bx-btn--navy:hover {
  background: var(--bx-amber);
  color: var(--bx-on-accent) !important;
}

.bx-dots {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.bx-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.bx-dot.is-active {
  width: 24px;
  background: var(--bx-amber);
}

/* Bloco lateral */
.bx-side {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bx-primary-dark);
  color: #FFFFFF;
  text-decoration: none;
}

.bx-side-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.bx-side:hover .bx-side-img {
  transform: scale(1.04);
}

.bx-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.7) 100%);
}

.bx-side-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 28px;
}

.bx-side-title {
  margin-bottom: 16px;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 700;
  line-height: 1.1;
}

/* ---------- 2. Vantagens ---------- */
.bx-usps {
  padding: 14px 0 6px;
}

.bx-usps-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto;
  list-style: none;
}

.bx-usps-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--nd-line);
  border-radius: 10px;
  background: #FFFFFF;
}

.bx-usp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--bx-accent-soft);
  color: var(--bx-accent-ink);
}

.bx-usp-icon svg {
  stroke: currentColor;
}

.bx-usps-list strong {
  display: block;
  color: var(--nd-ink);
  font-size: 15px;
  font-weight: 600;
}

.bx-usps-list small {
  display: block;
  margin-top: 2px;
  color: var(--nd-muted);
  font-size: 13px;
  line-height: 1.45;
}

/* ---------- 3. Prateleiras ---------- */
.bx-shelf {
  padding: var(--nd-section) 0 0;
}

.bx-shelves > .bx-shelf:last-child {
  padding-bottom: var(--nd-section);
}

.bx-shelf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.bx-shelf-head h2,
.bx-section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--bx-navy);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
}

.bx-shelf-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bx-accent-soft);
  color: var(--bx-accent-ink);
}

.bx-shelf-icon svg {
  stroke: currentColor;
}

.bx-shelf-head p,
.bx-section-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--nd-muted);
  font-size: 15px;
}

.bx-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--nd-line);
  border-radius: 999px;
  color: var(--bx-navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.bx-more:hover {
  border-color: var(--bx-navy);
}

.bx-shelf-products.brasa-product-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin: 0;
}

/* ---------- Seletor de combustível ---------- */
.nd-selector {
  margin-top: var(--nd-section);
  padding: clamp(36px, 5vw, 64px) 0;
  background: var(--bx-navy);
  color: #FFFFFF;
}

.nd-selector-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
  gap: clamp(28px, 5vw, 80px);
}

.nd-selector-head .brasa-no,
.nd-selector-head .nd-no {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bx-amber);
  color: var(--bx-on-accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.nd-selector-head h2 {
  margin: 0 0 14px;
  color: #FFFFFF;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.1;
}

.nd-selector-head p {
  max-width: 380px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
}

.nd-selector-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.nd-selector-tab {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nd-selector-tab:hover {
  border-color: #FFFFFF;
}

.nd-selector-tab[aria-selected="true"] {
  background: var(--bx-amber);
  border-color: var(--bx-amber);
  color: var(--bx-on-accent);
}

.nd-selector-body:not(.is-enhanced) .nd-selector-tabs {
  display: none;
}

.nd-selector-body:not(.is-enhanced) .nd-selector-panel + .nd-selector-panel {
  margin-top: 28px;
}

.nd-selector-panel {
  padding: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.nd-selector-body.is-enhanced .nd-selector-label {
  display: none;
}

.nd-selector-label {
  margin: 0 0 10px;
  color: #FFFFFF;
  font-size: 18px;
}

.nd-selector-panel p {
  margin: 0 0 20px;
  max-width: 640px;
  color: #FFFFFF;
  font-size: 17px;
  line-height: 1.55;
}

.nd-selector-fuels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nd-selector-fuels a {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--bx-radius);
  background: #FFFFFF;
  color: var(--bx-navy);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.nd-selector-fuels a:hover {
  background: var(--bx-amber);
  color: var(--bx-on-accent);
}

/* ---------- 4. Guia ---------- */
.bx-guide {
  padding: var(--nd-section) 0;
  background: var(--nd-mist);
}

.bx-section-head {
  margin-bottom: 24px;
}

.bx-guide-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.bx-guide-facts > div {
  padding: 22px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--nd-line);
}

.bx-guide-facts dt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--bx-navy);
  font-size: 18px;
  font-weight: 700;
}

.bx-guide-facts dt svg {
  color: var(--bx-accent-ink);
  stroke: currentColor;
}

.bx-guide-facts dd {
  margin: 0;
  color: var(--nd-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- 5. Orçamento ---------- */
.bx-offer {
  padding: clamp(28px, 4vw, 48px) 0;
  background: #FFFFFF;
}

.bx-offer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding-top: clamp(28px, 4vw, 44px) !important;
  padding-bottom: clamp(28px, 4vw, 44px) !important;
  border-radius: 14px;
  background: linear-gradient(110deg, var(--bx-navy) 0%, var(--bx-primary-light) 100%);
  max-width: calc(1440px - 2 * var(--nd-gutter));
}

.bx-offer h2 {
  margin: 0 0 8px;
  color: #FFFFFF;
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 700;
}

.bx-offer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.bx-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Ecrãs intermédios ---------- */
@media (max-width: 1360px) {
  .bx-shelf-products.brasa-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1100px) {
  .bx-shelf-products.brasa-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .bx-usps-list,
  .bx-guide-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .bx-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .bx-side {
    min-height: 200px;
  }
  .nd-selector-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .bx-shelf-products.brasa-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}

@media (max-width: 600px) {
  .bx-hero {
    padding-top: 12px;
  }
  .bx-slider {
    min-height: 440px;
    border-radius: 12px;
  }
  .bx-slide::after {
    background: linear-gradient(180deg, rgba(var(--bx-primary-dark-rgb), 0.25) 0%, rgba(var(--bx-primary-dark-rgb), 0.9) 70%);
  }
  .bx-slide-copy {
    padding: 22px 20px 48px;
  }
  .bx-slide-text {
    font-size: 15px;
  }
  .bx-dots {
    left: 20px;
    right: auto;
    bottom: 20px;
  }
  .bx-usps-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .bx-usps-list li {
    padding: 12px 14px;
  }
  .bx-shelf-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .bx-guide-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .nd-selector-tab {
    flex: 1 1 calc(50% - 8px);
    padding: 10px 8px;
    font-size: 13px;
  }
  .nd-selector-panel {
    padding: 18px;
  }
  .nd-selector-fuels,
  .nd-selector-fuels li,
  .nd-selector-fuels a {
    width: 100%;
  }
  .nd-selector-fuels a {
    justify-content: space-between;
  }
  .bx-offer-inner {
    border-radius: 0;
    max-width: none;
  }
  .bx-offer {
    padding: 0;
  }
  .bx-offer-actions,
  .bx-offer-actions .bx-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bx-slide,
  .bx-side-img {
    transition: none;
  }
}
