:root {
  --accent-color: #f27237;
}

[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

.img-tooltip-container {
  position: relative;
  margin-bottom: 0;
  width: 100%;
  opacity: 1;
  transform: none;
  /* Forzar que la imagen de la izquierda se renderice de forma independiente */
  contain: layout style paint;
  isolation: isolate;
}

.img-tooltip-container .loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  z-index: 1000;
}

.img-tooltip-container .loader:before {
  content: "";
  position: absolute;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid var(--accent-color);
  border-color: var(--accent-color) transparent var(--accent-color) transparent;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: animate-preloader 1s linear infinite;
}

@keyframes animate-preloader {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.img-hotspot {
  position: absolute;
  width: 30px;
  height: 30px;
  background: var(--accent-color);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.img-hotspot:hover {
  transform: translate(-50%, -50%) scale(1.2);
  background: #e05a2b;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.img-hotspot:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.img-tooltip {
  position: absolute;
  background: rgba(242, 114, 55, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
  transform: translate(-50%, 0);
  white-space: nowrap;
}

.img-hotspot:hover + .img-tooltip {
  opacity: 1;
}

/* Texto de instrucción para hotspots - versión discreta */
.hotspot-instruction {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(242, 114, 55, 0.15);
  backdrop-filter: blur(10px);
  color: #f27237;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(242, 114, 55, 0.2);
  border: 1px solid rgba(242, 114, 55, 0.3);
  transition: all 0.3s ease;
  animation: fadeInBounce 0.5s ease;
}

.hotspot-instruction:hover {
  background: rgba(242, 114, 55, 0.2);
  box-shadow: 0 4px 15px rgba(242, 114, 55, 0.3);
}

.hotspot-instruction i {
  font-size: 16px;
  animation: pointPulse 2s ease-in-out infinite;
}

.hotspot-instruction .bi-arrow-down-circle-fill {
  font-size: 14px;
  animation: bounceDown 1.5s ease-in-out infinite;
}

@keyframes fadeInBounce {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    pointer-events: none;
  }
}

@keyframes pointPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@keyframes bounceDown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

/* Versión móvil */
@media (max-width: 992px) {
  .hotspot-instruction {
    top: 10px;
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 20px;
  }
  
  .hotspot-instruction i {
    font-size: 14px;
  }
}

/* Versión móvil pequeña */
@media (max-width: 576px) {
  .hotspot-instruction {
    top: 8px;
    padding: 6px 14px;
    font-size: 11px;
    border-radius: 18px;
    gap: 6px;
  }
  
  .hotspot-instruction i {
    font-size: 13px;
  }
}

.repuesto-info {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: fadeInUp 0.3s ease forwards;
}

.repuesto-info.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.repuesto-info h3 {
  color: var(--accent-color);
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.repuesto-info h4 {
  margin-bottom: 20px;
  font-size: 1.4rem;
  color: #333;
}

/* Contenedor de imagen de repuesto con efecto zoom */
.repuesto-image-container {
  position: relative;
  overflow: hidden;
  margin: 20px auto;
  max-width: 100%;
  border-radius: 8px;
}

.repuesto-image-wrapper {
  position: relative;
  display: block;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s ease;
  outline: none;
}

.repuesto-image-wrapper:focus {
  outline: none;
}

.repuesto-image-wrapper:hover {
  transform: scale(1.02);
}

.repuesto-image-wrapper img {
  max-width: 100%;
  max-height: 300px;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
  width: 100%;
  height: auto;
}

/* Efecto hover: oscurece la imagen */
.repuesto-image-wrapper:hover img {
  transform: scale(1.05);
  filter: brightness(0.7);
}

/* Enlace de zoom sobre la imagen */
.repuesto-zoom-link {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(242, 114, 55, 0.7);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 10;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.repuesto-zoom-link:hover {
  background: rgba(242, 114, 55, 0.85);
  transform: translate(-50%, -50%) scale(1.05);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.repuesto-zoom-link i {
  font-size: 18px;
}

/* Mostrar el enlace de zoom al hacer hover */
.repuesto-image-wrapper:hover .repuesto-zoom-link {
  opacity: 1;
}

.no-image {
  padding: 40px;
  border-radius: 8px;
  margin: 20px auto;
  width: 100%;
  text-align: center;
  color: #666;
}

.default-message {
  color: #333;
  font-size: 1.2rem;
  text-align: center;
  padding: 20px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.logo {
  position: relative;
  margin: 20px 0 20px 40px;
  z-index: 997;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo.visible {
  opacity: 1;
  transform: translateY(0);
}

.logo img {
  max-height: 80px;
  width: auto;
}

.section-title {
  margin-top: 20px;
  margin-bottom: 3px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 996;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 3px;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  flex-wrap: wrap;
  padding: 0 15px;
  position: relative;
  z-index: 996;
}

.portfolio-filters.visible {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-filters li {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 4px;
  color: #666;
  transition: all 0.3s ease;
  font-weight: 500;
}

.portfolio-filters li:hover {
  color: var(--accent-color);
}

.portfolio-filters li.filter-active {
  color: var(--accent-color);
}

.main-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  transition: none;
  position: relative;
  z-index: 995;
}

.main-content.initial-state {
  flex-direction: column;
  align-items: center;
}

.main-content.initial-state .image-section {
  flex: 1;
  min-width: auto;
  max-width: 800px;
  width: 100%;
  transform: translateX(0);
  opacity: 1;
  margin-bottom: 0;
}

.main-content.initial-state .info-section {
  opacity: 0;
  transform: translateX(30px);
  pointer-events: none;
  display: none;
}

.image-section {
  flex: 1;
  min-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
  transform: translateX(0);
  opacity: 1;
  will-change: auto;
}

.info-section {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 20px;
  opacity: 0;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.main-content:not(.initial-state) .image-section {
  transform: none;
  max-width: 1100px;
  width: 100%;
  /* Evitar cualquier recarga visual */
  contain: layout style paint;
  transform: translate3d(0, 0, 0);
}

.main-content:not(.initial-state) .info-section {
  opacity: 1;
  pointer-events: auto;
  display: flex;
  /* Transición solo para la info section */
  transition: opacity 0.2s ease;
}

#repuesto-container {
  width: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: opacity 0.2s ease;
}

/* Efecto de fade out al cambiar contenido */
#repuesto-container.fade-out {
  opacity: 0;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

.btn-whatsapp {
  background-color: transparent;
  color: #25d366;
  border: 2px solid #25d366;
  padding: 8px 16px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  transition: all 0.3s ease;
  font-weight: 500;
  width: auto;
  min-width: 160px;
  font-size: 0.95rem;
  animation: float 2s ease-in-out infinite;
}

.btn-whatsapp:hover {
  background-color: #25d366;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 211, 102, 0.2);
  animation: none;
}

.btn-whatsapp i {
  font-size: 1.2rem;
}

@media (max-width: 992px) {
  .logo {
    margin: 15px 0 15px 20px;
  }

  .logo img {
    max-height: 60px;
  }

  .section-title {
    margin-top: 15px;
    margin-bottom: 0;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }

  .portfolio-filters {
    margin-top: 0;
    margin-bottom: 20px;
  }

  .portfolio-filters li {
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  .main-content {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
  }

  .image-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: auto;
  }

  .img-tooltip-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
  }

  .main-content:not(.initial-state) {
    flex-direction: column;
  }

  .main-content:not(.initial-state) .image-section {
    transform: none;
    max-width: 800px;
    width: 100%;
  }

  .main-content:not(.initial-state) .info-section {
    transform: translateY(0);
    opacity: 1;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto 0;
    order: 2;
    display: flex;
    pointer-events: auto;
  }

  .info-section {
    margin-top: 1rem;
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 576px) {
  .logo {
    margin: 10px 0 10px 15px;
  }

  .logo img {
    max-height: 50px;
  }

  .section-title {
    margin-top: 10px;
    margin-bottom: 0;
  }

  .section-title h2 {
    font-size: 1.3rem;
  }

  .portfolio-filters {
    gap: 10px;
    margin-top: 0;
    margin-bottom: 20px;
  }

  .portfolio-filters li {
    font-size: 0.8rem;
    padding: 5px 10px;
  }

  .main-content {
    padding: 0.5rem;
    max-width: 500px;
  }

  .img-tooltip-container {
    max-width: 450px;
  }

  .main-content:not(.initial-state) .image-section {
    max-width: 450px;
  }

  .main-content:not(.initial-state) .info-section {
    max-width: 350px;
    padding: 15px;
  }

  .info-section {
    max-width: 350px;
  }

  .repuesto-info h3 {
    font-size: 1.3rem;
  }

  .repuesto-info h4 {
    font-size: 1.1rem;
  }

  /* Ajustes para el botón de zoom en móviles */
  .repuesto-zoom-link {
    width: 40px;
    height: 40px;
  }

  .repuesto-zoom-link i {
    font-size: 16px;
  }

  /* Mostrar siempre el zoom en móviles (para mejor UX) */
  .repuesto-image-wrapper .repuesto-zoom-link {
    opacity: 0.8;
  }

  .repuesto-image-wrapper:active .repuesto-zoom-link {
    opacity: 1;
  }
}

.products.section {
  padding-top: 0;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.95);
  display: block;
}

#preloader .spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border: 6px solid var(--accent-color);
  border-color: var(--accent-color) transparent var(--accent-color) transparent;
  border-radius: 50%;
  animation: animate-preloader 1s linear infinite;
}

@keyframes animate-preloader {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

#categoria-imagen {
  max-width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s ease-out;
}

#categoria-imagen.loading {
  opacity: 0;
}

/*--------------------------------------------------------------*/
/* Estilos específicos para la página de repuestos - Espaciado mejorado */
/*--------------------------------------------------------------*/

/* SOBRESCRIBIR el padding-bottom de main.css que está causando mucho espacio */
.products.section .container.section-title {
  padding-bottom: 15px !important;
}

/* Espacio moderado entre el título Manual de Partes y los filtros */
.products.section .container.section-title:first-of-type {
  margin-bottom: 10px !important;
  padding-bottom: 10px !important;
}

.products.section .container.section-title:first-of-type h2 {
  margin-bottom: 5px !important;
}

/* Espacio moderado de los filtros */
.products.section .portfolio-filters {
  margin-top: 5px !important;
  margin-bottom: 15px !important;
}

/* Espacio reducido entre el texto "Haz click" y el contenido */
.products.section .container.section-title:last-of-type {
  margin-bottom: 5px !important;
  padding-bottom: 5px !important;
}

.products.section .container.section-title:last-of-type p {
  margin-top: 3px !important;
  margin-bottom: 3px !important;
  font-size: 1rem;
  color: #666;
  font-weight: 500;
}

/* Reducir espacio del contenido principal */
.products.section .main-content {
  margin-top: 5px !important;
}

/* Ajustes responsivos */
@media (max-width: 992px) {
  .products.section .container.section-title {
    padding-bottom: 12px !important;
  }
  
  .products.section .container.section-title:first-of-type {
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
  }
  
  .products.section .portfolio-filters {
    margin-top: 4px !important;
    margin-bottom: 12px !important;
  }
  
  .products.section .container.section-title:last-of-type {
    margin-bottom: 4px !important;
    padding-bottom: 4px !important;
  }
  
  .products.section .container.section-title:last-of-type p {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
  }
  
  .products.section .main-content {
    margin-top: 4px !important;
  }
}

@media (max-width: 576px) {
  .products.section .container.section-title {
    padding-bottom: 10px !important;
  }
  
  .products.section .container.section-title:first-of-type {
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
  }
  
  .products.section .portfolio-filters {
    margin-top: 3px !important;
    margin-bottom: 10px !important;
  }
  
  .products.section .container.section-title:last-of-type {
    margin-bottom: 3px !important;
    padding-bottom: 3px !important;
  }
  
  .products.section .container.section-title:last-of-type p {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    font-size: 0.9rem;
  }
  
  .products.section .main-content {
    margin-top: 3px !important;
  }
}

/*--------------------------------------------------------------*/
/* Estilos específicos para el header en la página de manual de partes */
/*--------------------------------------------------------------*/

/* Header fijo con fondo blanco para coincidir con el contenido */
.replacements-page .header {
  background-color: #ffffff !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: all 0.3s ease;
}

/* Header con línea divisoria cuando se hace scroll */
.replacements-page .header.scrolled {
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Asegurar que el header tenga z-index alto */
.replacements-page .header {
  z-index: 9999 !important;
}

/* Logo en el header */
.replacements-page .header .logo {
  position: relative !important;
  margin: 0 !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.replacements-page .header .logo img {
  max-height: 60px;
  width: auto;
}

/* Navegación en el header */
.replacements-page .header .navmenu {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Enlaces del menú */
.replacements-page .header .navmenu ul li a {
  color: #364d59 !important;
  transition: color 0.3s ease;
}

.replacements-page .header .navmenu ul li a:hover {
  color: var(--accent-color) !important;
}

/* Dropdown del menú */
.replacements-page .header .navmenu ul li.dropdown ul {
  background-color: #ffffff !important;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Enlaces del dropdown */
.replacements-page .header .navmenu ul li.dropdown ul li a {
  color: #364d59 !important;
}

.replacements-page .header .navmenu ul li.dropdown ul li a:hover {
  color: var(--accent-color) !important;
  background-color: #f8f9fa !important;
}

/* Botón de navegación móvil */
.replacements-page .header .mobile-nav-toggle {
  color: #364d59 !important;
}

/* Ajustar el contenido principal para el header fijo */
.replacements-page .main {
  padding-top: 80px;
}

/* Responsive para el header */
@media (max-width: 992px) {
  .replacements-page .header .logo img {
    max-height: 50px;
  }
  
  .replacements-page .main {
    padding-top: 80px;
  }
}

@media (max-width: 768px) {
  .replacements-page .main {
    padding-top: 90px;
  }
}

@media (max-width: 576px) {
  .replacements-page .header .logo img {
    max-height: 40px;
  }
  
  .replacements-page .main {
    padding-top: 100px;
  }
}

@media (max-width: 480px) {
  .replacements-page .main {
    padding-top: 110px;
  }
} 