/* =================================================================
   1. Sticky footer styles (Compatible Bootstrap 5 flexbox approach)
   =================================================================== */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

@media screen and (min-width: 768px) and (max-width: 979px) {
    body {
        padding-top: 60px;
    }
}

@media (min-width: 1200px) {
    .container-repanier,
    .container {
        max-width: 95% !important; /* Uses 95% of screen width instead of a fixed width */
    }
}

.footer {
    flex-shrink: 0;
    position: relative !important;
    width: 100%;
    text-align: center;
    border-top: 1px solid #dee2e6; /* Subtle full-width separator line */
    padding-top: 15px; /* Spacing above text */
    margin-top: 15px;  /* Space to detach footer from main content */
}

/* =================================================================
   2. Sidebar (.bs-docs-sidebar)
   =================================================================== */
.bs-docs-sidebar {
    padding: 0 0 1px 20px;
    margin-top: 1px;
    margin-bottom: 1px;
}

/* First-level items bold with default transparent left border */
.bs-docs-sidebar .nav > li > .nav-link {
    color: #3c3c3c !important;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    font-weight: bold;
    border-left: 2px solid transparent;
}

/* Sub-menus normal weight and indented */
.bs-docs-sidebar .nav .nav > li > .nav-link {
    padding-left: 30px;
    font-weight: normal;
    color: #3c3c3c !important;
    border-left: 2px solid transparent;
}

/* Green color on hover and focus (without vertical bar) */
.bs-docs-sidebar .nav > li > .nav-link:hover,
.bs-docs-sidebar .nav > li > .nav-link:focus,
.bs-docs-sidebar .nav .nav > li > .nav-link:hover,
.bs-docs-sidebar .nav .nav > li > .nav-link:focus {
    color: #51a351 !important;
    background-color: transparent !important;
    text-decoration: none;
}

/* Green color and left vertical bar for the active page */
.bs-docs-sidebar .nav > li > .nav-link.bs-docs-sidebar-active,
.bs-docs-sidebar .nav .nav > li > .nav-link.bs-docs-sidebar-active {
    color: #51a351 !important;
    background-color: transparent !important;
    text-decoration: none;
    border-left: 2px solid #51a351 !important;
}

/* =================================================================
   3. Utilities and Components (Panels / Accordions)
   =================================================================== */
.display_none {
    display: none !important;
}

.accordion-button:not(.collapsed):after,
.panel-heading.accordion-toggle:after {
    font-family: 'bootstrap-icons', serif;
    content: "\e114";
    float: right;
    position: relative;
    bottom: 23px;
    font-size: 15pt;
    color: grey;
}

.accordion-button.collapsed:after,
.panel-heading.accordion-toggle.collapsed:after {
    content: "\e080";
}

.panel-heading:hover {
    cursor: pointer;
}

.panel-heading:hover h4 {
    text-decoration: underline;
}

.offer-description {
    position: relative;
    height: 200px;
    margin-top: 20px;
    overflow: auto;
}

body > .container {
    padding: 0 15px 0;
}

.container .text-muted {
    margin: 20px 0;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

code {
    font-size: 80%;
}

/* =================================================================
   4. Navigation / Dropdowns & Mobile Menu (Native BS5 Offcanvas)
   =================================================================== */
@media only screen and (min-width: 768px) {
    .navbar-nav li.dropdown:hover > .dropdown-menu {
        display: block;
    }
}

@media only screen and (max-width: 767px) {
    .sidenav {
        display: none;
        height: 100%;
        max-height: 100% !important;
        width: 90%;
        position: fixed;
        z-index: 1100;
        top: 0;
        left: 0;
        background-color: #4d4d4f;
        overflow-x: hidden;
        transition: transform 0.5s ease;
        padding-top: 15px;
    }

    .sidenav a {
        padding: 8px 8px 8px 32px;
        text-decoration: none;
        color: #818181;
        display: block;
        transition: 0.3s;
        white-space: normal !important;
        font-size: 18px;
    }

    .sidenav a:hover, .offcanvas a:focus {
        color: #f1f1f1;
    }

    .sidenav .closebtn {
        position: absolute;
        top: 0;
        right: 20px;
    }
}

a.skip_link {
    position: absolute;
    left: -1000px;
    top: -1000px;
}

.white, .white a {
    color: #fff;
}

/* =================================================================
   5. Specific Containers (3 states to prevent navbar overlapping)
   =================================================================== */

/* Small screens / Mobiles (< 768px) */
@media only screen and (max-width: 767px) {
    .container-bootstrap,
    .container-repanier {
        margin-top: 90px;
    }
    .container-repanier {
        margin-bottom: 0;
    }
    .container-info {
        margin: 90px 0 -90px 0;
    }
}

/* Intermediate state / Tablets (768px to 976px) */
@media only screen and (min-width: 768px) and (max-width: 976px) {
    .container-bootstrap,
    .container-repanier {
        margin-top: 35px;
    }
    .container-repanier {
        margin-bottom: 0;
    }
    .container-info {
        margin: 35px 0 -35px 0;
    }
    .container-menu {
        padding: 0 15px 0;
    }
}

/* Large screens (>= 977px) */
@media only screen and (min-width: 977px) {
    .container-bootstrap,
    .container-repanier {
        margin-top: 85px;
    }
    .container-repanier {
        margin-bottom: 0;
    }
    .container-info {
        margin: 85px 0 -85px 0;
    }
    .container-menu {
        padding: 0 15px 0;
    }
}

/* =================================================================
   6. Pure CSS Cart Icon
   =================================================================== */
.icon-cart {
    width: 48px;
    height: 48px;
    position: relative;
    overflow: hidden;
    margin-top: -10px;
}

.icon-cart .cart-line-1 {
    width: 15%;
    height: 7%;
    position: absolute;
    left: 8%;
    top: 25%;
    transform: rotate(5deg);
    border-bottom-left-radius: 35%;
}

.icon-cart .cart-line-2 {
    width: 35%;
    height: 7%;
    position: absolute;
    left: 6%;
    top: 40%;
    transform: rotate(80deg);
}

.icon-cart .cart-line-2:before {
    content: "";
    width: 120%;
    height: 100%;
    position: absolute;
    left: 45%;
    top: -280%;
    transform: rotate(-80deg);
    background-color: inherit;
}

.icon-cart .cart-line-2:after {
    content: "";
    width: 70%;
    height: 100%;
    position: absolute;
    left: 59%;
    top: -670%;
    background-color: inherit;
    transform: rotate(40deg);
    border-top-left-radius: 50%;
    border-bottom-left-radius: 25%;
}

.icon-cart .cart-line-3 {
    width: 30%;
    height: 7%;
    position: absolute;
    left: 33%;
    top: 45%;
}

.icon-cart .cart-line-3:after {
    content: "";
    width: 124%;
    height: 100%;
    position: absolute;
    top: -150%;
    left: -5%;
    background-color: inherit;
}

.icon-cart .cart-wheel {
    width: 12%;
    height: 12%;
    border-radius: 100%;
    position: absolute;
    left: 28%;
    bottom: 20%;
}

.icon-cart .cart-wheel:after {
    content: "";
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: 100%;
    position: absolute;
    left: 200%;
    bottom: 0;
}

/* =================================================================
   7. Navbar and Miscellaneous Buttons
   =================================================================== */
.navbar-header {
    width: 100%;
}

.navbar-group-name {
    margin-left: 10px;
    color: #fff;
}

.btn {
    white-space: normal !important;
    word-wrap: break-word;
    word-break: normal;
    overflow-wrap: break-word;
}

.not-active {
    pointer-events: none;
    cursor: default;
}

.form-sticky-update-button {
    position: sticky;
    bottom: 65px;
}

.back-to-top-sticky-button {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 2000;
}

/* =================================================================
   8. Animations (Spinners)
   =================================================================== */
.gly-spin {
    animation: spin 2s infinite linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(359deg);
    }
}

/* =================================================================
   9. Custom Forms and Checkboxes
   =================================================================== */
.form-group input[type="checkbox"] {
    display: none;
}

.form-group input[type="checkbox"] + .btn-group > label span {
    width: 20px;
}

.form-group input[type="checkbox"] + .btn-group > label span:first-child {
    display: none;
}

.form-group input[type="checkbox"] + .btn-group > label span:last-child {
    display: inline-block;
}

.form-group input[type="checkbox"]:checked + .btn-group > label span:first-child {
    display: inline-block;
}

.form-group input[type="checkbox"]:checked + .btn-group > label span:last-child {
    display: none;
}

.button, input[type=submit], input[type=button], .submit-row input, a.button {
    color: initial !important;
    cursor: initial !important;
}

/* =================================================================
   10. Bootstrap Hearts Alignment & Sizing
   =================================================================== */
.bi-heart, .bi-heart-fill {
    font-size: 1.2rem;
    vertical-align: -0.125em;
}

/* =================================================================
   11. Chevron Icon Rotation on Expand
   =================================================================== */
.card-header[aria-expanded="true"] .chevron-icon,
.card-header .chevron-icon {
    transition: transform 0.2s ease-in-out;
}

.card-header[aria-expanded="true"] .chevron-icon {
    transform: rotate(90deg);
}

/* =================================================================
   12. Keep mobile navbar elements grouped on the left
   =================================================================== */
@media (max-width: 991.98px) {
    .navbar-custom .container-fluid {
        display: flex;
        justify-content: flex-start !important;
        flex-wrap: nowrap;
    }
}

/* =================================================================
   13. Sticky Sidebar with Internal Scroll
   =================================================================== */
@media (min-width: 992px) {
    .bs-docs-sidebar .fixed-sidebar-container {
        position: sticky;
        top: 5rem;
        max-height: calc(100vh - 6rem);
        display: flex;
        flex-direction: column;
    }

    .bs-docs-sidebar .sidebar-scrollable-area {
        overflow-y: auto;
        flex-grow: 1;
        padding-right: 5px;
    }
}

/* =================================================================
   14. Modal Dialog Top Offset (Prevents fixed navbar overlap)
   =================================================================== */
.modal-dialog {
    margin-top: 100px !important;
}

/* =================================================================
   15. Navbar Customization & Dropdown Styles
   =================================================================== */
.navbar-custom .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0.5rem 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Dark text for dropdown items */
.navbar-custom .dropdown-menu .dropdown-item {
    color: var(--bs-primary) !important;
}

/* Hover and focus states for dropdown items */
.navbar-custom .dropdown-menu .dropdown-item:hover,
.navbar-custom .dropdown-menu .dropdown-item:focus {
    color: #eee9f6 !important;
    background-color: var(--bs-primary) !important;
}

/* Active/selected state in the dropdown */
.navbar-custom .dropdown-menu .dropdown-item.active {
    color: #ffffff !important;
    background-color: var(--bs-primary) !important;
}