/*
ФЕРМА УЛЕЙ — НОВЫЙ ГОД 2027
ПОЛНАЯ ВЕРСИЯ CSS v3.3
OpenCart 3.0.3.7
OCMOD #67
1. Снег и сосульки на логотипе
2. Крупная хвоя в правом углу
3. Снежинки на белом фоне
4. Гирлянда в подвале
5. Без боковых гирлянд
6. Без изменений мобильной верстки
   ====================================================
   */
:root {
--uley-ny-gold: #d6a73d;
}

/* ==========================================
1. ШАПКА САЙТА — DESKTOP
   ========================================== */
@media (min-width: 1200px) {

header#header {
position: relative !important;
box-shadow:
  0 2px 0 var(--uley-ny-gold) !important;
}

/* Убираем прежнюю горизонтальную гирлянду */

header#header::before {
content: none !important;
display: none !important;
}

/* КРУПНАЯ ХВОЯ В ПРАВОМ УГЛУ */

header#header::after {
content: "" !important;
display: block !important;
position: absolute !important;

top: 0 !important;
right: 0 !important;
bottom: auto !important;
left: auto !important;

width: 270px !important;
height: 215px !important;
min-height: 0 !important;

margin: 0 !important;
padding: 0 !important;

background-image:
  url('/image/catalog/newyear2027/uley_corner_right_v32.webp') !important;

background-repeat: no-repeat !important;
background-position: right top !important;
background-size: contain !important;

pointer-events: none !important;

z-index: 2 !important;

transform: none !important;
}

/* ПОЛНОСТЬЮ УБИРАЕМ БОКОВЫЕ ЕЛИ */

body:has(section#category)::before,
body:has(section#category)::after {
content: none !important;
display: none !important;
background-image: none !important;
}
}

/* ==========================================
2. СНЕГ И СОСУЛЬКИ НА ЛОГОТИПЕ
========================================== */

@media (min-width: 768px) {

header#header .h_t_logo_box {
overflow: visible !important;
}

header#header .h_t_logo_box > a {
position: relative !important;
overflow: visible !important;
}

/* СНЕГ НАД НАДПИСЬЮ ФЕРМА УЛЕЙ */

header#header .h_t_logo_box > a::before {
content: "" !important;
display: block !important;
position: absolute !important;

top: 0px !important;
left: 65px !important;

width: 140px !important;
height: 32px !important;

min-height: 0 !important;

margin: 0 !important;
padding: 0 !important;

background-image:
  url('/image/catalog/newyear2027/uley_logo_snow_v32.svg') !important;

background-repeat: no-repeat !important;
background-position: center top !important;
background-size: 100% 100% !important;

pointer-events: none !important;

z-index: 8 !important;

transform: none !important;
}

/* УБИРАЕМ СТАРУЮ ШАПОЧКУ ДЕДА МОРОЗА */

header#header .h_t_logo_box > a::after {
content: none !important;
display: none !important;
}
}

/* ==========================================
3. СНЕЖИНКИ НА БЕЛОМ ФОНЕ
========================================== */

@media (min-width: 768px) {

/* ОСНОВНАЯ ОБЛАСТЬ */

body:has(section#category) #content {
background-image:
url('/image/catalog/newyear2027/uley_snowflakes_v32.svg') !important;
background-repeat: repeat !important;
background-position: center top !important;
background-size: 900px 650px !important;
}

/* КАТЕГОРИИ И ТОВАРЫ */

body:has(section#category) section#category,
body:has(section#category) section#catalog {
background-image:
url('/image/catalog/newyear2027/uley_snowflakes_v32.svg') !important;
background-repeat: repeat !important;
background-position: center top !important;
background-size: 900px 650px !important;
}
}

/* ==========================================
4. ПОДВАЛ — ГИРЛЯНДА
СОХРАНЯЕМ РАБОТАЮЩИЙ ВАРИАНТ
========================================== */

@media (min-width: 768px) {

footer#footer {
position: relative !important;
border-top:
  2px solid var(--uley-ny-gold) !important;
}

footer#footer::before {
content: "" !important;
display: block !important;
position: absolute !important;

top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: auto !important;

width: 100% !important;
height: 125px !important;

min-height: 0 !important;

margin: 0 !important;
padding: 0 !important;

background-image:
  url('/image/catalog/newyear2027/uley_ny_footer_2027.webp') !important;

background-repeat: repeat-x !important;
background-position: center top !important;
background-size: auto 125px !important;

pointer-events: none !important;

z-index: 1 !important;

transform: none !important;
}

footer#footer::after {
content: none !important;
display: none !important;
}
}

/* ==========================================
5. ПЛАНШЕТЫ
========================================== */

@media (min-width: 768px) and (max-width: 1199px) {

/* Не показываем угловую хвою */

header#header::before,
header#header::after {
content: none !important;
display: none !important;
}

/* Не показываем боковые гирлянды */

body:has(section#category)::before,
body:has(section#category)::after {
content: none !important;
display: none !important;
}

/* Уменьшенная гирлянда подвала */

footer#footer::before {
height: 90px !important;
background-size:
  auto 90px !important;
}
}

/* ==========================================
6. МОБИЛЬНАЯ ВЕРСИЯ
НЕ МЕНЯЕМ ВЕРСТКУ
========================================== */

@media (max-width: 767px) {

/* Не показываем старые мобильные елки и боковой декор. */
#mobmenu::before,
#mobmenu::after,
body:has(section#category)::before,
body:has(section#category)::after {
  content: none !important;
  display: none !important;
  background-image: none !important;
}

/* Санта на санях с оленями между логотипом и иконками. */
header#header {
  position: relative !important;
  overflow: visible !important;
}
header#header::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: clamp(112px, 34vw, 148px) !important;
  height: 64px !important;
  background: url('/image/catalog/newyear2027/uley_santa_mobile.webp') center / contain no-repeat !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* Сплошная хвойная гирлянда вдоль верхней кромки подвала. */
/* Шапочка Деда Мороза над буквой «а» в названии «Ферма». */
header#header .h_t_logo_box,
header#header .h_t_logo_box > a {
  overflow: visible !important;
}
header#header .h_t_logo_box > a {
  position: relative !important;
}
header#header .h_t_logo_box > a::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: -15px !important;
  right: -12px !important;
  left: auto !important;
  width: 29px !important;
  height: 30px !important;
  background: url('/image/catalog/newyear2027/santa_hat.svg') center / contain no-repeat !important;
  transform: rotate(30deg) !important;
  transform-origin: center !important;
  pointer-events: none !important;
  z-index: 8 !important;
}

/* Прямая хвойная гирлянда с бантами и шарами по нижнему краю шапки. */
header#header::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  bottom: -46px !important;
  width: 100% !important;
  height: 48px !important;
  border-radius: 0 0 22px 22px !important;
  background: url('/image/catalog/newyear2027/uley_mobile_header_garland_2027.webp') center top / auto 48px repeat-x !important;
  pointer-events: none !important;
  z-index: 1 !important;
  transform: none !important;
}

/* Поле поиска и раскрывающаяся панель выше декоративной гирлянды. */
header#header #search,
header#header .search,
header#header .search-box,
header#header .search_form,
header#header .h_t_search,
header#header .h_t_search_box,
header#header .search__form,
header#header form[action*="search"] {
  position: relative !important;
  z-index: 20 !important;
}

/* Снежинки на светлом фоне каталога и главной страницы. */
body > section#main,
body:has(section#category) #content,
body:has(section#category) section#category,
body:has(section#category) section#catalog {
  background-image: url('/image/catalog/newyear2027/uley_snowflakes_contrast_v41.svg') !important;
  background-repeat: repeat !important;
  background-position: center top !important;
  background-size: 380px 275px !important;
}

footer#footer {
  position: relative !important;
  border-top: 2px solid var(--uley-ny-gold) !important;
}
footer#footer::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: 100% !important;
  height: 85px !important;
  background: url('/image/catalog/newyear2027/uley_ny_footer_2027.webp') center top / auto 85px repeat-x !important;
  pointer-events: none !important;
  z-index: 2 !important;
}
footer#footer::after {
  content: none !important;
  display: none !important;
}
}

/* ==========================================
7. УБИРАЕМ СТАРЫЕ СИМВОЛЫ
СНЕЖИНКИ И РОМБИКИ У ЗАГОЛОВКОВ
========================================== */

section#category h2::after,
section#catalog h2::after,
section#about h2::after {
content: none !important;
display: none !important;
}

/* ==========================================
КОНЕЦ CSS — NEW YEAR 2027 v3.3
========================================== */

/* =========================================
ФЕРМА УЛЕЙ — ФИНАЛЬНАЯ КОРРЕКЦИЯ v3.4
Подвал и мобильную версию не трогаем
========================================= */

@media (min-width: 1200px) {

/* 1. СНЕГ — ПОДНИМАЕМ НАД БУКВАМИ */

header#header .h_t_logo_box > a::before {
top: -11px !important;
left: 65px !important;
width: 140px !important;
height: 32px !important;

background-image:
  url('/image/catalog/newyear2027/uley_logo_snow_v32.svg') !important;

background-repeat: no-repeat !important;
background-position: center top !important;
background-size: 100% 100% !important;

pointer-events: none !important;
z-index: 8 !important;
}

/* 2. ПРАВЫЙ УГОЛ — ШИРЕ И КОРОЧЕ */

header#header::after {
content: "" !important;
display: block !important;
top: 0 !important;
right: 0 !important;
bottom: auto !important;
left: auto !important;

width: 320px !important;
height: 165px !important;

background-image:
  url('/image/catalog/newyear2027/uley_corner_right_v32.webp') !important;

background-repeat: no-repeat !important;
background-position: right top !important;
background-size: 320px auto !important;

pointer-events: none !important;
z-index: 2 !important;
}
}

/* 3. СНЕЖИНКИ — ЗАМЕТНЕЕ НА БЕЛОМ ФОНЕ */

@media (min-width: 768px) {

body:has(section#category) #content,
body:has(section#category) section#category,
body:has(section#category) section#catalog {
background-image:
  url('/image/catalog/newyear2027/uley_snowflakes_v32.svg') !important;

background-repeat: repeat !important;
background-position: center top !important;

/* Снежинки немного крупнее */
background-size: 760px 550px !important;
}
}

/* =========================================
ULEY NEW YEAR 2027 — HEADER FIX v3.6
Не меняем расположение элементов шапки
========================================= */

@media (min-width: 1200px) {

/* Шапка — исходная структура */
header#header {
position: relative !important;
isolation: isolate;
}

/* Хвоя — позади содержимого */
header#header::after {
z-index: -1 !important;
pointer-events: none !important;
}

/* Не меняем position у дочерних блоков */

}

/* =========================================
ULEY NEW YEAR 2027 — SNOWFLAKES FIX v3.7
Снежинки на белом фоне главной страницы
========================================= */

@media (min-width: 768px) {

/* Фон всей главной страницы */
body:has(section#category) {
background-image:
url('/image/catalog/newyear2027/uley_snowflakes_v32.svg') !important;
background-repeat: repeat !important;
background-position: center 220px !important;
background-size: 760px 550px !important;
background-attachment: scroll !important;
}

/* Убираем дублирование снежинок в секциях */
body:has(section#category) #content,
body:has(section#category) section#category,
body:has(section#category) section#catalog {
background-image: none !important;
}
}

/* =========================================
ФЕРМА УЛЕЙ — СНЕЖИНКИ v3.8
Отдельный декоративный слой
========================================= */

@media (min-width: 768px) {

/* Главная страница */
body:has(section#category) {
position: relative;
}

/* Снежинки на свободных белых участках */
body:has(section#category) section#category,
body:has(section#category) section#catalog {
position: relative !important;
isolation: isolate;
}

body:has(section#category) section#category::before,
body:has(section#category) section#catalog::before {
content: "" !important;
display: block !important;
position: absolute !important;
inset: 0 !important;
width: 100% !important;
height: 100% !important;

background-image:
  url('/image/catalog/newyear2027/uley_snowflakes_v32.svg') !important;

background-repeat: repeat !important;
background-position: center top !important;
background-size: 760px 550px !important;

opacity: 1 !important;
pointer-events: none !important;

z-index: -1 !important;
}
}

/* =========================================
ФЕРМА УЛЕЙ — СНЕЖИНКИ v3.9
Используем реальный контейнер #main
========================================= */

@media (min-width: 768px) {

/* Снежинки на белом фоне сайта */
body:has(section#category) section#main {
background-image:
url('/image/catalog/newyear2027/uley_snowflakes_v32.svg') !important;
background-repeat: repeat !important;
background-position: center top !important;
background-size: 760px 550px !important;
}

/* Отключаем старые декоративные слои */
body:has(section#category) section#category::before,
body:has(section#category) section#catalog::before {
content: none !important;
display: none !important;
}
}

/* =========================================
ФЕРМА УЛЕЙ — СНЕЖИНКИ v4.0
Исправление селектора
========================================= */

@media (min-width: 768px) {

/* Снежинки на основном белом фоне */
body > section#main {
background-image:
url('/image/catalog/newyear2027/uley_snowflakes_v32.svg') !important;
background-repeat: repeat !important;
background-position: center top !important;
background-size: 760px 550px !important;
}

}

/* ФЕРМА УЛЕЙ — СНЕЖИНКИ v4.2 /
/ Меняем только фон, не трогаем фотографии */

@media (min-width: 768px) {
body > section#main {
filter: none !important;
background-image:
  url('/image/catalog/newyear2027/uley_snowflakes_contrast_v41.svg') !important;

background-repeat: repeat !important;
background-position: center top !important;
background-size: 760px 550px !important;
}
}

/* ФЕРМА УЛЕЙ — СНЕГ ПОД ЛОГОТИПОМ v4.4 */

@media (min-width: 768px) {

header#header .h_t_logo_box > a::before {
top: 37px !important;
left: 65px !important;
width: 140px !important;
height: 22px !important;

background-image:
  url('/image/catalog/newyear2027/uley_logo_snow_v32.svg') !important;

background-repeat: no-repeat !important;
background-position: center top !important;
background-size: 100% 100% !important;

/* Переворачиваем сосульки вверх,
   чтобы снег выглядел как нижний сугроб */
transform: rotate(180deg) !important;

pointer-events: none !important;
z-index: 8 !important;
}
}

/* ФЕРМА УЛЕЙ — СОСУЛЬКИ ВНИЗ v4.5 */

@media (min-width: 768px) {

header#header .h_t_logo_box > a::before {
top: 37px !important;
left: 65px !important;
width: 140px !important;
height: 22px !important;

transform: none !important;
}

}

/* ФЕРМА УЛЕЙ — СНЕГ ПОД ЛОГОТИПОМ v4.6 */

@media (min-width: 768px) {

header#header .h_t_logo_box > a::before {
top: 52px !important;
left: 65px !important;
width: 140px !important;
height: 22px !important;

transform: none !important;
pointer-events: none !important;
}

}

/* ==========================================
ФЕРМА УЛЕЙ — ШАПКА ДЕДА МОРОЗА v4.7
Убираем снег, возвращаем шапочку
========================================== */

@media (min-width: 768px) {

/* Полностью убираем сугроб и сосульки */
header#header .h_t_logo_box > a::before {
content: none !important;
display: none !important;
background-image: none !important;
}

/* Возвращаем шапочку Деда Мороза */
header#header .h_t_logo_box > a::after {
content: "" !important;
display: block !important;
position: absolute !important;
top: -21px !important;
left: calc(100% - 25px) !important;

width: 43px !important;
height: 44px !important;

background:
  url('/image/catalog/newyear2027/santa_hat.svg')
  center / contain no-repeat !important;

pointer-events: none !important;
z-index: 8 !important;

transform: rotate(13deg) !important;
}
}

/* ШАПКА ДЕДА МОРОЗА — НАКЛОН 30° */

@media (min-width: 768px) {
header#header .h_t_logo_box > a::after {
transform: rotate(30deg) !important;
}
}
/* ==========================================
   FIX v6 — каталог поверх баннеров (desktop)
   Не меняем мобильное новогоднее оформление
   ========================================== */
@media (min-width: 768px) {
  header#header {
    position: relative !important;
    z-index: 1000 !important;
  }

  /* Выпадающая панель каталога — выше слайдера */
  header#header .dropdown-menu,
  header#header .catalog-menu,
  header#header .catalog__menu,
  header#header #menu,
  header#header #catalog-menu {
    z-index: 1001 !important;
  }
}
