/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Montserrat", sans-serif;
  background: #f9f9f9; /* fondo blanco en toda la página */
  color: #222;
  line-height: 1.6;
  font-size: 16px;
}

/* BANNER */
.banner {
  background: #009688;
  color: white;
  text-align: center;
  padding: 8px 0;
  font-size: 0.95rem;
  font-weight: 500;
}

/* HEADER */
header {
  background: #006d6d;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
}
header .logo img {
  height: 50px;
  display: block;
}

/* NOMBRE DEL MODELO */
.modelo-nombre {
  text-align: center;
  margin: 30px 0 20px;
}
.modelo-nombre h2 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #111;
  text-transform: uppercase;
}

/* MAIN */
.main-container {
  margin: 20px;
}

/* GALERÍA DE FOTOS */
.galeria {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}
.thumbnails {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
  flex-wrap: wrap;
}
.thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.3s, transform 0.2s;
}
.thumbnails img:hover {
  border: 2px solid #009688;
  transform: scale(1.05);
}
.thumbnails img.activa {
  border: 2px solid #009688;
}
.imagen-principal {
  text-align: center;
}
.imagen-principal img {
  max-width: 360px;
  border: 1px solid #ddd; /* borde solo en la foto */
  border-radius: 0;       /* cuadrado */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* DESCRIPCIÓN DEL MODELO */
.descripcion-modelo {
  margin: 0 0 25px;
  text-align: left;
  font-size: 0.95rem;
  color: #444;
}
.descripcion-modelo p {
  margin: 5px 0;
}
.descripcion-modelo strong {
  font-weight: 700;
  color: #111;
}

/* FORMULARIO */
.formulario {
  max-width: 700px;
  margin: 20px auto;
}
.formulario form {
  display: flex;
  flex-direction: column;
}
.formulario label {
  margin-top: 14px;
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}
.formulario input,
.formulario select,
.formulario textarea {
  padding: 10px;
  margin-top: 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.formulario input:focus,
.formulario select:focus,
.formulario textarea:focus {
  border-color: #009688;
  box-shadow: 0 0 4px rgba(0,150,136,0.2);
  outline: none;
}
fieldset {
  border: 1px solid #eee;
  padding: 15px;
  margin-top: 14px;
  border-radius: 6px;
  background: #fafafa;
}
legend {
  font-weight: 600;
  color: #009688;
  font-size: 0.95rem;
}
.oculto { display: none; }

/* Título bloque dentro del formulario */
.titulo-bloque {
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
}

/* FICHA TÉCNICA */
.ficha-tecnica {
  margin-top: 20px;
}
.ficha-tecnica a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #009688;
  font-weight: 600;
  text-decoration: none;
}
.ficha-tecnica a:hover {
  text-decoration: underline;
}

/* BOTÓN */
button {
  margin-top: 25px;
  padding: 14px;
  background: #009688;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}
button:hover {
  background: #00796b;
}

/* FOOTER */
footer {
  background: #006d6d;
  color: white;
  text-align: center;
  padding: 25px 20px;
  margin-top: 40px;
}
footer h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 600;
}
footer p {
  margin: 5px 0;
  font-size: 0.95rem;
  font-weight: 500;
}

/* --- Desktop layout --- */
@media (min-width: 992px) {
  .main-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 80px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
  }

  .galeria {
    flex: 1;
    flex-direction: row;
    gap: 30px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
  }

  .thumbnails {
    flex-direction: column;
    gap: 14px;
    margin: 0;
  }
  .thumbnails img {
    width: 80px;
    height: 80px;
  }

  .imagen-principal img {
    max-width: 600px;
  }

  .descripcion-modelo {
    text-align: left;
    max-width: 100%;
    margin: 0 0 30px;
    font-size: 1rem;
  }
  .descripcion-modelo p {
    margin-bottom: 8px;
  }
}

/* MODAL GUÍA DE TALLAS - Responsivo */
.modal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0; 
  top: 0;
  width: 100%; 
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.6);
  padding: 10px;
}

.modal-contenido {
  background: #fff;
  margin: auto;
  padding: 20px;
  border-radius: 8px;
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.modal-contenido h2 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  text-align: center;
}

.modal-contenido table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 0.9rem;
}

.modal-contenido table th,
.modal-contenido table td {
  border: 1px solid #ddd;
  padding: 8px 6px;
  text-align: center;
  word-break: break-word;
}

.modal-contenido table th {
  background: #f7f7f7;
  font-weight: 600;
}

.cerrar {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}
.cerrar:hover {
  color: #009688;
}

/* ✅ Ajustes extra solo para móviles */
@media (max-width: 600px) {
  .modal-contenido {
    padding: 15px;
    max-width: 95%;
  }
  .modal-contenido table {
    font-size: 0.8rem;
  }
  .modal-contenido h2 {
    font-size: 1.1rem;
  }
}


/* Flechas del slider */
.flecha {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  padding: 8px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  user-select: none;
  transition: background 0.3s;
  z-index: 10;
}

.flecha:hover {
  background: rgba(0,150,136,0.8);
  color: #fff;
}

.flecha.izquierda { left: 10px; }
.flecha.derecha { right: 10px; }

.imagen-principal {
  position: relative; /* Necesario para posicionar flechas */
  text-align: center;
}

.imagen-principal img {
  display: block;
  margin: 0 auto;
}


/* Breadcrumb */
.breadcrumb {
  font-size: 0.95rem;
  margin: 15px 20px;
  color: #666;
}

.breadcrumb a {
  text-decoration: none;
  color: #009688;
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 8px;
  color: #999;
}

/* Precio / Desglose */
.precio-desglose {
  background: #fff;
  padding: 15px;
  margin: 20px 0;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.precio-desglose p {
  margin: 6px 0;
  font-size: 0.95rem;
  color: #333;
}

.precio-desglose strong {
  color: #006d6d;
}




/* Grids generales */
.productos .grid,
.bordados .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 60px auto;
  max-width: 1200px;
  padding: 0 20px;
  text-align: center;
}

/* Tarjeta de cada producto */
.productos .producto,
.bordados .producto {
  background: #fff;
  padding: 10px 10px 15px; /* menos padding arriba/abajo */
  border: 2px solid #000;
  transition: transform 0.3s, box-shadow 0.3s;
}

.productos .producto:hover,
.bordados .producto:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Títulos de cada modelo */
.productos h3 {
  margin-bottom: 12px; /* menos espacio */
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  text-transform: uppercase;
}

/* Imágenes uniformes (más rectangulares) */
.productos img,
.bordados img {
  width: 100%;
  height: 200px;   /* 🔥 antes 260px → ahora más bajo */
  object-fit: contain;
  display: block;
  border-radius: 0;
  box-shadow: none; 
}

/* Responsive */
@media (max-width: 992px) {
  .productos .grid,
  .bordados .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

@media (max-width: 600px) {
  .productos .grid,
  .bordados .grid {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .productos h3 {
    margin-bottom: 18px;
    font-size: 1.2rem;
  }
}


/* HERO */
.hero {
  text-align: center;
  padding: 80px 20px 50px;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.2rem !important;   /* forzamos prioridad */
  font-weight: 800;
  color: #111;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.3rem !important;   /* forzamos prioridad */
  color: #444;
  margin-bottom: 14px;
  line-height: 1.6;
}

.hero p strong {
  font-size: 1.5rem !important;   /* forzamos prioridad */
  color: #000;
  display: inline-block;
  margin-top: 8px;
}

.hero .nota {
  font-size: 1rem !important;   /* forzamos prioridad */
  color: #666;
  margin-top: 15px;
  display: block;
}

/* HERO - Responsive en móvil */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem !important; /* más pequeño en móvil */
  }

  .hero p {
    font-size: 1rem !important;
  }

  .hero p strong {
    font-size: 1.2rem !important;
  }

  .hero .nota {
    font-size: 0.9rem !important;
  }
}



/* Botón Seleccionar */
.btn-seleccionar {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 18px;
  background: #006d6d; /* mismo verde que el header */
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px; /* bordes redondeados */
  transition: background 0.3s, transform 0.2s;
}

.btn-seleccionar:hover {
  background: #009688; /* tono más claro al pasar el ratón */
  transform: translateY(-2px);
}


/* Bordados grid */
/* Bordados grid */
.bordados .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1200px;   /* 🔥 igual que los modelos */
  margin: 60px auto;   /* 🔥 mismo margen */
  padding: 0 20px;     /* 🔥 mismo padding */
  text-align: center;
}


/* Contenedor uniforme sin borde ni fondo */
.bordados .bordado {
  padding: 0;
  height: 250px;         /* altura fija uniforme */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Imágenes de bordados */
.bordados .bordado img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* recorta para que no se deformen */
  display: block;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* sombra ligera para que destaquen */
}

/* Responsive */
@media (max-width: 768px) {
  .bordados .grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 500px) {
  .bordados .grid {
    grid-template-columns: 1fr;
  }
}


/* Sección completa del proceso */


/* ==========================
   SECCIÓN PROCESO ORIGINAL
========================== */
.proceso {
  text-align: center;
  margin: 80px auto;
  max-width: 1300px;
}

.proceso h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 50px;
  color: #111;
}

/* Contenedor principal */
.pasos {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  margin: 60px 0;
  padding: 0 20px;
}

/* Línea verde que conecta los pasos */
.pasos::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 10%;
  right: 10%;
  height: 4px;
  background-color: #009688; /* verde clásico */
  z-index: 1;
}

/* Cada paso */
.paso {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Círculo numerado */
.paso .icono {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px auto;
  border-radius: 50%;
  background: #009688;
  color: #fff;
  font-size: 1.3rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px #009688;
}

/* Título */
.paso h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
}

/* Texto */
.paso p {
  font-size: 0.95rem;
  color: #444;
  max-width: 230px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .pasos {
    flex-direction: column;
    align-items: center;
    gap: 50px;
  }

  .pasos::before {
    display: none;
  }

  .paso {
    text-align: center;
  }

  .paso p {
    max-width: 300px;
  }
}


/* Sección cómo pedir */
.como-pedir {
  background: #f9f9f9;
  padding: 60px 20px;
  margin: 0;
  text-align: center;
}

.como-pedir h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 40px;
}

/* Grid de pasos */
.pasos-pedido {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Cada tarjeta de paso */
.paso-pedido {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 25px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.paso-pedido:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* Iconos */
.paso-pedido .icono {
  font-size: 2rem;
  background: #009688;
  color: #fff;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 15px;
}

.paso-pedido h3 {
  font-size: 1.2rem;
  color: #111;
  font-weight: 700;
  margin-bottom: 10px;
}

.paso-pedido p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 992px) {
  .pasos-pedido {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .pasos-pedido {
    grid-template-columns: 1fr;
  }

  .paso-pedido {
    padding: 20px;
  }

  .como-pedir h2 {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }
}


/* ===== MODAL RESUMEN PEDIDO ===== */
.modal-resumen {
  display: none; /* Oculto por defecto */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1000;

  justify-content: center;
  align-items: center;
  overflow-y: auto; /* ✅ si hay mucho contenido */
  padding: 20px;
}

.modal-resumen-contenido {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  margin: auto;
  position: relative;

  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
  animation: fadeIn 0.3s ease-in-out;
}

/* Botón cerrar */
.cerrar-resumen {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
  font-weight: bold;
}

.cerrar-resumen:hover {
  color: #009688;
}

/* Contenido del resumen */
.resumen-detalle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.resumen-detalle img {
  width: 160px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Lista de detalles */
.resumen-detalle ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
  width: 100%;
  max-width: 380px;
  text-align: left;
  line-height: 1.5;
}

.resumen-detalle li {
  margin-bottom: 10px;
}

.resumen-detalle strong {
  color: #111;
}

/* Botón pagar */
.btn-pagar-resumen {
  background: #009688;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  transition: background 0.3s ease;
}

.btn-pagar-resumen:hover {
  background: #00796b;
}

/* Responsive: en escritorio imagen + lista en fila */
@media (min-width: 768px) {
  .resumen-detalle {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }

  .resumen-detalle img {
    width: 200px;
  }

  .resumen-detalle ul {
    max-width: 60%;
    font-size: 1rem;
  }
}

/* Animación suave */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === CONTENEDOR PRINCIPAL DEL PAGO === */
  main.container {
    padding: 10px;
    max-width: 1300px;
    margin: 40px auto;
  }



/* === DISTRIBUCIÓN DE COLUMNAS === */
.contenido {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: flex-start;
}

@media (max-width: 960px) {
  .contenido {
    grid-template-columns: 1fr;
  }
}

/* === BLOQUES DE CADA COLUMNA === */
.col-izq, .col-der {
  flex: 1;
  min-width: 340px;
}

.col-izq .contenido-blanco,
.col-der .contenido-resumen {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e2e2;
  padding: 24px 26px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* === TÍTULOS DE BLOQUE === */
.titulo-azul {
  background-color: #006D6D;   /* verde corporativo */
  color: #fff !important;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0;
  padding: 12px 16px;
  border-radius: 6px 6px 0 0;
  border: none;
  text-transform: none;
  letter-spacing: 0.2px;
}

/* === FORMULARIO DE TARJETA (MOLLIE) === */
#payment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#payment-form label {
  font-weight: 600;
  font-size: 15px;
  color: #333;
  margin-bottom: 6px;
  display: block;
}

#card-holder,
#card-number,
#expiry-date,
#verification-code {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  line-height: 1.4;
  box-sizing: border-box;
}

#card-holder:hover,
#card-number:hover,
#expiry-date:hover,
#verification-code:hover {
  border-color: #006D6D;
}

.error-field {
  color: #b00020;
  font-size: 13px;
  margin-bottom: 6px;
}

/* === EXPIRY + CVV EN DOS COLUMNAS === */
.form-row.two-cols {
  display: flex;
  gap: 14px;
}
.form-row.two-cols .form-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* === BOTÓN DE PAGO === */
#submit {
  background-color: #006D6D;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
}
#submit:hover { background-color: #218838; }

#error-message {
  color: #b00020;
  font-size: 14px;
  margin-top: 6px;
}

/* === BLOQUE DERECHO: RESUMEN === */
.contenido-resumen p {
  margin-bottom: 8px;
  font-size: 15px;
  color: #333;
}
.contenido-resumen strong {
  color: #111;
}
.precio {
  font-size: 1.4rem;
  font-weight: 700;
  color: #006D6D;
}

/* === MÉTODO DE PAGO Y LOGOS DE SEGURIDAD === */
.metodo-pago {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #333;
}
.logos-seguridad {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 20px;
}
.logos-seguridad img { height: 28px; }

/* === CABECERA Y TITULO PRINCIPAL === */
h1 {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #111;
}

/* === BREADCRUMB === */
.breadcrumb {
  background: none;
  margin-bottom: 10px;
  font-size: 14px;
}
.breadcrumb a {
  color: #006D6D;
  font-weight: 500;
}






/* === SECCIÓN: PROCESO === 
.proceso {
  background-color: #f9f9f9;
  padding: 60px 20px;
  text-align: center;
}

.proceso-container {
  max-width: 1100px;
  margin: 0 auto;
}

.proceso-container h2 {
  font-size: 28px;
  color: #111;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
}

 === Cuadrícula de pasos === 
.proceso .pasos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 25px;
  justify-items: center;
}

.proceso .paso {
  background-color: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  padding: 25px 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 250px;
}

.proceso .paso:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

=== Icono de paso === 
.proceso .icono {
  background-color: #28a745;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

 === Texto del paso === 
.proceso h3 {
  font-size: 18px;
  color: #111;
  margin-bottom: 8px;
}

.proceso p {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 0;
}
*/

/* === Imagen del producto en el resumen del pago === */
.producto-imagen {
  text-align: center;
  margin-bottom: 20px;
}

.producto-imagen img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}


/* === Ajustes solo para pantallas grandes (ordenador) === */
@media (min-width: 1024px) {
  /* Reduce el ancho total del contenedor principal */
  main.container {
    max-width: 1300px;
    padding: 30px;
  }

  /* Reduce un poco la separación entre columnas */
  .contenido {
    gap: 20px;
  }

  /* Hace las tarjetas más equilibradas */
  .col-izq .contenido-blanco,
  .col-der .contenido-resumen {
    padding: 20px 22px;
  }

  /* Ajusta el tamaño de la imagen del producto */
  .producto-imagen img {
    max-width: 80%;
    max-height: 220px;
    object-fit: contain;
  }

  /* Reduce márgenes generales para mantener proporción */
  h1 {
    margin-bottom: 25px;
    font-size: 26px;
  }
}


.producto-imagen img,
.diseno-imagen img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background-color: #fff;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}


/* Vista previa del diseño subido */
#resumenArchivo img,
#disenoPreview {
  display: block;
  margin-top: 10px;
  background-color: #f2f2f2; /* gris claro para contrastar logos blancos */
  border-radius: 10px;
  border: 1px solid #ccc;
  max-width: 180px; /* más pequeño y equilibrado */
  max-height: 180px;
  object-fit: contain;
  padding: 10px;
}
  




/* === MODAL GENERAL === */
#modalPreview {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px); /* ✅ efecto elegante */
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* === CONTENIDO DEL MODAL === */
.modal-content {
  background: #fff;
  border-radius: 14px;
  padding: 30px 40px 40px;
  max-width: 950px; /* ✅ más ancho */
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: #111;
  font-weight: 700;
}

/* === ÁREA DE VISTA PREVIA === */
.preview-area {
  position: relative;
  margin: 0 auto 25px auto;
  width: 100%;
  max-width: 600px; /* ✅ mucho más grande */
  aspect-ratio: 1 / 1;
  background: transparent;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* === GORRA BASE === */
#baseGorra {
  width: 120%; /* ✅ aumenta el tamaño visible */
  height: auto;
  object-fit: contain;
  display: block;
  transform: translateY(5%); /* ✅ un poquito más centrada verticalmente */
}

/* === DISEÑO DEL USUARIO === */
#previewDiseno {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.3);
  max-width: 200px;     /* mantiene el ancho máximo */
  max-height: 90px;     /* ✅ evita que se salga verticalmente */
  width: auto;
  height: auto;
  object-fit: contain;  /* ✅ mantiene proporciones originales */
  cursor: move;
  user-select: none;
  pointer-events: auto;
}


/* === BOTONES === */
#guardarPosicion {
  background: #009688;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  margin: 0 10px;
}

#guardarPosicion:hover, #closePreview:hover {
  background: #00796b;
}

/* === Responsive === */
@media (max-width: 768px) {
  .modal-content {
    max-width: 90%;
    padding: 20px;
  }

  .preview-area {
    max-width: 320px;
  }

  #baseGorra {
    width: 100%;
    transform: none;
  }

  #previewDiseno {
    max-width: 100px;
      max-height: 90px;     /* ✅ evita que se salga verticalmente */
    transform: translate(-50%, -50%) scale(1);
  }
}


.modal-header {
  position: relative;
  display: flex;
  justify-content: center; /* ✅ centra el título */
  align-items: center;
  margin-bottom: 25px;
}

.modal-header h2 {
  font-size: 1.6rem;
  color: #111;
  font-weight: 700;
  margin: 0;
}

#closePreview {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #009688;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
}

#closePreview:hover {
  background: #00796b;
  transform: scale(1.1);
}

.tooltip-container {
  position: relative;
  display: inline-block;
  background-color: #007bff;
  color: white;
  font-size: 11px;
  font-weight: bold;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  text-align: center;
  line-height: 16px;
  cursor: pointer;
}

.tooltip-container .tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 230px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 8px 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%; /* aparece arriba del icono */
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s;
  font-size: 12px;
  line-height: 1.3;
}

.tooltip-container .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* === Estilo del campo titular de la tarjeta === */
.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

#card-holder-name {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#card-holder-name:focus {
  border-color: #00796b; /* verde del botón */
  box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.15);
}

.error-field {
  color: #d93025;
  font-size: 0.85rem;
  margin-top: 4px;
}

