/* Современный дизайн для аптеки "Источник здоровья" */
/* Бело-зеленая цветовая схема */

:root {
  --primary-green: #2E7D32;
  --light-green: #4CAF50;
  --accent-green: #66BB6A;
  --background-white: #FFFFFF;
  --light-gray: #F8F9FA;
  --text-dark: #2C3E50;
  --text-light: #6C757D;
  --border-light: #E9ECEF;
  --shadow: rgba(0, 0, 0, 0.1);
  --gradient-green: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-white);
  overflow-x: hidden;
}

/* Контейнер страницы */
#page {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--background-white);
  box-shadow: 0 0 20px var(--shadow);
  border-radius: 0;
  min-height: 100vh;
}


/* Логотип */
#u228 {
  text-align: center;
  margin: 2rem auto;
  padding: 0 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

#u228_img {
  max-width: 400px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 8px 25px var(--shadow);
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
}

#u228_img:hover {
  transform: scale(1.05);
}

/* Описание */
#u197-4 {
  background: var(--light-gray);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 10px;
  border-left: 5px solid var(--primary-green);
}

#u197-4 p {
  font-size: 1.2rem;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.8;
}

/* Поиск */
#u331 {
  background: var(--background-white);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--shadow);
  text-align: center;
}

/* Навигация */
#menuu130 {
  background: var(--background-white);
  border: none;
  box-shadow: 0 2px 10px var(--shadow);
  border-radius: 10px;
  margin: 2rem 0;
  padding: 0;
  overflow: hidden;
}

.MenuItemContainer {
  flex: 1;
}

.MenuItem {
  background: var(--background-white);
  color: var(--text-dark);
  text-decoration: none;
  padding: 1rem 2rem;
  transition: all 0.3s ease;
  border: none;
  border-radius: 0;
  position: relative;
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

.MenuItem:hover {
  background: var(--light-green);
  color: white;
  transform: translateY(-2px);
}

.MenuItem.MuseMenuActive {
  background: var(--primary-green);
  color: white;
}


/* Таблица товаров */
#u2255 {
  margin: 2rem 0;
  padding: 0 1rem;
}

.tg {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--background-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px var(--shadow);
}

.tg thead {
  background: var(--gradient-green);
}

.tg th {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1.5rem 1rem;
  text-align: left;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tg td {
  padding: 1.2rem 1rem;
  border: none;
  border-bottom: 1px solid var(--border-light);
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.tg tbody tr:hover {
  background: var(--light-gray);
}

.tg tbody tr:last-child td {
  border-bottom: none;
}

.tg .tg-0pky:first-child {
  font-weight: 500;
  color: var(--text-dark);
}

.tg .tg-0pky:last-child {
  font-weight: 700;
  color: var(--primary-green);
  text-align: right;
  font-size: 1.1rem;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
  #page {
    margin: 0;
    border-radius: 0;
  }
  
  #u228_img {
    max-width: 300px;
  }
  
  #u197-4 {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  #u197-4 p {
    font-size: 1rem;
  }
  
  .MenuItem {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }
  
  /* Улучшенное отображение таблицы на планшетах */
  .tg {
    font-size: 0.85rem;
  }
  
  .tg th,
  .tg td {
    padding: 0.7rem 0.4rem;
    font-size: 0.85rem;
    word-wrap: break-word;
  }
  
  .tg th:first-child,
  .tg td:first-child {
    width: 65%;
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .tg th:last-child,
  .tg td:last-child {
    width: 35%;
    text-align: center;
    font-weight: bold;
    color: var(--primary-green);
  }
  
  .tg .tg-0pky:last-child {
    font-size: 0.95rem;
  }
  
  /* Контейнер таблицы с горизонтальной прокруткой */
  #products-table-container > div:last-of-type {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin: 0 -1rem;
  }
  
  /* Фильтры на мобильных устройствах */
  #search-input {
    font-size: 0.9rem;
    padding: 0.7rem 0.9rem;
  }
  
  select {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
  
  /* Информация о торговой точке */
  #trade-point-info {
    padding: 0.8rem;
    margin-bottom: 0.8rem;
  }
  
  #trade-point-info h4 {
    font-size: 1rem;
  }
  
  #trade-point-info p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  #u228_img {
    max-width: 250px;
  }
  
  /* Компактное отображение таблицы на мобильных */
  .tg {
    font-size: 0.75rem;
    min-width: 100%;
  }
  
  .tg th,
  .tg td {
    padding: 0.5rem 0.3rem;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
  }
  
  .tg th:first-child,
  .tg td:first-child {
    width: 60%;
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .tg th:last-child,
  .tg td:last-child {
    width: 40%;
    text-align: center;
    font-weight: bold;
    color: var(--primary-green);
    white-space: nowrap;
  }
  
  .tg th {
    font-size: 0.8rem;
    padding: 0.6rem 0.3rem;
  }
  
  .tg .tg-0pky:last-child {
    font-size: 0.9rem;
    font-weight: 600;
  }
  
  /* Улучшенный контейнер таблицы */
  #products-table-container > div:last-of-type {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    margin: 0 -0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Фильтры на маленьких экранах */
  #search-input {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.8rem;
  }
  
  select {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    min-width: 120px;
  }
  
  /* Информация о результатах */
  #results-info {
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
  }
  
  /* Пагинация */
  #pagination button {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  #page-info {
    font-size: 0.8rem;
  }
  
  /* Информация о торговой точке на мобильных */
  #trade-point-info {
    padding: 0.6rem;
    margin-bottom: 0.6rem;
  }
  
  #trade-point-info h4 {
    font-size: 0.9rem;
  }
  
  #trade-point-info p {
    font-size: 0.8rem;
  }
}

@media (max-width: 360px) {
  /* Очень маленькие экраны */
  .tg {
    font-size: 0.7rem;
    min-width: 100%;
  }
  
  .tg th,
  .tg td {
    padding: 0.4rem 0.2rem;
    line-height: 1.2;
  }
  
  .tg th:first-child,
  .tg td:first-child {
    width: 55%;
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .tg th:last-child,
  .tg td:last-child {
    width: 45%;
    text-align: center;
    font-weight: bold;
    color: var(--primary-green);
    white-space: nowrap;
  }
  
  .tg th {
    font-size: 0.75rem;
    padding: 0.5rem 0.2rem;
  }
  
  .tg .tg-0pky:last-child {
    font-size: 0.8rem;
  }
  
  /* Контейнер таблицы для очень маленьких экранов */
  #products-table-container > div:last-of-type {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    margin: 0 -0.3rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }
  
  select {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    min-width: 100px;
  }
}

/* Анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#u228,
#u197-4,
#menuu130,
#u2255 {
  animation: fadeInUp 0.6s ease-out;
}

/* Улучшения для поиска */
.ya-site-form form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.ya-site-form input[type="search"] {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 25px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.ya-site-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.ya-site-form input[type="submit"] {
  background: var(--primary-green);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.ya-site-form input[type="submit"]:hover {
  background: var(--light-green);
}

/* Дополнительные улучшения */
.verticalspacer {
  height: 2rem;
}

/* Футер */
footer {
  background: var(--gradient-green) !important;
  color: white !important;
  padding: 2rem !important;
  margin-top: 3rem !important;
  text-align: center !important;
  border-radius: 0 0 10px 10px;
}

footer h3 {
  margin-bottom: 1rem !important;
  font-size: 1.5rem !important;
  font-weight: 600 !important;
}

footer p {
  margin-bottom: 1rem !important;
  opacity: 0.9 !important;
}

footer div[style*="display: grid"] {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 1.5rem !important;
  margin-top: 1.5rem !important;
  text-align: left !important;
}

footer div[style*="display: grid"] > div {
  text-align: left !important;
}

footer strong {
  font-weight: 600 !important;
  display: block !important;
  margin-bottom: 0.5rem !important;
}

footer span {
  opacity: 0.9 !important;
}

/* Адаптивность футера */
@media (max-width: 768px) {
  footer div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  footer {
    padding: 1.5rem !important;
  }
}

/* Стили для лучшей читаемости */
p {
  margin-bottom: 1rem;
}

/* Улучшенные тени */
#u228,
#u197-4,
#menuu130,
#u2255 {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Hover эффекты для интерактивных элементов */
.MenuItem,
.ya-site-form input[type="submit"] {
  cursor: pointer;
}

/* Улучшенная типографика */
body {
  font-size: 16px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

/* Стили для лучшего контраста */
.tg tbody tr:nth-child(even) {
  background: rgba(76, 175, 80, 0.02);
}

.tg tbody tr:hover {
  background: rgba(76, 175, 80, 0.08);
}

/* Дополнительные стили для мобильных устройств */
@media (max-width: 768px) {
  /* Улучшенная прокрутка таблицы */
  #products-table-container > div:last-of-type::-webkit-scrollbar {
    height: 6px;
  }
  
  #products-table-container > div:last-of-type::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 3px;
  }
  
  #products-table-container > div:last-of-type::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
  }
  
  #products-table-container > div:last-of-type::-webkit-scrollbar-thumb:hover {
    background: var(--light-green);
  }
  
  /* Индикатор прокрутки */
  #products-table-container > div:last-of-type::after {
    content: "← Прокрутите для просмотра всех колонок →";
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 0.5rem;
    background: var(--light-gray);
    border-top: 1px solid var(--border-light);
  }
}
