:root {
  --rojo-origami: #d32f2f;
  --rojo-oscuro: #b71c1c;
  --rojo-claro: #f44336;
  --texto-oscuro: #1a1a1a;
  --texto-gris: #555555;
  --blanco-puro: #ffffff;
  --cristal: rgba(255, 255, 255, 0.75);
  --shadow-soft: 0 15px 45px rgba(0, 0, 0, 0.15);
  --shadow-strong: 0 25px 60px rgba(211, 47, 47, 0.25);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  color: var(--texto-oscuro);
  line-height: 1.6;
  background-color: #f4f4f4;
  position: relative;
}

.float-log {
  position: fixed;
  z-index: -1;
  opacity: 0;
  height: 600px;
  aspect-ratio: 1/1;
  bottom: -20%;
  left: -12%;
  transform: rotate(-25deg);
  animation: fadeLog 1s linear 1s forwards,float 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes fadeLog {
  0%{
    opacity: 0;
  }
  100%{
    opacity: 0.4;
  }
}

@keyframes float {
  0%, 100% {
    transform: rotate(-25deg) translateY(0);
  }
  50% {
    transform: rotate(-25deg) translateY(-20px);
  }
}

/* --- HEADER (heredado del index pero se repite para independencia) --- */
.header {
  width: 100%;
  height: 80px;
  background: var(--cristal) !important;
  position: fixed;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  border-bottom: 2px solid rgba(211, 47, 47, 0.2);
  animation: slideDown 0.6s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.logos-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s;
}

.logo-link:hover {
  transform: scale(1.05);
}

.logo-img-ajustado {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.divisor-logos {
  width: 1px;
  height: 25px;
  background: rgba(0, 0, 0, 0.1);
}

.nav-menu {
  display: flex;
  gap: 20px;
  list-style: none;
  animation: fadeIn 0.8s ease-out 0.3s both;
}

.nav-menu a {
  text-decoration: none;
  color: var(--texto-oscuro);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--rojo-origami), var(--rojo-claro));
  transition: width 0.3s ease;
}

.nav-menu a:hover {
  color: var(--rojo-origami);
}

.nav-menu a:hover::after {
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- HERO CATÁLOGO --- */
.catalogo-hero {
  background: linear-gradient(135deg, var(--rojo-origami) 0%, var(--rojo-oscuro) 100%);
  color: white;
  text-align: center;
  padding: 120px 5% 60px;
  margin-top: 80px;
  animation: fadeInDown 0.8s ease-out;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -40px 80px rgba(0, 0, 0, 0.2);
}

.catalogo-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  /*background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);*/
  border-radius: 50%;
  pointer-events: none;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.catalogo-hero h1 {
  font-size: 3rem;
  color: white;
  margin-bottom: 1rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.catalogo-hero p {
  color: rgba(255, 255, 255, 0.95);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.6;
}

/* --- LÍNEAS DE CATÁLOGO --- */
.linea-catalogo {
  padding: 70px 5%;
  border-bottom: 1px solid rgba(211, 47, 47, 0.1);
  /*background: white;*/
  animation: fadeIn 0.8s ease-out;
}

.linea-titulo {
  font-size: 2.5rem;
  color: var(--rojo-origami);
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 900;
  animation: slideInDown 0.6s ease-out;
  position: relative;
  display: inline-block;
  width: 100%;
}

.linea-titulo::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--rojo-origami), var(--rojo-claro));
  border-radius: 2px;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.linea-catalogo > p {
  display: none;
}

/* --- GRILLA DE PRODUCTOS --- */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 35px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.producto-item {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transition: var(--transition-smooth);
  animation: scaleIn 0.6s ease-out both;
  border: 1px solid rgba(211, 47, 47, 0.08);
  position: relative;
}

.producto-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--rojo-origami), var(--rojo-claro));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.producto-item:nth-child(n) {
  animation-delay: calc(0.05s * var(--nth));
}

.producto-item:nth-child(1) { --nth: 1; animation-delay: 0.05s; }
.producto-item:nth-child(2) { --nth: 2; animation-delay: 0.1s; }
.producto-item:nth-child(3) { --nth: 3; animation-delay: 0.15s; }
.producto-item:nth-child(4) { --nth: 4; animation-delay: 0.2s; }
.producto-item:nth-child(5) { --nth: 5; animation-delay: 0.25s; }
.producto-item:nth-child(6) { --nth: 6; animation-delay: 0.3s; }
.producto-item:nth-child(7) { --nth: 7; animation-delay: 0.35s; }
.producto-item:nth-child(8) { animation-delay: 0.4s; }
.producto-item:nth-child(9) { animation-delay: 0.45s; }

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.producto-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(211, 47, 47, 0.2);
}

.producto-item:hover::before {
  transform: scaleX(1);
}

.producto-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  background: linear-gradient(135deg, #f5f5f5 0%, #eee 100%);
  overflow: hidden;
  transition: var(--transition-smooth);
  position: relative;
}

.producto-item:hover .producto-img {
  transform: scale(1.08);
}


.producto-info {
  padding: 20px;
  position: relative;
  z-index: 2;
}

.producto-info h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--texto-oscuro);
  font-weight: 700;
  line-height: 1.3;
}

.detalle {
  font-size: 0.85rem;
  color: #666;
  margin: 8px 0;
  font-weight: 500;
  line-height: 1.5;
}

.codigo {
  font-family: 'Courier New', monospace;
  background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-top: 10px;
  color: #333;
  font-weight: 600;
  border: 1px solid rgba(211, 47, 47, 0.1);
}

.precio-ref {
  font-weight: 700;
  color: var(--rojo-origami);
  margin-top: 10px;
  font-size: 0.9rem;
  display: inline-block;
  padding: 4px 8px;
  background: rgba(211, 47, 47, 0.05);
  border-radius: 4px;
}

/* --- BOTONES --- */
.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  padding: 30px 0;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.macro-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--rojo-origami) 0%, var(--rojo-oscuro) 100%);
  color: white;
  padding: 14px 32px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  border: 2px solid var(--rojo-origami);
  transition: var(--transition-smooth);
  box-shadow: 0 10px 25px rgba(211, 47, 47, 0.35);
  position: relative;
  overflow: hidden;
}

.macro-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: 1;
}

.macro-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(211, 47, 47, 0.45);
}

.macro-btn:hover::before {
  transform: translateX(100%);
}

.volver {
  display: block;
  width: fit-content;
  margin: 60px auto;
  background: linear-gradient(135deg, var(--rojo-origami) 0%, var(--rojo-oscuro) 100%);
  color: white;
  padding: 14px 32px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition-smooth);
  box-shadow: 0 10px 25px rgba(211, 47, 47, 0.35);
  animation: fadeInUp 0.8s ease-out 0.6s both;
  position: relative;
  overflow: hidden;
}

.volver::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.volver:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(211, 47, 47, 0.45);
}

.volver:hover::before {
  transform: translateX(100%);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- FOOTER --- */
footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
  color: white;
  text-align: center;
  padding: 40px 20px;
  animation: fadeIn 0.8s ease-out 0.7s both;
  border-top: 1px solid rgba(211, 47, 47, 0.1);
}

footer p {
  margin: 8px 0;
  font-size: 0.95rem;
}

footer p:last-child {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 12px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .catalogo-hero {
    padding: 100px 30px 50px;
    margin-top: 70px;
  }

  .catalogo-hero h1 {
    font-size: 2.5rem;
  }

  .linea-titulo {
    font-size: 2rem;
  }

  .productos-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    padding: 0 15px;
  }

  .producto-img {
    height: 350px;
  }

  .linea-catalogo {
    padding: 60px 30px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0 20px;
    height: 70px;
  }

  .nav-menu {
    display: none;
  }

  .logo-img-ajustado {
    height: 40px;
  }

  .catalogo-hero {
    padding: 90px 20px 40px;
    margin-top: 70px;
  }

  .catalogo-hero h1 {
    font-size: 2rem;
  }

  .catalogo-hero p {
    font-size: 0.95rem;
  }

  .linea-catalogo {
    padding: 50px 20px;
  }

  .linea-titulo {
    font-size: 1.7rem;
  }

  .productos-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 0;
  }

  .producto-img {
    height: 200px;
  }

  .producto-info {
    padding: 15px;
  }

  .producto-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .detalle {
    font-size: 0.8rem;
    margin: 6px 0;
  }

  .codigo {
    font-size: 0.7rem;
  }

  .btn {
    margin-top: 30px;
  }

  .macro-btn {
    padding: 12px 28px;
    font-size: 0.9rem;
  }

  .volver {
    padding: 12px 28px;
    margin: 40px auto;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 15px;
  }

  .logos-wrapper {
    gap: 8px;
  }

  .divisor-logos {
    height: 20px;
  }

  .logo-img-ajustado {
    height: 35px;
  }

  .catalogo-hero {
    padding: 80px 15px 30px;
    margin-top: 70px;
  }

  .catalogo-hero h1 {
    font-size: 1.5rem;
  }

  .catalogo-hero p {
    font-size: 0.9rem;
  }

  .linea-catalogo {
    padding: 35px 15px;
  }

  .linea-titulo {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .linea-titulo::after {
    width: 60px;
  }

  .productos-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0;
  }

  .producto-img {
    height: 250px;
  }

  .producto-info {
    padding: 15px;
  }

  .producto-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .detalle {
    font-size: 0.75rem;
    margin: 5px 0;
  }

  .codigo {
    font-size: 0.65rem;
  }

  .btn {
    margin-top: 25px;
  }

  .macro-btn {
    padding: 12px 24px;
    font-size: 0.85rem;
  }

  .volver {
    padding: 12px 24px;
    margin: 30px auto;
    font-size: 0.85rem;
  }

  footer {
    padding: 20px 15px;
  }

  footer p {
    font-size: 0.85rem;
  }

  footer p:last-child {
    font-size: 0.7rem;
  }
}
