/* Taxonomy Page Styles */

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.filter-contact-mobile {
  display: none;
}

@media (max-width: 767px) {
  .filter-contact-mobile {
    display: block;
    margin-bottom: 40px !important;
  }
}

.taxonomy-container {
  padding-bottom: 60px;
}

.taxonomy-description {
  margin-bottom: 30px;
}

.taxonomy-description p {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

#productos-mas-vendidos h2 {
  font-family: "Roboto", Sans-serif;
  font-size: 23px;
  font-weight: 600;
}

/* Main Wrapper */
.taxonomy-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* Filters Panel */
.filters-panel {
  flex: 0 0 250px;
  background-color: #f8f9fa;
  border-radius: 8px;
  height: fit-content;
  top: 20px;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.filters-title {
  background-color: #4b4f58;
  font-size: 15px;
  border-radius: 10px 10px 0 0;
  padding: 10px 0 !important;
  margin-top: 0 !important;
  margin-bottom: 20px !important;
  text-align: center;
  color: white;
  width: 100%;
}

/* Filter Group */
.filter-group {
  margin-bottom: 20px;
  padding: 0 20px;
}

.filter-group:first-of-type {
  padding-top: 20px;
}

.filter-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  background-color: white;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.filter-select:hover,
.filter-input:hover {
  border-color: #007bff;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Contact Form */
.filter-contact {
  margin-top: 40px;
  background-color: #0170b9;
  padding: 1.25rem;
  margin: 40px 0 0 0;
  border-radius: 8px;
  border-top: 40px solid #ffffff;
}

.filter-contact h4 {
  color: white;
  font-size: 16px;
  margin: 0 0 5px 0;
  font-weight: 600;
}

.btn-contactanos {
  background-color: #00bc10;
  color: #ffffff !important;
  border-radius: 25px;
  padding: 1rem 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none !important;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 12.5rem;
  margin: auto;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-contactanos i {
  margin-right: 5px;
}

.filter-contact p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  margin: 0 0 15px 0;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-form input {
  padding: 10px 12px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  background-color: white;
  color: #333;
}

.contact-form input::placeholder {
  color: #999;
}

.contact-form input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.btn-enviar {
  background-color: white;
  color: #007bff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 13px;
}

.btn-enviar:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

/* Productos Main */
.productos-main {
  flex: 1;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

/* Producto Item */
.producto-item {
  background-color: #ebf0fa;
  border: 2px solid #4b4f58;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.producto-item.fade-in {
  animation: fadeInUp 0.5s ease-out;
}

.producto-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.producto-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.producto-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.producto-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  padding: 15px;
  margin: 0;
  flex-grow: 1;
  align-items: center;
  min-height: 50px;
  line-height: 1.4;
  text-align: center;
}

.btn-ver-mas {
  display: inline-block;
  background-color: #0170b9;
  color: white !important;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  margin: 0 auto 20px auto;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
  text-decoration: none !important;
}

/* No Productos */
.no-productos {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 16px;
}

/* Loading Message */
.loading-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #007bff;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Error Message */
.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #d32f2f;
  font-size: 16px;
}

/* Ver Más Container */
.ver-mas-container {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.btn-ver-mas-productos {
  background-color: #0170b9;
  color: white;
  border: none;
  padding: 12px 40px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-ver-mas-productos:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-ver-mas-productos.loading {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ver-mas-productos.loading::after {
  content: " ...cargando";
}

/* Responsive */
@media (max-width: 1024px) {
  .taxonomy-wrapper {
    gap: 20px;
  }

  .filters-panel {
    flex: 0 0 250px;
  }

  .productos-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
}

/* Utility Classes */
.flex {
  display: flex;
}

.gap-10 {
  gap: 10px;
}
.gap-20 {
  gap: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Brands Carousel Section */
.home-brands-carousel-section {
  width: 100%;
  background-color: #f3f4f6 !important;
  padding: 2rem 0 !important;
}

.brands-description {
  text-align: center;
  font-family: Roboto, sans-serif;
  font-size: 25px;
  font-style: normal;
  font-weight: 300;
  line-height: 30px;
  margin-bottom: 30px;
}

.home-brands-carousel {
  margin: 0;
  position: relative;
  background: transparent !important;
}

.brand-carousel-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
}

.brand-carousel-item img {
  max-width: 100%;
  height: 180px;
  display: block;
}

/* Brands Carousel Navigation */
.home-brands-carousel .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
}

.home-brands-carousel .owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: all;
  background-color: rgba(59, 130, 246, 0.9);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.home-brands-carousel .owl-nav button:first-child {
  left: -20px;
}

.home-brands-carousel .owl-nav button:last-child {
  right: -20px;
}

.home-brands-carousel .owl-nav button:hover {
  background-color: #2563eb;
}

.home-brands-carousel .owl-nav button:focus {
  outline: none;
}

/* Parts Carousel Section */
.home-parts-section {
  width: 100%;
  padding: 60px 0;
  font-family: "Roboto", Sans-serif;
  font-size: 17px;
  font-weight: 600;
  background-color: white;
  padding-bottom: 1rem;
}

.home-parts-carousel {
  margin: 0;
  position: relative;
}

.parts-item {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.parts-item img {
  width: 100%;
  height: 280px;
  display: block;
  object-fit: cover;
}

.parts-item-image {
  width: 126px !important;
  height: auto !important;
}

/* Parts Carousel Navigation */
.home-parts-carousel .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
}

.home-parts-carousel .owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: all;
  background-color: rgba(59, 130, 246, 0.9);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.home-parts-carousel .owl-nav button:first-child {
  left: -20px;
}

.home-parts-carousel .owl-nav button:last-child {
  right: -20px;
}

.home-parts-carousel .owl-nav button:hover {
  background-color: #2563eb;
}

.home-parts-carousel .owl-nav button:focus {
  outline: none;
}
/* Cuadros Azules */
.cuadros-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
}

.cuadro-azul {
  background-color: #0170b9;
  color: white;
  height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 150px;
  font-family: Roboto, sans-serif;
}

.cuadro-azul a {
  margin: 0;
  font-size: 30px;
  font-style: normal;
  font-weight: 600;
  color: #ffffff !important;
  text-decoration: none !important;
}
.repuestos h2 {
  font-family: Roboto, sans-serif;
  font-size: 25px;
  font-style: normal;
  font-weight: 600;
  line-height: 30px;
  max-width: 80%;
  margin: 0 auto;
  padding-bottom: 20px;
}
.repuestos * {
  max-width: 80%;
  margin: 0 auto;
}
.text-distribuidor-official {
  font-family: Roboto, sans-serif;
  font-size: 25px;
  font-style: normal;
  font-weight: 600;
  line-height: 30px;
  max-width: 80%;
  margin: 0 auto;
}

.taxonomy-wrapper-container {
  padding-top: 60px;
  background-color: #efefef;
}

@media (min-width: 768px) {
  .cuadros-container {
    flex-direction: row;
  }

  .cuadro-azul {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .taxonomy-wrapper {
    flex-direction: column;
  }

  .filters-panel {
    flex: 1;
    position: static;
  }

  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .producto-image {
    height: 150px;
  }

  /* Carousel responsive styles */
  .home-brands-carousel .owl-nav button,
  .home-parts-carousel .owl-nav button {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .parts-item-image {
    width: 100px !important;
  }

  .brand-carousel-item {
    height: 120px;
    padding: 10px;
  }

  .brand-carousel-item img {
    object-fit: contain;
  }

  .cuadro-azul {
    height: auto;
    min-height: unset;
    padding: 2.5rem 0;
  }
}

@media (max-width: 480px) {
  .filters-panel {
    padding: 20px 15px;
  }

  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .btn-ver-mas-productos {
    width: 100%;
  }

  .brand-carousel-item {
    height: 100px;
    padding: 8px;
  }

  .home-brands-carousel .owl-nav button,
  .home-parts-carousel .owl-nav button {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .home-parts-section {
    padding: 40px 0;
    font-size: 15px;
    padding-bottom: 1rem;
  }

  .parts-item {
    min-height: 150px;
  }

  .brand-carousel-item {
    height: 120px;
  }

  .parts-item-image {
    width: 80% !important;
    height: auto !important;
  }
}
