diff --git a/tienda/templates/tienda/home.html b/tienda/templates/tienda/home.html
index ff4e691..4465721 100644
--- a/tienda/templates/tienda/home.html
+++ b/tienda/templates/tienda/home.html
@@ -118,6 +118,13 @@
font-size: 1.1rem;
opacity: 0.9;
}
+
+ @media (max-width: 767.98px) {
+ .hero-section h1 {
+ text-align: center;
+ text-wrap: balance;
+ }
+ }
{% endblock %}
diff --git a/tienda/tests.py b/tienda/tests.py
index be787d8..2e01718 100644
--- a/tienda/tests.py
+++ b/tienda/tests.py
@@ -1363,6 +1363,21 @@ class EndpointViewTests(TestCase):
self.assertEqual(response.status_code, 200)
self.assertContains(response, 'site-title-mobile d-md-none')
self.assertContains(response, 'site-title-desktop')
+ def test_home_mobile_welcome_title_centered(self):
+ response = self.client.get(reverse("home"))
+ html = response.content.decode()
+ media_idx = html.find("@media (max-width: 767.98px)")
+ self.assertNotEqual(media_idx, -1)
+
+ rule_idx = html.find(".hero-section h1", media_idx)
+ self.assertNotEqual(rule_idx, -1)
+
+ block_end_idx = html.find("}", rule_idx)
+ self.assertNotEqual(block_end_idx, -1)
+ rule_block = html[rule_idx:block_end_idx]
+
+ self.assertIn("text-align: center", rule_block)
+ self.assertIn("text-wrap: balance", rule_block)
def test_login_required_endpoints_redirect_anonymous(self):
secured_get_routes = [