/**
 * Пищепром Header - Desktop Styles
 * Кастомный хедер для Aspro.Maximum
 */

/* Reset */
.pp-wrap,.pp-wrap *,.pp-wrap *::before,.pp-wrap *::after{box-sizing:border-box!important}

/* Global reset for Aspro pseudo-elements */
.pp-wrap ul,.pp-wrap ol,.pp-wrap li{list-style:none!important;list-style-type:none!important;margin:0!important;padding:0!important}
.pp-wrap li::before,.pp-wrap li::after,.pp-wrap li::marker{display:none!important;content:""!important;width:0!important;height:0!important;border:none!important;background:none!important;position:absolute!important;left:-9999px!important}

/* Top Bar */
.pp-top{background:#1d4ed8!important;color:#fff!important;font-size:14px!important;padding:0!important;margin:0!important}
.pp-cont{max-width:1400px!important;margin:0 auto!important;padding:0 16px!important;width:100%!important}
.pp-top-in{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:8px 0!important;gap:16px!important}
.pp-top a{color:#fff!important;text-decoration:none!important}
.pp-top a:hover{color:#dbeafe!important}
.pp-top-left{flex:1!important}
.pp-top-right{display:flex!important;align-items:center!important;gap:24px!important}
.pp-top-links{display:flex!important;gap:24px!important}

/* Main Header */
.pp-main{background:#2563eb!important;position:sticky!important;top:0!important;z-index:1000!important;box-shadow:0 4px 6px -1px rgba(0,0,0,.1)!important;padding:0!important;margin:0!important}
.pp-main-in{display:flex!important;align-items:center!important;gap:16px!important;padding:12px 0!important;flex-wrap:nowrap!important}

/* LOGO */
.pp-logo{display:flex!important;align-items:center!important;gap:16px!important;text-decoration:none!important;flex-shrink:0!important;max-width:280px!important}
.pp-logo .logo{max-height:60px!important;max-width:200px!important;overflow:hidden!important;display:block!important;width:auto!important;height:auto!important}
.pp-logo .logo.colored{max-height:60px!important;max-width:200px!important}
.pp-logo .logo a{display:block!important}
.pp-logo .logo img,
.pp-logo .logo a img,
.pp-wrap .pp-logo .logo img,
.pp-wrap .logo img{max-height:60px!important;max-width:200px!important;width:auto!important;height:auto!important;display:block!important;object-fit:contain!important}
.pp-title{color:#fff!important;font-size:22px!important;font-weight:700!important;white-space:nowrap!important;margin:0!important;padding:0!important}

/* Search Area */
.pp-search-area{flex:1 1 auto!important;display:flex!important;gap:16px!important;align-items:center!important;min-width:0!important}
.pp-cat-btn{display:flex!important;align-items:center!important;gap:8px!important;height:48px!important;padding:0 20px!important;background:#3b82f6!important;border:2px solid rgba(255,255,255,.3)!important;border-radius:8px!important;color:#fff!important;font-size:16px!important;font-weight:600!important;cursor:pointer!important;flex-shrink:0!important}
.pp-cat-btn:hover{background:#60a5fa!important}
.pp-cat-btn svg{width:20px!important;height:20px!important;flex-shrink:0!important}
.pp-cat-btn span{white-space:nowrap!important}

/* Search Input */
.pp-search{flex:1 1 auto!important;position:relative!important;min-width:200px!important}
.pp-search form{display:block!important;position:relative!important;margin:0!important;padding:0!important}
.pp-search input,
.pp-search input[type="text"]{width:100%!important;height:48px!important;padding:0 56px 0 16px!important;border:none!important;border-radius:8px!important;font-size:16px!important;outline:none!important;background:#fff!important;color:#333!important;margin:0!important;box-shadow:none!important}
.pp-search input:focus{box-shadow:0 0 0 3px rgba(147,197,253,.5)!important}
.pp-search button,
.pp-search button[type="submit"]{position:absolute!important;right:4px!important;top:50%!important;transform:translateY(-50%)!important;width:40px!important;height:40px!important;background:#ef4444!important;border:none!important;border-radius:8px!important;color:#fff!important;cursor:pointer!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;margin:0!important}
.pp-search button:hover{background:#dc2626!important}
.pp-search button svg{width:20px!important;height:20px!important}

/* Actions (favorites, cabinet, cart) */
.pp-actions{display:flex!important;align-items:center!important;gap:16px!important;flex-shrink:0!important}
.pp-act{display:flex!important;flex-direction:column!important;align-items:center!important;gap:4px!important;padding:8px 8px!important;color:#fff!important;text-decoration:none!important;background:none!important;border:none!important;cursor:pointer!important;position:relative!important;min-width:60px!important}
.pp-act:hover{color:#dbeafe!important}
.pp-act svg{width:24px!important;height:24px!important}
.pp-act span{font-size:12px!important;white-space:nowrap!important}
.pp-act-badge{position:absolute!important;top:0!important;right:-2px!important;background:#ef4444!important;color:#fff!important;font-size:11px!important;font-weight:700!important;border-radius:50%!important;min-width:20px!important;height:20px!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0 4px!important}

/* Cart badge visibility - controlled by Aspro JS via basket-count class */
.pp-act.basket-link:not(.basket-count) .count{display:none!important}
.pp-act.basket-link.basket-count .count{display:flex!important}

/* Mega Menu */
.pp-mega,.pp-mega *,.pp-mega *::before,.pp-mega *::after{border-left:none!important;border-top:none!important;border-bottom:none!important}
.pp-mega{display:none!important;position:absolute!important;left:0!important;right:0!important;top:100%!important;background:#fff!important;box-shadow:0 20px 25px -5px rgba(0,0,0,.1)!important;z-index:999!important;padding:16px 0!important;border:none!important}
.pp-mega.open{display:block!important}
.pp-mega-inner{max-width:1280px!important;margin:0 auto!important;padding:0 16px!important}
.pp-mega-in{display:flex!important;padding:0!important;border:none!important}

/* Categories list */
.pp-cats{width:320px!important;background:#f9fafb!important;border:none!important;border-right:1px solid #e5e7eb!important;flex-shrink:0!important;list-style:none!important;margin:0!important;padding:0!important}
.pp-cats,.pp-cats *{list-style:none!important}
.pp-cats li{list-style:none!important;margin:0!important;padding:0!important;border:none!important;position:relative!important}
.pp-cats li::before,.pp-cats li::after{display:none!important;content:""!important;width:0!important;height:0!important;border:none!important;background:none!important;position:static!important}
.pp-cat{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px 24px!important;color:#374151!important;cursor:pointer!important;border:none!important;background:transparent!important;width:100%!important;text-align:left!important;font-size:14px!important;font-family:inherit!important;line-height:1.5!important;transition:all .15s ease!important}
.pp-cat:hover,.pp-cat.active{background:#eff6ff!important;color:#2563eb!important}
.pp-cat-inner{display:flex!important;align-items:center!important;gap:12px!important}
.pp-cat-inner span{font-size:14px!important}
.pp-cat svg{width:20px!important;height:20px!important;color:#9ca3af!important;flex-shrink:0!important}
.pp-cat:hover svg,.pp-cat.active svg{color:#2563eb!important}
.pp-cat-arrow{width:16px!important;height:16px!important;flex-shrink:0!important;color:#9ca3af!important}
.pp-cat:hover .pp-cat-arrow,.pp-cat.active .pp-cat-arrow{color:#2563eb!important}

/* Subcategories */
.pp-subs{flex:1!important;padding:32px!important;display:none!important;background:#fff!important}
.pp-subs.visible{display:block!important}
.pp-subs h3{font-size:20px!important;font-weight:700!important;color:#111827!important;margin:0 0 16px!important;padding:0!important}
.pp-subs-grid{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:16px!important}
.pp-sub{color:#4b5563!important;text-decoration:none!important;padding:8px 0!important;font-size:14px!important;display:block!important;transition:color .15s ease!important}
.pp-sub:hover{color:#2563eb!important}

/* Promo banner */
.pp-promo{margin-top:24px!important;background:linear-gradient(to right,#3b82f6,#2563eb)!important;border-radius:12px!important;padding:24px!important;color:#fff!important}
.pp-promo h4{font-size:18px!important;font-weight:600!important;margin:0 0 8px!important}
.pp-promo p{color:#bfdbfe!important;margin:0 0 16px!important;font-size:14px!important}
.pp-promo-btn{display:inline-block!important;background:#ef4444!important;color:#fff!important;padding:10px 24px!important;border-radius:8px!important;text-decoration:none!important;font-weight:500!important;transition:background .15s ease!important}
.pp-promo-btn:hover{background:#dc2626!important;color:#fff!important}

/* Top Bar Phone (right-aligned) */
.pp-top-phone{display:inline-flex!important;align-items:center!important;margin-left:auto!important}
.pp-top-phone a{color:#fff!important;text-decoration:none!important}
.pp-top-phone a:hover{color:#dbeafe!important}
.pp-top-phone .property,.pp-top-phone .phone{display:inline-flex!important;align-items:center!important;margin:0!important;padding:0!important}
.pp-top-phone .title{display:none!important}
.pp-top-phone .value{display:inline!important;color:#fff!important}
.pp-top-phone .inline-block{display:inline!important}

/* Media Queries */
@media(max-width:1024px){
    .pp-subs-grid{grid-template-columns:repeat(2,1fr)!important}
}

/* Search Results Dropdown */
.title-search-result{position:absolute!important;top:100%!important;left:0!important;right:0!important;margin-top:4px!important;background:#fff!important;border-radius:8px!important;box-shadow:0 10px 25px rgba(0,0,0,.15)!important;z-index:1001!important;max-height:400px!important;overflow-y:auto!important;border:1px solid #e5e7eb!important}
.pp-search .title-search-result{position:absolute!important;top:100%!important;left:0!important;right:0!important;margin-top:4px!important;background:#fff!important;border-radius:8px!important;box-shadow:0 10px 25px rgba(0,0,0,.15)!important;z-index:1001!important;max-height:400px!important;overflow-y:auto!important;border:1px solid #e5e7eb!important}
.pp-search-results{padding:8px 0!important;background:#fff!important}
.pp-search-item{display:flex!important;align-items:center!important;gap:12px!important;padding:10px 16px!important;text-decoration:none!important;color:#374151!important;transition:background .15s ease!important}
.pp-search-item:hover{background:#f3f4f6!important}
.pp-search-img{width:50px!important;height:50px!important;flex-shrink:0!important;background:#f9fafb!important;border-radius:6px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
.pp-search-img img{width:100%!important;height:100%!important;object-fit:contain!important}
.pp-search-img svg{width:24px!important;height:24px!important;color:#9ca3af!important}
.pp-search-info{flex:1!important;min-width:0!important}
.pp-search-name{display:block!important;font-size:14px!important;color:#111827!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.pp-search-type{display:block!important;font-size:12px!important;color:#6b7280!important;margin-top:2px!important}
.pp-search-section .pp-search-img{background:#eff6ff!important}
.pp-search-section .pp-search-img svg{color:#2563eb!important}
.pp-search-all{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px 16px!important;background:#f9fafb!important;color:#2563eb!important;text-decoration:none!important;font-weight:500!important;font-size:14px!important;border-top:1px solid #e5e7eb!important}
.pp-search-all:hover{background:#eff6ff!important}
.pp-search-all svg{width:16px!important;height:16px!important}

/* Profile Widget */
.pp-profile{position:relative!important}
.pp-profile-inner{position:relative!important;display:flex!important;flex-direction:column!important;align-items:center!important}

/* Profile Dropdown */
.pp-profile-dropdown{visibility:hidden!important;opacity:0!important;position:absolute!important;top:100%!important;right:50%!important;transform:translateX(50%)!important;padding-top:10px!important;z-index:9999!important;transition:opacity .2s ease,visibility .2s ease!important}
.pp-profile-dropdown::before{content:""!important;position:absolute!important;top:0!important;left:0!important;right:0!important;height:15px!important}
.pp-profile-inner:hover .pp-profile-dropdown{visibility:visible!important;opacity:1!important}

/* Dropdown Menu Styles */
.pp-profile-dropdown .dropdown-menu{display:block!important;position:relative!important;background:#fff!important;border-radius:8px!important;box-shadow:0 10px 25px rgba(0,0,0,.15)!important;padding:8px 0!important;margin:0!important;min-width:180px!important;list-style:none!important}
.pp-profile-dropdown .dropdown-menu li{list-style:none!important;margin:0!important;padding:0!important}
.pp-profile-dropdown .dropdown-menu li::before,
.pp-profile-dropdown .dropdown-menu li::after,
.pp-profile-dropdown .dropdown-menu li::marker{display:none!important;content:""!important;width:0!important;height:0!important}
.pp-profile-dropdown .dropdown-menu li a{display:block!important;padding:10px 16px!important;color:#374151!important;text-decoration:none!important;font-size:14px!important;white-space:nowrap!important}
.pp-profile-dropdown .dropdown-menu li a:hover{background:#f3f4f6!important;color:#2563eb!important}

/* =============================================
   Fixed Header (#headerfixed) - Кастомный Пищепром
   Стандартный Aspro шаблон + CSS-оверрайды
   ============================================= */

/* Фон — синий: ВСЕ обёртки прозрачные, сам контейнер синий */
html body #headerfixed,
html body #headerfixed.fixed{
    --card_bg_black:#2563eb!important;
    background:#2563eb!important;
    background-color:#2563eb!important;
    box-shadow:0 4px 6px -1px rgba(0,0,0,.1)!important;
}
html body #headerfixed > .maxwidth-theme,
html body #headerfixed .logo-row,
html body #headerfixed .header__top-inner,
html body #headerfixed .left_wrap,
html body #headerfixed .right_wrap,
html body #headerfixed .line-block,
html body #headerfixed .line-block__item,
html body #headerfixed .inner-table-block,
html body #headerfixed .wrap_icon,
html body #headerfixed .search_wrap{
    background:transparent!important;
    background-color:transparent!important;
}

/* Логотип — инвертировать в белый */
html body #headerfixed .logo img{
    filter:brightness(0) invert(1)!important;
}

/* Иконки — ТОЛЬКО конкретные: бургер, кабинет, избранное, корзина */
html body #headerfixed .burger i.svg svg,
html body #headerfixed .wrap_cabinet i.svg svg,
html body #headerfixed .basket-link i.svg svg{
    filter:brightness(0) invert(1)!important;
}

/* Текст и ссылки — белые */
html body #headerfixed a{color:#fff!important}
html body #headerfixed a:hover{color:#dbeafe!important}
html body #headerfixed .dark-color{color:#fff!important}
html body #headerfixed .dark_link{color:#fff!important}
html body #headerfixed .darken span{color:#fff!important}
html body #headerfixed .phone a{color:#fff!important}

/* Телефон — скрыть иконку, белый текст */
html body #headerfixed .phones_block i.svg{display:none!important}

/* Счётчики — красный бейдж, БЕЗ фильтра */
html body #headerfixed .count{
    background:#ef4444!important;
    color:#fff!important;
    border-radius:50%!important;
    min-width:18px!important;height:18px!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    font-size:10px!important;font-weight:700!important;padding:0 3px!important;
    filter:none!important;
}
/* Скрыть текстовые названия "Избранные товары", "Корзина" */
html body #headerfixed .basket-link .title{display:none!important}

/* Поиск — белый инпут во всю ширину */
html body #headerfixed .search-block,
html body #headerfixed .search-wrapper{
    background:transparent!important;border:none!important;box-shadow:none!important;
}
html body #headerfixed form.search{
    background:#fff!important;border-radius:8px!important;border:none!important;height:40px!important;
    display:flex!important;align-items:center!important;
}
html body #headerfixed .search-input{
    background:transparent!important;color:#333!important;height:40px!important;border:none!important;
    font-size:14px!important;box-shadow:none!important;
}
/* Вертикальное выравнивание поиска по центру хедера + растянуть во всю ширину */
html body #headerfixed .search_wrap,
html body #headerfixed .search-block,
html body #headerfixed .search-wrapper,
html body #headerfixed .search_wrap .inner-table-block{
    display:flex!important;align-items:center!important;height:100%!important;width:100%!important;
}
html body #headerfixed .header__top-item.flex1{flex:1 1 auto!important;min-width:0!important}
html body #headerfixed .search_wrap{width:100%!important}
html body #headerfixed form.search .search-input-div{flex:1 1 auto!important}
html body #headerfixed [id^="title-search_"]{width:100%!important}
/* Кнопка поиска — красная, иконка по центру */
html body #headerfixed .btn-search{
    height:34px!important;width:34px!important;border-radius:8px!important;
    background:#ef4444!important;border:none!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    padding:0!important;position:absolute!important;right:3px!important;top:50%!important;transform:translateY(-50%)!important;
}
html body #headerfixed .btn-search:hover{background:#dc2626!important}
html body #headerfixed .btn-search i.svg{display:flex!important;align-items:center!important;justify-content:center!important;width:16px!important;height:16px!important}
html body #headerfixed .btn-search i.svg svg{filter:brightness(0) invert(1)!important;width:16px!important;height:16px!important}
/* Скрыть "Каталог" выпадашку и кнопку закрытия */
html body #headerfixed .dropdown-select.searchtype,
html body #headerfixed .close-block{display:none!important}

/* task-38398 (визуал 06.03.26): подпись «Под заказ» у товаров не в наличии в каталоге.
   Aspro рисует красную точку .icon.order с пустым .value — заполняем подписью.
   .value у Aspro не :empty (внутри пробельный узел), поэтому пишем без :empty. */
.catalog_item .item-stock .icon.order + .value::before,
.catalog_block .item-stock .icon.order + .value::before{content:"Под заказ"}
.catalog_item .item-stock .icon.order + .value,
.catalog_block .item-stock .icon.order + .value{color:#e10000}

/* task-38398 (06.03.26, Денис): единый стиль скругления — все кнопки и поля сайта к 8px.
   Системная тема Aspro задаёт `.btn:not(.round-ignore){border-radius:26px!important}` (pill).
   Перебиваем повышенной специфичностью (html body + :not(.round-ignore)). */
html body .btn:not(.round-ignore),
html body .btn_big, html body .btn-default, html body .btn-primary,
html body .btn-exlg, html body .to-cart, html body .in-cart,
html body .more_text_ajax, html body .bx_filter_search_button, html body .bx_filter .btn,
html body input[type="submit"], html body button[type="submit"], html body a.btn,
html body .colored_theme_bg-btn, html body .buy_btn, html body .to-cart-btn,
html body .in-cart-btn, html body .to_basket, html body .basket-btn,
html body .add2basket, html body .pp-cat-btn,
html body .popup-window .btn, html body .modal .btn, html body .form-control-btn,
html body input[type="text"], html body input[type="tel"], html body input[type="email"],
html body input[type="password"], html body input[type="number"], html body input[type="search"],
html body input[type="url"], html body input.form-control,
html body .inputbox, html body select, html body textarea, html body .form-control, html body .search-input {
    border-radius: 8px !important;
}
/* Tailwind-кнопки React-островов (карточка товара) — тоже к 8px, кроме круглых */
html body button[class*="tw-"]:not([class*="rounded-full"]),
html body a[class*="tw-rounded"]:not([class*="rounded-full"]) {
    border-radius: 8px !important;
}
/* Оформление заказа (sale.order.ajax): кнопка «Оформить заказ» и поле промокода
   — у v2-custom своя высокая специфичность, перебиваем сильнее. 8px как образец. */
html body .bx-soa #bx-soa-orderSave2 .btn,
html body .bx-soa [data-save-button],
html body .bx-soa-cart-total .btn,
html body #bx-soa-total-mobile .btn,
html body .bx-soa-coupon-input input[type="text"].form-control,
html body .bx-soa-coupon .bx-soa-coupon-input input.form-control {
    border-radius: 8px !important;
}
/* Круглые элементы оставляем круглыми (ползунки фильтра цены, иконочные кнопки) */
html body .bx_ui_slider_handle, html body [class*="tw-rounded-full"],
html body [class*="rounded-full"], html body .btn-circle, html body .btn.btn-round {
    border-radius: 50% !important;
}

/* task-38398 (06.03.26, Денис): кнопки «Рассрочка»/«Лизинг» в карточке (React-остров)
   вылезали за блок — ряд flex nowrap не давал ужать. Разрешаем перенос. */
html body .tw-flex.tw-gap-2:has(> button.tw-border-green-600),
html body .tw-flex.tw-gap-2:has(> button[class*="tw-border-green"]) {
    flex-wrap: wrap !important;
}
