/* ==========================================================================
   Souss Marep — listing pages (category / search / brand / new / promos)
   CSS-only restyle of the stock "warehouse" markup.
   Loaded by soussmarephero::hookDisplayHeader() on listing controllers only.
   ========================================================================== */

:root {
    --smc-bg:      #f3f4f6;
    --smc-card:    #ffffff;
    --smc-line:    #e7e9ee;
    --smc-ink:     #16181d;
    --smc-muted:   #8b9099;
    --smc-accent:  #dc283e;
    --smc-radius:  14px;
    --smc-shadow:  0 1px 2px rgba(16,20,28,.04), 0 1px 3px rgba(16,20,28,.06);
    --smc-shadow-h:0 10px 26px rgba(16,20,28,.10);
}

/* ---------- page canvas ----------
   The theme-editor sheet (custom_s_1.css) forces
   `#wrapper{padding:0!important;background-color:#FFF!important}`, hence the
   !important here. The breadcrumb is hidden site-wide by that same sheet, so
   it is not styled at all below. */
body#category #wrapper,
body#search #wrapper,
body#manufacturer #wrapper,
body#supplier #wrapper,
body#best-sales #wrapper,
body#new-products #wrapper,
body#prices-drop #wrapper {
    background-color: var(--smc-bg) !important;
    padding-bottom: 46px !important;
}

#inner-wrapper { padding-top: 26px; }

/* ---------- page title ---------- */
#js-product-list-header { margin-bottom: 18px; }
#js-product-list-header .page-title,
#main .page-title {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--smc-ink);
    margin: 6px 0 0;
}

/* ---------- column widths (desktop) ---------- */
@media (min-width: 1200px) {
    #left-column.col-lg-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    #content-wrapper.col-lg-10 {
        flex: 0 0 80%;
        max-width: 80%;
    }
}

/* ---------- empty sidebar -> full width ----------
   Category 300 ("Installation et réparation") has neither a subcategory tree
   nor faceted filters, so the column is styled away up front — no reflow.
   `body.smh-no-sidebar` is set by the script in hookDisplayHeader() and covers
   any other listing that ends up with an empty column. */
@media (min-width: 768px) {
    body.category-id-300 #left-column,
    body.smh-no-sidebar #left-column { display: none; }

    body.category-id-300 #content-wrapper,
    body.smh-no-sidebar #content-wrapper {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
/* wider canvas fits one more product per row */
@media (min-width: 1400px) {
    body.category-id-300 .js-product-miniature-wrapper.col-xl-3,
    body.smh-no-sidebar .js-product-miniature-wrapper.col-xl-3 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* ==========================================================================
   LEFT COLUMN — white cards
   ========================================================================== */
/* One card per block. The faceted-search module renders
   `.block.block-facets > #search_filters`, so only the outer element gets the
   card — the fallback selector below covers themes where `#search_filters`
   has no `.block` wrapper. */
#left-column .block,
#left-column #search_filters_wrapper > #search_filters {
    background: var(--smc-card);
    border: 1px solid var(--smc-line);
    border-radius: var(--smc-radius);
    box-shadow: var(--smc-shadow);
    padding: 18px 18px 14px;
    margin-bottom: 18px;
}
#left-column .block #search_filters {
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
#left-column #facets_search_wrapper,
#left-column #search_filters_wrapper {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
}
#left-column .block .block-title,
#left-column #search_filters .facet-title,
#left-column .facet-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: var(--smc-ink);
    text-transform: none;
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--smc-line);
}
#left-column .block .block-title a { color: inherit; }

/* category tree */
#left-column .category-sub-menu { list-style: none; margin: 0; padding: 0; }
#left-column .category-sub-menu li { position: relative; border: 0; margin: 0; }
/* the theme prefixes every link with a FontAwesome chevron — drop it */
#left-column .block-links ul > li a:before { content: none !important; display: none !important; }
#left-column .category-sub-menu li > a {
    display: block;
    padding: 7px 26px 7px 0 !important;
    font-size: 14px;
    line-height: 1.35;
    color: #464b54;
    border: 0;
    transition: color .15s, transform .15s;
}
#left-column .category-sub-menu li > a:hover {
    color: var(--smc-accent);
    transform: translateX(3px);
}
#left-column .category-sub-menu li > a.current,
#left-column .category-sub-menu li > a:focus { color: var(--smc-accent); }
#left-column .category-sub-menu li[data-depth="1"] > a { font-size: 13px; color: #6d737c; }
#left-column .category-sub-menu .collapse-icons {
    position: absolute;
    right: 0;
    top: 5px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 6px;
    color: #a2a7b0;
    cursor: pointer;
    transition: background .15s, color .15s;
}
#left-column .category-sub-menu .collapse-icons:hover { background: #f2f3f5; color: var(--smc-ink); }
#left-column .category-sub-menu .collapse .category-sub-menu {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 2px solid var(--smc-line);
}

/* facets */
#left-column .facet { margin: 0 0 18px; padding: 0; border: 0; }
#left-column .facet:last-child { margin-bottom: 0; }
#left-column .facet ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
#left-column .facet ul::-webkit-scrollbar { width: 5px; }
#left-column .facet ul::-webkit-scrollbar-thumb { background: #d9dce1; border-radius: 3px; }
#left-column .facet li { border: 0; }
#left-column .facet-label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    padding: 6px 6px 6px 4px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.35;
    color: #464b54;
    cursor: pointer;
    transition: background .15s;
}
#left-column .facet-label:hover { background: #f6f7f9; }
#left-column .facet-label.active { color: var(--smc-ink); font-weight: 600; }
#left-column .facet-label a { color: inherit; }
#left-column .facet-label .magnitude { color: var(--smc-muted); font-weight: 400; font-size: 12.5px; }
#left-column .facet .custom-checkbox,
#left-column .facet .custom-radio { flex: 0 0 auto; margin-top: 1px; }

/* the "Filtrer par" caption above facets */
#left-column #search_filters > p:first-child {
    font-size: 15px;
    font-weight: 800;
    color: var(--smc-ink);
    margin: 0 0 14px;
}

/* ==========================================================================
   TOOLBAR (sort / per page / pagination / view switch)
   ========================================================================== */
#js-product-list-top.products-selection {
    background: var(--smc-card);
    border: 1px solid var(--smc-line);
    border-radius: var(--smc-radius);
    box-shadow: var(--smc-shadow);
    padding: 10px 16px;
    margin: 0 0 20px;
}
#js-product-list-top .view-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: #a2a7b0;
    transition: background .15s, color .15s;
}
#js-product-list-top .view-switcher a:hover { background: #f2f3f5; color: var(--smc-ink); }
#js-product-list-top .view-switcher a.current { background: var(--smc-ink); color: #fff; }

#js-product-list-top .products-sort-nb-dropdown .select-title {
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--smc-line);
    border-radius: 9px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: #3d424a;
    padding: 0 12px;
    box-shadow: none;
    transition: border-color .15s;
}
#js-product-list-top .products-sort-nb-dropdown .select-title:hover { border-color: #c9cdd4; }
#js-product-list-top .dropdown-menu {
    border: 1px solid var(--smc-line);
    border-radius: 11px;
    box-shadow: 0 12px 28px rgba(16,20,28,.12);
    padding: 6px;
}
#js-product-list-top .dropdown-menu .dropdown-item {
    border-radius: 7px;
    font-size: 13.5px;
    padding: 7px 10px;
}
#js-product-list-top .dropdown-menu .dropdown-item.current { color: var(--smc-accent); font-weight: 600; }

/* pagination — the theme puts the border on the <li>, move it onto the <a> */
.pagination .page-list { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.pagination .page-list li {
    list-style: none;
    display: block;
    border: 0 !important;
    margin: 0;
}
.pagination .page-list li a,
.pagination .page-list li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 9px;
    border: 1px solid var(--smc-line);
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: #3d424a;
    transition: background .15s, color .15s, border-color .15s;
}
.pagination .page-list li span.spacer { border: 0; background: transparent; color: var(--smc-muted); min-width: 18px; }
.pagination .page-list li a:hover { background: #f2f3f5; border-color: #c9cdd4; color: var(--smc-ink); }
.pagination .page-list li.current a,
.pagination .page-list li a.disabled {
    background: var(--smc-ink) !important;
    border-color: var(--smc-ink) !important;
    color: #fff !important;
}
#js-product-list-footer .pagination,
#js-product-list .pagination { margin-top: 24px; justify-content: center; display: flex; }

/* ==========================================================================
   PRODUCT GRID
   ========================================================================== */
#js-product-list .products.row { margin-left: -9px; margin-right: -9px; }
.js-product-miniature-wrapper { padding: 0 9px; margin-bottom: 18px; display: flex; }

.product-miniature.product-miniature-grid {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--smc-card);
    border: 1px solid var(--smc-line);
    border-radius: var(--smc-radius);
    box-shadow: var(--smc-shadow);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-miniature.product-miniature-grid:hover {
    transform: translateY(-4px);
    box-shadow: var(--smc-shadow-h);
    border-color: #dfe2e8;
}

/* --- image --- */
.product-miniature-grid .thumbnail-container {
    position: relative;
    margin: 0;
    padding: 14px;
    background: #fff;
    border: 0;
    overflow: visible;
}
.product-miniature-grid .thumbnail-container .product-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
}
.product-miniature-grid .thumbnail-container picture { display: block; width: 100%; height: 100%; }
.product-miniature-grid .thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* the source shots (236x305) carry a wide white margin — zoom past it */
    transform: scale(1.12);
    transition: transform .35s ease;
}
.product-miniature.product-miniature-grid:hover .thumbnail-container img { transform: scale(1.19); }

/* --- flags --- */
.product-miniature-grid .product-flags {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    pointer-events: none;
}
.product-miniature-grid .product-flags li.product-flag {
    position: static;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1.5;
    text-transform: none;
    background: #eef0f3;
    color: #4a4f57;
    box-shadow: none;
}
.product-miniature-grid .product-flags li.product-flag.new { background: #16181d; color: #fff; }
.product-miniature-grid .product-flags li.product-flag.on-sale,
.product-miniature-grid .product-flags li.product-flag.discount,
.product-miniature-grid .product-flags li.product-flag.discount-percentage,
.product-miniature-grid .product-flags li.product-flag.discount-amount {
    background: var(--smc-accent);
    color: #fff;
}
.product-miniature-grid .product-flags li.product-flag.pack { background: #2f6fed; color: #fff; }

/* --- quick view --- */
.product-miniature-grid .product-functional-buttons {
    position: absolute;
    right: 20px;
    bottom: 12px;
    z-index: 4;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s, transform .2s;
}
.product-miniature.product-miniature-grid:hover .product-functional-buttons { opacity: 1; transform: none; }
.product-miniature-grid .product-functional-buttons-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--smc-line);
    color: #3d424a;
    box-shadow: 0 4px 12px rgba(16,20,28,.14);
}
.product-miniature-grid .product-functional-buttons-links a:hover { background: var(--smc-ink); color: #fff; border-color: var(--smc-ink); }

/* --- text block --- */
.product-miniature-grid .product-description {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 4px 16px 16px;
    border-top: 1px solid #f1f2f5;
    margin-top: 4px;
    text-align: left;
}
/* stack title and price vertically instead of side by side */
.product-miniature-grid .product-description > .row {
    display: block;
    margin: 0;
    flex: 1 1 auto;
}
.product-miniature-grid .product-description > .row > .col,
.product-miniature-grid .product-description > .row > .product-miniature-right {
    display: block;
    max-width: 100%;
    flex: none;
    padding: 0;
    text-align: left;
}
.product-miniature-grid .product-description > .row > .col {
    display: flex;
    flex-direction: column;
}
/* brand goes above the title.
   custom_s_1.css hides it with `.products-grid .product-miniature
   .product-brand{display:none!important}` — beaten on specificity here. */
#js-product-list .products-grid .product-miniature-grid .product-brand {
    order: -1;
    display: block !important;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--smc-muted);
    margin: 10px 0 5px;
}
.product-miniature-grid .product-category-name,
.product-miniature-grid .product-reference { display: none; }

.product-miniature-grid .product-title {
    margin: 0 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    min-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-miniature-grid .product-title a { color: var(--smc-ink); }
.product-miniature.product-miniature-grid:hover .product-title a { color: var(--smc-accent); }

/* when there is no brand, keep the same top spacing */
.product-miniature-grid .product-description > .row > .col > .product-title:first-child { margin-top: 10px; }

.product-miniature-grid .product-price-and-shipping {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.product-miniature-grid .product-price-and-shipping .product-price,
.product-miniature-grid .product-price-and-shipping .price {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--smc-accent);
    white-space: nowrap;
}
.product-miniature-grid .product-price-and-shipping .regular-price {
    font-size: 13px;
    font-weight: 500;
    color: var(--smc-muted);
    text-decoration: line-through;
}
.product-miniature-grid .product-price-and-shipping .discount-percentage,
.product-miniature-grid .product-price-and-shipping .discount-amount {
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    background: var(--smc-accent);
    border-radius: 5px;
    padding: 2px 7px;
}
.product-miniature-grid .product-availability {
    margin: 8px 0 0;
    font-size: 12.5px;
    font-weight: 600;
}

/* hidden clutter kept out of the card */
.product-miniature-grid .product-description-short { display: none; }

/* ==========================================================================
   LIST VIEW (the second toggle) — keep it consistent
   ========================================================================== */
.product-miniature.product-miniature-list {
    background: var(--smc-card);
    border: 1px solid var(--smc-line);
    border-radius: var(--smc-radius);
    box-shadow: var(--smc-shadow);
    padding: 14px;
    margin-bottom: 16px;
    transition: box-shadow .22s, border-color .22s;
}
.product-miniature.product-miniature-list:hover { box-shadow: var(--smc-shadow-h); border-color: #dfe2e8; }
.product-miniature-list .product-title { font-size: 15px; font-weight: 700; }
.product-miniature-list .product-price { color: var(--smc-accent); font-weight: 800; }

/* ==========================================================================
   MISC blocks living in #main
   ========================================================================== */
#products .subcategories,
#category-description,
#js-product-list-footer .block-category,
#main .block-category {
    background: var(--smc-card);
    border: 1px solid var(--smc-line);
    border-radius: var(--smc-radius);
    box-shadow: var(--smc-shadow);
    padding: 20px;
    margin-bottom: 20px;
}
#js-active-search-filters:not(.hide) {
    background: var(--smc-card);
    border: 1px solid var(--smc-line);
    border-radius: var(--smc-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
}
#js-active-search-filters .filter-block {
    background: #f2f3f5;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12.5px;
    margin: 3px 6px 3px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
#facets-loader-icon { text-align: center; padding: 30px 0; color: var(--smc-muted); }

/* ==========================================================================
   SERVICE PANEL — shown instead of "There are no products." on the
   "Installation et réparation" category (see category.tpl)
   ========================================================================== */
.smh-service {
    background: var(--smc-card);
    border: 1px solid var(--smc-line);
    border-radius: 18px;
    box-shadow: var(--smc-shadow);
    padding: 46px 34px 40px;
    text-align: center;
    max-width: 720px;
    margin: 10px auto 0;
}
.smh-service-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(220, 40, 62, .09);
    color: var(--smc-accent);
    font-size: 27px;
    margin-bottom: 20px;
}
.smh-service-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--smc-ink);
    margin: 0 0 12px;
}
.smh-service-text {
    font-size: 15px;
    line-height: 1.65;
    color: #5c626b;
    max-width: 520px;
    margin: 0 auto 28px;
}
.smh-service-tel {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 26px 12px 12px;
    border-radius: 999px;
    background: var(--smc-accent);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(220, 40, 62, .28);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.smh-service-tel:hover,
.smh-service-tel:focus {
    background: #c11f33;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(220, 40, 62, .34);
}
/* the theme colours <strong>/<small> inside links — force them back to white */
.smh-service-tel,
.smh-service-tel small,
.smh-service-tel strong,
.smh-service-tel .fa { color: #fff !important; }
.smh-service-tel-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    font-size: 19px;
}
.smh-service-tel-txt { text-align: left; line-height: 1.25; }
.smh-service-tel-txt small {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    opacity: .82;
    margin-bottom: 3px;
}
.smh-service-tel-txt strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.2px;
    direction: ltr;
    unicode-bidi: embed;
}
.smh-service-link {
    display: block;
    margin-top: 22px;
    font-size: 14px;
    font-weight: 600;
    color: #5c626b;
    text-decoration: none;
}
.smh-service-link:hover { color: var(--smc-accent); text-decoration: none; }
.smh-service-link .fa { margin-left: 4px; }

/* --- compact bar variant, used when the category also lists products --- */
.smh-service--bar {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    max-width: none;
    margin: 0 0 20px;
    padding: 18px 22px;
    border-radius: var(--smc-radius);
}
.smh-service--bar .smh-service-ico {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    font-size: 21px;
    margin: 0;
}
.smh-service--bar .smh-service-body { flex: 1 1 auto; min-width: 0; }
.smh-service--bar .smh-service-title { font-size: 18px; margin: 0 0 4px; }
.smh-service--bar .smh-service-text {
    font-size: 13.5px;
    line-height: 1.5;
    max-width: none;
    margin: 0;
}
.smh-service--bar .smh-service-tel {
    flex: 0 0 auto;
    padding: 9px 20px 9px 9px;
    gap: 11px;
    box-shadow: 0 6px 16px rgba(220, 40, 62, .24);
}
.smh-service--bar .smh-service-tel-ico { width: 38px; height: 38px; flex: 0 0 38px; font-size: 16px; }
.smh-service--bar .smh-service-tel-txt strong { font-size: 18px; }
.smh-service--bar .smh-service-tel-txt small { font-size: 10.5px; }

@media (max-width: 767px) {
    .smh-service--bar {
        flex-wrap: wrap;
        gap: 14px;
        padding: 18px;
    }
    .smh-service--bar .smh-service-body { flex: 1 1 100%; order: 2; }
    .smh-service--bar .smh-service-tel { order: 3; width: 100%; justify-content: center; }
}

@media (max-width: 575px) {
    .smh-service { padding: 34px 20px 30px; border-radius: 14px; }
    .smh-service-title { font-size: 21px; }
    .smh-service-text { font-size: 14px; margin-bottom: 24px; }
    .smh-service-tel { padding: 10px 20px 10px 10px; gap: 11px; }
    .smh-service-tel-ico { width: 38px; height: 38px; flex: 0 0 38px; font-size: 16px; }
    .smh-service-tel-txt strong { font-size: 18px; }
    .smh-service--bar { padding: 16px; }
    .smh-service--bar .smh-service-title { font-size: 16px; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    #left-column { margin-bottom: 20px; }
    #js-product-list-top.products-selection { padding: 10px 12px; }
}
@media (max-width: 575px) {
    #wrapper { padding-bottom: 30px; }
    #main .page-title { font-size: 22px; }
    #js-product-list .products.row { margin-left: -6px; margin-right: -6px; }
    .js-product-miniature-wrapper { padding: 0 6px; margin-bottom: 12px; }
    .product-miniature-grid .product-description { padding: 4px 12px 14px; }
    .product-miniature-grid .product-price-and-shipping .product-price { font-size: 16px; }
    /* two products per row on phones */
    .js-product-miniature-wrapper.col-12 { flex: 0 0 50%; max-width: 50%; }
    .product-miniature-grid .product-title { font-size: 12.5px; }
}
