body {
    /*background-color: #000c4a;*/
    display: flex;
    flex-direction: column;
}

html, body {
    height: 100%;
    margin: 0;
}

html { scroll-behavior: smooth; }
[id="servicio"], [id="contacto"] { scroll-margin-top: 80px; }

.navbar {
    background-color: #323390;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.navbar .nav-link {
    border-radius: 8px;
    padding: 0.45rem 0.9rem !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

/* Buscador del encabezado */
.buscador {
    position: relative;
    flex: 0 1 340px;
    width: 100%;
}

.buscador > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8c90b0;
    font-size: 1.15rem;
    pointer-events: none;
}

.buscador input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 38px;
    border: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    color: #2b2f45;
    outline: none;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.buscador input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }

.buscador-resultados {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 300px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 1100;
}

.buscador-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: #2b2f45;
    text-decoration: none;
    border-bottom: 1px solid #eef0f7;
}

.buscador-item:last-child { border-bottom: 0; }
.buscador-item:hover { background: #f4f5ff; color: #2b2f45; }
.buscador-item img { width: 46px; height: 46px; object-fit: contain; background: #f4f5fa; border-radius: 8px; }
.buscador-datos { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.buscador-datos small { color: #8c90b0; text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.04em; }
.buscador-datos strong { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buscador-precio { font-weight: 700; color: #323390; font-size: 0.85rem; white-space: nowrap; }
.buscador-vacio { padding: 1rem; text-align: center; color: #8c90b0; font-size: 0.9rem; }

/* Tarjetas de producto (listados de motos y accesorios) */
.producto-card {
    background: #fff;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.producto-card .producto-img {
    background: #f4f5fa;
    padding: 0.75rem;
    position: relative;
}

.stock-etiqueta {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    z-index: 1;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    color: #fff;
}

.stock-agotado { background: #e5484d; }
.stock-bajo { background: #f59f00; }

.producto-card.agotado .img-producto,
.producto-card.agotado .card-body { opacity: 0.55; }

.producto-card .img-producto {
    height: 200px;
    width: 100%;
    object-fit: contain;   /* conserva la proporción de la foto (antes solo lo hacían los CSS de los listados) */
    transition: transform 0.3s ease;
}

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

.producto-card .producto-marca {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    color: #696cff;
}

.producto-card .producto-modelo {
    font-weight: 600;
    margin: 0.15rem 0 0.4rem;
    color: #2b2f45;
}

.producto-card .producto-dato { font-size: 0.85rem; color: #6b7189; margin-bottom: 0.5rem; }

.producto-card .producto-precio {
    font-size: 1.2rem;
    font-weight: 700;
    color: #323390;
    margin: 0;
}

.producto-card .producto-ver {
    font-size: 0.85rem;
    color: #696cff;
    font-weight: 600;
}

/* Galería del detalle de moto / accesorio (_galeria_producto.html) */
.galeria-producto { text-align: center; }

.galeria-principal img {
    max-height: 420px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.galeria-miniaturas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.galeria-mini {
    width: 64px;
    height: 64px;
    padding: 2px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.galeria-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.galeria-mini:hover { opacity: 1; }
.galeria-mini.active { opacity: 1; border-color: #696cff; }

.filter-sidebar {
    border-radius: 16px !important;
    border: 0 !important;
}

.resultados-estado {
    color: #9aa3bd;
    text-align: center;
    padding: 3rem 1rem;
}

.resultados-estado i { font-size: 3rem; display: block; margin-bottom: 0.5rem; }

@media (max-width: 767px) {
    .producto-card .img-producto { height: 170px; }
}

.navbar-toggler {
    padding: 0.25rem 0.75rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-size: 0.95rem !important;
}

.main-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 70px;
    padding-bottom: 20px;
    padding-right: 0.8rem !important;
    padding-left: 0.8rem !important;
}

.cont-footer {
    background-color: #d0d1d3;
    padding: 2rem 1rem;
    margin: 0 -0.8rem;          /* ocupa todo el ancho dentro de .main-section */
    width: calc(100% + 1.6rem);
}

.footer-marcas {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-marcas img { height: 42px; max-width: 80px; object-fit: contain; }

.btn-ayuda {
  position: fixed;
  bottom: 50px;
  right: 20px;
  background-color: #25D366;
  color: white;
  padding: 10px 15px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 9999;
}

.btn-ayuda:hover {
  transform: scale(1.1);
  color: white !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
}
