/*ESTILOS DEL HEADER COMIENZO*/
  /* Botón Buscar personalizado */

  .navbar {
    background: linear-gradient(to bottom, #410202, #880b0b); /* degradado negro → rojo oscuro */
}

.navbar {
    background: linear-gradient(to bottom, #410202, #880b0b); /* fondo degradado */
    box-shadow: 0 8px 20px rgba(243, 50, 2, 0.7); /* sombra más intensa y difusa */
}


.btn-buscar,
.btn-buscar:hover,
.btn-buscar:focus,
.btn-buscar:active,
.btn-buscar:focus-visible {
  color: #000 !important;
  border-color: #ff8c00 !important;
  background-color: #ff8c00 !important;
  box-shadow: none !important;
  outline: none !important;
}


  .navbar-nav .nav-item.dropdown.show > .nav-link {
  background-color: #880b0bff !important;
  color: #dc3545 !important;
}

.dropdown-menu {
  background-color: #880b0bff !important;
}

/* === Estilo personalizado del dropdown === */
.dropdown-menu {
  background-color: #880b0bff; /* mismo fondo rojo que el header */
  border: none;
}

.dropdown-menu .dropdown-item {
  color: #dc3545;             /* mismo color de texto */
}

.dropdown-menu .dropdown-item:hover {
  background-color: transparent !important;
    color: #000000 !important;
}

/* si una opción del menú está activa */
.dropdown-menu .dropdown-item.active {
  background-color: transparent;
  color: #ff5100ff;  /* mismo color amarillo fuego que estás usando para .nav-link.active */
}

  .dropdown-menu .dropdown-item.active {
  background-color: transparent !important;
  color: #ff5100ff !important;
}

/* Botón de opciones en móvil - texto negro cuando está abierto o hover */
@media (max-width: 991px) {
  .btn-outline-danger.dropdown-toggle.show,
  .btn-outline-danger.dropdown-toggle:active,
  .btn-outline-danger.dropdown-toggle:hover {
    color: #000000 !important;
    background-color: #dc3545 !important;
  }
}

/* Botón de opciones en pantallas grandes - texto negro cuando está abierto o hover */
@media (min-width: 992px) {
  .btn-outline-danger.dropdown-toggle.show,
  .btn-outline-danger.dropdown-toggle:active,
  .btn-outline-danger.dropdown-toggle:hover {
    color: #000000 !important;
    background-color: #dc3545 !important;
  }
}

   /* ✅ Cambiar solo el color del texto cuando esté activo o seleccionado */
  .navbar-nav .nav-link.active {
    background-color: transparent !important; /* quitamos el fondo rojo */
    color: #ff5100ff !important;               /* amarillo fuego */
  }

  .navbar-nav .nav-link.active:hover {
    background-color: transparent !important;
    color: #FFBF00 !important;
  }

  /* ✅ Ancho del input en pantallas grandes para que se vea completo el placeholder */
  @media (min-width: 992px) {
    input[name="q"] {
      flex: 1 1 auto !important; /* Usar flex para ajustarse automáticamente */
    }
  }
  /* Estilos para pantallas grandes */
  @media (min-width: 992px) {
    input[name="q"] {
      color: #ffffff !important; /* Texto en blanco */
      background-color: #000000 !important; /* Fondo negro */
      border: 1px solid #6c757d !important;
      caret-color: #ffffff !important;
    }

    input[name="q"]::placeholder {
      color: #cccccc;
      opacity: 1;
    }

    input[name="q"]:focus {
      color: #ffffff !important;
      background-color: #000000 !important;
      border-color: #dc3545 !important;
      box-shadow: 0 0 0 3px rgba(220,53,69,0.25) !important;
    }
  }

  /* Estilos para pantallas pequeñas (móviles) */
  @media (max-width: 991px) {
    input[name="q"] {
      color: #ffffff !important; /* Texto en blanco */
      background-color: #000000 !important; /* Fondo negro */
      border: 1px solid #6c757d !important;
      caret-color: #ffffff !important;
    }

    input[name="q"]::placeholder {
      color: #cccccc;
      opacity: 1;
    }

    input[name="q"]:focus {
      color: #ffffff !important;
      background-color: #000000 !important;
      border-color: #dc3545 !important;
      box-shadow: 0 0 0 3px rgba(220,53,69,0.25) !important;
    }
  }

  input[name="q"]::selection {
    background: rgba(220, 53, 69, 0.3); /* Selección en rojo claro */
    color: #dc3545;
  }

  input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") no-repeat center;
    cursor: pointer;
  }
body {
    font-family: Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Rajdhani', sans-serif;
}

.ColorFondoPagina {
    min-height: 100vh;
    margin: 0;
    background-color: #1e1e1e;
}

/* Slider de precio — thumb invisible (reemplazado por ícono moto) */
#precioSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 20px;
    background: transparent;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}
#precioSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1px;
    height: 1px;
    background: transparent;
}
#precioSlider::-moz-range-thumb {
    width: 1px;
    height: 1px;
    background: transparent;
    border: none;
}
#precioSlider::-webkit-slider-runnable-track { background: transparent; }
#precioSlider::-moz-range-track { background: transparent; }
/* Oscurecer el fondo del modal al 95% - backdrop muy oscuro */
.modal-backdrop {
    background-color: #000000 !important;
}

.modal-backdrop.show {
    opacity: 0.92 !important;
}

/* Asegurar que el modal tenga buen contraste */
.modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
}

.carousel-control-prev {
    left: -12px; /* Mueve el botón más hacia la izquierda */
}

.carousel-control-next {
    right: -12px; /* Mueve el botón más hacia la derecha */
}
        .carousel-control-prev-icon,
        .carousel-control-next-icon {
            background-color: black;
            /* fondo negro traslúcido */
            border-radius: 50%;
            /* forma circular */
            padding: 10px;
            /* espacio interno para agrandar el círculo */
            width: 40px;
            height: 40px;
            background-size: 60% 60%;
            /* tamaño del ícono dentro del círculo */
        }

        
.modal-custom-size {
    max-height: 90vh; /* Altura máxima 90% de la pantalla */
}

.modal-body {
    overflow-y: auto;
}

.modal-img {
    max-height: 70vh;
    object-fit: contain;
}

.modal-video {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

/* Solo aplica dentro de los modales */
.modal-body {
    max-height: 70vh; /* Asegura scroll si el contenido es muy largo */
    overflow-y: auto;
}

/* Scrollbar para Chrome, Edge, Safari */
.modal-body::-webkit-scrollbar {
    width: 10px;               /* ancho de la barra */
}

.modal-body::-webkit-scrollbar-track {
    background: #2c2c2c;       /* color de fondo del track */
    border-radius: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #dc3545; /* rojo danger de Bootstrap */
    border-radius: 5px;
    border: 2px solid #2c2c2c; /* opcional, separa del track */
}

/* Scrollbar para Firefox */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: #dc3545 #2c2c2c;
}

/* === ESTILOS PARA IMÁGENES DEL CARRUSEL === */
.carousel-main-image {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    margin: 0 auto;
    image-orientation: from-image !important;
}

/* === ESTILOS PARA MINIATURAS === */
.thumbnails-container {
    padding: 0;
}

.thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0 !important;
}

.thumbnail-image {
    transition: outline 0.2s ease;
    border-radius: 0 !important;
    image-orientation: from-image !important;
    border: none !important;
    padding: 0 !important;
}

.thumbnail-image:hover {
    outline: 2px solid rgba(220, 53, 69, 0.5);
    outline-offset: 0;
}

.thumbnail-image.active {
    outline: 2px solid #dc3545;
    outline-offset: 0;
}

/* === RESPONSIVE PARA MÓVIL === */
@media (max-width: 991.98px) {
    .carousel-main-image {
        height: 300px !important;
    }

    .thumbnail-image {
        height: 60px !important;
    }

    /* Ajuste de columnas en móvil */
    .modal-body .row > div[class*="col-lg-"] {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .carousel-main-image {
        height: 250px !important;
    }

    .thumbnail-image {
        height: 50px !important;
    }

    .thumbnails-container .col-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* === AJUSTES PARA VIDEO DE YOUTUBE === */
.ratio-16x9 {
    position: relative;
    width: 100%;
}

.ratio-16x9::before {
    display: block;
    padding-top: 56.25%;
    content: "";
}

.ratio-16x9 > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* cookies.css */
.cookie-aviso {
  z-index: 1055;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #ffffff;
  color: #000000;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
/* WhatsApp - ícono flotante siempre visible */
.whatsapp-fab {
    position: fixed;
    left: 18px;
    bottom: 10%;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    animation: wafloat 3s ease-in-out infinite;
    text-decoration: none;
}

.whatsapp-fab__icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37,211,102,0.45);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.whatsapp-fab__icon i {
    color: #fff;
    font-size: 2rem;
}
.whatsapp-fab:hover .whatsapp-fab__icon {
    transform: scale(1.1);
}

.whatsapp-fab__label {
    background: #fff;
    color: #111;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}
.whatsapp-fab:hover .whatsapp-fab__label {
    opacity: 1;
    transform: translateX(0);
}

@keyframes wafloat {
    0%, 100% { margin-top: 0; }
    50%       { margin-top: -14px; }
}

@media (max-width: 768px) {
    .whatsapp-fab { left: 12px; }
    .whatsapp-fab__icon { width: 50px; height: 50px; }
    .whatsapp-fab__icon i { font-size: 1.7rem; }
    .whatsapp-fab__label { display: none; }
}
/* Mensaje flotante de Cotización */
.cotizacion-float-message {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: linear-gradient(135deg, #ff8c00 0%, #ff7300 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(255, 140, 0, 0.4);
    max-width: 320px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideInRight 0.5s ease forwards, pulse-orange 2s ease-in-out infinite;
}

.cotizacion-float-message:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 140, 0, 0.6);
}

/* Globito - punta triangular a la derecha */
.cotizacion-float-message::before {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #ff8c00;
}

.cotizacion-float-message .message-text {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.cotizacion-float-message .cta-text {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cotizacion-float-message .search-icon {
    font-size: 1.3rem;
    animation: bounce-search 1s ease-in-out infinite;
}

.cotizacion-float-message .close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cotizacion-float-message .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Animaciones */
@keyframes slideInRight {
    from {
        opacity: 0;
        right: -350px;
    }
    to {
        opacity: 1;
        right: 20px;
    }
}

@keyframes pulse-orange {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(255, 140, 0, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(255, 140, 0, 0.6);
    }
}

@keyframes bounce-search {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive - móvil */
@media (max-width: 768px) {
    .cotizacion-float-message {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        top: 50%;
        transform: translateY(-50%);
    }

    .cotizacion-float-message:hover {
        transform: translateY(-50%) scale(1.02);
    }

    .cotizacion-float-message::before {
        right: -10px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%) rotate(0deg);
    }

    @keyframes slideInRight {
        from {
            opacity: 0;
            right: -350px;
        }
        to {
            opacity: 1;
            right: 10px;
        }
    }

    .cotizacion-float-message .message-text {
        font-size: 0.9rem;
    }

    .cotizacion-float-message .cta-text {
        font-size: 1rem;
    }
}
/* Panel de estadísticas lateral */
.stats-panel {
    position: fixed;
    left: -280px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-panel.expanded {
    left: 0;
}

.stats-panel-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Contenido del panel */
.stats-panel-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border: 2px solid #dc3545;
    border-left: none;
    border-radius: 0 15px 15px 0;
    padding: 20px;
    width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(220, 53, 69, 0.3);
}

/* Botón de toggle - se mueve con el panel */
.stats-toggle-btn {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    border: 2px solid #dc3545;
    border-left: none;
    border-radius: 0 10px 10px 0;
    width: 40px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.2rem;
    box-shadow: 2px 0 10px rgba(220, 53, 69, 0.4);
}

.stats-toggle-btn:hover {
    background: linear-gradient(135deg, #b02a37 0%, #8b1f2e 100%);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 2px 0 15px rgba(220, 53, 69, 0.6);
}

.stats-toggle-btn i {
    transition: transform 0.3s ease;
}

.stats-panel.expanded .stats-toggle-btn i {
    transform: rotate(180deg);
}

/* Sección de contador */
.stats-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(220, 53, 69, 0.3);
}

.stats-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.stats-title {
    color: #ff8c00;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-value {
    color: #dc3545;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-value i {
    font-size: 1.5rem;
}

/* Lista de motos más vistas */
.top-motos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-moto-item {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 10px;
    align-items: center;
}

.top-moto-item:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.top-moto-rank {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.top-moto-info {
    flex: 1;
    min-width: 0;
}

.top-moto-name {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-moto-views {
    color: #ff8c00;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-moto-views i {
    font-size: 0.7rem;
}

/* Scrollbar personalizado */
.stats-panel-content::-webkit-scrollbar {
    width: 6px;
}

.stats-panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.stats-panel-content::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 3px;
}

.stats-panel-content::-webkit-scrollbar-thumb:hover {
    background: #b02a37;
}

/* Responsive - móvil */
@media (max-width: 768px) {
    .stats-panel {
        left: -240px;
    }

    .stats-panel-content {
        width: 240px;
        padding: 15px;
    }

    .stats-toggle-btn {
        right: -35px;
        width: 35px;
        height: 70px;
        font-size: 1rem;
    }

    .stats-value {
        font-size: 1.5rem;
    }

    .stats-title {
        font-size: 0.8rem;
    }

    .top-moto-name {
        font-size: 0.75rem;
    }

    .top-moto-views {
        font-size: 0.7rem;
    }
}
