/* Общие настройки */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 900px;
    margin: 40px auto;
    background: linear-gradient(135deg, #1e1e2f, #252538);
    color: #eee;
    min-height: 100vh;
    padding: 0 20px;
}

.header {
  background-color: #222;
  padding: 15px 20px;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #ffcc00;
}

/* Контейнер с товарами */
.items {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Элемент товара */
.items__item {
    background: #2c2c44;
    box-shadow: 0 6px 12px rgb(0 0 0 / 0.6);
    padding: 20px 24px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: default;
}

.items__item:hover {
    box-shadow: 0 12px 24px rgb(0 0 0 / 0.8);
    transform: translateY(-4px);
}

/* Информация о товаре */
.items__info {
    max-width: 650px;
}

.items__title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #58a6ff;
    text-shadow: 0 2px 5px rgba(88, 166, 255, 0.5);
}

.items__details {
    font-size: 1rem;
    line-height: 1.5;
    color: #bbb;
}

/* Изображения */
.items__images {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.items__image {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.items__image:hover {
    border-color: #58a6ff;
    transform: scale(1.05);
}

/* Кнопки */
.items__btn {
    background: #e55353;
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    align-self: center;
    user-select: none;
    box-shadow: 0 5px 15px rgba(229, 83, 83, 0.7);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.items__btn:hover {
    background: #bb3f3f;
    box-shadow: 0 7px 20px rgba(187, 63, 63, 0.9);
}

#result {
    margin-bottom: 24px;
    font-weight: 700;
    color: #55bb55;
    text-align: center;
    font-size: 1.1rem;
}

/* Ссылка */
.link {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-top: 24px;
    color: #58a6ff;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: #1c3d7a;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20, 20, 30, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal[aria-hidden="false"] {
    display: flex;
}

.modal__content {
    background: #29294d;
    padding: 30px 35px;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    text-align: center;
    color: #eee;
}

.modal__content h2 {
    margin-bottom: 16px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #58a6ff;
}

.modal__content p {
    font-size: 1.1rem;
    margin-bottom: 28px;
    color: #ccc;
}

.modal__buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.items__btn--cancel {
    background: #777;
    box-shadow: 0 5px 15px rgba(119, 119, 119, 0.6);
}

.items__btn--cancel:hover {
    background: #555;
    box-shadow: 0 7px 20px rgba(85, 85, 85, 0.9);
}

@media (max-width: 600px) {
  .nav {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  .nav-link {
    font-size: 1.2rem;
  }
}