/* ========================================== */
/*                 main.css                  */
/* ========================================== */

/* ============ БАЗОВЫЕ СТИЛИ ============ */

/* Сброс */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Фон + полупрозрачная пелена */
body {
  font-family: Arial, sans-serif;
  background: url('../swg/fon.svg') no-repeat center center/cover;
  position: relative;
  min-height: 100vh; /* Чтобы при мало контента не схлопывалось */
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: white;
  opacity: 0.65;
  z-index: -1;
}



/* Сначала прячем всё мобильное */
.mobile-search-toggle,
.mobile-search-container {
  display: none;
}

/* ========================================== */
/*            СОВРЕМЕННЫЕ АНИМАЦИИ            */
/* ========================================== */

/* Анимация появления элементов */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Упрощенные анимации для лучшей производительности */
.category-card {
  animation: fadeInUp 0.3s ease-out;
  animation-fill-mode: both;
}

.product-card {
  animation: fadeInUp 0.4s ease-out;
  animation-fill-mode: both;
}

/* Убираем задержки для лучшей производительности */
.categories h2, .popular h2 {
  animation: fadeInLeft 0.4s ease-out;
}

.about {
  animation: fadeInUp 0.5s ease-out;
}

/* ========================================== */
/*              СЧЕТЧИК КОРЗИНЫ               */
/* ========================================== */

.cart-link {
  position: relative;
  display: inline-block;
}

.cart-counter {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  min-width: 20px;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  animation: pulse 2s infinite;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.cart-counter.visible {
  opacity: 1;
  transform: scale(1);
}

.cart-counter.updated {
  animation: bounce 0.6s ease;
}

/* Уменьшим чуть иконки внутри .icons */
.icons > button img,
.icons > a img {
  width: 24px;
  height: 24px;
}


/* Шапка (header) */
header {
  width: 100%;
  max-width: 1400px;
  margin: 10px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #115710 0%, #1a7a1a 50%, #0f4a0f 100%);
  padding: 20px 30px;
  color: white;
  border-radius: 25px;
  box-shadow: 
    0 8px 32px rgba(17, 87, 16, 0.3),
    0 2px 16px rgba(17, 87, 16, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1000;
  min-height: 80px;
  flex-wrap: nowrap;
}

/* Убираем анимацию shimmer для производительности */

.menu-toggle,
.mobile-menu {
  display: none;
}

.header-left {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.header-row h1 {
  font-size: 30px; /* Можно также уменьшить размер, если требуется */
  margin: 0 10px;  /* Было 0 40px – уменьшаем горизонтальные отступы */
}

.logo {
  font-size: 30px;
  font-weight: bold;
  white-space: nowrap;
}
nav ul {
  list-style: none;
  display: flex;
  margin-top: 10px;
  gap: 30px;
}
nav a {
  color: white;
  text-decoration: none;
  font-size: 16px;
}
.icons {
  display: flex;
  gap: 25px;
  align-items: center;
}
.icons > a img,
.icons > button img {
  width: 30px;
  height: 30px;
}

/* Кнопка входа в шапке */
.login-btn-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 8px 20px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.login-btn-header:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login-btn-header:active {
  transform: translateY(0);
}

.login-btn-text {
  display: inline-block;
}

/* Телефон в шапке */
.phone-link-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 20px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.phone-link-header:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.phone-link-header:active {
  transform: translateY(0);
}

.phone-link-header img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.phone-text-desktop {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Кнопка заказа для неавторизованных */
.order-btn-disabled {
  opacity: 0.7;
  cursor: pointer !important;
  background: #95a5a6 !important;
}

.order-btn-disabled:hover {
  background: #7f8c8d !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(127, 140, 141, 0.3) !important;
}

/* Секции «Категории» и «Популярные товары» */
.categories,
.popular {
  padding: 20px;
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;  /* Центрируем основной контейнер */
}

.categories h2,
.popular h2 {
  margin-bottom: 30px;
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #115710 0%, #2d9f42 50%, #0f4a0f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  position: relative;
  text-shadow: 0 2px 4px rgba(17, 87, 16, 0.1);
}

.categories h2::after,
.popular h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #115710, #2d9f42, #115710);
  border-radius: 2px;
}

/* --- Сетка категорий --- */
.category-grid {
  display: grid;
  gap: 20px;
  justify-content: center;
  margin: 0 auto;
  /* По умолчанию 4 колонки — если очень широкий экран */
  grid-template-columns: repeat(4, 1fr);
}

.category-card {
  width: 100%;
  max-width: 320px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  padding: 20px;
  border: none;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 
    0 4px 20px rgba(0, 128, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Убираем зеленую полоску */
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 128, 0, 0.15);
}

/* Убираем hover-эффект для полоски */
.category-card p {
  font-size: 20px;
  text-align: start;
  font-weight: bold;
  color: #000;
  margin: 0;
}
.category-card img {
  width: 100px;
  height: auto;
  object-fit: contain;
}

/* --- Сетка товаров (по умолчанию 5 колонок) --- */
.product-grid {
  display: grid;
  gap: 40px;
  justify-content: center;
  margin: 0 auto;
  
  grid-template-columns: repeat(5, 220px);
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 25px;
  border: none;
  border-radius: 25px;
  background: #ffffff;
  box-shadow: 
    0 8px 32px rgba(45, 159, 66, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  width: 220px;
  min-height: 320px;
  position: relative;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}

/* Убираем зеленую полоску с товаров */

.product-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(45, 159, 66, 0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}


.product-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}


.product-card img {
  width: 100%;
  height: 150px;
  border-radius: 20px;
  object-fit: contain;
  margin-bottom: 5px;
  transition: transform 0.4s ease;
}
.product-card p {
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin: 5px 0;
}
.order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #2d9f42;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  margin-top: 15px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 90%;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 15px rgba(45, 159, 66, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.order-btn:hover {
  background: #238534;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 8px 25px rgba(45, 159, 66, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.order-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(45, 159, 66, 0.3);
}

/* Эффект волны при нажатии */
.order-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.order-btn:active::before {
  width: 300px;
  height: 300px;
}

/* Анимация для карточек товаров при наведении */
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(45, 159, 66, 0.15);
}

/* Убираем hover-эффект для полоски товаров */

.product-card:hover::after {
  opacity: 1;
}

.product-card:hover img {
  transform: scale(1.05);
}
.order-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  margin-top: 0;
  border-radius: 0;
}

/* Примечание для товаров с единицей "место" */
.place-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 13px;
  color: #4a5568;
}

.note-icon {
  font-size: 14px;
}

.note-text {
  font-weight: 500;
  line-height: 1.3;
}

/* Блок выбора веса (при нажатии "Заказать") */
.weight-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.weight-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}
.minus-btn, .plus-btn {
  width: 30px;
  height: 30px;
  background: #2d9f42;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.minus-btn:hover,
.plus-btn:hover {
  background: #238534;
}
.weight-input-wrapper {
  position: relative;
  display: inline-block;
}

.weight-input {
  padding-right: 30px; /* добавляем место для кг */
  text-align: center;
  width: 65px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 6px;
  padding: 4px;
}

.weight-unit-inside {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #000;
  font-size: 0.9em;
}

.weight-buttons {
  display: flex;
  gap: 10px;
}
.confirm-btn,
.cancel-btn {
  background: #fff;
  color: #2d9f42;
  border: 2px solid #2d9f42;
  border-radius: 20px;
  padding: 6px 15px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}
.confirm-btn:hover,
.cancel-btn:hover {
  background: #f0f0f0;
}

/* Стили для выбора единицы измерения (совместое) */
.unit-type-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
}

.unit-type-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.unit-type-btn {
  flex: 1;
  max-width: 120px;
  background: #fff;
  border: 2px solid #2d9f42;
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.unit-type-btn:hover {
  background: #f0fff0;
  border-color: #238534;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(45, 159, 66, 0.2);
}

.unit-icon {
  font-size: 32px;
}

.unit-label {
  font-size: 12px;
  font-weight: bold;
  color: #2d9f42;
}

.unit-type-selector .cancel-btn {
  margin-top: 10px;
}

/* --- Блок «О нас» --- */
.about {
  background: linear-gradient(135deg, rgba(245, 245, 245, 0.95) 0%, rgba(248, 255, 248, 0.95) 100%);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 20px;
  padding: 40px 0;
  margin: 40px auto;
  max-width: 1000px;
  position: relative;
  box-shadow: 
    0 15px 30px rgba(17, 87, 16, 0.1),
    0 6px 12px rgba(17, 87, 16, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: fadeInUp 0.8s ease-out;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #115710, #2d9f42, #4ade80, #2d9f42, #115710);
  border-radius: 30px 30px 0 0;
}

.about-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
}

.about-content {
  text-align: center;
}

.about h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #115710 0%, #2d9f42 50%, #0f4a0f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.about h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #115710, #2d9f42, #115710);
  border-radius: 2px;
}

.about-text {
  margin-bottom: 30px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.6;
  color: #1c1c1c;
  font-weight: 500;
  max-width: 700px;
  margin: 0 auto 15px;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.feature-item {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  padding: 20px 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(17, 87, 16, 0.1);
  backdrop-filter: blur(5px);
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(17, 87, 16, 0.15);
  border-color: #2d9f42;
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 15px;
  display: block;
}

.feature-item h3 {
  font-size: 20px;
  font-weight: 600;
  color: #115710;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  line-height: 1.4;
}

/* --- Футер --- */
footer {
  background: linear-gradient(135deg, #115710 0%, #0f4a0f 100%);
  color: white;
  padding: 0;
  margin-top: 50px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2d9f42, #4ade80, #2d9f42);
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 25px 20px;
}

/* Основной контент футера */
.footer-main {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-bottom: 25px;
}

/* Секция доставки */
.delivery-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
}

.delivery-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: rgba(45, 159, 66, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(45, 159, 66, 0.3);
  transition: all 0.3s ease;
  width: 100%;
}

.delivery-card:hover {
  background: rgba(45, 159, 66, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(45, 159, 66, 0.3);
  border-color: rgba(45, 159, 66, 0.5);
}

.delivery-icon {
  font-size: 28px;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 159, 66, 0.3);
  border-radius: 50%;
  flex-shrink: 0;
}

.delivery-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 5px 0;
  line-height: 1.4;
}

.delivery-content strong {
  color: #ffffff;
  font-weight: 600;
}

/* Секция контактов */
.contacts-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.contact-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 159, 66, 0.2);
  border-radius: 50%;
  flex-shrink: 0;
}

.contact-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-info strong {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-info span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
}

/* Стили для интерактивных контактов */
.contact-item {
  transition: all 0.3s ease;
}

.contact-item:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.address-item {
  transition: all 0.3s ease;
}

.address-item:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* Нижняя часть футера */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.address-section {
  flex: 1;
  min-width: 200px;
}

.address-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.address-icon {
  font-size: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 159, 66, 0.2);
  border-radius: 50%;
  flex-shrink: 0;
}

.address-info {
  display: flex;
  flex-direction: column;
}

.address-info strong {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.address-info span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.footer-logo h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.footer-logo p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.footer-copyright p {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #2d9f42;
  color: white;
  padding: 15px 25px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: bold;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ====================================== */
/*          Поисковая строка             */
/* ====================================== */

/* Стили для блока автодополнения в поисковой строке */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0; 
}

.search-bar input[type="text"] {
  padding: 10px 35px 10px 15px;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  color: #115710;
  width: 250px;
  transition: all 0.2s ease;
}

.search-bar input[type="text"]:focus {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-icon {
  position: absolute;
  right: 10px;
  width: 20px;
  height: 20px;
  margin-right: 5px;
  pointer-events: none; /* чтобы иконка не мешала кликам */
  filter: opacity(0.6);
}


.search-bar input[type="text"]::placeholder {
  color: #115710;
}

.search-bar button {
  padding: 5px 15px;
  font-size: 16px;
  border: none;
  border-radius: 20px;
  background-color: #2d9f42;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-bar button:hover {
  background-color: #238534;
}

/* Красивые подсказки поиска с картинками */
.search-suggestions-container {
  position: fixed;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  max-height: 300px;
  overflow-y: auto;
  min-width: 250px;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: all 0.2s ease;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover {
  background-color: #f8fff8;
  transform: translateX(4px);
}

.search-suggestion-item:first-child {
  border-radius: 12px 12px 0 0;
}

.search-suggestion-item:last-child {
  border-radius: 0 0 12px 12px;
}

.suggestion-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 12px;
  border: 2px solid #f0f0f0;
  transition: border-color 0.2s ease;
}

.search-suggestion-item:hover .suggestion-image {
  border-color: #2d9f42;
}

.suggestion-text {
  flex: 1;
}

.suggestion-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.suggestion-category {
  font-size: 12px;
  color: #666;
  font-weight: 400;
}

.suggestion-image-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 2px solid #f0f0f0;
  margin-right: 12px;
  flex-shrink: 0;
}

.product-highlight {
  border: 5px solid #238534 !important;
  transition: border 0.3s ease;
}


/* ====================================== */
/*          АДАПТИВНЫЕ СТИЛИ             */
/* ====================================== */

/* --- Пример: крупные экраны (более 1400px)
   Можно ограничить ширину шапки или увеличить кол-во колонок 
   (если хотите 5 категорий/ряд). 
   Часто делают @media (min-width: 1400px) { ... }
*/

/* (1) Планшеты (max-width: 1024px) */
@media (max-width: 1024px) {
  /* Компактная шапка для планшетов в стиле мобильной версии */
  header {
    padding: 10px 14px;
    margin: 8px auto 0;
    border-radius: 14px;
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-wrap: nowrap;
    gap: 10px;
    width: 90%;
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(17, 87, 16, 0.3);
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
  }

  .menu-toggle:active {
    transform: scale(0.95);
  }

  .logo {
    font-size: 18px;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    white-space: normal;
    word-wrap: break-word;
    max-width: 180px;
    flex: 1;
    min-width: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
  }

  .desktop-menu {
    display: none;
  }

  .icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .desktop-search {
    display: none;
  }

  .mobile-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
  }

  .mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
  }

  .mobile-search-toggle:active {
    transform: scale(0.95);
  }

  .mobile-search-toggle img {
    width: 20px;
    height: 20px;
  }

  .cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: none;
    border: none;
  }

  .cart-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
  }

  .cart-link:active {
    transform: scale(0.95);
  }

  .cart-link img {
    width: 20px;
    height: 20px;
  }

  .cart-counter {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ff4444, #ff6666);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 3px 12px rgba(255, 68, 68, 0.5);
    border: none;
  }

  .icons > a:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: none;
    border: none;
  }

  .icons > a:last-child:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
  }

  .icons > a:last-child:active {
    transform: scale(0.95);
  }

  .icons > a:last-child img {
    width: 20px;
    height: 20px;
  }

  /* Выпадающий поиск для планшетов */
  .mobile-search-container {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 10010;
    border: none;
    max-width: calc(100vw - 16px);
  }
  
  .mobile-search-container.active {
    display: block;
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .mobile-search-container .search-bar {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(45, 159, 66, 0.2);
  }
  
  .mobile-search-container .search-bar input[type="text"] {
    width: 100%;
    border: 2px solid #2d9f42;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    outline: none;
    background: #f8f9fa;
    transition: all 0.3s ease;
  }
  
  .mobile-search-container .search-bar input[type="text"]:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(45, 159, 66, 0.1);
  }
  
  .mobile-search-close {
    display: none;
  }

  /* Выпадающее меню для планшетов */
  .mobile-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 10010;
    border: none;
    display: none;
    max-width: calc(100vw - 16px);
  }
  
  .mobile-menu.open {
    display: block;
    animation: slideDown 0.3s ease-out;
  }
  
  .mobile-menu-content {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(45, 159, 66, 0.2);
  }
  
  .mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .mobile-menu li {
    margin-bottom: 8px;
  }
  
  .mobile-menu li:last-child {
    margin-bottom: 0;
  }
  
  .mobile-menu a {
    text-decoration: none;
    color: #2d9f42;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    display: block;
    transition: all 0.3s ease;
    background: rgba(45, 159, 66, 0.05);
    border: 1px solid rgba(45, 159, 66, 0.1);
  }
  
  .mobile-menu a:hover {
    color: white;
    background: linear-gradient(135deg, #2d9f42, #34d058);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(45, 159, 66, 0.3);
  }

  .categories h2,
  .popular h2 {
    font-size: 36px;
    margin-bottom: 25px;
  }

  /* Улучшенная сетка категорий */
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 15px;
  }
  
  .category-card {
    max-width: 300px;
    padding: 20px 15px;
    border-radius: 18px;
  }
  
  .category-card p {
    font-size: 18px;
  }
  
  .category-card img {
    width: 90px;
    height: 90px;
  }

  /* Улучшенная сетка товаров */
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 0 15px;
  }
  
  .product-card {
    width: 100%;
    min-height: 280px;
    padding: 20px 15px;
    border-radius: 18px;
  }
  
  .product-card img {
    height: 120px;
    width: 100%;
  }
  
  .product-card p {
    font-size: 16px;
    margin: 10px 0;
  }

  .order-btn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px;
    min-height: 48px;
    width: 90%;
  }
  
  .order-btn img {
    width: 18px;
    height: 18px;
  }

  /* Улучшенная секция "О нас" */
  .about {
    margin: 35px auto;
    padding: 35px 0;
    border-radius: 20px;
  }
  
  .about-container {
    padding: 0 30px;
  }
  
  .about h2 {
    font-size: 30px;
    margin-bottom: 20px;
  }
  
  .about-text p {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .about-features {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
  }
  
  .feature-item {
    padding: 20px 15px;
    border-radius: 15px;
  }
  
  .feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
  }
  
  .feature-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  .feature-item p {
    font-size: 14px;
  }

  /* Улучшенный футер */
  .footer-container {
    padding: 30px 25px 20px;
  }
  
  .footer-main {
    grid-template-columns: 1fr 1.8fr;
    gap: 30px;
    margin-bottom: 25px;
  }
  
  .delivery-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .delivery-card {
    padding: 18px;
    gap: 15px;
    border-radius: 12px;
  }
  
  .delivery-icon {
    font-size: 26px;
    width: 42px;
    height: 42px;
  }
  
  .delivery-content p {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .contacts-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .contacts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .contact-item {
    padding: 12px;
    gap: 10px;
    border-radius: 10px;
  }
  
  .contact-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
  }
  
  .contact-info strong {
    font-size: 12px;
  }
  
  .contact-info span {
    font-size: 11px;
  }
  
  .footer-bottom {
    padding-top: 20px;
    gap: 20px;
  }
  
  .address-item {
    padding: 12px 15px;
    gap: 10px;
    border-radius: 10px;
  }
  
  .address-icon {
    font-size: 16px;
    width: 28px;
    height: 28px;
  }
  
  .address-info strong {
    font-size: 12px;
  }
  
  .address-info span {
    font-size: 11px;
  }
  
  .footer-logo h4 {
    font-size: 16px;
  }
  
  .footer-logo p {
    font-size: 11px;
  }
  
  .footer-copyright p {
    font-size: 10px;
  }
}

/* (2) Средние мобильные экраны (max-width: 768px) */
@media (max-width: 768px) {
  /* Максимально удобная и крутая шапка для мобильных */
  header {
    padding: 12px 16px;
    margin: 8px auto 0;
    border-radius: 16px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-wrap: nowrap;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(17, 87, 16, 0.3);
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
  }

  .menu-toggle:active {
    transform: scale(0.95);
  }

  .logo {
    font-size: 22px;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    white-space: normal;
    word-wrap: break-word;
    max-width: 180px;
    flex: 1;
    min-width: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
  }

  .desktop-menu {
    display: none;
  }

  .icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .desktop-search {
    display: none;
  }

  .mobile-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
  }

  .mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
  }

  .mobile-search-toggle:active {
    transform: scale(0.95);
  }

  .mobile-search-toggle img {
    width: 20px;
    height: 20px;
  }

  .cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: none;
    border: none;
  }

  .cart-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
  }

  .cart-link:active {
    transform: scale(0.95);
  }

  .cart-link img {
    width: 20px;
    height: 20px;
  }

  .cart-counter {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ff4444, #ff6666);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 3px 12px rgba(255, 68, 68, 0.5);
    border: none;
  }

  .icons > a:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: none;
    border: none;
  }

  .icons > a:last-child:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
  }

  .icons > a:last-child:active {
    transform: scale(0.95);
  }

  .icons > a:last-child img {
    width: 20px;
    height: 20px;
  }

  /* Кнопка входа для мобильных */
  .login-btn-header {
    padding: 6px 16px;
    font-size: 14px;
    border-radius: 18px;
  }

  .phone-link-header {
    padding: 6px 10px;
    border-radius: 18px;
  }

  .phone-text-desktop {
    display: none; /* Скрываем текст телефона на мобильных */
  }

  .phone-link-header img {
    width: 18px;
    height: 18px;
  }

  /* Улучшенный поиск */
  .desktop-search {
    display: none;
  }
  
  .mobile-search-toggle {
    display: inline-flex;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
  }
  
  .mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  
  /* Выпадающий поиск для мобильных */
  .mobile-search-container {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 10020;
    border: none;
    max-width: calc(100vw - 16px);
  }
  
  .mobile-search-container.active {
    display: block;
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .mobile-search-container .search-bar {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(45, 159, 66, 0.2);
  }
  
  .mobile-search-container .search-bar input[type="text"] {
    width: 100%;
    border: 2px solid #2d9f42;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    outline: none;
    background: #f8f9fa;
    transition: all 0.3s ease;
  }
  
  .mobile-search-container .search-bar input[type="text"]:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(45, 159, 66, 0.1);
  }
  
  .mobile-search-close {
    display: none; /* Убираем кнопку закрытия для выпадающего элемента */
  }

  /* Стили для подсказок поиска на мобильных устройствах */
  .mobile-search-container .search-suggestions-container {
    position: static;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: auto;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
    width: 100%;
  }

  .mobile-search-container .search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
  }

  .mobile-search-container .search-suggestion-item:last-child {
    border-bottom: none;
  }

  .mobile-search-container .search-suggestion-item:hover {
    background-color: #f8fff8;
    transform: translateX(4px);
  }

  .mobile-search-container .search-suggestion-item:first-child {
    border-radius: 12px 12px 0 0;
  }

  .mobile-search-container .search-suggestion-item:last-child {
    border-radius: 0 0 12px 12px;
  }

  .mobile-search-container .suggestion-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid #f0f0f0;
    transition: border-color 0.2s ease;
  }

  .mobile-search-container .search-suggestion-item:hover .suggestion-image {
    border-color: #2d9f42;
  }

  .mobile-search-container .suggestion-text {
    flex: 1;
  }

  .mobile-search-container .suggestion-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
  }

  .mobile-search-container .suggestion-category {
    font-size: 12px;
    color: #666;
    font-weight: 400;
  }

  .mobile-search-container .suggestion-image-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid #f0f0f0;
    margin-right: 12px;
    flex-shrink: 0;
  }

  /* Улучшенное мобильное меню */
  .menu-toggle {
    display: inline-block;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #fff;
    padding: 6px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  
  .desktop-menu {
    display: none;
  }
  
  /* Выпадающее меню для мобильных */
  .mobile-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 10020;
    border: none;
    display: none;
    max-width: calc(100vw - 16px);
  }
  
  .mobile-menu.open {
    display: block;
    animation: slideDown 0.3s ease-out;
  }
  
  .mobile-menu-content {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(45, 159, 66, 0.2);
  }
  
  .mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .mobile-menu li {
    margin-bottom: 8px;
  }
  
  .mobile-menu li:last-child {
    margin-bottom: 0;
  }
  
  .mobile-menu a {
    text-decoration: none;
    color: #2d9f42;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    display: block;
    transition: all 0.3s ease;
    background: rgba(45, 159, 66, 0.05);
    border: 1px solid rgba(45, 159, 66, 0.1);
  }
  
  .mobile-menu a:hover {
    color: white;
    background: linear-gradient(135deg, #2d9f42, #34d058);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(45, 159, 66, 0.3);
  }

  /* Улучшенные заголовки */
  .categories h2, .popular h2 {
    font-size: 28px;
    margin-bottom: 20px;
  }

  /* Улучшенная сетка категорий */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }
  
  .category-card {
    padding: 18px 12px;
    border-radius: 15px;
  }
  
  .category-card p {
    font-size: 16px;
  }
  
  .category-card img {
    width: 70px;
    height: 70px;
  }

  /* Улучшенная сетка товаров */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }
  
  .product-card {
    width: 100%;
    min-height: 220px;
    padding: 18px 12px;
    border-radius: 15px;
  }
  
  .product-card img {
    height: 100px;
    width: 100%;
    object-fit: contain;
  }
  
  .product-card p {
    font-size: 15px;
    margin: 8px 0;
  }

  .order-btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    min-height: 44px;
    width: 90%;
  }
  
  .order-btn img {
    width: 18px;
    height: 18px;
  }

  /* Улучшенная секция "О нас" */
  .about {
    margin: 30px auto;
    padding: 25px 0;
    max-width: 95%;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.95) 0%, rgba(248, 255, 248, 0.95) 100%);
  }
  
  .about-container {
    padding: 0 20px;
  }
  
  .about h2 {
    font-size: 24px;
    margin-bottom: 18px;
  }
  
  .about-text p {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
  }
  
  .about-features {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
  }
  
  .feature-item {
    padding: 18px 15px;
    border-radius: 12px;
  }
  
  .feature-icon {
    font-size: 28px;
    margin-bottom: 10px;
  }
  
  .feature-item h3 {
    font-size: 16px;
    margin-bottom: 6px;
  }
  
  .feature-item p {
    font-size: 13px;
  }
}

/* Адаптивные анимации для мобильных */
@media (max-width: 768px) {
  .cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    text-decoration: none;
  }

  .cart-counter {
    width: 16px;
    height: 16px;
    font-size: 9px;
    top: -4px;
    right: -4px;
  }
  
  /* Отключаем сложные анимации на мобильных */
  .category-card, .product-card {
    animation: none;
    transition: none;
  }
  
  .product-card:hover, .category-card:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(45, 159, 66, 0.1);
  }
  
  /* Отключаем backdrop-filter на мобильных */
  header {
    backdrop-filter: none;
  }
  
  .about {
    backdrop-filter: none;
  }
  
  /* Адаптивные стили для секции "О нас" на планшетах */
  .about {
    margin: 30px auto;
    padding: 30px 0;
  }
  
  .about-container {
    padding: 0 25px;
  }
  
  .about h2 {
    font-size: 28px;
    margin-bottom: 15px;
  }
  
  .about-text p {
    font-size: 15px;
    line-height: 1.5;
  }
  
  .about-features {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
  }
  
  .feature-item {
    padding: 15px 12px;
  }
  
  .feature-icon {
    font-size: 30px;
    margin-bottom: 12px;
  }
  
  .feature-item h3 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  
  .feature-item p {
    font-size: 13px;
  }

  /* Адаптивные стили для футера на планшетах */
  footer {
    margin-top: 40px;
  }
  
  .footer-container {
    padding: 25px 20px 15px;
  }
  
  .footer-main {
    grid-template-columns: 1fr 1.5fr;
    gap: 25px;
    margin-bottom: 20px;
  }
  
  .delivery-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  .delivery-card {
    padding: 15px;
    gap: 12px;
  }
  
  .delivery-icon {
    font-size: 24px;
    width: 38px;
    height: 38px;
  }
  
  .delivery-content p {
    font-size: 12px;
  }
  
  .contacts-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  .contacts-grid {
    gap: 10px;
  }
  
  .contact-item {
    padding: 10px;
    gap: 8px;
  }
  
  .contact-icon {
    font-size: 16px;
    width: 28px;
    height: 28px;
  }
  
  .contact-info strong {
    font-size: 11px;
  }
  
  .contact-info span {
    font-size: 10px;
  }
  
  .footer-bottom {
    padding-top: 12px;
    gap: 15px;
  }
  
  .address-item {
    padding: 8px 12px;
    gap: 8px;
  }
  
  .address-icon {
    font-size: 14px;
    width: 24px;
    height: 24px;
  }
  
  .address-info strong {
    font-size: 11px;
  }
  
  .address-info span {
    font-size: 10px;
  }
  
  .footer-logo h4 {
    font-size: 14px;
  }
  
  .footer-logo p {
    font-size: 10px;
  }
  
  .footer-copyright p {
    font-size: 9px;
  }
}

/* (3) Очень узкие экраны (max-width: 480px) */
@media (max-width: 480px) {

  /* Оптимизированная шапка для очень маленьких экранов */
  header {
    padding: 10px 12px;
    gap: 8px;
    display: flex;
    width: 95%;
    margin: 6px auto 0;
    border-radius: 14px;
    min-height: 60px;
    box-shadow: 0 3px 16px rgba(17, 87, 16, 0.3);
  }

  /* Компактное мобильное меню для маленьких экранов */
  .mobile-menu a {
    text-decoration: none;
    color: #2d9f42;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    display: block;
    transition: all 0.3s ease;
    background: none;
    border: none;
    text-align: center;
  }
  
  .mobile-menu a:hover {
    color: #115710;
    background: rgba(17, 87, 16, 0.1);
    transform: none;
    box-shadow: none;
  }

  .mobile-menu li {
    margin-bottom: 4px;
  }
  
  .header-left {
    gap: 8px;
    flex: 1;
    min-width: 0;
  }
  
  .menu-toggle {
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 8px;
  }
  
  .logo {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    max-width: 140px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
  }
  
  .icons {
    gap: 6px;
  }
  
  .mobile-search-toggle,
  .cart-link,
  .icons > a:last-child {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  
  .mobile-search-toggle img,
  .cart-link img,
  .icons > a:last-child img {
    width: 18px;
    height: 18px;
  }
  
  .cart-counter {
    width: 18px;
    height: 18px;
    font-size: 9px;
    top: -3px;
    right: -3px;
  }

  .icons {
    gap: 12px;
    flex-shrink: 0;
  }
  
  .icons > a img,
  .icons > button img {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
  }

  /* Кнопка входа для очень маленьких экранов */
  .login-btn-header {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 16px;
  }

  .phone-link-header {
    padding: 5px 8px;
    border-radius: 16px;
  }

  .phone-link-header img {
    width: 16px;
    height: 16px;
  }

  /* Улучшенная сетка категорий */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }

  .category-card {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: auto;
    padding: 15px 10px;
    border-radius: 15px;
    text-align: center;
  }
  
  .category-card p {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    text-align: center;
  }
  
  .category-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
  }

  /* Улучшенная сетка товаров */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }
  
  .product-card {
    width: 100%;
    min-height: 200px;
    padding: 15px 10px;
    border-radius: 15px;
  }
  
  .product-card img {
    height: 70px;
    width: 100%;
    object-fit: contain;
  }
  
  .product-card p {
    font-size: 14px;
    font-weight: 600;
    margin: 8px 0;
    line-height: 1.2;
  }
  
  .order-btn {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  
  .order-btn img {
    width: 16px;
    height: 16px;
  }

  /* Улучшенные заголовки */
  .categories h2, .popular h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  /* Улучшенная секция "О нас" */
  .about {
    margin: 20px auto;
    padding: 20px 0;
    max-width: 95%;
    border-radius: 15px;
  }
  
  .about-container {
    padding: 0 15px;
  }
  
  .about h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .about-text p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
  }
  
  .about-features {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
  }
  
  .feature-item {
    padding: 15px 12px;
    border-radius: 12px;
  }
  
  .feature-icon {
    font-size: 24px;
    margin-bottom: 8px;
  }
  
  .feature-item h3 {
    font-size: 16px;
    margin-bottom: 6px;
  }
  
  .feature-item p {
    font-size: 12px;
    line-height: 1.3;
  }

  /* Улучшенный футер */
  footer {
    margin-top: 30px;
  }
  
  .footer-container {
    padding: 20px 15px 15px;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 15px;
  }
  
  .delivery-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  .delivery-card {
    padding: 15px;
    gap: 12px;
    border-radius: 10px;
  }
  
  .delivery-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
  }
  
  .delivery-content p {
    font-size: 12px;
    line-height: 1.4;
  }
  
  .contacts-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .contact-item {
    padding: 12px;
    gap: 10px;
    border-radius: 8px;
  }
  
  .contact-icon {
    font-size: 16px;
    width: 28px;
    height: 28px;
  }
  
  .contact-info strong {
    font-size: 11px;
  }
  
  .contact-info span {
    font-size: 10px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding-top: 15px;
  }
  
  .address-section {
    min-width: auto;
    width: 100%;
  }
  
  .address-item {
    padding: 10px 12px;
    gap: 10px;
    justify-content: center;
    border-radius: 8px;
  }
  
  .address-icon {
    font-size: 14px;
    width: 24px;
    height: 24px;
  }
  
  .address-info strong {
    font-size: 11px;
  }
  
  .address-info span {
    font-size: 10px;
  }
  
  .footer-info {
    align-items: center;
    text-align: center;
  }
  
  .footer-logo h4 {
    font-size: 14px;
  }
  
  .footer-logo p {
    font-size: 10px;
  }
  
  .footer-copyright p {
    font-size: 9px;
  }

  /* Улучшенные уведомления */
  .toast {
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 25px;
  }
}

/* Дополнительные улучшения для очень маленьких экранов */
@media (max-width: 360px) {
  .logo {
    font-size: 14px;
  }
  
  /* Еще более компактное меню для очень маленьких экранов */
  .mobile-menu a {
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 3px;
  }
  
  .mobile-menu li {
    margin-bottom: 3px;
  }
  
  .category-card p {
    font-size: 12px;
  }
  
  .product-card p {
    font-size: 12px;
  }
  
  .order-btn {
    font-size: 12px;
    padding: 8px 12px;
  }
  
  .categories h2, .popular h2 {
    font-size: 20px;
  }
}
