/* ========================================
   PREMIUM HEADER — ФИНАЛЬНАЯ ВЕРСИЯ С ВЫРАВНИВАНИЕМ
======================================== */

/* ===== CONTAINER ===== */
.premium-header .container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.premium-header {
  background: #ffffff;
  position: relative;
  z-index: 50;
}

/* ===== TOP LINE ===== */
.premium-top {
  height: 110px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ececec;
  background: #f3f7f1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* ===== ГЛАВНОЕ ИСПРАВЛЕНИЕ: ГРИД КОНТЕЙНЕР ===== */
.premium-top-inner {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  align-items: center;
  width: 100%;
  height: 110px;  /* ВАЖНО: фиксированная высота */
  column-gap: 30px;
}

/* ===== ЛОГОТИП ===== */
.premium-logo {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
}

.premium-logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.premium-logo img {
  max-height: 72px;
  width: auto;
  display: block;
}

/* ===== ПОИСК ===== */
.premium-search {
  display: flex;
  align-items: center;
  height: 100%;
  justify-content: center;
}

.premium-search form {
  width: 100%;
  max-width: 800px;
  margin: 0;
}

/* Адаптация для больших экранов */
@media (min-width: 1600px) {
  .premium-search form {
   max-width: 900px; /* на широких мониторах не бесконечный */
  }
}

.premium-search input {
  width: 100%;
  height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
  font-size: 14px;
  box-sizing: border-box;
  margin: 0;
}

.premium-search input:focus {
  border-color: #2F5D3A;
  outline: none;
  box-shadow: 0 0 0 2px rgba(47,93,58,0.08);
}
/* =============================
   КОРЗИНА
============================= */

.premium-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;  /* расстояние между иконкой и счетчиком */
}

.premium-cart svg {
  width: 24px;
  height: 24px;
  display: block;
  transition: 0.2s ease;
}

.cart-count {
  position: absolute;
  top: 35px;      /* немного выше иконки */
  right: -12px;    /* немного правее */
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #3F7A4C;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
}

.premium-cart:hover svg {
  transform: translateY(-2px);
  color: #3F7A4C;
}


/* ===== ИКОНКИ ===== */
.premium-icons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  height: 100%;
}

.premium-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.premium-icons svg {
  width: 22px;
  height: 22px;
  display: block;
  color: #2b2b2b;
  transition: 0.2s ease;
}

.premium-icons a:hover svg {
  color: #2F5D3A;
  transform: translateY(-2px);
   transition: 0.2s ease;
}

/* ========================================
   NAVIGATION LINE
======================================== */
.premium-nav {
  background: #4C8A59;
  border-bottom: 1px solid #ececec;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08);
}

.premium-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* MENU */
.premium-menu-list {
  display: flex;
  align-items: center;
  gap: 48px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.premium-menu-list > li {
  position: relative;
}

.premium-menu-list > li > a {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #ffffff;
  text-decoration: none;
  padding: 20px 0;
  position: relative;
  transition: 0.25s ease;
}

.premium-menu-list > li > a:hover {
  color: #dff3e3;
}

.premium-menu-list > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 12px;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.premium-menu-list > li > a:hover::after {
  transform: scaleX(1);
}

/* SOCIAL RIGHT */
.premium-social {
  display: flex;
  align-items: center;
  gap: 18px;
}

.premium-social img {
  width: 32px;
  height: 32px;
  display: block;
  transition: 0.2s ease;
  opacity: 0.9;
}

.premium-social a:hover img {
  opacity: 1;
  transform: translateY(-3px);
}

/* ========================================
   CATALOG PANEL
======================================== */
.catalog-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 1100px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
  padding: 40px;
  border-radius: 0 0 12px 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: 0.3s ease;
  z-index: 999;
}

.premium-catalog.active .catalog-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.catalog-columns {
  display: flex;
  gap: 70px;
}

.catalog-col {
  min-width: 180px;
}

.catalog-title {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: #2F5D3A;
  margin-bottom: 14px;
  text-decoration: none;
}

.catalog-sub {
  list-style: none;
  padding: 0;
  margin: 0;
}

.catalog-sub li a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  transition: 0.2s ease;
}

.catalog-sub li a:hover {
  background: #F4E8D8;
  padding-left: 8px;
}

.premium-search,
.premium-icons {
  align-self: flex-end;  /* прижать к низу грид-ячейки */
  margin-bottom: -20px;   /* точный отступ от низа */
}
.premium-search form {
  max-width: 720px !important;
}
.ui-autocomplete {
    z-index: 99999 !important;
}
/* ========================================
   PREMIUM SEARCH DROPDOWN
======================================== */

.premium-search {
    position: relative;
}

#search .dropdown-menu {
    display: block !important;        /* перебиваем submenu */
    position: absolute !important;
    top: 100%;
    left: 0;
    width: 100% !important;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    z-index: 99999 !important;
}

#search .dropdown-menu > li > a {
    padding: 10px 14px;
    font-size: 14px;
    white-space: normal;
}

#search .dropdown-menu > li > a:hover {
    background: #f3f7f1;
}
/* ========================================
   JQUERY UI AUTOCOMPLETE — WIDTH FIX
======================================== */

.premium-search {
  position: relative;
}
.premium-search .ui-autocomplete {
  top: calc(100% - 45px) !important;
  left: 0 !important;
}

.ui-autocomplete {
  margin-top: 6px; /* аккуратный зазор */
  max-height: 400px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid #e6e6e6;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  z-index: 99999;
}

