* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #111;
  color: white;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ── HERO ── */
.hero-principal {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-fondo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(40%);
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%;
}

.hero-overlay h1 {
  font-size: 80px;
  font-weight: 800;
  letter-spacing: 4px;
  margin-bottom: 20px;
}

.slogan {
  font-size: 24px;
  margin-bottom: 40px;
}

.btn-hero {
  display: inline-block;
  padding: 16px 40px;
  background: #ff7a00;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
}

/* ── FORMULARIO CLIENTE ── */
.cliente {
  padding: 100px 0;
}

.cliente .container {
  max-width: 700px;
  background: #1b1b1b;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0,0,0,.4);
}

.cliente h2 {
  margin-bottom: 30px;
  text-align: center;
}

input,
select {
  width: 100%;
  padding: 15px;
  margin-bottom: 15px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
}

/* ── FOTO SECCIONES ── */
.foto-seccion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 120px 8%;
}

.foto-seccion img {
  width: 500px;
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0,0,0,.5);
}

.texto-rugby {
  max-width: 500px;
}

.texto-rugby h2 {
  font-size: 42px;
  margin-bottom: 20px;
  color: #f0c674;
}

.texto-rugby p {
  font-size: 18px;
  line-height: 1.8;
}

.inversa {
  flex-direction: row-reverse;
}

/* ── PRODUCTOS ── */
.productos {
  padding: 100px 0;
}

.productos h2 {
  text-align: center;
  font-size: 48px;
  margin-bottom: 50px;
}

#catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.producto {
  background: #1b1b1b;
  padding: 25px;
  border-radius: 20px;
  text-align: center;
  transition: .3s;
}

.producto:hover {
  transform: translateY(-10px);
}

.producto img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  margin-bottom: 15px;
}

.controles {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.controles button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #ff7a00;
  color: white;
  font-size: 22px;
  cursor: pointer;
  transition: background .2s;
}

.controles button:hover {
  background: #cc6200;
}

/* ── SECCIÓN PEDIDO ── */
.pedido {
  padding: 80px 0;
}

.pedido h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

/* Layout lado a lado */
.pedido-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

/* ── Columna izquierda: resumen ── */
.pedido-resumen {
  background: #1b1b1b;
  border-radius: 20px;
  padding: 30px;
}

#listaPedido {
  min-height: 100px;
  margin-bottom: 20px;
  line-height: 1.9;
  font-size: 15px;
  color: #ddd;
}

.pedido-vacio {
  color: #666;
  font-style: italic;
}

.total-pedido {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f0c674;
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid #333;
}

/* Caja de descuento aplicado */
.descuento-box {
  display: none;
  flex-direction: column;
  background: linear-gradient(135deg, #1e3a1e, #223d22);
  border: 1px solid #4caf50;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 18px;
  gap: 4px;
  animation: fadeIn .4s ease;
}

.descuento-box.activo {
  display: flex;
}

.descuento-etiqueta {
  font-size: 13px;
  color: #a5d6a7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.descuento-porcentaje {
  font-size: 28px;
  font-weight: 800;
  color: #69f0ae;
}

.descuento-ahorro {
  font-size: 14px;
  color: #c8e6c9;
}

#enviarPedido {
  display: block;
  width: 100%;
  padding: 18px;
  font-size: 17px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  border: none;
  border-radius: 50px;
  background: #ff7a00;
  color: #111;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

#enviarPedido:hover {
  background: #cc6200;
  transform: translateY(-2px);
}

/* ── Columna derecha: progreso de división ── */
.progreso-division {
  background: #1b1b1b;
  border-radius: 20px;
  padding: 30px;
  border: 1px solid #2a2a2a;
}

.progreso-division h3 {
  font-size: 20px;
  color: #f0c674;
  margin-bottom: 20px;
  font-weight: 700;
}

.progreso-sin-division {
  color: #555;
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
}

.progreso-contenido {
  /* visible cuando hay división seleccionada */
}

.progreso-acumulado {
  font-size: 15px;
  color: #aaa;
  margin-bottom: 22px;
}

.progreso-acumulado strong {
  color: white;
  font-size: 18px;
}

/* Escalas */
.escalas {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.escala-item {
  flex: 1;
  background: #252525;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid #333;
  transition: border-color .3s, background .3s;
}

.escala-item.alcanzado {
  border-color: #f0c674;
  background: #2a2416;
}

.escala-monto {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.escala-pct {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #f0c674;
}

/* Barra de progreso */
.barra-contenedor {
  margin: 18px 0 6px;
  position: relative;
}

.barra {
  width: 100%;
  height: 18px;
  background: #2d2d2d;
  border-radius: 30px;
  overflow: hidden;
}

#barraProgreso {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #7d1f2f, #f0c674);
  border-radius: 30px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.barra-marcas {
  position: relative;
  height: 20px;
  margin-top: 6px;
}

.barra-marcas span {
  position: absolute;
  font-size: 10px;
  color: #555;
  white-space: nowrap;
}

.mensaje-descuento {
  font-size: 14px;
  color: #ccc;
  line-height: 1.6;
  margin-top: 16px;
  padding: 12px 16px;
  background: #222;
  border-radius: 10px;
  border-left: 3px solid #7d1f2f;
}

.mensaje-descuento strong {
  color: #f0c674;
}

/* ── FOTO FINAL ── */
.foto-final {
  padding: 120px 0;
  text-align: center;
}

.foto-final img {
  width: 80%;
  max-width: 900px;
  border-radius: 25px;
  margin-bottom: 40px;
}

.foto-final h2 {
  font-size: 48px;
  margin-bottom: 15px;
  color: #f0c674;
}

.logo-seccion {
  text-align: center;
  margin-top: 60px;
}

.logo-fba {
  width: 70px;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s;
}

.logo-fba:hover {
  transform: scale(1.05);
}

/* ── FOOTER ── */
footer {
  background: black;
  padding: 50px;
  text-align: center;
  margin-top: 50px;
}

footer h3 {
  margin-bottom: 15px;
  font-size: 30px;
}

/* ── ANIMACIONES ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-overlay h1 {
    font-size: 50px;
  }

  .foto-seccion {
    flex-direction: column;
    text-align: center;
  }

  .inversa {
    flex-direction: column;
  }

  .pedido-layout {
    grid-template-columns: 1fr;
  }

  .escalas {
    flex-direction: column;
    gap: 10px;
  }

  .escala-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
  }

  .escala-monto {
    margin-bottom: 0;
    font-size: 14px;
  }

  .escala-pct {
    font-size: 18px;
  }
  
.logro-descuento {
  display: none;
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2a2416, #3a2f1a);
  border: 1px solid #f0c674;
  text-align: center;
  animation: logroAparece .5s ease, logroPulso 1.8s ease-in-out infinite 1s;
}

.logro-descuento.activo {
  display: block;
}

.logro-descuento .logro-titulo {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #f0c674;
  font-weight: 700;
  margin-bottom: 6px;
}

.logro-descuento .logro-mensaje {
  font-size: 16px;
  color: white;
  font-weight: 600;
}

.logro-descuento .logro-mensaje strong {
  color: #f0c674;
  font-size: 20px;
}

@keyframes logroAparece {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes logroPulso {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,198,116,.4); }
  50%      { box-shadow: 0 0 0 10px rgba(240,198,116,0); }
}
