:root {
    --primary-color: #3498db; /* Синий */
    --secondary-color: #2ecc71; /* Зеленый */
    --background-color: #f4f6f8;
    --text-color: #333;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px var(--shadow-color);
}

/* Added styles for header content layout */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header nav {
   /* Adjust navigation if needed, maybe remove margin-top */
   margin: 0 20px; /* Add some space around nav */
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0; /* Removed margin-top */
}

header nav ul li {
    display: inline;
    margin: 0 15px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #ecf0f1; /* Светло-серый */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Адаптивная сетка */
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto; /* Центрирование */
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px var(--shadow-color);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.product-card img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.product-card h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-card .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.product-card .description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1; /* Allows description to take available space */
}

.product-card button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.product-card button:hover {
    background-color: #27ae60; /* Темнее зеленый */
    transform: scale(1.05);
}

footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: 20px;
    background-color: #e9ecef;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
}

/* Removed Registration Form Styles */

/* Added Header Login Form Styles */
.header-login-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-login-form input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.header-login-form button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.header-login-form button:hover {
    background-color: #27ae60; /* Darker green */
} 