diff --git a/website_sale_aplicoop/static/src/css/components/product-card.css b/website_sale_aplicoop/static/src/css/components/product-card.css index fd36a45..d3d6671 100644 --- a/website_sale_aplicoop/static/src/css/components/product-card.css +++ b/website_sale_aplicoop/static/src/css/components/product-card.css @@ -36,13 +36,14 @@ } .product-img-cover { - max-height: 120px; + height: 120px; width: 100%; object-fit: cover; border-radius: 8px 8px 0 0; box-shadow: 0 2px 8px rgba(40, 39, 39, 0.09); background: #f3f3f3; display: block; + flex-shrink: 0; } .product-card .card-body { @@ -50,7 +51,7 @@ flex-direction: column; height: 100%; flex-grow: 1; - padding: 0.6rem 0.7rem 0.7rem 0.7rem; + padding: 0.4rem 0.55rem 0.5rem; position: relative; background: linear-gradient(135deg, rgba(0, 123, 255, 0.07) 0%, rgba(0, 123, 255, 0.04) 100%); transition: background 0.3s; @@ -67,13 +68,13 @@ .product-card .card-title { flex-grow: 1; - margin: 0 0 0.15rem 0; + margin: 0 0 0.1rem 0; min-height: auto; display: block; word-wrap: break-word; overflow-wrap: break-word; - font-size: 1.08rem !important; - line-height: 1.1; + font-size: 1rem !important; + line-height: 1.15; text-align: center; font-weight: 600; color: #1a202c; @@ -81,9 +82,9 @@ } .product-card .card-text { - margin-bottom: 0.12rem; + margin-bottom: 0.08rem; text-align: center; - font-size: 1rem; + font-size: 0.95rem; } .product-card .card-text strong { @@ -97,19 +98,19 @@ text-align: center; color: #4a5568; font-weight: 400; - margin-bottom: 0.12rem; - font-size: 0.92rem !important; + margin-bottom: 0.08rem; + font-size: 0.85rem !important; } .product-tags { text-align: center; display: flex; flex-wrap: wrap; - gap: 0.18rem; + gap: 0.12rem; justify-content: center; font-weight: 400; - font-size: 1.1rem !important; - margin: 0; + font-size: 1rem !important; + margin: 0 0 0.08rem 0; padding: 0; } @@ -129,15 +130,15 @@ .card-body p.card-text { text-align: center; - margin-bottom: 0.6rem; - min-height: 1.7rem; + margin-bottom: 0.35rem; + min-height: 1.5rem; display: flex; align-items: center; justify-content: center; background-color: var(--primary-color, #007bff); color: #fff; border-radius: 0.18rem; - font-size: 1.05rem; + font-size: 0.98rem; } .card-body p.card-text strong { @@ -160,53 +161,73 @@ .product-img-placeholder { height: 120px; width: 100%; - object-fit: cover; border-radius: 8px 8px 0 0; - background: #f3f3f3 - url('data:image/svg+xml;utf8,Sin imagen') - no-repeat center center; - display: block; + background: #f3f3f3; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + color: #ccc; } -/* Responsive: mejorar altura y espaciado en móvil */ -@media (max-width: 600px) { +/* Responsive: tablet (≤768px) — compresión moderada */ +@media (max-width: 768px) { + .product-card .product-image, + .product-img-cover, + .product-img-fixed, + .product-img-placeholder { + height: 90px; + } + .product-card .card-body { + padding: 0.35rem 0.45rem 0.4rem; + } + .card-body p.card-text { + margin-bottom: 0.25rem; + min-height: 1.4rem; + } +} + +/* Responsive: móvil (≤480px) — compresión máxima */ +@media (max-width: 480px) { .product-card { - padding: 0.25rem; - border-radius: 8px; + padding: 0.15rem; + border-radius: 6px; } .product-card .product-image, .product-img-cover, .product-img-fixed, .product-img-placeholder { - height: 70px; - max-height: 70px; - min-height: 70px; - border-radius: 6px 6px 0 0; + height: 60px; + border-radius: 5px 5px 0 0; } .product-card .card-body { - padding: 0.4rem 0.4rem 0.5rem 0.4rem; + padding: 0.25rem 0.3rem 0.3rem; } .product-card .card-title { - font-size: 0.98rem !important; - margin-bottom: 0.08rem; + font-size: 0.82rem !important; + line-height: 1.15; + margin-bottom: 0.05rem; } .product-card .card-text { - font-size: 0.92rem; + font-size: 0.8rem; } .badge-km { - font-size: 0.58rem !important; - padding: 0.13rem 0.22rem !important; + font-size: 0.55rem !important; + padding: 0.1rem 0.18rem !important; } .product-tags { - font-size: 0.95rem !important; + font-size: 0.82rem !important; + gap: 0.08rem; + margin-bottom: 0.05rem; } .card-body p.card-text { - min-height: 1.1rem; - font-size: 0.95rem; - margin-bottom: 0.3rem; + min-height: 1rem; + font-size: 0.85rem; + margin-bottom: 0.2rem; } .product-card .product-supplier { - font-size: 0.82rem !important; + font-size: 0.72rem !important; + margin-bottom: 0.05rem; } }