/* =================================================================
   BP EQUIPMENT — BigPires
   Componente visual de grelha de produtos de equipamento.
   ================================================================= */

/* ── 1. Variáveis ──────────────────────────────────────────────── */
:root {
  --bpe-bg:            #ffffff;
  --bpe-accent:        #7c6fcd;        /* roxo/lilás — cor dos links de acção */
  --bpe-text-title:    #1a1a1a;
  --bpe-text-name:     #1a1a1a;
  --bpe-img-height:    280px;
  --bpe-gap:           5px;
  --bpe-arrow-size:    44px;
  --bpe-card-width:    478.5px;
  --bpe-card-height:   610px;
}

/* ── 2. Wrapper de secção (full-bleed) ─────────────────────────── */
.bp-equipment {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bpe-bg);
  padding: 56px 0 64px;
  box-sizing: border-box;
  overflow: hidden;
}

/* ── 3. Container interno — ocupa 98% da largura do ecrã ────────── */
.bp-equipment__inner {
  width: 98%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

/* ── 4. Cabeçalho da secção ────────────────────────────────────── */
.bp-equipment__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.bp-equipment__header-left {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.bp-equipment__title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--bpe-text-title);
  margin: 0;
  line-height: 1.2;
}

.bp-equipment__see-all {
  font-size: .875rem;
  font-weight: 400;
  color: var(--bpe-text-title);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  opacity: .7;
  transition: opacity .2s;
}

.bp-equipment__see-all:hover {
  opacity: 1;
}

/* ── 5. Grupo de setas (no cabeçalho, lado direito) ────────────── */
.bp-equipment__arrows {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── 6. Setas de navegação ─────────────────────────────────────── */
.bp-equipment__arrow {
  width: var(--bpe-arrow-size);
  height: var(--bpe-arrow-size);
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #d0d0d0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  color: var(--bpe-text-title);
  transition: background .2s, border-color .2s, color .2s;
  flex-shrink: 0;
}

.bp-equipment__arrow:hover {
  background: var(--bpe-text-title);
  border-color: var(--bpe-text-title);
  color: #fff;
}

.bp-equipment__arrow:disabled,
.bp-equipment__arrow.is-hidden {
  opacity: .35;
  pointer-events: none;
}

/* ── 7. Track (scroll horizontal) ─────────────────────────────── */
.bp-equipment__track {
  display: flex;
  gap: var(--bpe-gap);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bp-equipment__track::-webkit-scrollbar {
  display: none;
}

/* ── 8. Card de produto — tamanho fixo ───────────────────────────── */
.bp-equipment__card {
  flex: 0 0 var(--bpe-card-width);
  width: var(--bpe-card-width);
  height: var(--bpe-card-height);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: 8px; /* Opcional, para ficar mais elegante */
}

/* ── 9. Imagens e Fundo do Produto ────────────────────────────────── */
.bp-equipment__img-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.bp-equipment__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity .35s ease, transform .45s ease;
}

.bp-equipment__img--main {
  opacity: 1;
}

.bp-equipment__img--hover {
  opacity: 0;
}

.bp-equipment__card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(20,12,27,0.9) 0%, rgba(20,12,27,0.4) 50%, rgba(20,12,27,0.1) 100%);
  pointer-events: none;
}

.bp-equipment__card:hover .bp-equipment__img--main {
  opacity: 0;
}

.bp-equipment__card:hover .bp-equipment__card-desc {
  max-height: 120px;
  opacity: 1;
  margin-bottom: 24px;
}

.bp-equipment__card:hover .bp-equipment__img--hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ── 10. Conteúdo (Nome, Desc, Botão) ────────────────────────────── */
.bp-equipment__card-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  box-sizing: border-box;
}

.bp-equipment__product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-align: left;
  line-height: 1.3;
  text-transform: uppercase;
}

.bp-equipment__card-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bp-equipment__card-desc {
  font-size: .875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.5;
  text-align: left;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .35s ease, opacity .3s ease, margin-bottom .35s ease;
}

/* ── 11. Botão Comprar ───────────────────────────────────────────── */
.bp-equipment__card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--bpe-text-title);
  font-size: .875rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 9999px;
  text-align: center;
  transition: background .3s, color .3s;
  align-self: flex-start;
}

.bp-equipment__card:hover .bp-equipment__card-btn {
  background: #68467c;
  color: #ffffff;
}

/* ── 12. Responsivo ────────────────────────────────────────────── */
/* Cards mantêm o tamanho fixo (478.5×610) em todos os ecrãs — em
   telas mais estreitas o utilizador desliza/arrasta o carrossel. */
@media (max-width: 640px) {
  :root {
    --bpe-card-width:  340px;
    --bpe-card-height: 460px;
  }
}
