/* Correcciones exclusivas de las páginas de categoría en móvil. */
@media (max-width: 767px) {
  body#category #category-description img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  #subcategories ul {
    margin-left: -5px;
  }

  #subcategories ul li {
    width: calc(50% - 10px);
    min-width: 0;
    margin: 5px;
  }
}
@media (max-width: 767px) {
  body#category #products .products > .js-product.product {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
  }
}

/* Marco uniforme para las imágenes de subcategorías. */
body#category #subcategories ul li .subcategory-image a {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 9px;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid #D0121A;
  border-radius: 8px;
  box-sizing: border-box;
}

body#category #subcategories ul li .subcategory-image a picture {
  display: block;
  width: 100%;
  height: 100%;
}

body#category #subcategories ul li .subcategory-image a img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

body#category #subcategories ul li:hover .subcategory-image a {
  padding: 9px;
  border: 2px solid #B20F17;
}

/* Nombres de subcategoría: azul accesible sobre fondo blanco. */
body#category #subcategories ul li .subcategory-name {
  color: #0B3D91;
}

body#category #subcategories ul li .subcategory-name:hover {
  color: #082F6F;
}

/* Imágenes de las descripciones de categoría: ancho adaptable sin deformación. */
body#category #category-description img,
body#category .category-additional-description img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
}

/* Footer: imagen de coche completa y proporcional en móvil. */
@media (max-width: 767px) {
  .footer-container {
    padding-bottom: 56.26vw;
    background-size: 100% auto;
    background-position: center bottom;
  }
}
