body {
  font-family: 'Georgia', serif;
  background: #faf5f0;
  color: #3c1f1f;
  margin: 0;
  padding: 0;
}

header {
  background: #611411;
  color: white;
  padding: 20px;
}

header h1 {
  margin: 0;
}

.lang-switch {
  font-size: 14px;
  text-align: right;
  margin-top: 10px;
}

.lang-switch button {
  background: transparent;
  color: white;
  border: none;
  margin-left: 10px;
  cursor: pointer;
  font-weight: bold;
}

main {
  padding: 20px;
}

h2 {
  border-bottom: 2px solid #611411;
  padding-bottom: 5px;
}

.wine-container,
.grape-container {
  display: flex;
  gap: 20px;
  justify-content: center;   /* Центрируем */
  flex-wrap: wrap;           /* Разрешаем перенос */
}

.lang-currency-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 10px;
  padding: 0 30px 5px 30px;
}

.lang-switch button {
  background: transparent;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  padding: 3px 6px;
  height: 30px;
  line-height: 30px;
}

#currency-select {
  background-color: #611411;
  color: white;
  border: 1px solid white;
  border-radius: 4px;
  font-size: 13px;
  font-family: Georgia, serif;
  height: 30px;
  padding: 0 6px;
  width: 65px;
  box-sizing: border-box;
  margin-top: 1px;
}

/* Вино — оставляем как есть */
.wine-item {
  background: white;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  flex: 0 0 20%;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 550px;
  transition: transform 0.3s ease;
  overflow: hidden;
  position: relative;
}

/* Виноград — отдельно и компактно */
.grape-item {
  background: white;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  flex: 0 0 15%;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: auto;
  transition: transform 0.3s ease;
  overflow: hidden;
  position: relative;
}

/* Анимация при наведении — для обеих */
.wine-item:hover, .grape-item:hover {
  transform: scale(1.05);
}

/* Картинки вина — как было */
.wine-item img {
  max-height: 300px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
  
}

/* Картинки винограда — аккуратные и ниже */
.grape-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
  border-radius: 6px;
}

/* --- Общий стиль legend-text --- */
.details, .legend-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
  font-size: 14px;
  background: #f8f1ed;
  padding: 0 10px;
  border-radius: 6px;
  margin-top: 10px;
}

.legend-text.show {
  padding: 10px;
  max-height: none;
  overflow: visible;
}

/* --- Блоки внутри легенды --- */
.legend-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 25px 0;
  flex-wrap: wrap;
  background: #f8f1ed;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.05);
}

/* Чередование направления */
.legend-block.left-image {
  flex-direction: row;
}

.legend-block.right-image {
  flex-direction: row-reverse;
}

/* Изображение */
.legend-img {
  width: 45%;
  max-width: 420px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.15);
}

/* Текст */
.legend-text-paragraph {
  width: 50%;
  font-size: 16px;
  line-height: 1.7;
  text-align: justify;
  color: #3c1f1f;
  font-family: Georgia, serif;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .legend-block {
    flex-direction: column !important;
    text-align: center;
  }

  .legend-img,
  .legend-text-paragraph {
    width: 100%;
  }
}

.details.show {
  max-height: 500px;
  padding: 10px;
  overflow: visible;
}

button {
  background: #611411;
  color: white;
  border: none;
  padding: 6px 10px;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

button:hover {
  background: #3d0f0f;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px; /* Равномерные отступы между всеми кнопками */
}

nav a,
.login-button,
.client-name {
  background-color: #611411;
  color: white;
  padding: 8px 14px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.2s;
  display: inline-block;
}

nav a:hover,
.login-button:hover,
.client-name:hover {
  background-color: #831b1b;
}

.client-access {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.client-menu {
  position: relative;
}

.client-dropdown {
  position: absolute;
  top: 40px;
  left: 0;
  background: #611411;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 4px;
  display: none;
  z-index: 999;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.client-dropdown a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 8px 12px;
}

.client-dropdown a:hover {
  background-color: #831b1b;
}

form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 16px;
}

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

form button[type="submit"] {
  width: 100%;
  background-color: #611411;
  color: white;
  padding: 10px;
  border: none;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
}

#cart-items table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#cart-items th, #cart-items td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: center;
}

footer {
  font-family: Georgia, serif;
  font-size: 14px;
  background: #611411;
  color: white;
  text-align: center;
  padding: 30px;
  margin-top: 30px;
}

footer a {
  color: white;
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 14px;
}

footer a:hover {
  text-decoration: underline;
}

footer div {
  font-family: Georgia, serif;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .wine-container, .grape-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .wine-item, .grape-item {
    flex: 0 0 45%;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .wine-item, .grape-item {
    flex: 0 0 90%;
  }
}
/* === СТИЛИЗАЦИЯ SELECT (выбор страны и города) === */
select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #faf5f0;
  color: #3c1f1f;
  font-size: 16px;
  box-sizing: border-box;
}

/* Анимация при наведении на Select */
select:hover {
  border-color: #611411;
}
/* === СТИЛИЗАЦИЯ ФОРМ === */

/* Общий стиль для всех инпутов, select и textarea */
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 16px;
}

/* Стилизация выпадающих списков */
select {
  background-color: #faf5f0;
  color: #3c1f1f;
  height: 45px;
}

/* Кнопки Pay и Reset */
#payButton, #resetButton {
  width: 100%;
  background-color: #611411;
  color: white;
  padding: 12px;
  border: none;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 10px;
}

#payButton:hover, #resetButton:hover {
  background-color: #3d0f0f;
}

/* Кнопки для админки, формы и навигации */
button {
  background: #611411;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

button:hover {
  background: #3d0f0f;
}

/* === Адаптивность === */
@media (max-width: 768px) {
  form {
    margin-bottom: 20px;
  }
}
#main-stamp {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    opacity: 0.9;
}

#main-stamp:hover {
    transform: scale(1.1); /* Эффект увеличения */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Эффект тени */
    opacity: 1; /* Чуть более яркий при наведении */
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

#main-stamp {
    animation: pulse 2s infinite; /* Легкая пульсация */
}

#global-sold-counter {
  display: inline-flex;
  justify-content: center;
  background: #fff;
  padding: 12px 25px;
  border: 2px solid #611411;
  border-radius: 8px;
  box-shadow: inset 0 0 8px rgba(97, 20, 17, 0.3), 0 0 10px rgba(97, 20, 17, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#global-sold-counter:hover {
  transform: scale(1.1);
  box-shadow: inset 0 0 10px rgba(97, 20, 17, 0.4), 0 0 15px rgba(97, 20, 17, 0.5);
}

#global-sold-counter span {
  font-size: 28px;
  font-weight: bold;
  color: #611411;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  padding: 0 4px;
  border-right: 1px solid #611411;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

#global-sold-counter span:last-child {
  border-right: none;
}