diff --git "a/app.py" "b/app.py" --- "a/app.py" +++ "b/app.py" @@ -282,6 +282,13 @@ def catalog(): display: block; margin-top: 5px; } + .product-price .discount { + font-size: 0.9rem; + color: #2ecc71; + font-weight: 500; + display: block; + margin-top: 5px; + } .product-description { font-size: 0.85rem; color: #666; @@ -322,6 +329,23 @@ def catalog(): background-color: #27ae60; box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4); } + .favorite-button { + position: absolute; + top: 10px; + left: 10px; + background: none; + border: none; + font-size: 1.5rem; + cursor: pointer; + color: #666; + transition: color 0.3s ease; + } + .favorite-button.favorited { + color: #e63946; + } + .favorite-button:hover { + color: #e63946; + } #cart-button { position: fixed; bottom: 80px; @@ -474,6 +498,17 @@ def catalog(): font-size: 0.75rem; font-weight: 500; } + .discount-badge { + position: absolute; + top: 40px; + right: 10px; + background-color: #2ecc71; + color: white; + padding: 5px 10px; + border-radius: 15px; + font-size: 0.75rem; + font-weight: 500; + }
@@ -500,6 +535,9 @@ def catalog(): data-name="{{ product['name']|lower }}" data-description="{{ product['description']|lower }}" data-category="{{ product.get('category', 'Без категории') }}"> + {% if product.get('photos') and product['photos']|length > 0 %}${item.price} с × ${item.quantity} (Цвет: ${item.color})
-${item.quantity >= item.min_wholesale ? 'Оптовая цена' : 'Розничная цена'}
+${item.quantity >= item.min_wholesale ? 'Оптовая цена' : (item.discount ? 'Скидка ' + item.discount + '%' : 'Розничная цена')}