/* style.css — полная версия для корпоративного сайта */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-text: #333333;
  --color-primary: #2c3e50;
  --color-accent: #3498db;
  --color-border: #e0e0e0;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(90%, 1200px);
  margin: 0 auto;
  padding: 0 1rem;
}

/* === Header & Navigation === */
header {
  background-color: var(--color-primary);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
}

.main-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  align-items: center;
}

.main-menu > li {
  position: relative;
}

.main-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0;
  display: block;
  transition: color 0.2s;
}

.main-menu a:hover,
.submenu a:hover {
  color: var(--color-accent);
}

/* === Submenu (dropdown) === */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 220px;
  z-index: 100;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  display: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s, transform 0.2s;
}

.submenu li {
  margin: 0;
}

.submenu a {
  color: var(--color-text);
  padding: 0.5rem 1rem;
  display: block;
  font-size: 0.95rem;
}

.menu-item.active > .submenu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* === Mobile styles for menu === */
@media (max-width: 768px) {
  .main-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    border-radius: var(--radius);
  }

  .main-menu > li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem;
  }

  .main-menu > li:last-child {
    border-bottom: none;
  }

  .submenu {
    position: static;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    padding: 0.5rem 0 0.5rem 1.5rem;
    border-radius: 0;
    min-width: auto;
    display: none;
    opacity: 1;
    transform: none;
  }

  .menu-item.active > .submenu {
    display: block;
  }

  .submenu a {
    color: white;
    padding: 0.3rem 0;
  }

  .submenu-toggle::after {
    content: " ▼";
    font-size: 0.7rem;
    opacity: 0.8;
  }

  .menu-item.active .submenu-toggle::after {
    content: " ▲";
  }
}

/* === Main content === */
main {
  flex: 1;
  padding: 2rem 0;
}

.page-title {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: var(--color-primary);
}

/* === Request form === */
.request-form {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.submit-btn {
  background-color: var(--color-accent);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:hover {
  background-color: #2980b9;
}

/* === Product catalog === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f0f0f0;
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.card-text {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.card-sku {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 0.75rem;
}

.add-to-cart {
  background: none;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.add-to-cart:hover {
  background: var(--color-accent);
  color: white;
}

/* === Footer === */
footer {
  background: #f5f5f5;
  padding: 1.5rem 0;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-top: auto;
}

/* === Login / Register pages === */
.login-form, .register-form {
  max-width: 500px;
  margin: 2rem auto;
}

/* === Responsive adjustments === */
@media (max-width: 480px) {
  .page-title {
    font-size: 1.5rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .submit-btn, .add-to-cart {
    width: 100%;
  }
}
