body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: url('../images/bg.webp') no-repeat center center fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  color: #fff;
  overflow-x: hidden;
}

header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  background-color: rgba(20, 20, 30, 0.85);
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.left-side {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo img {
  width: 40px;
  height: 40px;
}

.site-name {
  font-size: 20px;
  font-weight: bold;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
}

.nav-button:hover {
  background: linear-gradient(90deg, #ff1a1a, #ff4d4d, #cc0000, #ff1a1a);
  background-size: 300%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: redPulse 2.5s linear infinite;
}

@keyframes redPulse {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.language-select {
  display: flex;
  align-items: center;
  gap: 10px;
}

#lang-selector-top {
  background-color: rgba(30,30,40,0.9);
  border: 1px solid #ff1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
}

#lang-selector-top option {
  background-color: #20202a;
  color: #fff;
}

#lang-selector-top:focus {
  outline: none;
}

.center-copy {
  margin-right: 6.77vw;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.center-copy .search-button,
.center-copy .sort-button {
  pointer-events: auto;
}

.center-copy .copyright {
  font-size: 14px;
  color: #ccc;
  pointer-events: auto;
}

.search-button {
  margin-right: 3vw;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s, transform 0.2s;
}

.sort-button {
  margin-right: 6.77vw;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s, transform 0.2s;
}

.search-button:hover, .sort-button:hover {
  transform: scale(1.1);
}

.search-icon, .sort-icon {
  width: 30px;
  height: 30px;
}

.quad-wrapper {
  width: 62.5vw;
  margin: 0 auto;
  padding: 40px 0;
  display: flex;
  justify-content: center;
}

.sidebar.left-ads {
  position: fixed;
  top: 70px;
  left: 0;
  width: 16.302%;
  height: 92vh;
  z-index: 999;
  box-shadow: 0 0 20px rgba(0, 0, 0, 1);
}

.sidebar.right-ads {
  position: fixed;
  top: 70px;
  right: 0;
  width: 16.302%;
  height: 92vh;
  z-index: 999;
  box-shadow: 0 0 20px rgba(0, 0, 0, 1);
}

.ad-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.ad-block {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
}

.ad-block img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-overlay-text {
  position: absolute;
  top: 30px;
  left: 0;
  width: 100%;
  padding: 0 12px;
  text-align: center;
  color: #fff;
  font-size: 18px;
  line-height: 1.4;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}

.ad-subtitle {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  padding: 0 12px;
  text-align: center;
  color: #fff;
  font-size: 20px;
  line-height: 1.3;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}

/* ===== КАТЕГОРІЇ ПРОДУКТІВ ===== */
.food-card.cat-aziatska { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/aziatska.webp'); }
.food-card.cat-alkohol { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/alkohol.webp'); }
.food-card.cat-bobovi { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/bobovi.webp'); }
.food-card.cat-boroshniani { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/boroshniani.webp'); }
.food-card.cat-garniry { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/garniry.webp'); }
.food-card.cat-gorikhy { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/gorikhy.webp'); }
.food-card.cat-hotovi { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/hotovi.webp'); }
.food-card.cat-hryby { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/hryby.webp'); }
.food-card.cat-deserty { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/deserty.webp'); }
.food-card.cat-dytyache { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/dytyache.webp'); }
.food-card.cat-dobavky { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/dobavky.webp'); }
.food-card.cat-dietychni { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/dietychni.webp'); }
.food-card.cat-zhyry { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/zhyry.webp'); }
.food-card.cat-zakusky { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/zakusky.webp'); }
.food-card.cat-zamorozheni { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/zamorozheni.webp'); }
.food-card.cat-zapikanky { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/zapikanky.webp'); }
.food-card.cat-zelen { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/zelen.webp'); }
.food-card.cat-kashi { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/kashi.webp'); }
.food-card.cat-kovbasni { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/kovbasni.webp'); }
.food-card.cat-krupy { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/krupy.webp'); }
.food-card.cat-myaso { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/myaso.webp'); }
.food-card.cat-makarony { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/makarony.webp'); }
.food-card.cat-molochni { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/molochni.webp'); }
.food-card.cat-moreprodukty { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/moreprodukty.webp'); }
.food-card.cat-napoyi { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/napoyi.webp'); }
.food-card.cat-nasinnya { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/nasinnya.webp'); }
.food-card.cat-ovochi { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/ovochi.webp'); }
.food-card.cat-olii { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/olii.webp'); }
.food-card.cat-pidsolod { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/pidsolod.webp'); }
.food-card.cat-solodoshchi { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/solodoshchi.webp'); }
.food-card.cat-ryba { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/ryba.webp'); }
.food-card.cat-salaty { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/salaty.webp'); }
.food-card.cat-sendvichi { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/sendvichi.webp'); }
.food-card.cat-syry { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/syry.webp'); }
.food-card.cat-sneky { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/sneky.webp'); }
.food-card.cat-snidanky { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/snidanky.webp'); }
.food-card.cat-sousy { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/sousy.webp'); }
.food-card.cat-spetsii { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/spetsii.webp'); }
.food-card.cat-subprodukty { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/subprodukty.webp'); }
.food-card.cat-supy { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/supy.webp'); }
.food-card.cat-sukhofrukty { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/sukhofrukty.webp'); }
.food-card.cat-tradytsiini { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/tradytsiini.webp'); }
.food-card.cat-fastfud { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/fastfud.webp'); }
.food-card.cat-frukty { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/frukty.webp'); }
.food-card.cat-yahody { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/yahody.webp'); }
.food-card.cat-yaytsya { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('images/yaytsya.webp'); }
/* Фон для категорії "Інше" */
.food-card.cat-inshi { background-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 70%), url('../images/food.webp'); }

.food-grid {
  width: 62.5vw;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.666vh 0.937vw;
  margin: 40px auto 0;
}

.food-card {
  background-color: rgba(20,20,30,0.9);
  background-image: url('../images/food.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1;
  padding: 12px;
  text-align: center;
  transition: 0.25s, background 0.5s;
  color: #fff;
  text-shadow: 
    0 0 8px rgba(0, 0, 0, 1), 
    0 0 4px rgba(0, 0, 0, 1),
    1px 1px 2px rgba(0, 0, 0, 1);
}

.food-card:hover {
  transform: translateY(-6px) scale(1.1);
}

.food-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
  text-align: center;
  word-break: break-word;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.food-mini {
  font-size: 14px;
  opacity: 0.95;
  line-height: 1.5;
}

.food-mini div {
  margin: 4px 0;
}

.food-mini span {
  display: block;
}

.food-mini span.label {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 2px;
  text-transform: uppercase;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

@media (max-width: 830px) {
  .food-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .food-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin: 15px auto 0 !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
    box-sizing: border-box !important;
  }

  .food-card {
    aspect-ratio: 1 / 1;
    padding: 10px;
  }

  .food-card h4 {
    font-size: 14px;
  }

  .food-mini {
    font-size: 12px;
  }

  header {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    padding: 8px 10px !important;
    background-color: rgba(15, 17, 26, 0.95) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
  }

  .left-side {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    overflow: hidden !important;
  }

  .nav-buttons {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    gap: 8px !important;
    padding: 2px 4px !important;
    box-sizing: border-box !important;
  }

  .nav-buttons::-webkit-scrollbar {
    display: none;
  }

  .nav-button {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 7px 12px !important;
    border-radius: 9px !important;
    background: rgba(255, 26, 26, 0.08) !important;
    border: 1px solid rgba(255, 26, 26, 0.22) !important;
    font-size: 13px !important;
    color: #fff !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    touch-action: manipulation !important;
  }

  .nav-button:hover, .nav-button:active {
    background: rgba(255, 26, 26, 0.22) !important;
    border-color: #ff1a1a !important;
  }

}

/* ===== FOOD CARD EXPAND ===== */
.food-card.active {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(1.15);
  width: min(420px, 92vw);
  height: auto;
  z-index: 5000;
  cursor: default;
  animation: foodOpen 0.35s ease;
}

.food-card.closing {
  animation: foodClose 0.3s ease forwards;
}

.food-card.active .food-mini {
  margin-top: 12px;
  font-size: 15px;
}

.food-card.active h4 {
  font-size: 22px;
}

.food-mini.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  margin-top: 12px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.food-mini.two-columns .label {
  font-weight: bold;
}

@keyframes foodClose {
  from {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
  }
}

@keyframes foodOpen {
  from {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
}

/* затемнення фону */
.food-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 4000;
}

/* ===== МОДАЛЬНЕ ВІКНО ПОШУКУ ТА СОРТУВАННЯ (JS-генероване) ===== */
.food-overlay.search-active, .food-overlay.sort-active {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 6000;
  justify-content: center;
  align-items: center;
  transition: background-image 0.4s ease;
}

.food-overlay.search-active[style*="flex"] {
  display: flex !important;
}

/* Фон пошуку за замовчуванням (коли категорія не обрана) — використовуємо загальний фон їжі */
.search-modal-container, .sort-modal-container {
  background-color: rgba(20,20,30,0.95);
  border-radius: 16px;
  width: min(560px, 92vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  color: #fff;
  box-shadow: 0 0 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(80,80,100,0.1);
  overflow: hidden;
  background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('../images/food.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: background-image 0.4s ease;
}

.sort-modal-container {
  width: min(380px, 92vw); /* Вужче вікно для сортування */
}

/* Фон пошуку для кожної категорії — JS додає відповідний клас */
.search-modal-container.cat-aziatska, .sort-modal-container.cat-aziatska { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/aziatska.webp'); }
.search-modal-container.cat-alkohol, .sort-modal-container.cat-alkohol { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/alkohol.webp'); }
.search-modal-container.cat-bobovi, .sort-modal-container.cat-bobovi { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/bobovi.webp'); }
.search-modal-container.cat-boroshniani, .sort-modal-container.cat-boroshniani { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/boroshniani.webp'); }
.search-modal-container.cat-garniry, .sort-modal-container.cat-garniry { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/garniry.webp'); }
.search-modal-container.cat-gorikhy, .sort-modal-container.cat-gorikhy { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/gorikhy.webp'); }
.search-modal-container.cat-hotovi, .sort-modal-container.cat-hotovi { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/hotovi.webp'); }
.search-modal-container.cat-hryby, .sort-modal-container.cat-hryby { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/hryby.webp'); }
.search-modal-container.cat-deserty, .sort-modal-container.cat-deserty { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/deserty.webp'); }
.search-modal-container.cat-dytyache, .sort-modal-container.cat-dytyache { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/dytyache.webp'); }
.search-modal-container.cat-dobavky, .sort-modal-container.cat-dobavky { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/dobavky.webp'); }
.search-modal-container.cat-dietychni, .sort-modal-container.cat-dietychni { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/dietychni.webp'); }
.search-modal-container.cat-zhyry, .sort-modal-container.cat-zhyry { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/zhyry.webp'); }
.search-modal-container.cat-zakusky, .sort-modal-container.cat-zakusky { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/zakusky.webp'); }
.search-modal-container.cat-zamorozheni, .sort-modal-container.cat-zamorozheni { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/zamorozheni.webp'); }
.search-modal-container.cat-zapikanky, .sort-modal-container.cat-zapikanky { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/zapikanky.webp'); }
.search-modal-container.cat-zelen, .sort-modal-container.cat-zelen { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/zelen.webp'); }
.search-modal-container.cat-kashi, .sort-modal-container.cat-kashi { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/kashi.webp'); }
.search-modal-container.cat-kovbasni, .sort-modal-container.cat-kovbasni { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/kovbasni.webp'); }
.search-modal-container.cat-krupy, .sort-modal-container.cat-krupy { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/krupy.webp'); }
.search-modal-container.cat-myaso, .sort-modal-container.cat-myaso { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/myaso.webp'); }
.search-modal-container.cat-makarony, .sort-modal-container.cat-makarony { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/makarony.webp'); }
.search-modal-container.cat-molochni, .sort-modal-container.cat-molochni { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/molochni.webp'); }
.search-modal-container.cat-moreprodukty, .sort-modal-container.cat-moreprodukty { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/moreprodukty.webp'); }
.search-modal-container.cat-napoyi, .sort-modal-container.cat-napoyi { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/napoyi.webp'); }
.search-modal-container.cat-nasinnya, .sort-modal-container.cat-nasinnya { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/nasinnya.webp'); }
.search-modal-container.cat-ovochi, .sort-modal-container.cat-ovochi { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/ovochi.webp'); }
.search-modal-container.cat-olii, .sort-modal-container.cat-olii { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/olii.webp'); }
.search-modal-container.cat-pidsolod, .sort-modal-container.cat-pidsolod { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/pidsolod.webp'); }
.search-modal-container.cat-solodoshchi, .sort-modal-container.cat-solodoshchi { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/solodoshchi.webp'); }
.search-modal-container.cat-ryba, .sort-modal-container.cat-ryba { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/ryba.webp'); }
.search-modal-container.cat-salaty, .sort-modal-container.cat-salaty { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/salaty.webp'); }
.search-modal-container.cat-sendvichi, .sort-modal-container.cat-sendvichi { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/sendvichi.webp'); }
.search-modal-container.cat-syry, .sort-modal-container.cat-syry { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/syry.webp'); }
.search-modal-container.cat-sneky, .sort-modal-container.cat-sneky { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/sneky.webp'); }
.search-modal-container.cat-snidanky, .sort-modal-container.cat-snidanky { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/snidanky.webp'); }
.search-modal-container.cat-sousy, .sort-modal-container.cat-sousy { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/sousy.webp'); }
.search-modal-container.cat-spetsii, .sort-modal-container.cat-spetsii { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/spetsii.webp'); }
.search-modal-container.cat-subprodukty, .sort-modal-container.cat-subprodukty { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/subprodukty.webp'); }
.search-modal-container.cat-supy, .sort-modal-container.cat-supy { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/supy.webp'); }
.search-modal-container.cat-sukhofrukty, .sort-modal-container.cat-sukhofrukty { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/sukhofrukty.webp'); }
.search-modal-container.cat-tradytsiini, .sort-modal-container.cat-tradytsiini { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/tradytsiini.webp'); }
.search-modal-container.cat-fastfud, .sort-modal-container.cat-fastfud { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/fastfud.webp'); }
.search-modal-container.cat-frukty, .sort-modal-container.cat-frukty { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/frukty.webp'); }
.search-modal-container.cat-yahody, .sort-modal-container.cat-yahody { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/yahody.webp'); }
.search-modal-container.cat-yaytsya, .sort-modal-container.cat-yaytsya { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('images/yaytsya.webp'); }
.search-modal-container.cat-inshi, .sort-modal-container.cat-inshi { background-image: linear-gradient(to top, rgba(20,20,30,0.95) 0%, rgba(20,20,30,0.8) 100%), url('../images/food.webp'); }

.search-fixed-top {
  display: flex;
  gap: 10px;
  padding: 20px 20px 15px;
  /* ПРИБРАНО ЧЕРВОНУ ЛІНІЮ — замість border-bottom: 1px solid rgba(255,26,26,0.2) */
  border-bottom: 1px solid rgba(80,80,100,0.2);
  background: rgba(20,20,30,0.98);
  flex-shrink: 0;
}

.search-fixed-top input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  /* ПРИБРАНО ЧЕРВОНУ РАМКУ — замість border: 1px solid #ff1a1a */
  border: 1px solid rgba(80,80,100,0.5);
  background-color: #20202a;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-fixed-top input[type="text"]:focus {
  /* ПРИБРАНО ЧЕРВОНИЙ КОЛІР ФОКУСУ — замість #ff4d4d */
  border-color: #4a4a5a;
  box-shadow: 0 0 0 3px rgba(80,80,100,0.15);
}

.search-fixed-top input[type="text"]::placeholder {
  color: #888;
}

.search-fixed-top button {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background-color: #ff1a1a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.search-fixed-top button:hover {
  background-color: #ff3333;
  transform: translateY(-1px);
}

.search-fixed-top button:active {
  transform: translateY(0);
}

#f-close-x {
  background: #444 !important;
  padding: 10px 14px !important;
  font-size: 16px !important;
}

#f-close-x:hover {
  background: #555 !important;
}

.search-scrollable-content {
  overflow-y: auto;
  padding: 20px;
  flex: 1;
}

.search-scrollable-content::-webkit-scrollbar {
  width: 6px;
}

.search-scrollable-content::-webkit-scrollbar-track {
  background: transparent;
}

.search-scrollable-content::-webkit-scrollbar-thumb {
  /* ПРИБРАНО ЧЕРВОНИЙ КОЛІР СКРОЛБАРУ — замість rgba(255,26,26,0.3) */
  background: rgba(80,80,100,0.3);
  border-radius: 3px;
}

.filter-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Сортування: стилі для перемикачів */
.sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.05);
  padding: 10px 15px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.sort-item label {
  font-size: 14px;
  color: #fff;
  flex: 1;
}

.sort-options {
  display: flex;
  gap: 5px;
}

.sort-opt {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255,26,26,0.3);
  background: rgba(0,0,0,0.3);
  color: #888;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.sort-opt.active {
  background: #ff1a1a;
  color: #fff;
  border-color: #ff1a1a;
  box-shadow: 0 0 10px rgba(255,26,26,0.4);
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-item.full-width {
  grid-column: 1 / -1;
}

.filter-row-triple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  grid-column: 1 / -1;
}

.filter-item label {
  font-size: 13px;
  font-weight: 600;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-item select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  /* ПРИБРАНО ЧЕРВОНУ РАМКУ — замість border: 1px solid rgba(255,26,26,0.4) */
  border: 1px solid rgba(80,80,100,0.4);
  background-color: #20202a;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.filter-item select:focus {
  /* ПРИБРАНО ЧЕРВОНИЙ КОЛІР ФОКУСУ */
  border-color: #4a4a5a;
}

.filter-item select option {
  background-color: #20202a;
  color: #fff;
}

.range-row {
  display: flex;
  gap: 8px;
}

.range-row input[type="number"] {
  width: 50%;
  padding: 8px 10px;
  border-radius: 8px;
  /* ПРИБРАНО ЧЕРВОНУ РАМКУ — замість border: 1px solid rgba(255,26,26,0.4) */
  border: 1px solid rgba(80,80,100,0.4);
  background-color: #20202a;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.range-row input[type="number"]:focus {
  /* ПРИБРАНО ЧЕРВОНИЙ КОЛІР ФОКУСУ */
  border-color: #4a4a5a;
}

.range-row input[type="number"]::placeholder {
  color: #666;
}

/* ===== Кнопка "Скинути фільтри" ===== */
#reset-top-container {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

#f-reset-top {
  cursor: pointer;
  padding: 10px 25px;
  border-radius: 30px;
  border: 1px solid #ff1a1a;
  background: rgba(255,26,26,0.15);
  color: #fff;
  font-weight: bold;
  backdrop-filter: blur(5px);
  transition: all 0.3s;
  font-size: 14px;
}

#f-reset-top:hover {
  background: rgba(255,26,26,0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255,26,26,0.2);
}

/* ===== Кнопка "Показати ще" ===== */
#load-more-btn {
  width: 100%;
  padding: 15px;
  margin-top: 25px;
  border-radius: 25px;
  background: #1e1e1e;
  color: #fff;
  cursor: pointer;
  border: 1px solid #555;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s;
}

#load-more-btn:hover {
  background: #2a2a2a;
  border-color: #ff1a1a;
}

/* ===== МОБІЛЬНА АДАПТАЦІЯ ===== */
@media (max-width: 830px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body {
    display: block !important;
    text-align: left !important;
    padding: 0 !important;
    padding-bottom: 85px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .main-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    gap: 16px !important;
  }

  /* ===== Реклама - приховано на мобільних пристроях ===== */
  .sidebar.left-ads,
  .sidebar.right-ads {
    display: none !important;
  }

  .center-copy,
  .language-select,
  .site-logo {
    display: none !important;
  }

  /* Мобільна адаптація модального вікна пошуку */
  .search-modal-container {
    width: 95vw;
    max-height: 85vh;
    border-radius: 12px;
  }

  .filter-grid-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filter-row-triple {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .search-fixed-top {
    padding: 15px;
    flex-wrap: wrap;
  }

  .search-fixed-top input[type="text"] {
    width: 100%;
    margin-bottom: 8px;
  }

  .range-row input[type="number"] {
    width: 48%;
  }
}

/* ===== Нижня панель для мобільних ===== */
.bottom-panel {
  display: none;
  width: 100%; max-width: 100%;
  min-height: 60px;
  background-color: rgba(20,20,30,0.95);
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1000;
  padding: 0;
  color: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
  font-size: clamp(12px,3vw,16px);
  justify-content: center;
  align-items: center;
  gap: 0;
}

.bottom-panel .panel-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0;
  gap: 0; /* прибираємо відстань між дочірніми елементами */
}

.bottom-panel .panel-content .center-copy,
.bottom-panel .panel-content .language-select {
  display: flex;
  align-items: center;
  color: #fff;
  gap: 0;
}

.bottom-panel .language-select select {
  background-color: rgba(30,30,40,0.9);
  border: 1px solid #ff1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.bottom-panel .language-select select:hover {
  background-color: rgba(50,50,60,0.95);
}

.bottom-panel .language-select select:focus {
  outline: none;
}

.bottom-panel .language-select select option {
  background-color: #20202a;
  color: #fff;
}

@media (max-width: 1000px) {
  .bottom-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 0;
  }
}