body {
  font-family: Arial, sans-serif;
  margin: 0; padding: 0;
  padding-top: 170px;  /* ajusta según la altura real del logo */
  background: #f5f5f5;
}

header {
  background: #222;
  color: #fff;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header naba {
  color: #fff;
  margin: 0 10px;
  text-decoration: none;
}

main {
  padding: 20px;
}

.logo-img {
  height: 80px;      /* antes 40px → ahora el doble */
  max-height: 80px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 10px;
  padding-top: 6px;    /* menos espacio arriba */
  padding-bottom: 6px; /* menos espacio abajo */
  margin-top: 6px;
  border-top: 2px solid rgba(255,255,255,0.1);
}

footer img {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

footer img:hover {
  opacity: 1; /* efecto hover en logo empresa */
}

footer .container {
  gap: 10px; /* pequeño espacio entre logo y texto */
}

.footer-logo {
  transition: transform 0.5s ease-in-out; /* transición suave */
  display: inline-block; /* necesario para que la rotación funcione */
}

.footer-logo:hover {
  transform: rotate(20deg) scale(1.25); /* gira 15 grados y aumenta un poco */
}

.panel-filtros {
  width: 280px;
  background-color: #E8E8E8;
}

.moto {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}

.moto img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.moto-card {                   /* Efecto hover suave */
  background-size: cover;
  background-position: center;
  height: 300px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 10px;
  overflow: hidden;
}

.moto-card:hover {
  transform: translateY(-5px) scale(1.05); /* zoom suave en hover */
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.moto-card img {
  transition: transform 0.4s ease;
}

.moto-card:hover img {
  transform: scale(1.05);
}

.moto-card .overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2));
  height: 100%;
  color: white;
}

.moto-img { /* Contenedor de imagen con proporción fija */
  width: 100%;
  aspect-ratio: 3 / 2; /* mantiene proporción 3:2 */
  object-fit: cover;   /* recorta sin deformar */
  transition: transform 0.4s ease;
}

.moto-card:hover .moto-img {
  transform: scale(1.05); /* zoom suave en hover */
}

.moto-card p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.moto-card p span {
  white-space: nowrap;
}

.moto-card {
  width: clamp(230px, calc(300px + (450 - 300) * ((100vw - 200px) / (2048 - 200))), 450px);
  max-width: 100%;
  margin: auto;
  transition: width 0.4s ease; /* transición suave al redimensionar */
}

.miniatura {
  width: 150px;
  height: auto;
  margin: 5px;
  display: inline-block;
  text-align: center;
}

.miniatura img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.boton {
  display: block;
  margin-top: 5px;
  background: crimson;
  color: white;
  padding: 4px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
}

.card-moto {
  border: 1px solid #ccc;
  padding: 10px;
  margin: 10px;
  flex: 1 1 calc(33% - 20px);
  box-sizing: border-box;
  min-width: 280px;
}

.carousel {
  position: relative;
  min-height: 300px; /* ajustable */
}

.carousel-item img {
  max-width: 100%;
  height: auto;
  margin: auto;
  display: block;
  object-fit: contain;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.5); /* fondo oscuro translúcido */
  border-radius: 50%;
}

#carouselMoto { /* Contenedor del carrusel con espacio lateral extra para flechas */
  position: relative;
  padding: 0 8px; /* deja espacio a izquierda y derecha para las flechas */
  max-width: 100%;
}

#carouselMoto .carousel-control-prev, /* Flechas de control fuera del carrusel */
#carouselMoto .carousel-control-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 60px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  z-index: 10;
  opacity: 0.8;
}

#carouselMoto .carousel-control-prev:hover,
#carouselMoto .carousel-control-next:hover {
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 1;
}

#carouselMoto .carousel-control-prev { /* Posiciones exactas */
  left: -40px; /* fuera del carrusel */
}

#carouselMoto .carousel-control-next {
  right: -35px; /* fuera del carrusel */
}

#carouselMoto .carousel-inner {
  max-height: 400px;
  background-color: #f8f9fa;
}

#carouselMoto .carousel-item { /* Contenedor del carrusel con altura fija */
  height: 400px; /* altura uniforme para todas las imágenes */
  background-color: #f8f9fa;
  text-align: center;
  overflow: hidden;
  position: relative;       /* para control */
}

#carouselMoto .carousel-item img { /* Imágenes bien contenidas */
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  position: absolute;       /* posición absoluta */
  top: 50%;                 /* centrar verticalmente */
  left: 50%;                /* centrar horizontalmente */
  transform: translate(-50%, -50%);
}

#sidebar { /* Sidebar inicial */
  width: 230px;
  transition: transform 0.3s ease;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 300;
  background: #E0E0E0;
  z-index: 999;          /* encima del resto */
  border-right: 1px solid #ddd;
}

#sidebar .toggle-tab { /* Pestaña lateral */
  position: absolute;
  top: 41%;
  right: -30px;
  transform: translateY(-50%);
  background: #343a40;
  color: white;
  padding: 6px;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  font-size: 14px;
  z-index: 1000;
  user-select: none;  /* para que no se marque texto */
}

#sidebar .toggle { /* Pestaña lateral */
  position: absolute;
  top: 51%;
  right: -30px;
  transform: translateY(-50%);
  background: #343a40;
  color: white;
  padding: 6px;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  font-size: 14px;
  z-index: 1000;
  user-select: none;  /* para que no se marque texto */
}

#sidebar.closed { /* Estado cerrado */
  transform: translateX(-100%) translateY(0);
}

#sidebar.open { /* Estado abierto */
  transform: translateX(0) translateY(0);
}

#sidebar.down { /* Estado subido */
  transform: translateX(0) translateY(-40%);
}

#sidebar.open.down {
  transform: translateX(0) translateY(-40%);
}

#sidebar.closed.down {
  transform: translateX(-100%) translateY(-40%);
}

#main-content { /* Fichas con margen dinámico */
  margin-left: 230px;
  transition: margin-left 0.3s ease;
}

#sidebar.closed + #main-content { /* Si sidebar colapsa → catálogo ocupa todo el ancho */
  margin-left: 0;
}

@media (max-width: 768px) { /* En pantallas pequeñas, el sidebar arranca colapsado Responsive */
  #sidebar {
    width: 230px;
  }
  #sidebar:not(.open) {
    transform: translateX(-100%); /* oculto */
  }
  #main-content {
    margin-left: 0 !important;
  }
}

.modal-overlay { /* Estilo básico del modal */
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.modal-box {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  min-width: 300px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  animation: fadeInScale 0.4s ease;
}
.modal-actions {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.btn-danger {
  background: #dc3545;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
}
.btn-secondary {
  background: #3545DC;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
}

@keyframes fadeInScale { /* Pequeña animación al aparecer */
  from {opacity: 0; transform: scale(0.9);}
  to {opacity: 1; transform: scale(1);}
}