/* 
   NIKE AIR ZOOM — style.css
   Premium Design System
*/

/* CSS Variables */
:root {
  --bg-color:        #ccee66;
  --dark-color:      #202020;
  --btn-color:       #a3be52;
  --text-primary:    #ffffff;
  --text-dark:       #202020;
  --transition-speed: 0.6s;
  --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  overflow-x: hidden;
  position: relative;
  padding: 30px 80px;
  transition:
    background var(--transition-speed) var(--transition-curve);
}

/* Diagonal Shape */
.diagonal-shape {
  background: var(--dark-color);
  position: absolute;
  top: 0;
  left: -600px;
  transform: rotate(-70deg);
  width: 100%;
  height: 130%;
  transition: background var(--transition-speed) var(--transition-curve);
  z-index: 0;
}

/* Background Text */
.bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 280px;
  font-weight: 900;
  letter-spacing: -10px;
  opacity: 0.07;
  color: var(--text-primary);
  z-index: 0;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

/* Header */
header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
  z-index: 10;
  margin-bottom: 20px;
}

/* Coluna vazia à esquerda — equilibra o grid */
.header-left {
  display: block;
}

/* Logo centralizada sobre a divisória diagonal */
.logo {
  width: 70px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
  cursor: pointer;
  justify-self: center;
  /* Sutil sombra para destacar em cima da linha diagonal */
  filter: brightness(0) invert(1) drop-shadow(0 2px 12px rgba(0,0,0,0.25));
}

.logo:hover {
  transform: scale(1.12);
}

nav {
  display: flex;
  gap: 32px;
  justify-self: end;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--text-primary);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.nav-link:hover::after {
  width: 100%;
}

/* Main Layout */
.caixa-principal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: calc(100vh - 200px);
  position: relative;
  z-index: 1;
}

/* Text Box */
.caixa-texto {
  max-width: 480px;
  position: relative;
  z-index: 2;
}

.tag-novo {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 6px 20px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

h4 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 72px;
  font-weight: 900;
  line-height: 0.95;
  margin-bottom: 20px;
  letter-spacing: -2px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Parágrafo — descrição do produto */
#descricao-tenis {
  font-size: 15px;
  line-height: 1.75;
  opacity: 0.85;
  margin-bottom: 32px;
  font-weight: 300;
  max-width: 400px;
  letter-spacing: 0.3px;
  /* Borda sutil à esquerda para destaque editorial */
  padding-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.35);
}

#descricao-tenis strong {
  font-weight: 600;
  opacity: 1;
  /* Texto em negrito levemente mais visível */
  color: rgba(255, 255, 255, 1);
}

/* Cart Button */
.botao-carrinho {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--btn-color);
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition:
    background var(--transition-speed) var(--transition-curve),
    transform 0.4s var(--transition-curve),
    box-shadow 0.4s var(--transition-curve);
  border: none;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.3px;
  font-family: "Outfit", sans-serif;
  position: relative;
  overflow: hidden; /* necessário para o ripple */
}

.botao-carrinho:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.botao-carrinho:active {
  transform: translateY(0) scale(0.98);
}

.botao-carrinho.added {
  background: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

/* ── Ripple do botão ── */
.botao-carrinho .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Shoe Image */
.caixa-imagem {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shoe-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--bg-color) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(70px);
  transition:
    background var(--transition-speed) var(--transition-curve),
    transform 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.imagem-tenis {
  width: 680px;
  transform: rotate(-25deg);
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.3));
  transition:
    opacity 0.28s ease,
    transform 0.3s ease;
  animation: floatShoe 4s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Estados de fade controlados pelo JS */
.imagem-tenis.fade-out {
  opacity: 0;
  transform: rotate(-25deg) scale(0.88);
}

.imagem-tenis.fade-in {
  opacity: 1;
  transform: rotate(-25deg) scale(1);
}

/* Flutuação contínua — JS usa transform inline; a animação funciona como fallback
   quando o mouse não está na página */
@keyframes floatShoe {
  0%, 100% { transform: rotate(-25deg) translateY(0); }
  50%       { transform: rotate(-25deg) translateY(-14px); }
}

/* Color Selector (aside lateral) */
.caixa-botoes {
  position: fixed;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

/* Trilho vertical */
.slider-track {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: calc(100% - 16px);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  top: 8px;
  z-index: 0;
}

/* Indicador que desliza */
.slider-indicator {
  position: absolute;
  width: 3px;
  height: 72px; /* igual à altura do botão */
  background: var(--text-primary);
  border-radius: 3px;
  top: 0;
  left: 0;
  transition: top var(--transition-speed) var(--transition-curve);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* Botão de cor */
.botao-cor {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
  transition: all 0.35s var(--transition-curve);
  position: relative;
  z-index: 1;
  padding: 0;
  font-family: "Outfit", sans-serif;
}

.botao-cor:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.botao-cor.active {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.15);
}

.cor-preview {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.botao-cor.active .cor-preview {
  transform: scale(1.18);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

.cor-nome {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.botao-cor.active .cor-nome {
  color: var(--text-primary);
}

/* Entrance Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeScale {
  from { opacity: 0; transform: rotate(-25deg) scale(0.8); }
  to   { opacity: 1; transform: rotate(-25deg) scale(1); }
}

header          { animation: slideUp    0.8s var(--transition-curve) 0.0s both; }
.tag-novo       { animation: slideRight 0.8s var(--transition-curve) 0.2s both; }
h4              { animation: slideRight 0.8s var(--transition-curve) 0.3s both; }
h1              { animation: slideRight 0.8s var(--transition-curve) 0.4s both; }
#descricao-tenis{ animation: slideRight 0.8s var(--transition-curve) 0.5s both; }
.botao-carrinho { animation: slideRight 0.8s var(--transition-curve) 0.6s both; }
.imagem-tenis   { animation: fadeScale  1.0s var(--transition-curve) 0.5s both,
                              floatShoe   4.0s ease-in-out            1.5s infinite; }
.caixa-botoes   { animation: slideUp    0.8s var(--transition-curve) 0.7s both; }

/* Responsive */
@media (max-width: 1200px) {
  body { padding: 20px 40px; }

  h1 { font-size: 56px; }

  .imagem-tenis { width: 520px; }

  .bg-text { font-size: 200px; }
}

@media (max-width: 900px) {
  body {
    padding: 20px 24px;
    overflow-y: auto;
  }

  .caixa-principal {
    flex-direction: column;
    text-align: center;
    height: auto;
    padding-top: 20px;
    gap: 20px;
  }

  .caixa-texto { max-width: 100%; }

  #descricao-tenis {
    max-width: 100%;
    border-left: none;
    padding-left: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.25);
    padding-top: 12px;
    text-align: left;
  }

  h1 { font-size: 48px; }

  .imagem-tenis { width: 340px; }

  nav { display: none; }

  .sizes { justify-content: center; }

  .caixa-botoes {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    flex-direction: row;
    margin-top: 30px;
    padding-bottom: 40px;
  }

  .slider-track { display: none; }

  .bg-text { font-size: 120px; }

  .diagonal-shape { left: -800px; }
}

@media (max-width: 480px) {
  h1 { font-size: 36px; }

  h4 { font-size: 18px; }

  .imagem-tenis { width: 270px; }

  .botao-carrinho {
    padding: 14px 28px;
    font-size: 14px;
  }

  .bg-text { font-size: 80px; }
}