/* === BASE === */
body {
    font-family: Arial, sans-serif;
    padding: 0;
    margin: 0;
    background-color: #f4f4f4;
}

/* === HEADER === */
header {
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 20px;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    font-weight: bold;
}

/* === CONTENEDOR PRINCIPAL === */
.container {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    max-width: 600px;
    margin: 30px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* === FORMULARIOS === */
label {
    display: block;
    font-weight: bold;
    margin-top: 15px;
}

select,
input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.select2-container {
    width: 100% !important;
    box-sizing: border-box;
    margin-top: 5px;
    margin-bottom: 15px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
}

button:hover {
    background-color: #0056b3;
}

/* === RESULTADOS === */
#resultados {
    margin-top: 25px;
}

.producto {
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 5px;
}

.producto span {
    display: block;
}

.producto-imagen {
    width: 100%;
    max-width: 150px;
    margin-top: 10px;
    border-radius: 8px;
    display: block;
    cursor: pointer;
}

/* === MODAL === */
#modalImagen {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

#modalImagen img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    border: 5px solid white;
}

#cerrarModal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    z-index: 10000;
}

/* === BOTONES DEL CARRITO === */
.btn-principal {
    background-color: #28a745;
    color: white;
    padding: 10px;
    text-align: center;
    border: none;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
}

.btn-secundario {
    background-color: #6c757d;
    color: white;
    padding: 10px;
    text-align: center;
    border: none;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
}

.btn-principal:hover,
.btn-secundario:hover {
    opacity: 0.9;
}


/* --- Botones unificados (usar en todas las páginas) --- */
.btn {
  font: inherit;
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none; /* para <a class="btn"> */
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.btn--primary {
  background: #2563eb;
  color: #fff;
  border-color: #1d4ed8;
}
.btn--primary:hover { background: #1d4ed8; }

.btn--secondary {
  background: #fff;
  color: #111;
  border-color: #cbd5e1;
}
.btn--secondary:hover { background: #f3f4f6; }

/* Evitar que estilos globales del header afecten a botones/enlaces con .btn */
header nav a.btn { color: inherit; background: inherit; border-color: inherit; }

/* Mapear IDs existentes a las clases, sin tocar HTML */
#buscar            { composes: btn btn--primary; }   /* si tu build no soporta composes, usa lo de abajo */
#limpiarBusqueda   { composes: btn btn--secondary; }

#limpiarCarrito    { composes: btn btn--secondary; }
#generarCotizacion { composes: btn btn--primary; }

/* Fallback universal (si no tienes preprocesador con "composes") */
#buscar, #generarCotizacion {
  font: inherit; display:inline-block; padding:10px 14px; border-radius:8px; border:1px solid #1d4ed8;
  background:#2563eb; color:#fff; cursor:pointer; text-decoration:none;
}
#buscar:hover, #generarCotizacion:hover { background:#1d4ed8; }

#limpiarBusqueda, #limpiarCarrito, a.btn-secundario, .btn-secundario {
  font: inherit; display:inline-block; padding:10px 14px; border-radius:8px; border:1px solid #cbd5e1;
  background:#fff; color:#111; cursor:pointer; text-decoration:none;
}
#limpiarBusqueda:hover, #limpiarCarrito:hover, a.btn-secundario:hover, .btn-secundario:hover { background:#f3f4f6; }

/* --- Botones pequeños dentro del carrito --- */
.cantidad button,
.btn-eliminar {
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  background: #f9fafb;   /* gris muy claro */
  color: #111;
  line-height: 1.2;
  transition: background .15s ease, border-color .15s ease;
}

.cantidad button:hover,
.btn-eliminar:hover {
  background: #e5e7eb;   /* gris un poco más oscuro al hover */
}

/* Diferenciar botón eliminar */
.btn-eliminar {
  color: #dc2626;              /* rojo */
  border-color: #fca5a5;
}
.btn-eliminar:hover {
  background: #fee2e2;
}

