/* Mobile Adaptive Styles - только для мобилки и планшета */

/* ===== МОБИЛКА (до 768px) ===== */
@media (max-width: 768px) {
  
  /* Хедер */
  .header__top {
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
  }
  
  .header__top .container {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  .header-logo img {
    max-width: 120px;
    height: auto;
  }
  
  /* Мобильное меню */
  .header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 2px solid #ebeb47;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 100vh;
    overflow-y: auto;
    width: 100%;
    height: auto;
    /* ВРЕМЕННО: делаем меню всегда видимым для тестирования */
    /* transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important; */
  }
  
  .header-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .header-nav .nav {
    flex-direction: column;
    padding: 20px 16px;
    gap: 12px;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .header-nav .flexible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .header-nav .nav .link {
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    background: #f8f9fa;
    border: 2px solid transparent;
    text-align: center;
    transition: all 0.3s ease;
    color: #000 !important;
    text-decoration: none !important;
    display: block !important;
  }
  
  .header-nav .nav .link:hover {
    background: #ebeb47;
    border-color: #ebeb47;
    color: #000;
  }
  
  /* Специальные стили для wishlist и корзины */
  .header-nav .nav .link[href*="wishlist"] {
    background: #ffe6e6;
    border-color: #ff9999;
    color: #d63384;
  }
  
  .header-nav .nav .link[href*="cart"] {
    background: #e6f3ff;
    border-color: #66b3ff;
    color: #0066cc;
  }
  
  .header-nav .nav .link[href*="wishlist"]:hover {
    background: #ff9999;
    border-color: #ff9999;
    color: #fff;
  }
  
  .header-nav .nav .link[href*="cart"]:hover {
    background: #66b3ff;
    border-color: #66b3ff;
    color: #fff;
  }
  
  /* Кнопка мобильного меню */
  .btn-menu {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: #ebeb47;
    border: 2px solid #ebeb47;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(235, 235, 71, 0.3);
    position: relative;
    z-index: 10000;
  }
  
  .btn-menu:hover {
    background: #d4d43a;
    border-color: #d4d43a;
    transform: scale(1.05);
  }
  
  .btn-menu.active {
    background: #000;
    border-color: #000;
  }
  
  .icon-bar {
    width: 24px;
    height: 3px;
    background: #000;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
  }
  
  .btn-menu.active .icon-bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .btn-menu.active .icon-bar:nth-child(2) {
    opacity: 0;
  }
  
  .btn-menu.active .icon-bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Языковой переключатель */
  .select-lang {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
  }
  
  .select-lang .link {
    padding: 12px 16px;
    font-size: 16px;
    background: #fff;
    border: 2px solid #ebeb47;
    border-radius: 8px;
    text-align: center;
    color: #000 !important;
    text-decoration: none !important;
    display: block !important;
  }
  
  /* Основной контент */
  .container {
    padding: 0 16px;
  }
  
  /* Hero секция */
  .hero {
    padding: 40px 0;
    text-align: center;
  }
  
  .hero__title {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 16px;
  }
  
  .hero__subtitle {
    font-size: 16px;
    margin-bottom: 24px;
  }
  
  /* Продукты */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 0;
  }
  
  .product-card {
    padding: 20px;
    border-radius: 16px;
  }
  
  /* Футер */
  .footer {
    padding: 40px 0 20px;
  }
  
  .footer__content {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
  
  .footer__section {
    width: 100%;
  }
  
  .footer__section h3 {
    font-size: 18px;
    margin-bottom: 16px;
  }
  
  .footer__section ul {
    gap: 12px;
  }
  
  .footer__section ul li a {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  /* Формы */
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 16px;
    font-size: 16px;
    border-radius: 12px;
  }
  
  .btn {
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 12px;
    min-height: 48px;
  }
  
  /* Чат-бот */
  .chat-button {
    bottom: 20px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
  }
  
  .chat-widget {
    bottom: 90px !important;
    right: 20px !important;
    width: calc(100vw - 40px) !important;
    max-width: 400px !important;
  }
}

/* ===== ПЛАНШЕТ (768px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  
  /* Хедер */
  .header__top {
    padding: 16px 24px;
  }
  
  .header__top .container {
    gap: 20px;
  }
  
  .header-logo img {
    max-width: 140px;
  }
  
  /* Навигация */
  .header-nav .nav {
    gap: 16px;
  }
  
  .header-nav .nav .link {
    padding: 12px 16px;
    font-size: 16px;
  }
  
  /* Основной контент */
  .container {
    padding: 0 24px;
  }
  
  /* Hero секция */
  .hero {
    padding: 60px 0;
  }
  
  .hero__title {
    font-size: 36px;
    margin-bottom: 20px;
  }
  
  .hero__subtitle {
    font-size: 18px;
    margin-bottom: 30px;
  }
  
  /* Продукты */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 30px 0;
  }
  
  .product-card {
    padding: 24px;
  }
  
  /* Футер */
  .footer {
    padding: 50px 0 30px;
  }
  
  .footer__content {
    gap: 40px;
  }
  
  .footer__section h3 {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  /* Формы */
  .form-group input,
  .form-group textarea {
    padding: 14px;
    font-size: 15px;
  }
  
  .btn {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  /* Чат-бот */
  .chat-button {
    bottom: 24px !important;
    right: 24px !important;
    width: 56px !important;
    height: 56px !important;
  }
  
  .chat-widget {
    bottom: 90px !important;
    right: 24px !important;
    width: 350px !important;
  }
}

/* ===== ОБЩИЕ УЛУЧШЕНИЯ ДЛЯ МОБИЛКИ И ПЛАНШЕТА ===== */
@media (max-width: 1024px) {
  
  /* Улучшенные тач-цели */
  button, .btn, .link, input[type="submit"], input[type="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Убираем hover эффекты на тач-устройствах */
  @media (hover: none) {
    .btn:hover,
    .link:hover,
    .product-card:hover {
      transform: none;
      box-shadow: none;
    }
  }
  
  /* Улучшенная прокрутка */
  * {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Убираем выделение при тапе */
  * {
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Улучшенная производительность */
  .product-card,
  .btn,
  .header-nav {
    will-change: transform;
    transform: translateZ(0);
  }
  
  /* Затемнение фона при открытом меню */
  .header.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .header.menu-open::before {
    opacity: 1;
    visibility: visible;
  }
  
  /* Блокировка прокрутки при открытом меню */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}
