/* =====================================================
   Corsell — Specs Component v3
   - Fundo full width, conteudo max-width centralizado
   - Jost 600 uppercase para labels com acento/cedilha
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Jost:wght@300;400;500;600&display=swap');

/* ─ Wrapper: fundo full width ──────────────────────────── */
.cs-specs-wrap {
  width: 100%;
  position: relative;
  /* background aplicado via JS */
  padding: 70px 0 90px;
  box-sizing: border-box;
}

/* ─ Container interno: conteudo blocado ────────────────── */
.cs-specs-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

/* ─ Titulo ──────────────────────────────────────────── */
.cs-specs-title {
  /* Bebas Neue para titulos sem acento (ex: ALLEGRA) */
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.08em;
  color: #f0e8d8;
  margin: 0 0 32px;
  padding: 0;
  line-height: 1;
}

/* ─ Tabs ────────────────────────────────────────────── */
.cs-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.cs-tab {
  /* Jost para nomes de modelos (podem ter acento) */
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240,232,216,0.45);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 24px 12px;
  cursor: pointer;
  transition: color 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  margin-bottom: -1px;
  outline: none;
  white-space: nowrap;
}

.cs-tab:hover {
  color: rgba(240,232,216,0.75);
}

.cs-tab.is-active {
  color: #f0e8d8;
  border-bottom-color: var(--cs-accent, #4BA8A8);
}

/* ─ Painel ───────────────────────────────────────────── */
.cs-panel {
  position: relative;
  width: 100%;
}

.cs-pane {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start; /* foto e tabela ancoram no topo */
}

.cs-pane.is-active {
  display: grid;
  animation: csFadeIn 0.45s cubic-bezier(0.25,0.46,0.45,0.94) both;
}

@keyframes csFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─ Foto ──────────────────────────────────────────── */
/* Container da foto: mascara arredondada que nao cresce
   Centralizado na coluna, alinhado ao topo */
.cs-pane-img {
  align-self: flex-start; /* ancora no topo do grid */
  position: relative;
  width: 100%;
  max-width: 460px;
  border-radius: 20px;
  overflow: hidden;       /* mascara o zoom da imagem */
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  aspect-ratio: 3 / 4;
  background: rgba(0,0,0,0.15);
  margin: 0 auto; /* centraliza na coluna */
}

.cs-pane-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25,0.46,0.45,0.94);
  will-change: transform;
}

.cs-pane-img:hover img {
  transform: scale(1.06);
}

/* ─ Tabela glass ──────────────────────────────────── */
.cs-pane-table {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 8px 0;
  overflow: hidden;
}

.cs-pane-table table {
  width: 100%;
  border-collapse: collapse;
}

/* Reset do border generico "table td, table th" do tema (Hello Elementor
   reset.css), que aplicava contorno completo em cada celula (linha vertical
   entre colunas + linha antes da primeira/depois da ultima linha) */
.cs-pane-table td,
.cs-pane-table th {
  border: none;
}

.cs-pane-table tr {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s;
}

.cs-pane-table tr:last-child { border-bottom: none; }

.cs-pane-table tr:hover {
  background: rgba(255,255,255,0.04);
}

/* Labels: Jost 600 uppercase - suporta acento e cedilha */
.cs-td-label {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cs-accent, #4BA8A8);
  padding: 14px 24px;
  width: 38%;
  vertical-align: middle;
  white-space: nowrap;
}

/* Valores: Jost 300 */
.cs-td-val {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(240,232,216,0.9);
  padding: 14px 24px 14px 8px;
  vertical-align: middle;
  text-align: right;
}

/* ─ Responsivo ──────────────────────────────────────── */
@media (max-width: 768px) {
  .cs-specs-wrap { padding: 50px 0 60px; }
  .cs-specs-inner { padding: 0 20px; }

  /* Tabs sticky no mobile — top abaixo do header Corsell (~70px) */
  .cs-tabs {
    position: sticky;
    top: 70px;
    z-index: 50;
    background: rgba(10,10,10,0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin: 0 -20px 24px;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cs-tabs::-webkit-scrollbar { display: none; }
  .cs-tab {
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 11px;
    margin-bottom: 0;
  }
  .cs-tab.is-active {
    background: rgba(255,255,255,0.08);
    border-color: var(--cs-accent, #4BA8A8);
  }
  .cs-pane.is-active {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cs-pane-img { min-height: 300px; }
  .cs-tabs {
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: none;
  }
  .cs-tab {
    font-size: 11px;
    padding: 6px 14px 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    margin-bottom: 0;
  }
  .cs-tab.is-active {
    border-color: var(--cs-accent, #4BA8A8);
    border-bottom-color: var(--cs-accent, #4BA8A8);
  }
  .cs-pane-table {
    max-width: 100%;
    overflow: hidden;
  }
  .cs-pane-table table {
    table-layout: fixed;
    width: 100%;
  }
  .cs-td-label, .cs-td-val {
    font-size: 11px;
    padding: 10px 12px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .cs-td-label {
    width: 42%;
  }
  .cs-td-val {
    width: 58%;
    text-align: left;
  }
}

@media (max-width: 400px) {
  .cs-td-label, .cs-td-val {
    font-size: 10.5px;
    padding: 9px 10px;
  }
  .cs-td-label {
    width: 45%;
    letter-spacing: 0.12em;
  }
  .cs-td-val {
    width: 55%;
  }
}
