/* ==========================================
   Strox - Master Stylesheet (Clean & Optimized)
   ========================================== */

body {
    background-color: #f4f6f8;
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- ВЕРХНЯ ПАНЕЛЬ --- */
#top {
    background-color: #1a1d24;
    border-bottom: 1px solid #282c35;
    padding: 6px 0;
}

#top .list-inline {
    margin-bottom: 0;
}

#top .list-inline > li {
    padding-left: 12px;
    padding-right: 12px;
}

#top .list-inline > li > a,
#top .list-inline > li,
#top .dropdown-toggle {
    color: #ffffff !important;
    background: transparent !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

#top .list-inline > li > a:hover,
#top .dropdown-toggle:hover,
#top .open > .dropdown-toggle {
    color: #ff6600 !important;
}

#top .list-inline > li i {
    color: #ffffff !important;
    margin-right: 4px;
}

#top .list-inline > li:hover i,
#top .list-inline > li > a:hover i {
    color: #ff6600 !important;
}

#top .dropdown-menu {
    background-color: #212529 !important;
    border: 1px solid #343a40 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    padding: 5px 0 !important;
}

#top .dropdown-menu li > a {
    color: #ffffff !important;
    background: transparent !important;
    padding: 8px 15px !important;
}

#top .dropdown-menu li > a:hover {
    background-color: #ff6600 !important;
    color: #ffffff !important;
}

/* --- ШАПКА ТА ЛОГОТИП --- */
header {
    background-color: #212529 !important;
    padding: 15px 0;
    border-bottom: 3px solid #ff6600;
    position: relative;
    z-index: 50;
}

#logo a {
    display: inline-flex;
    align-items: center;
}

#logo img {
    max-height: 54px !important;
    max-width: 240px !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

/* Планшет / вузький десктоп: 768px - 991px */
@media (min-width: 768px) and (max-width: 991px) {
    header .container .row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    header .container .row::before,
    header .container .row::after {
        display: none !important;
        content: none !important;
    }

    header .container .row > div {
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* 1. Логотип */
    header .container .row > div:first-child {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: 120px !important;
    }

    #logo img {
        max-height: 34px !important;
        max-width: 120px !important;
        width: auto !important;
        height: auto !important;
    }

    /* 2. Пошук — гнучка ширина без обрізання кнопки */
    header .container .row > div:nth-child(2) {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
    }

    header .container .row > div:nth-child(2) #search {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    #search input.form-control {
        height: 38px !important;
        padding-left: 10px !important;
        padding-right: 6px !important;
        font-size: 12px !important;
        min-width: 0 !important;
    }

    #search .input-group-btn {
        width: auto !important;
        flex: 0 0 34px !important;
    }

    #search button.btn {
        width: 34px !important;
        min-width: 34px !important;
        flex: 0 0 34px !important;
        height: 38px !important;
        padding: 0 !important;
    }

    #search button.btn i {
        font-size: 13px !important;
    }

    /* 3. Кошик */
    header .container .row > div:last-child {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    header #cart,
    header #cart .btn-block {
        width: auto !important;
        white-space: nowrap !important;
    }

    header #cart .btn-block {
        padding: 7px 9px !important;
        font-size: 12px !important;
    }
}

/* Повноцінний десктоп: від 992px */
@media (min-width: 992px) {
    header .container .row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 16px !important;
    }

    header .container .row > div {
        float: none !important;
    }

    header .container .row > div:first-child {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    header .container .row > div:nth-child(2) {
        flex: 1 1 auto !important;
        max-width: 450px !important;
        width: auto !important;
        margin: 0 auto !important;
    }

    header .container .row > div:last-child {
        flex: 0 0 auto !important;
        width: auto !important;
        text-align: right !important;
    }
}

/* --- ПОШУК (ЗАОКРУГЛЕНИЙ З ЗЕЛЕНОЮ КНОПКОЮ) --- */
#search {
    width: 100%;
    max-width: 450px;
    display: flex;
    align-items: center;
}

#search input.form-control {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 30px 0 0 30px !important;
    border: 1px solid #495057;
    border-right: none;
    height: 46px;
    padding-left: 20px;
    background-color: #ffffff;
    box-shadow: none;
}

#search input.form-control:focus {
    border-color: #28a745;
    box-shadow: none;
}

#search button.btn {
    flex: 0 0 auto;
    border-radius: 0 30px 30px 0 !important;
    background-color: #28a745 !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 1px solid #218838 !important;
    border-left: none;
    height: 46px;
    padding: 0 22px;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

#search button.btn:hover,
#search button.btn:focus,
#search button.btn:active {
    background-color: #ff6600 !important;
    border-color: #e55c00 !important;
    color: #ffffff !important;
}

#search button.btn i {
    color: #ffffff !important;
    font-size: 16px;
}

/* --- КОШИК У ШАПЦІ --- */
header #cart {
    position: relative;
    z-index: 100;
}

header #cart .btn-block {
    background-color: #343a40 !important;
    border: 1px solid #495057 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 11px 18px !important;
    box-shadow: none !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

header #cart .btn-block:hover {
    background-color: #ff6600 !important;
    border-color: #ff6600 !important;
}

header #cart .btn-block i {
    color: #ffffff !important;
    margin-right: 6px;
}

/* --- ВИПАДАЮЧИЙ ПОП-АП КОШИК (ФІКС ВИПИРАННЯ ТА ШАРІВ) --- */
#cart .dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

@media (max-width: 767.98px) {
    #cart .dropdown-menu {
        width: calc(100vw - 24px) !important;
        min-width: 280px !important;
        right: 12px !important;
        left: 12px !important;
    }
}

#cart .dropdown-menu p.text-right {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    margin: 0;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 6px 6px;
}

#cart .dropdown-menu p.text-right a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    text-decoration: none !important;
    box-shadow: none !important;
}

#cart .dropdown-menu p.text-right a:first-child {
    background-color: #ff6600 !important;
    color: #ffffff !important;
    border: 1px solid #e55c00 !important;
}

#cart .dropdown-menu p.text-right a:last-child {
    background-color: #28a745 !important;
    color: #ffffff !important;
    border: 1px solid #218838 !important;
}

/* --- ГОЛОВНЕ МЕНЮ КАТАЛОГУ --- */
div#menu, nav#menu {
    background-color: #343a40 !important;
    background-image: none !important;
    border: none !important;
    border-radius: 6px !important;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

nav#menu .navbar-inner, 
nav#menu .container {
    background: none !important;
    border: none !important;
}

/* Основні пункти меню без змін */
nav#menu .nav > li > a {
    color: #ffffff !important;
    text-shadow: none !important;
    font-weight: 500;
    padding: 12px 18px;
    background: transparent !important;
}

nav#menu .nav > li > a:hover, 
nav#menu .nav > li.open > a {
    background-color: #ff6600 !important;
    color: #ffffff !important;
}

/* Підменю (десктоп): помаранчевий бекграунд при наведенні на пункти підменю */
nav#menu .dropdown-menu {
    border: none !important;
    border-radius: 0 0 6px 6px !important;
    padding: 6px 0 !important;
}

nav#menu .dropdown-inner ul li > a,
nav#menu .dropdown-menu li > a {
    color: #333333 !important;
    padding: 8px 16px;
    background-color: transparent !important;
    background-image: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

nav#menu .dropdown-inner ul li > a:hover,
nav#menu .dropdown-inner ul li > a:focus,
nav#menu .dropdown-menu li > a:hover,
nav#menu .dropdown-menu li > a:focus {
    background-color: #ff6600 !important;
    background-image: none !important;
    color: #ffffff !important;
}

/* «Показати усі ...» — без бекграунду взагалі */
nav#menu .dropdown-menu a.see-all,
nav#menu .dropdown-menu a.see-all:hover,
nav#menu .dropdown-menu a.see-all:focus,
nav#menu .dropdown-menu li > a.see-all,
nav#menu .dropdown-menu li > a.see-all:hover,
nav#menu .dropdown-menu li > a.see-all:focus {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #ff6600 !important;
}

nav#menu .dropdown-menu a.see-all:hover,
nav#menu .dropdown-menu li > a.see-all:hover {
    color: #e55c00 !important;
    text-decoration: underline !important;
}

/* --- УНІВЕРСАЛЬНІ ЗЕЛЕНІ КНОПКИ «КУПИТИ» --- */
button#button-cart, 
input#button-cart, 
.btn-primary, 
input.btn-primary, 
button.btn-primary,
.product-layout .button-group button:first-child,
.product-thumb .button-group button:first-child {
    background: #28a745 !important;
    background-color: #28a745 !important;
    background-image: none !important;
    border: 1px solid #218838 !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

button#button-cart:hover, 
.btn-primary:hover, 
.product-layout .button-group button:first-child:hover {
    background: #218838 !important;
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: #ffffff !important;
}

/* --- КАРТКИ ТОВАРІВ ТА ФУТЕР --- */
.product-thumb {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

footer {
    background-color: #1a1d24;
    color: #adb5bd;
    border-top: 4px solid #ff6600;
    margin-top: 40px;
    padding-top: 35px;
}

footer h5 {
    color: #ffffff;
    font-weight: 700;
    border-bottom: 2px solid #2d323b;
    padding-bottom: 8px;
}

/* Посилання у футері */
footer a {
    color: #adb5bd !important;
    text-decoration: none !important;
}

footer a:hover {
    color: #ff6600 !important;
    text-decoration: underline !important;
}

/* --- ХЛІБНІ КРИХТИ (ПОМАРАНЧЕВІ) --- */
.breadcrumb {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 25px;
}

.breadcrumb > li > a {
    color: #ff6600 !important;
    text-decoration: none;
}

.breadcrumb > li > a:hover {
    color: #e55c00 !important;
    text-decoration: underline;
}

/* Загальні посилання на сайті */
a {
    color: #ff6600;
}

a:hover, a:focus {
    color: #e55c00;
}

/* ==========================================
   Strox - Mobile & Breakpoint Fixes (<= 767px)
   ========================================== */

@media (max-width: 767px) {
    #logo img {
        max-height: 48px !important;
        max-width: 210px !important;
    }

    /* Кнопка виклику мобільного меню — помаранчева замість синьої */
    nav#menu .btn-navbar,
    nav#menu button.navbar-toggle,
    nav#menu .navbar-header .btn {
        background-color: #ff6600 !important;
        background-image: none !important;
        border-color: #e55c00 !important;
        color: #ffffff !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    nav#menu .btn-navbar:hover,
    nav#menu .btn-navbar:focus,
    nav#menu .btn-navbar:active,
    nav#menu button.navbar-toggle:hover,
    nav#menu button.navbar-toggle:focus {
        background-color: #e55c00 !important;
        border-color: #cc5200 !important;
        color: #ffffff !important;
    }

    /* Підменю у мобільному меню: приховане за замовчуванням, розгортається при натисканні (.open) */
    nav#menu .nav > li > .dropdown-menu {
        display: none !important;
        position: static !important;
        float: none !important;
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding-left: 16px !important;
    }

    nav#menu .nav > li.open > .dropdown-menu {
        display: block !important;
    }

    nav#menu .nav > li .dropdown-inner,
    nav#menu .nav > li .dropdown-inner ul {
        display: block !important;
        position: static !important;
        float: none !important;
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding-left: 0 !important;
    }

    nav#menu .nav > li .dropdown-inner ul li > a,
    nav#menu .nav > li .dropdown-menu li > a,
    nav#menu .nav > li .dropdown-menu a.see-all {
        color: #ff6600 !important;
        padding-left: 28px !important;
        padding-top: 7px !important;
        padding-bottom: 7px !important;
        background: transparent !important;
        background-color: transparent !important;
        font-size: 13px !important;
    }

    nav#menu .nav > li .dropdown-inner ul li > a:hover,
    nav#menu .nav > li .dropdown-menu li > a:hover,
    nav#menu .nav > li .dropdown-menu a.see-all:hover {
        color: #ff8533 !important;
        background: transparent !important;
        background-color: transparent !important;
    }

    header {
        overflow-x: visible !important;
    }

    header .container .row {
        display: block !important;
    }

    header .container .row > div {
        width: 100% !important;
        float: none !important;
        text-align: center !important;
        margin-bottom: 10px !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    header .container .row > div:last-child {
        margin-bottom: 0 !important;
    }

    #logo {
        display: inline-block;
        float: none !important;
    }

    /* Рядок пошуку на мобільних з точним розрахунком ширини без випирань */
    #search {
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
        display: flex !important;
        box-sizing: border-box !important;
    }

    #search input.form-control {
        width: calc(100% - 48px) !important;
        flex: 0 0 calc(100% - 48px) !important;
        border-radius: 30px 0 0 30px !important;
        height: 44px !important;
        padding-left: 15px !important;
        box-sizing: border-box !important;
    }

    #search button.btn {
        width: 48px !important;
        flex: 0 0 48px !important;
        border-radius: 0 30px 30px 0 !important;
        height: 44px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    header #cart {
        width: 100% !important;
        display: block !important;
    }

    header #cart .btn-block {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        padding: 12px 15px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    /* Рівні кнопки в картках товарів з гарантованим зеленим фоном для Купити */
    .product-thumb .button-group {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 10px 15px 15px 15px !important;
        background: #ffffff !important;
    }

    .product-thumb .button-group button,
    .product-thumb .button-group button:first-child {
        box-sizing: border-box !important;
    }

    .product-thumb .button-group button:first-child {
        width: 100% !important;
        flex: 0 0 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 12px 15px !important;
        background: #28a745 !important;
        background-color: #28a745 !important;
        border: 1px solid #218838 !important;
        border-radius: 6px !important;
        color: #ffffff !important;
    }

    .product-thumb .button-group button:first-child::after {
        content: " Купити" !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #ffffff !important;
    }

    .product-thumb .button-group button:first-child span {
        display: none !important;
    }

    .product-thumb .button-group button:nth-child(2),
    .product-thumb .button-group button:nth-child(3) {
        width: 48% !important;
        flex: 0 0 48% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 40px !important;
        margin: 0 !important;
        background: #f1f3f5 !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 6px !important;
        color: #495057 !important;
    }
}

/* --- КОЛІР ТА РОЗМІР ЦІН (1.6x ВІД ПОЧАТКОВОГО) --- */

/* 1. У списках товарів: Рекомендовані, Категорії, Пошук, Акції (залишаємо без змін) */
.product-thumb .price {
    font-size: 1.6em !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #111111 !important;
    margin-bottom: 8px !important;
}

.product-thumb .price .price-new {
    color: #28a745 !important;
    font-weight: 700 !important;
}

.product-thumb .price .price-old {
    color: #dc3545 !important;
    text-decoration: line-through !important;
    font-size: 0.8em !important;
    font-weight: 500 !important;
    margin-left: 6px !important;
}

.product-thumb .price .price-tax {
    display: block !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #6c757d !important;
    margin-top: 4px !important;
}

/* 2. На сторінці товару (картка товару) — тільки список цін (другий ul.list-unstyled) */
#product-product #content .col-sm-4 ul.list-unstyled:nth-of-type(2) li {
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #6c757d !important;
    text-decoration: none !important;
    font-weight: 400 !important;
}

/* Стара перекреслена ціна — червона (+0.3 від поточного -> 1.3em) */
#product-product #content .col-sm-4 ul.list-unstyled:nth-of-type(2) li:first-child:not(:has(h2)) {
    color: #dc3545 !important;
    text-decoration: line-through !important;
    font-size: 1.3em !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;
}

/* Ціна h2 на сторінці товару: +0.7 від поточного (1.7em), за замовчуванням чорна */
#product-product #content .col-sm-4 ul.list-unstyled:nth-of-type(2) li h2 {
    font-size: 1.7em !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    margin: 4px 0 !important;
    color: #111111 !important;
}

/* Якщо перед h2 є стара перекреслена ціна — поточна ціна зі знижкою зелена */
#product-product #content .col-sm-4 ul.list-unstyled:nth-of-type(2) li:first-child:not(:has(h2)) + li:has(h2) h2,
#product-product #content .col-sm-4 ul.list-unstyled:nth-of-type(2) li .price-new {
    color: #28a745 !important;
}


/* --- ВЛАСНИЙ ФІЛЬТР КАТЕГОРІЇ (STROX) --- */
.strox-filter-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.strox-filter-title {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 2px solid #ff6600;
}

.strox-filter-group {
    margin-bottom: 16px;
}

.strox-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 8px;
}

.strox-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.strox-price-inputs input.form-control {
    height: 36px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 13px;
}

.strox-price-inputs input.form-control:focus {
    border-color: #ff6600;
    box-shadow: none;
}

.strox-price-sep {
    color: #6c757d;
    font-weight: 600;
}

.strox-filter-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.strox-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 400;
    font-size: 13px;
    color: #333333;
    cursor: pointer;
}

.strox-filter-item input[type="checkbox"] {
    margin: 0;
    accent-color: #ff6600;
    cursor: pointer;
}

.strox-filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.strox-filter-actions .btn {
    flex: 1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 10px;
}

.strox-filter-actions .btn-default {
    background-color: #f1f3f5;
    border: 1px solid #ced4da;
    color: #343a40;
}

.strox-filter-actions .btn-default:hover {
    background-color: #e9ecef;
    color: #212529;
}