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

.container {
  max-width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

h1 {
  font-size: 24px;
  color: #2c2b2b;
}

/* ===================== ESTILOS INPUTS ===================== */
input[type="text"] {
  width: calc(100% - 0.1px);
  max-width: 600px;
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 22px;
}

/* Estilo para select modelo */
#modelo {
  max-width: 400px;
  width: 100%;
  font-size: 16px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}
#marca {
  max-width: 400px;
  width: 100%;
  font-size: 16px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}
#rubro {
  max-width: 400px;
  width: 100%;
  font-size: 13px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* ===================== BOTONES GENERALES ===================== */
button[type="submit"],
button[type="button"] {
  width: 20%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: #ff4800;
  color: #fff;
  cursor: pointer;
  margin-left: 20px;
}

button[type="submit"]:hover,
button[type="button"]:hover {
  background-color: #b33c00;
}

/* Botón alternativo verde */
.boton-verde.link-especial {
  display: inline-block;
  padding: 10px 20px;
  background-color: green;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

.boton-verde.link-especial:hover {
  background-color: darkgreen;
}

/* Botón desplegable */
.dropdown-btn {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 10px 0;
  background-color: #ff3700;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  text-align: center;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
  margin-left: 0 !important;
  display: inline-block !important;
  
}

.dropdown-btn:hover {
  background-color: #b30c00;
}

/* Botones acción (editar/eliminar/duplicar) */
.button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.button-red { background-color: #ff5733; color: white; }
.button-green { background-color: #4caf50; color: white; }
.button-orange { background-color: #ff9800; color: white; }

.button:hover { filter: brightness(85%); }

/* Botón buscar */
.btn-buscar {
  background-color: orange;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
}

.btn-buscar:hover {
  background-color: darkorange;
}

/* Botón iniciar sesión */
.login-button {
  padding: 15px 30px;
  font-size: 16px;
  color: #fff;
  background-color: #ff5722;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease-in-out;
}

.login-button:hover {
  animation: bounce 0.6s ease-in-out;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ===================== PAGINACIÓN ===================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 10px 0;
  flex-wrap: wrap;
}

.pagination a {
  margin: 5px;
  padding: 8px 12px;
  text-decoration: none;
  background-color: #2c3e50;
  color: white;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.pagination a:hover {
  background-color: #0056b3;
}

.pagination .active a {
  background-color: #0056b3;
  font-weight: bold;
}

.pagination .disabled {
  background-color: #cccccc;
  pointer-events: none;
  padding: 8px 12px;
  color: #666666;
  border-radius: 4px;
}

/* ===================== FORMULARIO CON IMAGEN ===================== */
.form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.form-container input[type="text"],
.form-container img {
  margin-bottom: 5px;
}

/* ===================== TABLA MODERNA ===================== */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin-top: 20px;
  background-color: transparent;
}

th, td {
  padding: 12px 15px;
  border: none;
  text-align: left;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  font-size: 15px;
}

th {
  background-color: #2c3e50;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* ===================== DETALLE EXPANDIBLE ===================== */
.dropdown-content {
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  padding: 15px;
  margin-top: 10px;
  color: #333;
  font-size: 15px;
}

.dropdown-content p {
  margin: 6px 0;
  line-height: 1.4;
  font-size: 15px;
}

.dropdown-content strong {
  color: #d35400;
  display: inline-block;
  min-width: 100px;
}

#toggle-marca-filtro {
  width: 100%;
  max-width: 400px; /* el mismo ancho de tus selects o filtros */
  display: block;
  margin: 1px; /* centrado */
  padding: 10px;
  background-color: #ff4800;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* ===================== CAMPOS DE FILTRO ===================== */
.grupo-campo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.grupo-campo label {
  min-width: 80px;
  font-weight: bold;
}

.grupo-campo select {
  width: 100%;
  max-width: 400px;
  padding: 10px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* ===================== BOTONES DE FILTRO ===================== */
.boton-filtro {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 10px auto;
  padding: 10px;
  background-color: #ff4800;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.boton-filtro:hover {
  background-color: #b33c00;
}

#toggle-medida-filtro {
  width: 100%;
  max-width: 400px;
  display: block;
  margin: 1px;
  padding: 10px;
  background-color: #ff4800;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}


/* ===================== RESPONSIVE ===================== */
/* ===========================================
   MEDIA QUERY MÓVIL - Estilos hasta 768px
   =========================================== */
@media only screen and (max-width: 768px) {

  /* Ocultar columnas innecesarias */
  .ocultar-en-movil,
  .ocultar-total {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Estructura responsiva de tabla */
  th { display: none; }

  table, thead, tbody, tr, td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  tr {
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  }

  td {
    text-align: left;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 0.95em;
    word-break: break-word;
    white-space: normal;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    top: 10px;
    left: 10px;
    width: 45%;
    font-weight: bold;
    color: #e67e22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ✅ AJUSTE PARA CELDA DEL BOTÓN */
 td.celda-boton {
  padding-left: 0 !important;
  text-align: left !important;
}

  td.celda-boton::before {
    content: '' !important;
    display: none !important;
  }

  /* ✅ BOTÓN AJUSTADO A IZQUIERDA */
td.celda-boton .dropdown-btn {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 10px !important;
  box-sizing: border-box;
}
  /* Estilo para contenido del dropdown */
  .dropdown-content {
    padding: 10px;
    text-align: left;
  }

  .dropdown-content p {
    margin: 5px 0;
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
    white-space: normal;
    margin-left:auto;
  }

  /* Otros elementos */
  img {
    max-width: 100%;
    height: auto;
    margin-left: auto;
  }

  h1 {
    font-size: 20px;
  }

  input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px;
    box-sizing: border-box;
  }
  #rubro {
  max-width: 100%x;
  width: 100%;
  font-size: 13px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

  .grupo-campo {
    flex-direction: column;
    align-items: flex-start;
  }

  .grupo-campo label {
    margin-bottom: 5px;
  }

  .boton-filtro {
    width: 100%;
    max-width: 100%;
  }


}
