:root {
  /* Ultra-modern palette */
  --bg: #05070a;
  --surface: #0e1117;
  --surface-bright: #161b22;
  --primary: #0066ff;
  --primary-glow: rgba(0, 102, 255, 0.4);
  --secondary: #ff3333;
  --secondary-glow: rgba(255, 51, 51, 0.3);
  --text: #ffffff;
  --text-muted: #8b949e;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.15);
  --radius-lg: 24px;
  --radius-md: 16px;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Texture & Decoration */
.grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.logo .mp { color: var(--primary); }
.logo .repuestos { color: var(--secondary); }

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--border-bright);
  transform: rotate(15deg);
}

.sun { display: none; }
.moon { display: block; }

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 24px -6px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -4px var(--primary-glow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-bright);
}

.btn-nav {
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Hero Section */
.hero {
  padding: 200px 0 120px;
  background-image: radial-gradient(circle at 80% 20%, rgba(0, 102, 255, 0.06) 0%, transparent 40%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(0, 102, 255, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
}

.hero-title span {
  color: var(--primary);
  font-style: italic;
  font-family: serif; /* Aesthetic touch */
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.hero-visual {
  position: relative;
}

.image-mask {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  animation: morph 20s linear infinite alternate;
}

@keyframes morph {
  0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
  100% { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; }
}

.image-mask img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) contrast(1.1);
}

.accent-blob {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: var(--primary);
  filter: blur(100px);
  opacity: 0.1;
  z-index: -1;
}

/* Brands Section Modern Marquee */
.brands-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}

.brands-container {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.brands-header {
  text-align: center;
  padding: 0 20px;
}

.marquee {
  position: relative;
  width: 100vw;
  max-width: 100%;
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
  display: flex;
  flex-shrink: 0;
  gap: 60px;
  padding: 20px 0;
  min-width: 100%;
  animation: scroll 40s linear infinite;
}

.marquee:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% / 2)); }
}

.brand-item {
  flex: 0 0 280px; /* Un poco más ancho para evitar cortes */
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
  padding: 30px;
}

.brand-item:hover {
  border-color: var(--primary);
  background: var(--surface-bright);
  transform: translateY(-5px);
}

.brand-item img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  /* Eliminamos el brightness(0) que rompía logos con degradados/colores específicos */
  filter: brightness(0) invert(1); 
  opacity: 0.7;
  transition: var(--transition);
}

/* Ajuste específico para logos con mucho espacio en blanco o formas pequeñas */
.brand-item img[alt="Electrolux"] {
  transform: scale(1.5);
}

.brand-item img[alt="Kohinoor"] {
  transform: scale(1.1); /* Reducido para que no se vea gigante */
}

.brand-item img[alt="General Electric"] {
  transform: scale(3.0); /* Reducido para que no se vea desproporcionado */
}

.brand-item:hover img {
  opacity: 1;
}

@media (max-width: 768px) {
  .brand-item {
    flex: 0 0 150px;
    height: 80px;
  }
}

/* Bento Section */
.bento-section {
  padding: 120px 0;
  background-color: var(--surface);
}

.section-header {
  margin-bottom: 60px;
}

.section-header .label {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.section-header .title {
  font-family: var(--font-heading);
  font-size: 3rem;
  letter-spacing: -0.03em;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 24px;
}

.bento-item {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.bento-item:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  opacity: 0.6;
}

.bento-item:hover img {
  opacity: 0.8;
  transform: scale(1.05);
}

.item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 7, 10, 0.95), transparent);
  z-index: 1;
}

.item-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 32px;
  z-index: 2;
}

.item-content h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.item-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
}

.bento-item:hover .item-content p {
  opacity: 1;
  transform: translateY(0);
}

/* Bento Variations */
.item-large { grid-column: span 2; grid-row: span 2; }
.item-tall { grid-row: span 2; }
.item-wide { grid-column: span 2; }

.item-tagline {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.1em;
}

/* Contact Section */
.contact-section {
  padding: 120px 0;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.contact-info .label {
  color: var(--secondary);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.contact-info h2 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 48px;
}

.info-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 48px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.info-card:hover {
  border-color: var(--border-bright);
}

.info-card svg { color: var(--primary); }

.details span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.details strong {
  font-size: 1.1rem;
  font-weight: 600;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 100px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--surface);
  border-color: var(--primary);
}

.map-container {
  height: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  filter: saturate(0.8) contrast(1.1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
footer {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-title { font-size: 4rem; }
  .hero-subtitle { margin: 0 auto 40px; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 500px; margin: 0 auto; }
  
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .item-large { grid-column: span 2; }
  
  .contact-wrapper { grid-template-columns: 1fr; }
  .map-container { height: 400px; }
}

@media (max-width: 640px) {
  .container { padding: 0 24px; }
  .hero-title { font-size: 3rem; }
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .item-large, .item-tall, .item-wide { grid-column: span 1; grid-row: span 1; }
  .nav-links { display: none; }
}

/* Animations Reveal */
.hero-content { opacity: 0; transform: translateY(30px); transition: var(--transition); }
.hero-content.visible { opacity: 1; transform: translateY(0); }

.bento-item { opacity: 0; transform: scale(0.95); transition: var(--transition); }
.bento-item.visible { opacity: 1; transform: scale(1); }
