/* estilos-catalogo.css */
:root{
  --bg:#f0f4f8;
  --primary:#1d3557;
  --primary-2:#457b9d;
  --accent:#e63946;
  --cta:#2a9d8f;
  --footer:#1d3557;
  --text:#333;
  --muted:#555;
}

*{box-sizing:border-box;}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
}

header {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: white;
  padding: 20px;
  text-align: center;
  animation: fadeInDown 1s ease;
}

header h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

header img {
  height: 60px;
}

nav {
  background-color: var(--accent);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px;
}

nav a {
  color: white;
  padding: 14px 20px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s;
}

nav a:hover {
  transform: scale(1.1);
  text-decoration: underline;
}

/* clase opcional para marcar la página activa */
nav a.active {
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08) inset;
}

main {
  padding: 30px;
  animation: fadeIn 1.5s ease;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary);
}

.grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* tarjetas de producto */
.card {
  width: 260px;
  min-height: 420px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s;
}

.card:hover { transform: translateY(-10px); }

.card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
}

.card h3 {
  margin: 15px 0 10px;
  color: var(--accent);
}

.card p {
  font-size: 0.9em;
  color: var(--muted);
}

/* botón principal reutilizable */
.btn-personalizar {
  display: inline-block;
  margin: 0 auto 20px auto;
  padding: 12px 25px;
  background-color: var(--cta);
  color: white;
  font-size: 1em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  text-decoration: none;
  text-align: center;
  width: fit-content;
}

.btn-personalizar:hover {
  background-color: #264653;
  transform: scale(1.05);
}

/* formulario de cotización (estilos base para las páginas nuevas) */
.form-cotizar {
  max-width: 720px;
  margin: 20px auto;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.06);
}

.form-cotizar label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
  color: var(--primary);
}

.form-cotizar input[type="text"],
.form-cotizar input[type="number"],
.form-cotizar select,
.form-cotizar textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e6eef6;
  border-radius: 6px;
  font-size: 0.95em;
  margin-bottom: 10px;
}

.form-cotizar button[type="submit"] {
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.form-cotizar button[type="submit"]:hover {
  transform: scale(1.02);
}

/* footer */
footer {
  background-color: var(--footer);
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 30px;
}

/* botón fijo de WhatsApp */
.whatsapp-fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  color: white;
  padding: 12px 18px;
  border-radius: 50px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  z-index: 999;
}

.whatsapp-fixed:hover {
  background-color: #128C7E;
  transform: scale(1.05);
}

.whatsapp-fixed img {
  width: 24px;
  height: 24px;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsividad */
@media (max-width: 768px) {
  header h1 { flex-direction: column; }
  nav { flex-direction: column; align-items: center; }
  nav a { padding: 10px; width: 100%; text-align: center; }
  main { padding: 15px; }
  .grid { flex-direction: column; align-items: center; }
  .card { width: 90%; }
  .whatsapp-fixed { bottom: 10px; right: 10px; padding: 10px 14px; font-size: 14px; }
}

@media (max-width: 480px) {
  header img { height: 40px; }
  h2 { font-size: 18px; }
  .card { width: 100%; }
}
/* Modal */
.modal { display:none; position:fixed; inset:0; z-index:1200; align-items:center; justify-content:center; padding:20px; }
.modal[aria-hidden="false"] { display:flex; }
.modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.45); }
.modal-content { position:relative; background:#fff; border-radius:10px; max-width:980px; width:100%; z-index:2; box-shadow:0 12px 30px rgba(0,0,0,0.25); overflow:auto; max-height:90vh; padding:18px; }
.modal-close { position:absolute; right:12px; top:8px; background:transparent; border:none; font-size:28px; color:#333; cursor:pointer; }
.modal-grid { display:flex; gap:18px; align-items:flex-start; }
.modal-imagen img { width:320px; height:320px; object-fit:cover; border-radius:8px; box-shadow:0 6px 14px rgba(0,0,0,0.08); }
.modal-info { flex:1; min-width:260px; }
.modal-info h3 { margin-top:0; color:var(--primary); }
.modal-info p { color:var(--muted); }
.radio-group label, .tallas label { margin-right:12px; display:inline-flex; gap:6px; align-items:center; color:#333; }
.form-cotizar input[type="number"], .modal-info select, .modal-info input[type="text"], .modal-info textarea { width:100%; padding:8px 10px; margin-top:6px; margin-bottom:10px; border-radius:6px; border:1px solid #e6eef6; }
@media (max-width:768px) {
  .modal-grid { flex-direction:column; align-items:center; }
  .modal-imagen img { width:90%; height:auto; max-height:360px; }
}
/* Grid de colores */
.color-grid {
  display: grid;
  grid-template-columns: repeat(6, 44px);
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

/* Etiqueta que contiene el radio y el círculo */
.swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  outline: none;
}

/* círculo visible con color */
.swatch .swatch-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c);
  display: block;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  border: 2px solid rgba(0,0,0,0.06);
}

/* ocultar el input radio visualmente pero mantener accesibilidad */
.swatch input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* efecto hover */
.swatch:hover { transform: translateY(-4px); }

/* estado seleccionado: borde rojo y sombra más marcada */
.swatch.selected {
  box-shadow: 0 0 0 3px rgba(255,0,0,0.18), 0 6px 18px rgba(0,0,0,0.18);
  transform: translateY(-4px);
}

/* para swatches claros (ej. blanco) añadir borde visible */
.swatch[style*="#ffffff"] .swatch-circle {
  border: 1px solid #ccc;
}

/* responsivo: menos columnas en móvil */
@media (max-width:600px) {
  .color-grid { grid-template-columns: repeat(6, 36px); gap:8px; }
  .swatch { width:36px; height:36px; }
  .swatch .swatch-circle { width:30px; height:30px; }
}
  #centerMessage {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(.98);
    background: rgba(11,103,255,0.95);
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    box-shadow: 0 12px 30px rgba(11,103,255,0.18);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s cubic-bezier(.2,.9,.3,1);
    white-space: nowrap;
  }
  #centerMessage.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
  }
