/* Instagram Filter Styles - Mejoras para las tarjetas generadas dinámicamente */

/* Estilos base para todas las tarjetas generadas */
.item.features-image {
  margin-bottom: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item.features-image:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Mejoras para contenedor de imagen */
.item-wrapper .item-img {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 365px;
  height: 365px;
}

.item-wrapper .item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  padding: 10px;
}

.item-wrapper:hover .item-img img {
  transform: scale(1.05);
}

/* Estilos para contenido */
.item-content {
  padding: 15px 10px;
}

.item-title {
  margin-bottom: 15px;
  color: #232323;
  font-weight: 800;
  line-height: 1.3;
  font-size: 20px;
}

/* Estilo específico para títulos de motos en stock - FORZAR APLICACIÓN */
.motorcycle-title {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: #1a1a1a !important;
  letter-spacing: 0.3px !important;
  margin-bottom: 18px !important;
  line-height: 1.2 !important;
}

/* Selector más específico para asegurar que se aplique */
.item-content .motorcycle-title,
.item-content h4.motorcycle-title {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: #1a1a1a !important;
}

/* También aplicar al strong dentro del título */
.motorcycle-title strong {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: #1a1a1a !important;
}

/* Sobrescribir específicamente las clases de Mobirise */
.item.features-image .item-title.motorcycle-title,
.item.features-image .item-title.motorcycle-title.mbr-fonts-style,
.item.features-image .item-title.motorcycle-title.display-5 {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: #1a1a1a !important;
  line-height: 1.2 !important;
}

/* Sobrescribir cualquier estilo de Mobirise que pueda interferir */
.item.features-image .item-content h4.motorcycle-title * {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: #1a1a1a !important;
}

/* Estilos para los detalles estructurados de las motos en stock */
.item-details {
  margin-bottom: 15px;
}

.field-line {
  margin-bottom: 8px;
  line-height: 1.4;
  font-size: 13px;
}

.field-label {
  font-weight: 600;
  color: #333;
}

.field-value {
  color: #555;
}

/* Estilos especiales para el precio */
.price-line {
  margin-top: 12px;
  padding: 8px 0;
  border-top: 1px solid #eee;
}

.price-label {
  font-weight: 800 !important;
  font-size: 16px !important;
  color: #28a745 !important;
}

.price-value {
  font-weight: 700 !important;
  font-size: 18px !important;
  color: #28a745 !important;
}

.mbr-text {
  color: #767676;
  line-height: 1.4;
  margin-bottom: 15px;
  min-height: 80px;
  font-size: 12px;
}

/* Estilos para botones */
.btn.item-btn {
  background: linear-gradient(135deg, #0f7699, #0a5c73);
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.3s ease;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn.item-btn:hover {
  background: linear-gradient(135deg, #0a5c73, #084a5a);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(15, 118, 153, 0.4);
  color: white;
}

/* Estilo para el icono de WhatsApp en botones */
.btn.item-btn .socicon-whatsapp {
  margin-right: 6px;
  font-size: 14px;
}

/* Estilo para el icono de Instagram en botones */
.btn.item-btn .socicon-instagram {
  margin-right: 6px;
  font-size: 14px;
}

/* Estilos para botón secundario de Instagram */
.btn.item-btn.btn-secondary {
  background: linear-gradient(135deg, #E4405F, #C13584);
  margin-left: 8px;
  color: white !important;
}

.btn.item-btn.btn-secondary:hover {
  background: linear-gradient(135deg, #C13584, #A12A6B);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(228, 64, 95, 0.4);
  color: white !important;
}

/* Ajustar footer para dos botones */
.item-footer {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

/* Asegurar que botones se mantengan en línea en escritorio */
@media (min-width: 769px) {
  .item-footer {
    flex-wrap: nowrap;
    justify-content: center;
  }
  
  .btn.item-btn {
    white-space: nowrap;
    min-width: auto;
    max-width: 48%;
    flex: 0 1 auto;
  }
}

/* Estilos específicos para motos vendidas */
.sold-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 10px;
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

.sold-notice {
  color: #dc3545;
  font-weight: 600;
  font-size: 11px;
  text-align: center;
  padding: 8px;
  background: rgba(220, 53, 69, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(220, 53, 69, 0.2);
  margin-top: 8px;
}

/* Efectos para motos vendidas */
.item.features-image.sold-item .item-img {
  height: 320px;
  min-height: 320px;
}

.item.features-image.sold-item .item-img img {
  filter: grayscale(0.4);
}

.item.features-image.sold-item .item-content {
  opacity: 0.85;
}

.item.features-image.sold-item .item-title {
  color: #666;
}

.item.features-image.sold-item .mbr-text {
  color: #999;
}

/* Responsivo */
@media (max-width: 768px) {
  .item-wrapper .item-img {
    min-height: 300px;
  }
  
  .item-wrapper .item-img img {
    max-height: 300px;
  }
  
  /* Tamaño específico para motos vendidas en móviles */
  .item.features-image.sold-item .item-img {
    height: 280px;
    min-height: 280px;
  }
  
  .item.features-image.sold-item .item-img img {
    max-height: 280px;
  }
  
  .item-content {
    padding: 12px 8px;
  }
  
  .mbr-text {
    min-height: 60px;
    font-size: 11px;
  }
  
  .btn.item-btn {
    padding: 6px 12px;
    font-size: 9px;
  }
  
  /* Mantener botones en línea también en móviles */
  .item-footer {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: space-between;
  }
  
  .btn.item-btn {
    text-align: center;
    font-size: 9px !important;
    padding: 6px 6px !important;
    white-space: nowrap;
  }
  
  /* Dar menos ancho al botón de WhatsApp */
  .btn.item-btn:not(.btn-secondary) {
    flex: 0 0 45%;
  }
  
  /* Dar más ancho al botón de Instagram */
  .btn.item-btn.btn-secondary {
    flex: 0 0 53%;
    margin-left: 0;
  }
  
  .item-title {
    font-size: 14px;
  }
}

/* Animaciones de entrada */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item.features-image {
  animation: slideInUp 0.6s ease-out;
}

/* Grid spacing mejorado */
.row > .item.features-image {
  margin-bottom: 40px;
}

/* Efectos de hover mejorados */
.item-wrapper {
  transition: all 0.3s ease;
}

.item.features-image:hover .item-wrapper {
  transform: translateY(-3px);
}

/* Estilo para sección de motos vendidas - SLIDER */
.sold-motorcycles-slider {
  margin-top: 40px;
  padding: 30px 0;
  background: linear-gradient(135deg, rgba(248, 249, 250, 0.8), rgba(241, 243, 244, 0.6));
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.slider-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

.slider-wrapper {
  overflow: hidden;
  border-radius: 15px;
  position: relative;
}

.slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 20px;
}

.slider-track .item.features-image {
  flex: 0 0 calc(33.333% - 14px);
  margin-bottom: 0;
}

/* Estilos específicos para imágenes en el slider de motos vendidas */
.sold-motorcycles-slider .item-wrapper .item-img {
  min-height: 280px !important;
  height: 280px !important;
}

/* Botones del slider */
.slider-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #0f7699 !important;
  border: 1px solid rgba(15, 118, 153, 0.2) !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  font-size: 8px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0.4 !important;
  min-width: 14px !important;
  max-width: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 1) !important;
  color: #0a5c73 !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  opacity: 1 !important;
  border-color: rgba(15, 118, 153, 0.3) !important;
}

.slider-btn:active {
  transform: translateY(-50%) scale(0.98);
}

.prev-btn {
  left: 15px;
}

.next-btn {
  right: 15px;
}

/* Dots indicator */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(15, 118, 153, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #0f7699;
  transform: scale(1.2);
}

.dot:hover {
  background: #0a5c73;
  transform: scale(1.1);
}

/* Responsive para slider */
@media (max-width: 992px) {
  .slider-track .item.features-image {
    flex: 0 0 calc(50% - 10px);
  }
  
  .slider-container {
    padding: 0 50px;
  }
}

@media (max-width: 768px) {
  .slider-track .item.features-image {
    flex: 0 0 calc(100% - 0px);
  }
  
  .slider-container {
    padding: 0 40px;
  }
  
  /* Mantener tamaño original para motos vendidas en móviles */
  .sold-motorcycles-slider .item-wrapper .item-img {
    min-height: 180px !important;
    height: 180px !important;
  }
  
  .sold-motorcycles-slider .item-wrapper .item-img img {
    max-height: 180px !important;
  }
  
  .slider-btn {
    width: 10px !important;
    height: 10px !important;
    font-size: 6px !important;
    min-width: 10px !important;
    max-width: 10px !important;
    min-height: 10px !important;
    max-height: 10px !important;
  }
  
  .prev-btn {
    left: 5px;
  }
  
  .next-btn {
    right: 5px;
  }
}

/* Animación de fade para las tarjetas del slider */
.slider-track .item.features-image {
  animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ================================
   ESTILOS PARA LOGO MÓVIL MÁS GRANDE
   ================================ */

/* Media query para dispositivos móviles y tablets */
@media (max-width: 991px) {
  /* Logo más grande en móviles - SELECTORES MÁS ESPECÍFICOS */
  .navbar-logo img,
  .navbar .navbar-brand .navbar-logo img,
  .navbar-dropdown .navbar-brand .navbar-logo img,
  .logo-responsive {
    height: 6rem !important;
    max-height: 6rem !important;
    width: auto !important;
  }
  
  /* Hacer el navbar más alto para acomodar el logo grande */
  .navbar,
  .navbar-dropdown,
  .navbar-fixed-top {
    padding: 1.2rem 0 !important;
    min-height: auto !important;
  }
  
  /* Asegurar que el contenedor se adapte */
  .navbar-brand {
    height: auto !important;
  }
}

/* Para pantallas extra pequeñas (teléfonos muy pequeños) */
@media (max-width: 576px) {
  /* Logo aún más grande en móviles pequeños */
  .navbar-logo img,
  .navbar .navbar-brand .navbar-logo img,
  .navbar-dropdown .navbar-brand .navbar-logo img,
  .logo-responsive {
    height: 7rem !important;
    max-height: 7rem !important;
    width: auto !important;
  }
  
  /* Navbar más compacto en móviles pequeños */
  .navbar,
  .navbar-dropdown,
  .navbar-fixed-top {
    padding: 0.5rem 0 !important;
    min-height: auto !important;
  }
}

/* Forzar logo móvil con CSS específico usando atributo src */
@media screen and (max-width: 991px) {
  img[src*="logo-graned-alargado"] {
    height: 8rem !important;
    max-height: 8rem !important;
  }
}

@media screen and (max-width: 576px) {
  img[src*="logo-graned-alargado"] {
    height: 9rem !important;
    max-height: 9rem !important;
  }
}

/* ================================
   OCULTAR NAVBAR DE MOBIRISE Y CREAR UNO NUEVO
   ================================ */

/* Ocultar el navbar original de Mobirise */
.navbar.navbar-dropdown.navbar-fixed-top.navbar-expand-lg {
  display: none !important;
}

/* Nuevo navbar personalizado */
.custom-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  z-index: 1030;
  padding: 1rem 0;
}

/* Agregar padding al body para compensar el navbar fixed */
body {
  padding-top: 120px !important;
}

.custom-navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

.custom-logo {
  flex-shrink: 0;
}

.custom-logo img {
  height: 5rem;
  width: auto;
}

.custom-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 3.5rem;
  flex: 1;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: static;
  transform: none;
  transition: none;
}

.custom-menu li a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 22px;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  position: relative;
}

.custom-menu li a::after {
  content: '';
  position: absolute;
  right: -1.75rem;
  top: 50%;
  transform: translateY(-50%);
  height: 25px;
  width: 1px;
  background: #ddd;
}

.custom-menu li:last-child a::after {
  display: none;
}

.custom-menu li a .socicon-whatsapp {
  font-size: 18px;
  color: #25d366;
}

.custom-menu li a:hover {
  color: #0f7699;
}

.custom-whatsapp-btn {
  background: #25d366;
  color: white !important;
  padding: 12px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.custom-whatsapp-btn:hover {
  background: #128c7e;
  color: white !important;
  transform: translateY(-2px);
}

/* Hamburger menu button */
.custom-hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  order: 2;
}

.custom-hamburger span {
  width: 25px;
  height: 3px;
  background: #333;
  transition: 0.3s;
}

/* Responsive */
@media (max-width: 991px) {
  body {
    padding-top: 100px !important;
  }
  
  .custom-logo img {
    height: 4rem !important;
  }
  
  .custom-navbar {
    padding: 1rem 0;
  }
  
  .custom-navbar .container {
    flex-wrap: nowrap;
    position: relative;
  }
  
  .custom-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    gap: 1rem;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    justify-content: flex-start;
    order: 3;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
  }
  
  .custom-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  .custom-menu li a {
    font-size: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: block;
  }
  
  .custom-hamburger {
    display: flex;
  }
  
  .custom-whatsapp-btn {
    font-size: 18px;
    padding: 15px 25px;
    order: 1;
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 110px !important;
  }
  
  .custom-logo img {
    height: 4.5rem !important;
  }
  
  .custom-menu li a {
    font-size: 24px;
    padding: 15px 0;
  }
  
  .custom-whatsapp-btn {
    font-size: 20px;
    padding: 18px 30px;
    margin-top: 15px;
  }
}