﻿

.main-prods-grid {
    display: grid;
    align-items: center;
    justify-items: center;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    grid-gap: 10px;
    padding: 10px;
    background-color: #CDCDCD;
}

.main-prods-grid a:hover, .main-prods-grid a:visited {
    text-decoration: none;
}

a:hover, a:visited {
    text-decoration: none;
}

.top-name {
    color: #4c4c4c;
    text-align: center;
    margin-left: 5px;
    margin-right: 5px;
}

    .top-name:hover {
        text-decoration: underline;
        cursor: pointer;
    }

h1.prod-name-a {
    font-size: 1em;
    font-weight: bold;
    color: #4c4c4c;
    margin-top: 10px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 5px;
    min-height: 30px;
}

.prod-name-b {
    font-size: 0.9em;
    line-height: 1.2em;
    padding-left: 4px;
    padding-right: 4px;
}

.prod-property {
    font-size: 0.9em;
    line-height: 1.2em;
    font-weight: 700;
    color: #4c4c4c;
}

.prod-list-descr {
    font-size: 0.9em;
    line-height: 1.2em;
    text-align: center;
    color: #4c4c4c;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 5px;
}

.card {
    position: relative;
    border-radius: 5px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    height: 400px;
    overflow: hidden;
    width: 160px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 160px;
}




.details {
    padding: 5px;
    width: 100%;
    text-align: center;
}



.strikethrough:before {
    border-top-color: #ff3f40;
}

.div-price {
    min-height: 54px;
}



.prod-buttons {
    position: absolute;
    bottom: 5px;
    width: 100%;
    padding: 5px;
    display: flex;
    align-items: baseline;
    justify-content: space-around;
}

.price-invisible {
    display: none;
}

.sort-buttons {
    display: flex;
    padding: 10px;
    justify-content: flex-end;
}

.pict_container {
    min-height: 320px;
}



@media (min-width:600px) {
    .main-prods-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        grid-gap: 10px;
    }

    .card {
        width: 260px;
        height: 480px;
    }




    .prod-buttons {
        padding-left: 10px;
        padding-right: 10px;
        min-width: 95px;
    }
}


/* layout: desktop sidebar */
.prodlist-layout {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.filters-panel {
    width: 290px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}

.prodlist-content {
    flex: 1 1 auto;
    min-width: 0; /* важно для flex */
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.filters-title {
    font-weight: 600;
}

.filters-body {
    padding: 12px;
}

.filters-footer {
    padding: 12px;
    border-top: 1px solid #eee;
}

.flt-tree .flt-item {
    margin-bottom: 6px;
}

/* dynamic filters blocks */
.flt-block {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

    .flt-block:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.flt-block-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.flt-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.flt-item {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

    .flt-item input[type=checkbox] {
        margin-top: 0;
    }

.flt-count {
    opacity: .75;
    font-size: 12px;
}

.flt-hidden {
    display: none;
}

/* tree indent support (если сервер отдаст Level) */
.flt-level-0 {
    padding-left: 0;
}

.flt-level-1 {
    padding-left: 12px;
}

.flt-level-2 {
    padding-left: 24px;
}

.flt-level-3 {
    padding-left: 36px;
}


/* Navigation meta (tree) */
#navDynamic .flt-block-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.filters-sep {
    margin: 10px 0;
    border-top: 1px solid #eee;
}

#navDynamic .flt-item {
    display: block;
    margin: 3px 0;
}

    #navDynamic .flt-item input {
        margin-right: 8px;
    }

/* отступы уровней дерева */
#navDynamic .flt-level-0 {
    padding-left: 0;
}

#navDynamic .flt-level-1 {
    padding-left: 12px;
}

#navDynamic .flt-level-2 {
    padding-left: 24px;
}

#navDynamic .flt-level-3 {
    padding-left: 36px;
}

#navDynamic .flt-level-4 {
    padding-left: 48px;
}


/* Navigation list (categories) */
#navDynamic .nav-title {
    font-weight: 700;
    margin: 0 0 6px 0;
}

#navDynamic .nav-cat-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#navDynamic .nav-cat-item {
    padding: 4px 0;
}

#navDynamic .nav-cat-link {
    display: inline-block;
    text-decoration: none;
}

#navDynamic .nav-cat-item.active .nav-cat-link {
    font-weight: 700;
    text-decoration: underline;
}

#navDynamic .nav-cat-more,
#navDynamic .nav-cat-less {
    display: inline-block;
    margin-top: 6px;
    cursor: pointer;
    text-decoration: underline;
}

#navDynamic .nav-cat-up-link {
    font-weight: 700;
}

/* "Еще / Меньше" — служебные ссылки */
#navDynamic .nav-cat-toggle {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px; /* меньше, чем категории */
    color: #888; /* серее */
    text-decoration: none; /* без подчеркивания как у категорий */
}

    #navDynamic .nav-cat-toggle:hover,
    #navDynamic .nav-cat-toggle:focus {
        color: #555;
        text-decoration: underline;
    }

/* опционально: чуть сдвинуть вправо, чтобы выглядело как действие */
#navDynamic .nav-cat-toggle {
    padding-left: 2px;
}

/* если хочешь прям явно отличать */
#navDynamic .nav-cat-toggle {
    font-style: italic;
}


/* Breadcrumbs above products */
.prodlist-breadcrumbs {
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
}

    .prodlist-breadcrumbs .breadcrumb {
        margin: 0;
        padding: 0;
        background: transparent;
    }

        .prodlist-breadcrumbs .breadcrumb > li + li:before {
            content: "›";
            padding: 0 8px;
            color: #999;
        }

    .prodlist-breadcrumbs .bc-link {
        text-decoration: none;
    }

        .prodlist-breadcrumbs .bc-link:hover,
        .prodlist-breadcrumbs .bc-link:focus {
            text-decoration: underline;
        }



/* mobile: offcanvas */
@media (max-width: 767px) {

    .prodlist-layout {
        display: block;
    }

    .filters-panel {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100%;
        width: 88%;
        max-width: 340px;
        z-index: 2001;
        border-radius: 0;
        border-left: none;
        border-top: none;
        border-bottom: none;
        transition: left .25s ease;
        overflow-y: auto;
    }

        .filters-panel.open {
            left: 0;
        }

    .filters-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.45);
        z-index: 2000;
    }

    body.filters-open {
        overflow: hidden;
    }


}



.prod-pager {
    padding: 10px 0 20px 0;
}

    .prod-pager .pagination {
        margin: 0;
    }

        .prod-pager .pagination > li > a,
        .prod-pager .pagination > li > span {
            cursor: pointer;
        }



.facet-toggle {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

    .facet-toggle:hover {
        text-decoration: none;
    }





.prodlist-page-h1 {
    font-size: 18px;
    line-height: 1.2;
    margin: 4px 0 8px 0;
    font-weight: 500;
}

.card > a,
.card > a:hover,
.card > a:focus,
.card > a:active {
    color: inherit;
    text-decoration: none;
    display: block;
}

.card .prod-name-a {
    display: block;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    color: #444;
    text-align: center;
    padding: 10px 12px 4px 12px;
    min-height: 46px;
}