<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {% block title %}<title>Market</title>{% endblock %}
    {% load static %}
</head>
<style>
    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        outline: none;
    }

    .header {
        background: #1d2124;
        color: white;
        padding: 20px 40px;
        display: flex;
        justify-content: space-between;
    }

    .link {
        color: white;
        text-decoration: none;
    }
    .links {
        display: flex;
        justify-content: space-between;
        gap: 20px;
    }
</style>
<body>
<div class="header">
    <a href="{% url 'main' %}" class="link">Главная</a>
    <div class="links">
        <a class="link" href="{% url 'services' %}">Товары</a>
    {% if user.is_authenticated %}
      <a class="link" href="{% url 'profile' %}">Профиль</a>
      <a class="link" href="{% url 'logout' %}">Выйти</a>
    {% else %}
      <a class="link" href="{% url 'register' %}">Регистрация</a>
      <a class="link" href="{% url 'login' %}">Вход</a>
    {% endif %}
    </div>
</div>
{% block content %}
{% endblock %}
</body>
</html>