/* ============================================================
   YELLA.UZ — BRAND OVERRIDE CSS v2.0
   Концепция: Минималистичный чёрно-белый
   #0A0A0A · #FFFFFF · #F5F5F5 · #737373
   Подключить в header.twig ПОСЛЕ основного stylesheet
   ============================================================ */

/* ── ПЕРЕМЕННЫЕ ─────────────────────────────────────────── */
:root {
  --primary:    #0A0A0A;
  --white:      #FFFFFF;
  --muted:      #F5F5F5;
  --border:     #E5E5E5;
  --text-secondary: #737373;
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-full: 50px;
}

/* ── ТИПОГРАФИКА ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

body,
h1, h2, h3, h4, h5, h6,
p, a, span, div, button, input, select, label {
  font-family: 'Nunito', sans-serif !important;
}

body {
  background: var(--white) !important;
  color: var(--primary) !important;
}

/* ============================================================
   МОБИЛЬНЫЙ ХИДЕР — Yella v2 (только до 767px)
   Усиленные селекторы — перебивают тему Upstore и .light-theme
   ============================================================ */

@media (max-width: 767px) {

  /* ── Скрыть верхнюю полоску и моб-баннер ── */
  html body #top,
  html body .htop-b-mob { display: none !important; }

  /* ── Хидер без белого spacer и без наложения на первый баннер ──
     НЕ ставим padding на body: он создаёт белую полосу сверху.
     Fixed-хидер темы переводим в sticky — он остаётся в потоке, поэтому баннер начинается строго ниже поиска. */
  html body {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* ── Каркас хидера: белый фон, тонкая линия, без тени ── */
  html body .up-header,
  html body header.up-header,
  html body .light-theme .up-header,
  html body.light-theme .up-header,
  html body .up-header.h-sticky,
  html body .up-header.fix-header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    transform: none !important;
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    background-image: none !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* На случай если тема добавляет offset первому блоку под fixed header */
  html body .up-header + *,
  html body .up-header ~ #content,
  html body .up-header ~ .container,
  html body #common-home {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  html body .up-header > .container,
  html body .up-header .container,
  html body .up-header .row,
  html body .up-header__inner,
  html body .header-top,
  html body .header-middle,
  html body .header-bottom {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    background-image: none !important;
  }

  html body .up-header > .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  html body .up-header > .container > .row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: nowrap !important;
  }

  html body .up-header__left,
  html body .up-header__right {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    background: transparent !important;
  }
  html body .up-header__left { flex: 1 1 auto !important; min-width: 0 !important; }
  html body .up-header__right { flex: 0 0 auto !important; gap: 2px !important; }

  /* ── Бургер ── */
  html body .up-header__btn-mobile-menu,
  html body .btn-menu-mobile,
  html body button.btn-menu-mobile {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 4px 0 -8px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #0A0A0A !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
  }
  html body .up-header__btn-mobile-menu i,
  html body .up-header__btn-mobile-menu .up-icon-22,
  html body .btn-menu-mobile i {
    color: #0A0A0A !important;
    font-size: 22px !important;
    background: transparent !important;
  }

  /* ── Логотип ── */
  html body #logo,
  html body .up-header__logo-top,
  html body .up-header__logo-mobile,
  html body .up-header__logo-desktop {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body #logo a,
  html body #logo h1 a,
  html body .up-header__logo-mobile a,
  html body .navbar-brand {
    color: #0A0A0A !important;
    font-weight: 800 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;
    text-decoration: none !important;
    background: transparent !important;
  }
  html body #logo h1 { margin: 0 !important; padding: 0 !important; font-size: inherit !important; }
  html body .up-header__logo-mobile img,
  html body .up-header__logo-desktop img,
  html body #logo img {
    max-height: 28px !important;
    width: auto !important;
  }

  /* ── Скрыть на мобильных лишние десктоп-блоки в хидере ── */
  html body .up-header .box-search,
  html body .up-header__right .box-search,
  html body .up-header .btn-menu-top,
  html body .up-header .box-menu-top,
  html body .up-header .up-theme-mode,
  html body .up-header .box-language-currency,
  html body .up-header .box-wishlist,
  html body .up-header .box-compare {
    display: none !important;
  }

  /* ── Иконки справа: кабинет + корзина ── */
  html body .up-header .box-account,
  html body .up-header .box-cart {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  html body .up-header .btn-account,
  html body .up-header .btn-cart-top,
  html body .up-header .box-cart > a,
  html body .up-header .box-cart > button,
  html body .up-header .box-cart .dropdown-toggle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 10px !important;
    color: #0A0A0A !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    position: relative !important;
    overflow: visible !important;
  }
  html body .up-header .btn-account i,
  html body .up-header .btn-cart-top i,
  html body .up-header .box-cart i,
  html body .up-header .box-cart .up-icon-22 {
    color: #0A0A0A !important;
    font-size: 22px !important;
    background: transparent !important;
  }

  /* ── СКРЫВАЕМ подписи "Меню", "Кабинет", "Корзина" под иконками ── */
  html body .up-header .text-a-icon,
  html body .up-header .btn-account .text-a-icon,
  html body .up-header .btn-cart-top .text-a-icon,
  html body .up-header__btn-mobile-menu .text-a-icon,
  html body .up-header .text-ai-account,
  html body .up-header .text-ai-cart,
  html body .up-header .text-ai-menu,
  html body .up-header .box-cart .ch-c-name,
  html body .up-header .box-cart .ch-c-price,
  html body .up-header .box-cart .cart-text,
  html body .up-header .box-cart .cart-total-price,
  html body .up-header .box-account.text-ai-on .text-a-icon,
  html body .up-header .box-cart.text-ai-on .text-a-icon,
  html body .up-header .box-cart .text-a-icon,
  html body .up-header .box-account .text-a-icon,
  html body .up-header [class*="text-ai"],
  html body .up-header .box-cart > a > span,
  html body .up-header .box-cart > button > span,
  html body .up-header .btn-cart-top > span,
  html body .up-header .btn-account > span {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    font-size: 0 !important;
  }

  /* ── Бейдж корзины — компактный кружок справа сверху иконки ── */
  html body .up-header .cart-i,
  html body .up-header .box-cart .cart-i,
  html body .up-header #cart-total .cart-i,
  html body .up-header .box-cart .badge,
  html body .up-header .box-cart [class*="cart-quantity"] {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    border-radius: 999px !important;
    background: #0A0A0A !important;
    background-color: #0A0A0A !important;
    color: #FFFFFF !important;
    border: 2px solid #FFFFFF !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 14px !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
  }

  /* ── Строка поиска под хидером ── */
  html body .up-header .search-wrapper.visible-xs,
  html body .search-wrapper.visible-xs,
  html body .search-wrapper {
    background: #FFFFFF !important;
    padding: 6px 12px 10px !important;
    border-bottom: 1px solid var(--border) !important;
    margin: 0 !important;
  }
  html body .search-wrapper .container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  html body .search-wrapper #search,
  html body .search-wrapper .search-top,
  html body .search-wrapper .header-search {
    background: var(--muted) !important;
    background-color: #F5F5F5 !important;
    border: 1px solid var(--border) !important;
    border-radius: 999px !important;
    height: 40px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
  }

  html body .search-wrapper input[type="text"],
  html body .search-wrapper .form-control {
    flex: 1 1 auto !important;
    background: transparent !important;
    border: 0 !important;
    height: 40px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #0A0A0A !important;
    box-shadow: none !important;
    outline: none !important;
  }
  html body .search-wrapper input::placeholder { color: var(--text-secondary) !important; }

  html body .search-wrapper .btn-search,
  html body .search-wrapper button[type="submit"] {
    flex: 0 0 auto !important;
    width: 40px !important;
    height: 40px !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--text-secondary) !important;
    padding: 0 !important;
  }
  html body .search-wrapper .btn-search i {
    color: var(--text-secondary) !important;
    font-size: 18px !important;
  }
}

/* ============================================================
   КНОПКА КАТАЛОГА (Десктоп)
   ============================================================ */
   
.up-header .btn-menu-top,
.light-theme .up-header .btn-menu-top,
.navbar .btn-menu-top,
.box-menu-top .btn-menu-top,
button.btn-menu-top,
button.btn-menu-top:link,
button.btn-menu-top:visited,
#header .btn-menu-top,
.btn-menu-top {
  background-color: var(--primary) !important;
  background: var(--primary) !important;
  color: var(--white) !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.2s ease !important;
}

.up-header .btn-menu-top i,
.up-header .btn-menu-top span,
.light-theme .up-header .btn-menu-top i,
.light-theme .up-header .btn-menu-top span,
.btn-menu-top i,
.btn-menu-top span,
button.btn-menu-top i,
button.btn-menu-top span {
  color: var(--white) !important;
  background: transparent !important;
}

/* Ховер состояние */
.up-header .btn-menu-top:hover,
.up-header .btn-menu-top:focus,
.up-header .btn-menu-top:active,
.light-theme .up-header .btn-menu-top:hover,
.btn-menu-top:hover,
.btn-menu-top:focus,
.btn-menu-top:active,
button.btn-menu-top:hover,
button.btn-menu-top:focus,
button.btn-menu-top:active,
#header .btn-menu-top:hover {
  background-color: #262626 !important;
  background: #262626 !important;
  color: var(--white) !important;
  border: none !important;
}

.up-header .btn-menu-top:hover i,
.up-header .btn-menu-top:hover span,
.btn-menu-top:hover i,
.btn-menu-top:hover span {
  color: var(--white) !important;
}

/* ============================================================
   ВЕРХНЯЯ ПОЛОСКА (телефон, валюта, язык)
   ============================================================ */
#top,
.top-bar,
#top .container {
  background: var(--muted) !important;
  border-bottom: 1px solid var(--border) !important;
}

#top a,
.top-bar a,
#top .links a {
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

#top a:hover,
.top-bar a:hover {
  color: var(--primary) !important;
}

/* ============================================================
   НАВИГАЦИЯ / МЕНЮ
   ============================================================ */
#menu,
.navbar,
nav.navbar {
  background: var(--white) !important;
  border: none !important;
  border-top: 1px solid var(--border) !important;
}

#menu .nav > li > a,
.navbar-nav > li > a,
#menu a {
  color: var(--primary) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

#menu .nav > li > a:hover,
.navbar-nav > li > a:hover,
#menu a:hover {
  color: var(--text-secondary) !important;
  background: var(--muted) !important;
}

#menu .nav > li.active > a,
.navbar-nav > li.active > a {
  color: var(--primary) !important;
  background: var(--muted) !important;
}

/* Дропдаун меню */
.dropdown-menu {
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important;
}

.dropdown-menu li a {
  color: var(--primary) !important;
  font-weight: 600 !important;
}

.dropdown-menu li a:hover {
  background: var(--muted) !important;
  color: var(--primary) !important;
}

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn-primary,
.btn-warning,
input[type="submit"],
button[type="submit"] {
  background: var(--primary) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  font-weight: 800 !important;
  transition: opacity 0.2s, transform 0.15s !important;
}

.btn-primary:hover,
.btn-warning:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--primary) !important;
  color: var(--white) !important;
  opacity: 0.85 !important;
}

.btn-default {
  background: var(--muted) !important;
  color: var(--primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  font-weight: 700 !important;
}

.btn-default:hover {
  background: var(--border) !important;
  color: var(--primary) !important;
}

/* Кнопка "В корзину" общая */
.btn-general,
.btn-add-cart,
.product-thumb button[type="submit"],
.product-thumb .btn-cart,
#button-cart {
  background: var(--primary) !important;
  background-color: var(--primary) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  font-weight: 800 !important;
}

.btn-general:hover,
.btn-add-cart:hover,
#button-cart:hover {
  opacity: 0.85 !important;
}

/* ============================================================
   КАРТОЧКИ ТОВАРОВ
   ============================================================ */
.product-thumb,
.product-card,
.product-layout {
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.product-thumb:hover,
.product-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.1) !important;
}

.product-thumb .caption,
.product-thumb .product-info {
  padding: 12px 14px !important;
  background: var(--white) !important;
}

.product-thumb h4,
.product-thumb .name {
  font-weight: 700 !important;
  color: var(--primary) !important;
}

.product-thumb h4 a {
  color: var(--primary) !important;
}

/* Цена */
.product-thumb .price,
.price,
.product-price {
  font-weight: 800 !important;
  color: var(--primary) !important;
}

.product-thumb .price-old,
.price-old {
  color: var(--text-secondary) !important;
  text-decoration: line-through !important;
}

/* Кнопка "в корзину" на карточке */
.product-thumb .button-group button,
.product-thumb .btn-cart {
  background: var(--primary) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 800 !important;
}

.product-thumb .button-group button:hover {
  opacity: 0.85 !important;
}

/* Бейджи */
.product-thumb .label-sale,
.product-thumb .label-new,
.sticker {
  background: var(--primary) !important;
  color: var(--white) !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
}

/* ============================================================
   ФУТЕР
   ============================================================ */
footer,
#footer {
  background: var(--primary) !important;
  color: rgba(255,255,255,0.7) !important;
  border-top: none !important;
}

footer h5,
#footer h5,
footer .title {
  color: var(--white) !important;
  font-weight: 800 !important;
  border-bottom: 2px solid rgba(255,255,255,0.2) !important;
}

footer a,
#footer a {
  color: rgba(255,255,255,0.6) !important;
  font-weight: 600 !important;
}

footer a:hover,
#footer a:hover {
  color: var(--white) !important;
}

#footer-bottom,
footer .copyright,
.footer-bottom {
  background: #000 !important;
  color: rgba(255,255,255,0.4) !important;
}

/* ============================================================
   ФОРМЫ
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
  background: var(--muted) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  color: var(--primary) !important;
  font-weight: 600 !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary) !important;
  background: var(--white) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(10,10,10,0.1) !important;
}

/* ============================================================
   ПАГИНАЦИЯ
   ============================================================ */
.pagination > li > a {
  background: var(--muted) !important;
  border: none !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
  border-radius: var(--radius-sm) !important;
}

.pagination > li.active > a {
  background: var(--primary) !important;
  color: var(--white) !important;
}

.pagination > li > a:hover {
  background: var(--border) !important;
  color: var(--primary) !important;
}

/* ============================================================
   РЕЙТИНГ
   ============================================================ */
.rating .fa-star,
.stars .fa-star {
  color: var(--primary) !important;
}

/* ============================================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================================ */
.breadcrumb {
  background: transparent !important;
}

.breadcrumb li a {
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
}

.breadcrumb li a:hover {
  color: var(--primary) !important;
}

/* ============================================================
   НИЖНЯЯ ПАНЕЛЬ НАВИГАЦИИ (Мобильная)
   ============================================================ */
.bottom-nav,
.mobile-bottom-nav,
.fixed-bottom-nav,
.nav-bottom-fixed,
.mobile-menu-bottom {
  background: var(--white) !important;
  border-top: 1px solid var(--border) !important;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05) !important;
}

.bottom-nav a,
.mobile-bottom-nav a,
.fixed-bottom-nav a,
.nav-bottom-fixed a {
  color: var(--text-secondary) !important;
}

.bottom-nav a.active,
.mobile-bottom-nav a.active,
.fixed-bottom-nav a.active,
.nav-bottom-fixed a.active {
  color: var(--primary) !important;
}

.bottom-nav i,
.mobile-bottom-nav i,
.fixed-bottom-nav i {
  color: inherit !important;
}

/* ============================================================
   СКРОЛЛБАР
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--muted);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ============================================================
   АЛЕРТЫ
   ============================================================ */
.alert-success {
  background: var(--muted) !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  border-radius: var(--radius-md) !important;
}

.alert-danger,
.alert-error {
  background: #FEE2E2 !important;
  color: #991B1B !important;
  border: 1px solid #FECACA !important;
  border-radius: var(--radius-md) !important;
}

.alert-info {
  background: var(--muted) !important;
  color: var(--primary) !important;
  border-left: 4px solid var(--primary) !important;
  border-radius: var(--radius-md) !important;
}

/* ============================================================
   ССЫЛКИ
   ============================================================ */
a {
  color: var(--primary) !important;
  transition: color 0.15s !important;
}

a:hover {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
}

/* ============================================================
   ОБЩИЕ СТИЛИ
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary) !important;
  font-weight: 800 !important;
}

.module-title,
.box-heading,
h3.title {
  font-weight: 800 !important;
  color: var(--primary) !important;
  border-bottom: 2px solid var(--primary) !important;
  display: inline-block !important;
}

#content,
.content-wrapper {
  background: var(--white) !important;
}
