* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brown-primary: #6b4423;
  --brown-dark: #4a2f1a;
  --beige: #d4a574;
  --beige-light: #e8c9a0;
  --green: #3d5a3c;
  --green-dark: #2a3f29;
  --white: #ffffff;
  --gray: #f5f5f5;
  --gray-dark: #2c2c2c;
  --orange: #ff6b35;
  --red: #c1121f;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

/* HEADER */
header {
  background: white;
  padding: 1.5rem 5%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 60px;
}

nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--brown-primary);
}

.header-icons {
  display: flex;
  gap: 1rem;
}

.icon-btn {
  width: 50px;
  height: 50px;
  background: #243977;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #ffffff;
  transition: all 0.3s;
}

.icon-btn:hover {
  background: var(--beige);
  transform: scale(1.05);
}

/* ================= HERO SECTION OPTIMIZADO ================= */
.main-banner {
  height: 720px;
  background-color: #f7f3f1;
  /* Fondo crema de la derecha */
  position: relative;
  display: flex;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  --primary: #6b4423;
  --primary-dark: #4a2f1a;
  --accent: #d4a574;
  --gradient: radial-gradient(circle at 15% 25%, #a6734c 0%, #633d26 100%);
}

/* SECCIÓN IZQUIERDA MARRÓN */
.brown-side {
  position: absolute;
  top: 0;
  left: 0;
  width: 75%;
  /* Cubre gran parte para luego ser cortado por el óvalo */
  height: 100%;
  background: #243977;
  display: flex;
  align-items: center;
  padding-left: 60px;
  z-index: 1;
}

.content {
  max-width: 620px;
  color: white;
}

.content h1 {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  width: 600px;
}

.content p {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 30px;
  opacity: 0.9;
  width: 600px;
}

.btn-cta {
  display: inline-block;
  padding: 14px 30px;
  background-color: #000c37;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  font-size: 13px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}
/* CONTENEDOR DE LA IMAGEN */
.machine-box {
  position: absolute;
  left: 45%;
  top: 55%;
  transform: translateY(-50%);
  z-index: 10;

  /* 1. Definimos el contenedor fijo */
  width: 380px;
  height: 300px;

  /* 2. Centramos la imagen dentro del contenedor */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.machine-box img {
  /* 3. Forzamos a que la imagen respete el contenedor */
  width: 100%;
  height: 100%;

  /* 4. CLAVE: 'contain' evita que se deforme o se vea rara */
  object-fit: contain;

  /* Mantenemos tus estilos visuales */
  filter: drop-shadow(15px 25px 20px rgba(0, 0, 0, 0.35));
}

/* EL ÓVALO (MASCARA) */
/* Este elemento crea el efecto ovalado "hacia adentro" */
/* EL ÓVALO (MASCARA) */
.oval-mask {
  position: absolute;
  /* Mantenemos tu posición original */
  right: 22%;
  top: 50%;
  /* Mantenemos tu desplazamiento */
  transform: translate(500px, -50%);

  /* Aumentamos el ancho para que la curva sea más abierta/larga */
  width: 980px;
  height: 750px;
  background-color: #f7f3f1;

  /* CLAVE: Cambiamos a un radio elíptico (X / Y)
     El 100% estira la curva hacia los lados, el 50% la mantiene suave arriba y abajo */
  border-radius: 50% / 50%;
  z-index: 2;
}

/* LÍNEA DE CONTORNO DEL ÓVALO */
.oval-line {
  position: absolute;
  right: 22.3%;
  top: 50%;
  transform: translate(500px, -50%);
  width: 985px;
  height: 750px;

  /* Tu línea de sombra */
  border-left: 18px solid rgba(0, 0, 0, 0.8);

  /* Importante que tenga el mismo radio elíptico */
  border-radius: 50% / 50%;
  z-index: 1;
}
/* MÁQUINA */
.machine-box {
  position: absolute;
  left: 40%;
  top: 55%;
  z-index: 10;
  height: 400px;
  width: 680px;
}

.machine-box img {
  width: 100%;
  filter: drop-shadow(0px 0 0 rgba(0, 0, 0, 0.35));
}

/* TAGS DERECHA */
.tags-side {
  position: absolute;
  right: 35px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  z-index: 15;
}

.tag {
  background-color: var(--primary-dark);
  color: white;
  width: 145px;
  padding: 10px;
  text-align: center;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.tag:hover {
  background-color: #7a553a;
}
/* Este es el estilo único para el botón activo */
.tag.active {
  /* Creamos el fondo clarito mezclando el color acento con blanco */
  background-color: color-mix(in srgb, var(--accent), white 90%);
  /* El texto y el borde usan el color acento fuerte */
  color: var(--accent);
  border: 2px solid var(--accent);
  font-weight: bold;
}

/* --- Los disparadores de color --- */

/* Cuando los botones estén dentro de la sección de Corte Láser */
.container-laser {
  --accent: #243977; /* Tu azul */
}

/* Cuando los botones estén dentro de la sección de Sublimación */
.container-sublimacion {
  --accent: #cda870; /* Tu café/dorado */
}

/* ===================== RESPONSIVE ===================== */

/* -------- LAPTOP / TABLET GRANDE -------- */
@media (max-width: 1200px) {
  .main-banner {
    height: 650px;
    display: grid !important;
  }

  .content h1 {
    font-size: 32px;
    width: 350px;
  }

  .content p {
    font-size: 18px;
    width: 350px;
  }

  .machine-box {
    height: 320px;
  }

  .machine-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .tags-side {
    right: 20px;
    font-size: 10px;
  }

  .tag {
    font-size: 10px;
  }
  .oval-mask,
  .oval-line {
    width: 750px;
    height: 700px;
  }
  .main-banner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    padding: 30px 20px;
  }
}

/* -------- TABLET -------- */
@media (max-width: 992px) {
  header {
    padding: 1rem 4%;
  }

  nav {
    gap: 1.5rem;
  }

  .main-banner {
    height: 600px;
  }

  .brown-side {
    width: 100%;
    padding-left: 40px;
  }

  .content {
    max-width: 520px;
  }

  .content h1 {
    font-size: 28px;
    width: 100%;
  }

  .content p {
    font-size: 16px;
    width: 100%;
  }

  .machine-box {
    width: 360px;
    left: 62%;
  }

  .oval-mask,
  .oval-line {
    /* En pantallas muy angostas, empujamos más el óvalo hacia afuera */
    transform: translate(550px, -50%);
    width: 800px;
  }

  .oval-line {
    border-left-width: 10px; /* Línea más fina */
  }

  .tags-side {
    right: 20px;
  }

  .tag {
    width: 120px;
    font-size: 10px;
  }
}

/* PRODUCTOS DESTACADOS - DISEÑO MEJORADO */
.productos-section {
  padding: 6rem 5%;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.productos-section h2 {
  text-align: center;
  font-size: 3rem;
  color: var(--brown-dark);
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-weight: 700;
}

.productos-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.productos-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.producto-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #f0f0f0;
}

.producto-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--beige);
}

.producto-img-container {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.producto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.producto-card:hover .producto-img {
  transform: scale(1.1);
}

.producto-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--brown-dark);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.producto-badge.destacado {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: var(--brown-dark);
}

.producto-badge.oferta {
  background: linear-gradient(135deg, #ff6b6b, #c92a2a);
}

.producto-content {
  padding: 2rem;
}

.producto-categoria {
  color: var(--brown-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.producto-categoria::before {
  content: "";
  width: 3px;
  height: 12px;
  background: var(--brown-primary);
  border-radius: 2px;
}

.producto-card h3 {
  font-size: 1.3rem;
  color: var(--brown-dark);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.4;
  min-height: 60px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.producto-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.producto-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 2px solid #f5f5f5;
}

.producto-precio-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.producto-precio-old {
  font-size: 0.9rem;
  color: #999;
  text-decoration: line-through;
}

.producto-precio {
  font-size: 2rem;
  color: var(--brown-dark);
  font-weight: 800;
  line-height: 1;
}

.producto-precio span {
  font-size: 1.2rem;
  font-weight: 600;
}

.producto-btn {
  background: var(--brown-dark);
  color: white;
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.producto-btn:hover {
  background: var(--brown-primary);
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(107, 68, 35, 0.3);
}

.producto-btn i {
  font-size: 1rem;
}

.ver-todos-btn {
  display: block;
  margin: 4rem auto 0;
  background: transparent;
  color: var(--brown-dark);
  border: 3px solid var(--brown-dark);
  padding: 1.2rem 3rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ver-todos-btn:hover {
  background: var(--brown-dark);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(107, 68, 35, 0.3);
}

/* SERVICIOS SECTION - DISEÑO DINÁMICO MEJORADO */
.services-section {
  background: linear-gradient(180deg, #2b4b8c 0%, #2b4b8c 100%);
  padding: 8rem 5%;
  position: relative;
  overflow: hidden;
}

/* Patrón decorativo de fondo */
.services-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(
      circle at 20% 50%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.services-header {
  text-align: center;
  margin-bottom: 5rem;
  position: relative;
  z-index: 1;
}

.services-header h2 {
  font-size: 4rem;
  color: white;
  margin-bottom: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.services-subtitle {
  font-size: 1.4rem;
  color: #ffffff;
  font-weight: 300;
}

/* SERVICIOS DESTACADOS - 2 GRANDES */
.services-featured {
  max-width: 1400px;
  margin: 0 auto 4rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.service-card-large {
  background: white;
  border-radius: 30px;
  padding: 3.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-card-large:hover {
  transform: translateY(-20px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.service-decoration {
  position: absolute;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #3d5a3c, transparent);
  border-radius: 50%;
  top: -150px;
  right: -150px;
  opacity: 0.15;
  transition: all 0.5s;
}

.service-card-large:hover .service-decoration {
  transform: scale(1.5) rotate(90deg);
  opacity: 0.25;
}

.service-number {
  font-size: 5rem;
  font-weight: 900;
  color: #0c0a00;
  opacity: 0.3;
  position: absolute;
  top: 1rem;
  right: 2rem;
  line-height: 1;
}

.service-card-content {
  position: relative;
  z-index: 2;
}

.service-icon-large {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown-primary));
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(107, 68, 35, 0.4);
  transition: all 0.4s;
}

.service-card-large:hover .service-icon-large {
  transform: rotate(15deg) scale(1.1);
  box-shadow: 0 15px 40px rgba(107, 68, 35, 0.6);
}

.service-card-large h3 {
  font-size: 2rem;
  color: var(--brown-dark);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.service-card-large p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.service-tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.service-tags span {
  background: #243977;
  color: #ffffff;
  padding: 0.6rem 1.3rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* SERVICIOS SECUNDARIOS - 4 MEDIANAS */
.services-grid-compact {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.service-card-medium {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 25px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.service-card-medium::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brown-primary), var(--beige));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.service-card-medium:hover::before {
  transform: scaleX(1);
}

.service-card-medium:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.service-icon-medium {
  width: 75px;
  height: 75px;
  background: #243977;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ffffff;
  margin: 0 auto 1.5rem;
  transition: all 0.4s;
}

.service-card-medium:hover .service-icon-medium {
  transform: scale(1.15) rotate(10deg);
  background: linear-gradient(135deg, var(--brown-primary), var(--beige));
  color: white;
}

.service-card-medium h3 {
  font-size: 1.4rem;
  color: var(--brown-dark);
  margin-bottom: 1rem;
  font-weight: 700;
}

.service-card-medium p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.service-link {
  width: 45px;
  height: 45px;
  background: var(--brown-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
  cursor: pointer;
}

.service-card-medium:hover .service-link {
  background: #243977;
  color: #ffffff;
  transform: translateX(5px);
}

/* CONTACTO */
.contacto-section {
  padding: 6rem 5%;
  background: white;
}

.contacto-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contacto-info h2 {
  font-size: 2.5rem;
  color: var(--brown-dark);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.contacto-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contacto-icon {
  width: 60px;
  height: 60px;
  background: var(--beige);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--brown-dark);
}

.contacto-form {
  background: var(--gray);
  padding: 3rem;
  border-radius: 15px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--brown-dark);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-submit {
  width: 100%;
  background: var(--brown-dark);
  color: white;
  padding: 1.2rem;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.form-submit:hover {
  background: var(--brown-primary);
}

/* GALERÍA DE TRABAJOS */
.galeria-section {
  padding: 6rem 5%;
  background: white;
}

.galeria-section h2 {
  text-align: center;
  font-size: 3rem;
  color: var(--brown-dark);
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 4rem;
}

.galeria-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.galeria-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  height: 300px;
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.galeria-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 2rem;
  transform: translateY(100%);
  transition: transform 0.4s;
}

.galeria-item:hover img {
  transform: scale(1.1);
}

.galeria-item:hover .galeria-overlay {
  transform: translateY(0);
}

.galeria-overlay h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.galeria-overlay p {
  color: #243977;
  font-size: 0.95rem;
}

/* TESTIMONIOS */
.testimonios-section {
  padding: 6rem 5%;
  background: #eee;
}

.testimonios-section h2 {
  text-align: center;
  font-size: 3rem;
  color: var(--brown-dark);
  margin-bottom: 4rem;
  text-transform: uppercase;
  font-weight: 700;
}

.testimonios-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.testimonio-card {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.testimonio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.testimonio-stars {
  color: #ffd700;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.testimonio-text {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonio-author {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1.5rem;
  border-top: 2px solid #243977;
}

.testimonio-author strong {
  color: var(--brown-dark);
  font-size: 1.1rem;
}

.testimonio-author span {
  color: #243977;
  font-size: 0.9rem;
}

/* POR QUÉ ELEGIRNOS */
.porque-section {
  padding: 6rem 5%;
  background: var(--brown-dark);
}

.porque-container {
  max-width: 1400px;
  margin: 0 auto;
}

.porque-content h2 {
  text-align: center;
  font-size: 3rem;
  color: white;
  margin-bottom: 4rem;
  text-transform: uppercase;
  font-weight: 700;
}

.porque-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.porque-item {
  text-align: center;
}

.porque-icon {
  width: 80px;
  height: 80px;
  background: var(--beige);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--brown-dark);
}

.porque-item h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.porque-item p {
  color: #ffffff;
  line-height: 1.7;
}

/* FOOTER */
.footer {
  background: #1a1a1a;
  color: white;
  padding: 4rem 5% 0;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #333;
}

.footer-column h3 {
  color: var(--beige);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.footer-logo {
  height: 50px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-column p {
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--brown-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.footer-social a:hover {
  background: var(--beige);
  transform: translateY(-3px);
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-column ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-column ul li a:hover {
  color: var(--beige);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ccc;
}

.footer-contact i {
  color: var(--beige);
  width: 20px;
}

.footer-bottom {
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #999;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--beige);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  /* Hero en tablet: Vertical */
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "content"
      "image"
      "buttons";
    padding: 3rem 5%;
  }

  .hero-container {
    text-align: center;
    padding-right: 0;
  }

  .hero-image {
    padding: 2rem 0;
  }

  .service-buttons {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    padding-left: 0;
    margin-top: 2rem;
  }

  .contacto-container {
    grid-template-columns: 1fr;
  }

  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .galeria-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonios-container {
    grid-template-columns: 1fr;
  }

  .porque-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Servicios responsive */
  .services-featured {
    grid-template-columns: 1fr;
  }

  .services-grid-compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-header h2 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  nav {
    display: none;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .productos-grid,
  .galeria-grid,
  .porque-grid,
  .services-grid-compact {
    grid-template-columns: 1fr;
  }

  .producto-card h3 {
    min-height: auto;
  }

  .producto-footer {
    flex-direction: column;
    gap: 1rem;
  }

  .producto-btn {
    width: 100%;
    justify-content: center;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  /* Servicios mobile */
  .services-header h2 {
    font-size: 2.5rem;
  }

  .service-card-large {
    padding: 2rem;
  }

  .service-number {
    font-size: 3rem;
  }

  .service-icon-large {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  .service-card-large h3 {
    font-size: 1.6rem;
  }

  .service-card-large p {
    font-size: 1rem;
  }
}

/* User Menu Dropdown */
.user-menu-container {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  z-index: 1000;
  overflow: hidden;
}

.user-info {
  padding: 1rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.user-info i {
  font-size: 1.5rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: #1a1a2e;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 500;
}

.dropdown-item:hover {
  background: #f8fafc;
  color: #c77340;
}

.dropdown-item i {
  font-size: 1.1rem;
  width: 20px;
}

.dropdown-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0.5rem 0;
}

.logout-btn {
  color: #ef4444;
  font-weight: 600;
}

.logout-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.cart-count {
  position: absolute;
  top: -20px;
  right: 5px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  position:relative;
}

.contacto-section {
  background: #efe8db;
  padding: 80px 20px;
}

.contacto-container {
  max-width: 1100px;
  margin: auto;
  text-align: center;
}

.contacto-title {
  font-size: 32px;
  color: #5a3a28;
  margin-bottom: 10px;
  text-align: center;
}

.contacto-subtitle {
  font-size: 15px;
  color: #6b6b6b;
  margin-bottom: 50px;
  text-align: center;
}

.contacto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

.contacto-card {
  background: #ffffff;
  padding: 35px 20px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.contacto-card:hover {
  transform: translateY(-8px);
}

.contacto-card i {
  font-size: 30px;
  color: #7a9a2e;
  margin-bottom: 15px;
}

.contacto-card h4 {
  font-size: 16px;
  color: #5a3a28;
  margin-bottom: 5px;
}

.contacto-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* HAMBURGER BUTTON */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  align-self: center;
}

.hamburger span {
  display: block;
  height: 4px;
  width: 100%;
  background: var(--brown-primary);
  border-radius: 2px;
}
.mobile-user-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
  width: 100%;
  align-items: center;
}

.mobile-user-menu a,
.logout-mobile {
  text-decoration: none;
  color: var(--brown-dark);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
}

/* SOLO DESKTOP */
.desktop-only {
  display: block;
}

.main-banner {
  display: grid;
  grid-template-columns: 1fr 520px 260px;
  gap: 20px;
  align-items: center;
  padding: 0px 0px;
}

/* TABLET */
@media (max-width: 1024px) {
  .main-banner {
    grid-template-columns: 1fr 420px;
    grid-template-rows: auto auto;
  }

  .tags-side {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
  }

  /* Ajustamos el óvalo para que no ocupe tanto espacio horizontal */
  .oval-mask {
    right: 10%; /* Lo movemos más a la derecha */
    width: 850px;
    height: 700px;
    transform: translate(450px, -50%); /* Reducimos el desplazamiento */
    border-radius: 50%; /* Mantenemos tu curvatura */
  }

  .oval-line {
    right: 10.3%;
    width: 855px;
    height: 700px;
    transform: translate(450px, -50%);
    border-radius: 50%;
    border-left: 15px solid rgba(0, 0, 0, 0.8); /* Línea un poco más delgada */
  }

  .machine-box {
    /* Ajustamos la posición para que no se amontone con el texto */
    left: 65%;
    top: 55%;
    transform: translate(-50%, -50%); /* Centramos mejor */

    /* Redimensionamos el contenedor para pantallas medianas */
    width: 400px;
    height: 300px;

    /* Aseguramos que mantenga su prioridad visual */
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .machine-box img {
    /* Mantenemos el ajuste proporcional */
    width: 100%;
    height: 100%;
    object-fit: contain;

    /* Suavizamos un poco la sombra para pantallas más pequeñas */
    filter: drop-shadow(10px 15px 15px rgba(0, 0, 0, 0.3));
  }

  /* Aseguramos que el contenido de texto no quede debajo de la curva */
  .content {
    max-width: 45%;
    padding-left: 30px;
  }
}

/* ==========================================================================
   OPTIMIZACIÓN MÓVIL TOTAL (768px o menos)
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Reset del Contenedor Principal */
  .main-banner {
    display: flex !important; /* Cambiamos de grid a flex para control total */
    flex-direction: column;
    height: auto !important;
    min-height: 100vh;
    padding: 0 !important; /* El color café debe tocar los bordes */
    background-color: var(--bg-crema);
    text-align: center;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 2000;
  }

  /* 2. Bloque Café con Curvatura Móvil */
  .brown-side {
    position: relative;
    width: 100%;
    height: auto;
    padding: 150px 10px 80px; /* Más espacio abajo para la curva */
    background: #243977;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Crea el efecto ovalado en la base */
    clip-path: ellipse(120% 100% at 50% 0%);
    z-index: 1;
  }

  .content {
    max-width: 100%;
    margin: 0 auto;
    padding-left: 0px;
  }

  .content h1 {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.2;
    padding: 0 10px;
    width: 100%;
  }

  .content p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    padding: 0 5px;
    width: 100%;
  }

  /* 3. Máquina (Adaptable y con Sombra) */
  .machine-box {
    position: relative;
    width: 100%;
    max-width: 250px;
    height: 280px; /* Altura fija para móvil */
    margin: -40px auto 20px;
    left: auto;
    top: auto;
    transform: none;
  }

  .machine-box img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0.3));
  }

  /* 4. Botones (Tags) en Cuadrícula */
  .tags-side {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 40px;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 botones por fila */
    gap: 10px;
    right: auto;
    height: auto;
  }

  .tag {
    width: auto;
    min-width: 145px;
    max-width: 200px;
    white-space: nowrap;
    box-sizing: border-box;
        padding: 5px;
    border-radius: 12px;
    background-color: var(--primary-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  /* Botón Hamburguesa */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2100;
    position: relative;
  }

  .hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--brown-primary);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
  }

  /* Animación a X cuando está activo */
  .hamburger.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .hamburger.is-active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Menú de navegación móvil */
  nav {
    display: none; /* Oculto por defecto */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 2000;
  }

  /* Clase que activa el menú (la que pone el JS) */
  nav.active {
    display: flex !important;
  }

  /* Ocultar elementos innecesarios */
  .oval-mask,
  .oval-line {
    display: none !important;
  }
}
.tags-side .tag {
  padding: 10px 5px;
  border-radius: 999px;
  white-space: nowrap;
}

/* CTA responsive */
.btn-cta {
  padding: 14px 22px;
  font-size: 16px;
  border-radius: 999px;
  max-width: 280px;
  width: 100%;
}
