/* Файл: style.css */
body {
    margin: 0;
    font-family: sans-serif;
    line-height: 1.6;
}

.container {
    width: 100%;
    margin: 0 auto;
    max-width: 1200px;
    position: fixed;
}

.navbar2 {
  overflow: hidden;
  background-color: #333;
  position: fixed;
  bottom: 0;
  width: 100%;
}

.navbar2 a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.navbar2 a:hover {
  background: #ddd;
  color: black;
}


/* Navbar */
.navbar {
    background-color: #333;
    color: white;
    padding: 3rem 0;
    position: fixed; /* Фиксированное меню */
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.hamburger-menu {
    display: none; /* Скрываем по умолчанию на больших экранах */
    cursor: pointer;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: white;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
}

.nav-links a:hover {
    background-color: #555;
    border-radius: 5px;
}

/* Hero Section */
.hero {
    padding-top: 80px; /* Отступ от фиксированного меню */
    text-align: center;
    background-color: #f4f4f4;
    padding-bottom: 50px;
}

.video-container {
    margin-top: 30px;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Slider */
.slider-container {
    position: relative;
    margin-top: 30px;
    overflow: hidden;
    max-width: 800px; /* Ограничиваем ширину слайдера */
    margin-left: auto;
    margin-right: auto;
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider img {
    width: 100%;
    flex-shrink: 0; /* Предотвращаем сжатие изображений */
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* Products */
.products {
    padding: 50px 0;
}

.products h2 {
    text-align: center;
    margin-bottom: 30px;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-card img {
    max-width: 100%;
    height: 200px; /* Фиксированная высота для изображений */
    object-fit: cover; /* Масштабирование с сохранением пропорций */
    margin-bottom: 15px;
}

.product-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.product-card p {
    margin-bottom: 10px;
}

.add-to-cart {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.add-to-cart:hover {
    background-color: #45a049;
}

/* Reviews */
.reviews {
    background-color: #f9f9f9;
    padding: 50px 0;
}

.reviews h2 {
    text-align: center;
    margin-bottom: 30px;
}

#review-list {
    margin-bottom: 30px;
}

.review {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.review:last-child {
    border-bottom: none;
}

.add-review-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    box-sizing: border-box; /* Учитывает padding и border в общей ширине */
    min-height: 100px;
}

.add-review-form button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.add-review-form button:hover {
    background-color: #0056b3;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
    position: fixed;
}

/* Modal for Login/Registration */
.modal {
    display: none; /* По умолчанию скрыто */
    position: fixed; /* Важно для центрирования */
    z-index: 1001; /* Поверх navbar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* Центрирование по вертикали */
    padding: 40px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: center;
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}

#login-form, #register-form {
    margin-top: 20px;
}

#login-form input, #register-form input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#login-form button, #register-form button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

#login-form button:hover, #register-form button:hover {
    background-color: #0056b3;
}

.toggle-form {
    margin-top: 20px;
    font-size: 0.9rem;
}

.toggle-form a {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.toggle-form a:hover {
    text-decoration: underline;
}

.error {
    color: red;
    margin-top: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hamburger-menu {
        display: block; /* Показываем гамбургер на малых экранах */
    }

    .nav-links {
        display: none; /* Скрываем ссылки по умолчанию */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Под navbar */
        background-color: #333;
        left: 0;
    }

    .nav-links.active {
        display: flex; /* Показываем ссылки при активации */
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .hero {
        padding-top: 70px; /* Adjust for smaller navbar */
    }

    .modal-content {
        margin: 20% auto;
    }
}
