:root {
  --primary-green: #fe7902;
  --primary-green-hover: #292929;
  --font-family: 'Roboto', sans-serif;
}

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

/* Force desktop layout on all viewports - MANTENIDO PARA ESCRITORIO */
html, body {
  min-width: 1024px;      /* impone un ancho mínimo tipo escritorio */
  overflow-x: auto;       /* habilita scroll horizontal si hace falta */
  height: 100%;
  font-family: var(--font-family);
  background-color: #000;
  color: #ddd;
}

.main-content {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 32px;
  padding-bottom: 60px;
  width: 1024px;          /* fija el ancho de contenido */
  margin: 0 auto;         /* centra horizontalmente */
}

.logo-container img {
  max-width: 150px;
  margin-bottom: 20px;
}

.login-box {
  background-color: #111;
  padding: 40px 30px;
  border-radius: 8px;
  width: 380px;           /* ancho fijo de escritorio */
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.login-box h2 {
  margin-bottom: 24px;
  color: #fff;
}

.login-box label {
  display: block;
  text-align: left;
  margin-bottom: 8px;
  color: #ccc;
}

.login-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #222;
  color: #fff;
}

.login-box button {
  width: 100%;
  background-color: var(--primary-green);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.login-box button:hover {
  background-color: var(--primary-green-hover);
}

.login-box a {
  display: block;
  margin-top: 15px;
  color: var(--primary-green);
  text-decoration: none;
}

.login-box a:hover {
  color: var(--primary-green-hover);
}

.error {
  color: #ff6060;
  font-size: 0.9rem;
  margin-top: 10px;
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #222;
  color: #fff;
  padding: 12px;
  text-align: center;
  font-size: 0.9rem;
  z-index: 100;
}

/* Banner profesional centrado */
.banner-container {
  width: 660px;
  margin: 32px auto 24px;
  text-align: center;
}

.banner-container a {
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.banner-container a:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.banner-container img {
  display: block;
  width: 100%;
  height: auto;
}

/* Trusted Shops Section */
.trusted-shops {
  text-align: center;
  margin-bottom: 32px;
}

.trusted-shops h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 16px;
  font-weight: 500;
  display: inline-block;
  border-bottom: 3px solid var(--primary-green);
  padding-bottom: 4px;
}

/* Grid de banners en 2 filas y columnas fluidas - MANTENIDO PARA ESCRITORIO */
.trusted-shops-grid {
  display: grid;
  grid-template-rows: repeat(2, auto);    /* siempre 2 filas */
  grid-auto-flow: column;                 /* rellena por columnas */
  grid-auto-columns: 600px;               /* ancho fijo de cada banner */
  gap: 24px;                              /* espacio entre banners */
  overflow-x: hidden;                       /* scroll horizontal si hacen falta */
  justify-content: center;                /* centra las columnas */
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: #888 transparent;
  -webkit-overflow-scrolling: touch;
}

.trusted-shops-grid::-webkit-scrollbar {
  height: 6px;
}

.trusted-shops-grid::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 3px;
}

/* Banners dentro del grid */
.trusted-banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trusted-banner:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.trusted-banner img {
  width: 100%;
  height: auto;
  object-fit: contain; /* Asegura que no se recorte */
  display: block;
}

/* =============================================== */
/* MEDIA QUERIES SOLO PARA MÓVIL - DESKTOP INTACTO */
/* =============================================== */

/* Tablets y móviles */
@media (max-width: 768px) {
  /* Resetear las restricciones de escritorio para móvil */
  html, body {
    min-width: unset;
    overflow-x: hidden;
  }
  
  .main-content {
    width: 100%;
    padding: 20px 15px 60px;
    /* Reordenar elementos en móvil: logo -> login -> banners */
    display: flex;
    flex-direction: column;
  }
  
  /* Poner el login primero después del logo */
  .logo-container {
    order: 1;
  }
  
  .login-box {
    order: 2;
    width: 100%;
    max-width: 400px;
    margin: 20px 10px;
    padding: 30px 25px;
  }
  
  /* Banners al final */
  .trusted-shops {
    order: 3;
    margin-top: 30px;
    margin-bottom: 0;
  }
  
  .login-box input {
    font-size: 16px; /* Evita zoom en iOS */
  }
  
  .login-box button {
    font-size: 16px;
  }
  
  .trusted-shops h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }
  
  /* Banners más compactos y horizontales */
  .trusted-shops-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    grid-auto-flow: row;
    gap: 12px;
    padding: 0 15px;
    overflow-x: visible;
  }
  
  /* Hacer banners más pequeños */
  .trusted-banner img {
    max-height: 80px;
    object-fit: contain;
  }
  
  .banner-container {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .main-content {
    padding: 15px 10px 60px;
  }
  
  .logo-container img {
    max-width: 120px;
  }
  
  .login-box {
    padding: 25px 20px;
    margin: 0 5px;
  }
  
  .trusted-shops h2 {
    font-size: 1.2rem;
  }
  
  /* Una sola columna en móviles muy pequeños */
  .trusted-shops-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 10px;
  }
  
  /* Reducir efectos hover en móvil */
  .trusted-banner:hover {
    transform: scale(1.02);
  }
  
  .banner-container {
    margin: 15px auto;
  }
}

/* Móviles muy pequeños */
@media (max-width: 320px) {
  .login-box {
    padding: 20px 15px;
  }
  
  .login-box input,
  .login-box button {
    padding: 10px;
  }
  
  .trusted-shops-grid {
    padding: 0 5px;
  }
}

/* Media Queries para diferentes dispositivos */

/* Tablets */
@media (max-width: 768px) {
  .main-content {
    padding: 20px 15px 60px;
  }
  
  .login-box {
    padding: 30px 25px;
  }
  
  .trusted-shops h2 {
    font-size: 1.3rem;
  }
  
  .trusted-shops-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
  }
}

/* Móviles */
@media (max-width: 480px) {
  .main-content {
    padding: 15px 10px 60px;
  }
  
  .logo-container img {
    max-width: 120px;
  }
  
  .login-box {
    padding: 25px 20px;
    margin: 0 10px;
  }
  
  .trusted-shops h2 {
    font-size: 1.2rem;
  }
  
  .trusted-shops-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 5px;
  }
  
  .trusted-banner {
    max-width: 100%;
  }
  
  /* Reducir efectos hover en móvil */
  .trusted-banner:hover {
    transform: none;
  }
}

/* Móviles muy pequeños */
@media (max-width: 320px) {
  .login-box {
    padding: 20px 15px;
  }
  
  .login-box input,
  .login-box button {
    padding: 10px;
  }
}