:root {
    --side-cart-width: 400px;
}

.dropzone .dz-message .dz-button {
    color: var(--dark) !important;
}

/* Product search */

/* Keep the filter panel in view while scrolling a long product listing.
   The sticky class is added by product_search.js only when the panel fits the viewport,
   so the search never gets its own scrollbar. Below xl the panel is an offcanvas. */
@media (min-width: 1200px) {
    .product-search-panel {
        /* Same vertical rhythm as py-4, so the panel never sits flush against the
           neighbouring bands. */
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .product-search-panel.product-search-panel-sticky {
        position: sticky;
        top: 1rem;
    }

    .ccm-toolbar-visible .product-search-panel.product-search-panel-sticky {
        top: calc(48px + 1rem);
    }
}

#productSearch .btn-transparent {
    color: var(--highlight);
}

#productSearch .nav-row-wrapper button {
    text-decoration: none;
}

#productSearch .nav-row-wrapper {
    position: relative;
    margin-top: -1px;
}

/* #productSearch .nav-row-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    border-top: 1px solid var(--white);
    pointer-events: none;
} */

#productSearch .nav-row-wrapper .category-item-row {
    display: flex;
    align-items: stretch;
    border-left: 1px solid var(--white);
    border-right: 1px solid var(--white);
}

#productSearch .nav-row-wrapper button.main-link {
    font-size: 1.5rem;
    display: inline-block;
    background: transparent;
    color: var(--white);
    text-align: start;
    width: 100%;
    flex: 1 1 auto;
    border: none;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--white);
    border-top: 1px solid var(--white);
}

#productSearch .nav-row-wrapper button.sub-link {
    background-color: transparent;
    color: var(--light);
    flex: 1 1 auto;
    border: none;
    text-align: start;
    width: 100%;
    padding: 0.45rem 0.75rem;
    font-size: 1.2rem;
}

#productSearch .nav-row-wrapper.current button.main-link {
    color: var(--highlight);
}

#productSearch .nav-row-wrapper.has-children button.main-link,
#productSearch .nav-row-wrapper.has-children button.sub-link {
    border-right: 1px solid var(--white);
    border-top: 1px solid var(--white);
    border-bottom: 1px solid var(--white);
}

#productSearch .nav-row-wrapper .toggle-child-page-list {
    font-size: 1.5rem;
    padding: 0;
    flex: 0 0 20%;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--white);
    border-top: 1px solid var(--white);
}

#productSearch .nav-row-wrapper .toggle-child-page-list .bi {
    transition: all 0.3s ease;
    display: inline-block;
}

#productSearch .nav-row-wrapper .toggle-child-page-list[aria-expanded="true"] {
    background-color: var(--highlight);
    color: var(--white);
}

#productSearch .nav-row-wrapper .toggle-child-page-list[aria-expanded="true"] .bi {
    transform: rotate(90deg);
}

#productSearch .nav-row-wrapper .sub-link.active {
    color: var(--highlight);
}

#productSearch .nav-row-wrapper.category-level-2 .category-item-row {
    margin-left: 0.75rem;
}

#productSearch .nav-row-wrapper.category-level-3 .category-item-row {
    margin-left: 1.5rem;
}

#productSearch .nav-row-wrapper.category-level-4 .category-item-row {
    margin-left: 2.25rem;
}

#productSearch .nav-row-wrapper.category-level-5 .category-item-row {
    margin-left: 3rem;
}

#productSearch .form-control,
#productSearch .form-select,
#productSearch .btn,
#productSearch .input-group-text {
    border-radius: 0;
}

.bootstrap-select.form-control .dropdown-toggle {
    background-color: transparent !important;
    border-radius: 0 !important;
    color: var(--white) !important;
    border: 1px solid var(--white) !important;
}

.dropdown.bootstrap-select {
    background-color: transparent;
}

.bootbox .bootstrap-select.form-control .dropdown-toggle {
    background-color: transparent !important;
    border-radius: 0 !important;
    color: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
}

.bootbox .dropdown.bootstrap-select {
    background-color: transparent;
}

.bootstrap-select .dropdown-menu {
    border-radius: 0px;
}

#productFilterMobileToggler {
    transition: all 0.3s ease;
    border-top: 1px solid var(--white);
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1020;
}

#productSearchMobileDirector {
    bottom: 0;
    position: fixed;
    right: 0;
}

.product-category-checkbox-panel {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--white);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    background-color: #fff;
}

.product-category-checkbox-item+.product-category-checkbox-item {
    margin-top: 0.35rem;
}

.product-category-depth-1 {
    margin-left: 1rem;
}

.product-category-depth-2 {
    margin-left: 2rem;
}

.product-category-depth-3 {
    margin-left: 3rem;
}

.product-category-depth-4 {
    margin-left: 4rem;
}

.product-variant-selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2.5rem;
}

.product-variant-selected-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.5rem;
    border: 1px solid var(--white);
    border-radius: 999px;
    background-color: var(--color-primary);
}

.product-variant-search-results {
    max-height: 260px;
    overflow-y: auto;
}

/* The theme renders muted text white for the dark site background. The variant table has a light
   background, so muted text and the loading indicators inside it must stay dark. */
#productVariantsTableElement .text-muted {
    color: var(--dark) !important;
}

.variant-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.variant-form-container .variant-loading {
    justify-content: center;
    min-height: 8rem;
}

.searching-overlay {
    transition: all 0.3s ease;
    position: absolute;
    display: flex;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-primary);
    color: var(--light);
    z-index: 100;
}

/* New category nav */

#webshopSideNav a {
    text-decoration: none;
}

#webshopSideNav a.main-link {
    font-size: 1.5rem;
    margin: 1rem 0;
    display: inline-block;
}

#webshopSideNav a.main-link.active {
    color: var(--highlight);
}

#webshopSideNav .category-row a.sub-link {
    display: inline-block;
    margin: 0.7rem 0;
    font-size: 1.2rem;
}

#webshopSideNav .category-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#webshopSideNav .category-row>a {
    flex: 1 1 auto;
    min-width: 0;
}

#webshopSideNav .category-row.level-1 {
    padding-left: 0;
}

#webshopSideNav .category-row.level-2 {
    padding-left: 0.75rem;
}

#webshopSideNav .category-row.level-3 {
    padding-left: 1.5rem;
}

#webshopSideNav .category-row.level-4 {
    padding-left: 2.25rem;
}

#webshopSideNav .category-row.level-5 {
    padding-left: 3rem;
}

#webshopSideNav .category-row a[aria-current="true"] {
    color: var(--highlight);
}

#webshopSideNav .category-toggle {
    font-size: 2rem;
    color: var(--highlight);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

#webshopSideNav .category-toggle .bi {
    display: inline-block;
    transition: transform 0.2s ease;
}

#webshopSideNav .category-toggle[aria-expanded="true"] .bi {
    transform: rotate(90deg);
}

#webshopSideNav .sub-link.active {
    text-decoration: underline;
}

/* Webshop main nav */

body .navbar-search {
    display: flex;
    width: 50%;
}

form .search-results {
    position: absolute;
    top: 100%;
    z-index: 5;
    width: 100%;
    border-radius: var(--border-radius);
}

#mainNav .toggle-side-cart .bi {
    font-size: 2rem;
    transition: all 0.3s ease;
}

.bg-success-subtle td {
    background-color: var(--bs-success-bg-subtle, #d1e7dd) !important;
}

/* Category nav */

#sideNav .navbar-nav .navbar-nav .nav-link {
    padding-left: calc(var(--side-nav-padding-x) + 1rem);
}

#sideNav .navbar-nav .navbar-nav .navbar-nav .nav-link {
    padding-left: calc(var(--side-nav-padding-x) + 2rem);
}

#sideNavContent .nav-link.active .nav-open-icon,
#sideNavContent .nav-link:not(.active) .nav-closed-icon {
    display: inline-block;
}

#sideNavContent .nav-link:not(.active) .nav-open-icon,
#sideNavContent .nav-link .nav-closed-icon {
    display: none;
}

#sideNav .nav-link {
    padding: 1rem var(--side-nav-padding-x);
    color: var(--white);
    font-size: 1rem;
    border-bottom: 2px solid var(--white);
    display: flex;
}

#sideNav .nav-link.active {
    background-color: var(--color-green);
}

#sideNav .product-items .nav-link {
    background-color: var(--color-secondary);
}

#sideNav .product-items .nav-link.active {
    background-color: var(--highlight-secondary);
}

/* Side cart */

#sideCart {
    height: 100vh;
    width: var(--side-cart-width);
    position: fixed;
    z-index: 5;
    right: calc(var(--side-cart-width) * -1);
    top: 0;
    overflow-x: hidden;
    transition: all 0.5s ease;
    background-color: var(--white);
    z-index: 1030;
}

.ccm-toolbar-visible #sideCart {
    top: 48px;
    height: calc(100vh - 48px);
}

#sideCart.open {
    right: 0;
    -webkit-box-shadow: -5px 0px 10px 0px rgba(30, 30, 30, 0.3);
    -moz-box-shadow: -5px 0px 10px 0px rgba(30, 30, 30, 0.3);
    box-shadow: -5px 0px 10px 0px rgba(30, 30, 30, 0.3);
}

.product-card-cart {
    border-bottom: 1px solid var(--dark);
    padding-bottom: 1rem;
}

.product-card-cart .product-image img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background-color: var(--white);
    border-radius: calc(var(--card-border-radius) / 2);
    max-width: 100%;
}

#sideCart ::-webkit-scrollbar {
    width: 7px;
}

#sideCart ::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
}

/* Product card */

.product-card {
    background-color: transparent;
    transition: box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card a {
    width: 100%;
    display: inline-block;
    text-decoration: none;
    color: var(--white);
    position: relative;
}

.product-card .sale-price {
    font-size: 0.9rem;
    font-weight: 400;
}

.product-card h3 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 400;
    word-break: break-word;
}

.product-card a:hover .btn-secondary,
.product-card a:focus .btn-secondary,
.product-card a:active .btn-secondary {
    background-color: var(--color-primary);
}

.product-card .add-to-cart-button {
    border-radius: var(--card-border-radius);
    width: 100%;
}

.product-card .product-card-image {
    aspect-ratio: 1 / 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--white);
    border-radius: var(--card-border-radius);
}

.product-card .pricing {
    font-size: 1rem;
    font-weight: 700;
}

.product-card .saldo {
    font-size: 0.75rem;
}

.product-card .ribbon {
    position: absolute;
    font-size: 1rem;
    top: 15px;
    left: -50px;
    width: 200px;
    padding: 3px 0;
    text-align: center;
    font-weight: 600;
    transform: rotate(-30deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.possible-to-order-color {
    border-radius: 50%;
    height: 10px;
    width: 10px;
    display: inline-block;
}

.page-template-webshop-product-template .possible-to-order-color {
    height: 14px;
    width: 14px;
}

.bootbox.modal.fade.bootbox-confirm.show {
    background-color: rgb(25 22 22 / 70%);
}

.product-price {
    font-size: 2rem;
    font-weight: 400;
}

/* Make product pages hero smaller */

.page-template-webshop-product-template #heroCarouselIndicators .carousel-item {
    height: auto;
    min-height: 150px;
}

.page-template-webshop-product-template #heroCarouselIndicators .carousel-item h1 {
    padding-top: 3rem;
    padding-bottom: 3rem;
    margin-bottom: 0;
}

/* Product image selection */

#productImageViewArea {
    aspect-ratio: 5/4;
    background-color: var(--white);
    transition: all 0.3s ease;
    border-radius: var(--card-border-radius);
}

#productImageViewArea:hover,
#productImageViewArea:active,
#productImageViewArea:focus {
    box-shadow: var(--dark-shadow-hover);
}

#zoomInImage {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 1rem;
    color: var(--color-primary);
    opacity: .6;
}

.view-this-image {
    aspect-ratio: 1/1;
    width: 100%;
    background-color: var(--white);
    border: none;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: var(--border-radius);
    position: relative;
}

.view-this-image .parent-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-primary);
    border-radius: var(--border-radius);
}

#fullscreenCarouselModal .carousel-control-next-icon,
#fullscreenCarouselModal .carousel-control-prev-icon {
    background-color: var(--dark-overlay);
}

/* Full screen modal */
#fullscreenCarouselModal .modal-dialog {
    max-width: 100%;
    height: 100%;
    margin: 0;
}

#fullscreenCarouselModal .modal-content {
    height: 100%;
    background-color: var(--dark-overlay);
    border: none;
    border-radius: 0;
}

#fullscreenCarouselModal .carousel-item img {
    object-fit: contain;
    width: 100%;
    height: 100vh;
    display: block;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: white;
    z-index: 9999;
    background: none;
    border: none;
}

.view-this-image.active .parent-overlay {
    display: none;
}

.pickup-point-list .list-group-item {
    cursor: pointer;
}

#productInfoContent table.table {
    width: 100% !important;
}

#productsTable img {
    width: 60px;
    height: 60px;
}

.topic-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: -8px;
}

.topic-wrapper h1, .topic-wrapper h2, .topic-wrapper h3,
.topic-wrapper h4, .topic-wrapper h5, .topic-wrapper h6 {
    color: var(--highlight);
}

/* .view-description {
    position: relative;
    margin-left: auto;
    margin-top: -15px;
} */

/* .description-area {
    height: 70px;
    overflow: hidden;
    transition: height 0.3s ease;
    margin-bottom: 10px;
    position: relative;
} */

/* .description-area:not(.expanded)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to top, var(--dark), transparent);
    pointer-events: none;
} */

/* Cart process */

.cart-page-products {
    background-color: var(--color-primary);
    border-radius: var(--border-radius);
    padding: .5rem 1rem;
    color: var(--white);
}

.payment-method-image {
    height: 50px;
    width: auto;
}

/* Mobile */

@media (max-width: 991px) {
    #mainNav .webshop-nav-toggler {
        font-size: 2rem;
    }

    #mainNav .toggle-side-cart .bi {
        font-size: 1.5rem;
    }

    #mainNav .toggle-side-cart .rounded-pill.badge {
        top: 10px;
    }

    .topic-wrapper {
        margin-top: 0;
    }

    body .navbar-search {
        display: none;
    }

    #sideCart {
        max-width: 95vw;
    }

    .product-card h3 {
        font-size: 0.8rem;
    }

    .product-card .pricing {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .product-card .h6 {
        font-size: 1rem;
    }

    .page-template-webshop-product-template .possible-to-order-color {
        height: 10px;
        width: 10px;
    }

    .product-card .add-to-cart-button {
        font-size: 0.8rem;
    }
}

/* Delivery method selection */

.delivery-method-groups {
    max-height: 33.6rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.delivery-method-group+.delivery-method-group {
    margin-top: 1rem;
}

.delivery-method-group h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.delivery-method-row {
    display: block;
    margin-bottom: 0.35rem;
}

.delivery-method-row .form-check-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.delivery-method-price {
    white-space: nowrap;
    font-weight: 600;
}

.import-progress-bar {
    width: 100%;
    height: 1.25rem;
}

/* Completed order rows (shipped / picked up) in the order listing */
#ordersTable tbody tr.order-row-completed>td {
    background-color: var(--bs-success-bg-subtle, #d1e7dd) !important;
}