/* mobile-optimization.css - Улучшения для мобильного опыта согласно плану улучшения дизайна */

/* 1. Увеличение размера кнопок и интерактивных элементов */
@media (max-width: 768px) {
  /* Базовые стили для всех кнопок */
  .btn,
  button,
  .btn-primary,
  .btn-secondary,
  .btn-outline-primary,
  input[type="submit"],
  input[type="button"],
  .nav-item,
  .touch-target {
    min-width: 44px;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Стили для иконок внутри кнопок */
  .btn i,
  button i {
    font-size: 18px;
  }
  
  /* Увеличение размера полей ввода */
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px; /* Предотвращает зум на iOS */
    border-radius: 4px;
  }
  
  /* Увеличение размера элементов списка/меню */
  .dropdown-item,
  .menu-item,
  .nav-link {
    min-height: 44px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
  }
  
  /* Увеличение зоны нажатия чекбоксов и радиокнопок */
  input[type="checkbox"],
  input[type="radio"] {
    min-width: 22px;
    min-height: 22px;
  }
  
  /* Обертки для чекбоксов и радиокнопок */
  .form-check,
  .checkbox-wrapper,
  .radio-wrapper {
    min-height: 44px;
    padding: 10px 0;
  }
  
  /* Увеличение мобильной кнопки меню */
  .mobile-menu-button {
    width: 44px;
    height: 44px;
    padding: 12px;
  }
  
  /* Улучшение области карточек */
  .coffee-card,
  .method-card,
  .country-card,
  .review-card {
    padding: 16px;
  }
  
  /* Ссылки в карточках */
  .coffee-card a,
  .method-card a,
  .country-card a,
  .review-card a {
    display: block;
    padding: 8px 0;
  }
  
  /* Звездочки рейтинга */
  .rating-stars {
    font-size: 20px;
    line-height: 1;
    letter-spacing: 2px;
    padding: 10px 0;
  }
  
  /* Добавление отступов между элементами */
  .filter-group,
  .form-group {
    margin-bottom: 16px;
  }
  
  /* Увеличение интерактивных областей в верхнем меню */
  .top-menu .nav-item {
    margin: 0 4px;
  }
  
  /* Таблицы: увеличение высоты ячеек */
  td, th {
    padding: 12px 8px;
    height: 44px;
  }
  
  /* Перемещение навигационных элементов в зону доступа большого пальца */
  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  /* Создание удобной мобильной навигации внизу экрана */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-background);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1000;
  }
  
  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    min-width: 60px;
    text-decoration: none;
    color: var(--text-color);
  }
  
  .mobile-bottom-nav i {
    font-size: 22px;
    margin-bottom: 4px;
  }
  
  .mobile-bottom-nav span {
    font-size: 12px;
  }
  
  /* Добавление отступа снизу для контента, чтобы он не перекрывался навигацией */
  body {
    padding-bottom: 70px;
  }
  
  /* Стили для бокового мобильного меню - улучшенная доступность для большого пальца */
  .nav-links.active {
    background: var(--card-background);
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 300px;
    padding: 20px;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transform: translateX(0);
    transition: transform 0.3s ease;
  }
  
  /* Кнопки действий в нижнем правом углу - доступно для большого пальца */
  .floating-action-button {
    position: fixed;
    bottom: 80px; /* Выше мобильной навигации */
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 900;
  }
  
  /* Поисковая форма, всегда доступная в верхней части экрана */
  .search-container {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--card-background);
    padding: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  /* Увеличенные отступы для кликабельных элементов */
  .nav-links a, 
  .footer-column a {
    display: block;
    padding: 12px 0;
    margin: 4px 0;
  }
  
  /* 3. Упрощение и фокусирование контента для мобильных экранов */
  
  /* Улучшение макета контейнеров */
  .container, 
  .content-container,
  .main-content,
  .section {
    padding: 16px 12px;
    margin-bottom: 16px;
  }
  
  /* Уменьшение padding и margin для экономии места */
  h1, h2, h3, h4, h5, h6 {
    margin-top: 0.8em;
    margin-bottom: 0.5em;
  }
  
  p {
    margin-bottom: 0.8em;
  }
  
  /* Оптимизация списков */
  ul, ol {
    padding-left: 20px;
    margin-bottom: 1em;
  }
  
  /* Улучшение отображения карточек кофе */
  .coffee-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  .coffee-card-header {
    position: relative;
  }
  
  .coffee-card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
  }
  
  .coffee-info {
    display: flex;
    flex-direction: column;
    padding: 12px;
  }
  
  .coffee-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
  }
  
  .coffee-card-rating {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
  }
  
  .coffee-card-origin {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
  }
  
  .coffee-card-taste-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
  }
  
  .taste-tag {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    background-color: var(--tag-background, #f0f0f0);
    color: var(--tag-color, #333);
  }
  
  .coffee-card-cta {
    margin-top: auto;
  }
  
  /* Скрытие второстепенной информации на мобильных */
  .secondary-info,
  .extended-description,
  .sidebar-widget {
    display: none;
  }
  
  /* Показ кнопки "Подробнее" для доступа к скрытой информации */
  .show-more-button {
    display: block;
    width: 100%;
    text-align: center;
    margin: 8px 0;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
  }
  
  /* Улучшение отображения таблиц */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
  
  /* Адаптивные изображения */
  .responsive-img {
    width: 100%;
    height: auto;
  }
  
  /* Улучшение макета страницы продукта */
  .product-details-container {
    display: flex;
    flex-direction: column;
  }
  
  .product-image-container {
    width: 100%;
    margin-bottom: 16px;
  }
  
  .product-details-main {
    width: 100%;
  }
  
  /* Оптимизация отображения отзывов */
  .review-list {
    display: flex;
    flex-direction: column;
  }
  /* Оптимизация отображения отзывов */
  .review-list {
    display: flex;
    flex-direction: column;
  }
  
  .review-item {
    margin-bottom: 16px;
    padding: 12px;
  }
  
  .review-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  /* Оптимизация фильтров */
  .filter-container {
    padding: 8px;
  }
  
  .filter-group-mobile {
    margin-bottom: 12px;
  }
  
  .filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px;
    background: var(--background-color);
    border: 1px solid #ddd;
    border-radius: 4px;
  }
  
  .filter-content {
    display: none;
    padding: 10px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
  }
  
  .filter-content.active {
    display: block;
  }
  
  /* Добавление отступов между элементами */
  .filter-group,
  .form-group {
    margin-bottom: 16px;
  }
  
  /* Увеличение интерактивных областей в верхнем меню */
  .top-menu .nav-item {
    margin: 0 4px;
  }
  
  /* Таблицы: увеличение высоты ячеек */
  td, th {
    padding: 12px 8px;
    height: 44px;
  }
}
