/* =========================================
   КАСТОМНЫЕ СТИЛИ ПОЛКА НА ПОЛКЕ
   ========================================= */

/* --- Шапка сайта --- */
header { background: #ffffff !important; padding: 24px 0 !important; border-bottom: 1px solid #e5e5e5 !important; line-height: 1 !important; }
.custom-header-row { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; width: 100% !important; max-width: 1320px; margin: 0 auto !important; padding: 0 15px !important; }
.header-item-logo { flex: 0 0 auto !important; display: flex !important; align-items: center !important; }
#logo { margin: 0 !important; padding: 0 !important; line-height: 0 !important; }
#logo img { height: 44px !important; width: auto !important; display: block !important; margin: 0 !important; }
.header-item-search { flex: 1 1 auto !important; margin: 0 40px !important; max-width: 800px !important; display: flex !important; align-items: center !important; gap: 15px !important; }
.btn-catalog { background: #b5009a !important; color: #ffffff !important; border-radius: 25px !important; padding: 0 24px !important; height: 44px !important; display: flex !important; align-items: center !important; gap: 10px !important; font-size: 16px !important; font-weight: 500 !important; border: none !important; cursor: pointer !important; white-space: nowrap !important; }
.btn-catalog:hover { background: #94007e !important; color: #ffffff !important; }
#search { margin: 0 !important; padding: 0 !important; }
#search .input-group { display: flex !important; align-items: center !important; margin: 0 !important; height: 44px !important; border: 1px solid #cccccc !important; border-radius: 25px !important; overflow: hidden !important; background: #ffffff !important; }
#search input[name="search"], #search input[type="text"] { height: 42px !important; min-height: 42px !important; line-height: 1 !important; box-sizing: border-box !important; padding-top: 10px !important; padding-bottom: 16px !important; padding-left: 25px !important; padding-right: 25px !important; margin: 0 !important; border: none !important; box-shadow: none !important; background: transparent !important; font-size: 16px !important; color: #333 !important; flex: 1 !important; }
#search input::placeholder { line-height: 1 !important; color: #999 !important; }
#search .btn-light, #search .btn { height: 42px !important; border: none !important; border-left: 1px solid #eeeeee !important; background: #f8f9fa !important; border-radius: 0 !important; padding: 0 20px !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 18px !important; color: #333 !important; }
.header-item-info { flex: 0 0 auto !important; display: flex !important; align-items: center !important; gap: 20px !important; }
.header-item-info a { color: #000000 !important; font-size: 14px !important; font-weight: 400 !important; text-decoration: none !important; display: flex !important; align-items: center !important; }
.header-item-info i { font-size: 16px !important; color: #000000 !important; }

/* --- Мега-меню --- */
.dropdown-mega-menu { width: 760px !important; padding: 24px !important; border-radius: 20px !important; border: none !important; box-shadow: 0 10px 40px rgba(0,0,0,0.08) !important; margin-top: 15px !important; }
.mega-menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.mega-menu-card { text-decoration: none !important; display: flex; flex-direction: column; align-items: center; text-align: center; color: #000000 !important; }
.mega-menu-img-wrap { width: 100%; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.mega-menu-card:hover .mega-menu-img-wrap { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.mega-menu-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mega-menu-title { font-size: 14px; font-weight: 500; line-height: 1.2; }

/* --- СТРОГИЕ СТИЛИ ГЛАВНОЙ --- */
#common-home { padding-top: 35px !important; }
#common-home > .row { display: flex !important; align-items: stretch !important; }
#content { display: flex !important; flex-direction: column !important; height: 100% !important; }

#content .carousel { border-radius: 16px !important; overflow: hidden !important; background: transparent !important; height: 100% !important; }

/* Убиваем ограничения Bootstrap (col-3) и заставляем тянуться */
#content .carousel-inner,
#content .carousel-item,
#content .carousel-item > .row,
#content .carousel-item > .row > div {
   height: 100% !important;
   margin: 0 !important;
   padding: 0 !important;
   width: 100% !important;
   max-width: 100% !important;
   flex: 1 1 100% !important;
}

#content .carousel-item a { display: block !important; height: 100% !important; }
#content .carousel-item img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center !important; max-width: none !important; display: block !important; }

/* Оставляем стили для старого меню справа */
#column-right .list-group { border-radius: 16px !important; overflow: hidden !important; border: none !important; }
#column-right .list-group-item { border: none !important; border-bottom: 1px solid #f2f2f2 !important; padding: 16px 20px !important; color: #333333 !important; }
#column-right .list-group-item:last-child { border-bottom: none !important; }
#column-right .list-group-item:hover { background: #fdfdfd !important; color: #b5009a !important; padding-left: 25px !important; }

/* --- Адаптивность (Мобильные) --- */
@media (max-width: 991px) {
  .custom-header-row { flex-wrap: wrap !important; gap: 15px !important; }
  .header-item-search { order: 3 !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; }
  .header-item-info span { display: none !important; }
  .header-item-info a { font-size: 22px !important; }
  .dropdown-mega-menu { width: 100% !important; min-width: 280px !important; padding: 15px !important; }
  .mega-menu-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 15px !important; }
}
@media (max-width: 575px) {
  .mega-menu-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .btn-catalog { padding: 0 15px !important; font-size: 14px !important; }
}

/* --- Сетка 2х2 для категорий в правой колонке --- */
.right-category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.right-tile { background: #f8f9fa; border-radius: 16px; padding: 15px 10px; text-align: center; text-decoration: none !important; color: #333 !important; display: flex; flex-direction: column; align-items: center; transition: all 0.2s ease; border: 1px solid #eeeeee; }
.right-tile:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); border-color: #e2e2e2; color: #b5009a !important; }
.right-tile img { width: 70px; height: 70px; object-fit: contain; margin-bottom: 10px; mix-blend-mode: multiply; }
.right-tile span { font-size: 13px; font-weight: 500; line-height: 1.2; }