.banner-wrapper {
    overflow: hidden;
    height: 200px;
    /* Set the max height */
    position: relative;
    /* Ensure the container can be positioned */
}

.banner-img {
    display: block;
    /* Remove any extra space below the image */
    width: 100%;
    /* Scale the width of the image */
    height: auto;
    /* Maintain aspect ratio */
    object-fit: cover;
    /* Crop the image to fill the container */
}

/* CSS for fade-out effect */
.alert.fade-out {
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.alert.fade-out.fade {
    opacity: 0;
}


/* Navbar Styles */
/* Make the navbar items display in a column on smaller screens */
/* Ensure the navbar items have some margin */
.navbar-nav .nav-item {
    margin-right: 15px;
}

/* Optionally add a break point for very narrow screens */
@media (max-width: 767.98px) {
    .navbar-nav {
        flex-direction: column;
        /* Stack items vertically on very small screens */
    }
}




/* Adjust for larger screens */
@media (min-width: 769px) {
    .navbar-nav-custom {
        display: flex;
        flex-direction: row;
    }

    .grid-container {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        width: 100%;
    }

    .card-header {
        padding: 15px;
    }
}




/* Checkout floating menu right */
.fixed-total {
    position: fixed !important;
    right: 2vw !important;
    /* Adjusted to 10vw from the right edge of the screen */
    width: 15vw !important;
    /* Adjust this width as needed */
    z-index: 1000 !important;
    background-color: white !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    padding: 15px !important;
}

/* carousel styles */

#carouselExampleSlidesOnly {
    max-height: 200px;
    overflow: hidden;
}

#carouselExampleSlidesOnly .carousel-inner img {
    height: 200px;
    object-fit: cover;
    /* Ensure the image is scaled correctly within the given height */
}





/* Navbar custom styles */
.navbar-custom {
    background-color: #f8f9fa;

}

.navbar-nav-custom .nav-item {
    position: absolute;
    margin-bottom: 5px;
}

.navbar-nav-custom .nav-link {
    padding: 10px 15px;
}

.navbar-nav-custom .nav-link:hover {
    background-color: #98c989;
    color: white !important;
    border-radius: 12px;
    transition: background-color 0.5s ease;
}

.secondary-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item:hover .secondary-menu,
.secondary-menu:hover {
    display: block;
}

/* Grid container styling this is the background of the whole bottom section*/
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, auto));
    gap: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    overflow-y: auto;
    /* Enable vertical scrolling if content exceeds container height */
    grid-auto-flow: dense;
    /* Fill in the gaps */
}

.grid-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    /* Adjust font size for grid items */
}

.sub-child {
    font-size: 12px;
    list-style-type: none;
    padding-left: 0;
    cursor: pointer;
}



#loading-indicator {
    text-align: center;
    padding: 20px;
    font-size: 18px;
}

.card-title {
    font-size: calc(1rem);
    word-wrap: break-word;
}


/* If you want more control over specific elements */
.card-text.description {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    font-weight: bold;
}

.card-text.code,
.card-text.unit-cost,
.card-text.availability {
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
}

.card-text.price {
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
    font-weight: bold;
}

.card {
    border-radius: 15px;
    /* Adjust to control roundness */
    overflow: hidden;
    /* Prevents content from overflowing */
    min-height: 350px;
    /* Adjust this value based on your design needs */
    display: flex;
    flex-direction: column;
}

.card-body {
    flex: 1;
    /* Allows the body to expand and fill available space */
}

.product-img {
    width: 100%;
    height: auto;
    max-width: 64px;
}

.quantity-controls {
    display: flex;
    align-items: center;
}

.quantity-controls .quantity {
    width: 25px;
    text-align: center;
    margin: 0 10px;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
}




.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #dee2e6;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #dee2e6;
}

.select2 {
    max-width: 100%;
    width: 100%;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.btn-group-xs>.btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}

.select2-container--open {
    z-index: 9999;
}

.searchable-fields {
    padding-left: 5px;
}

.searchable-link {
    padding: 0 5px 0 5px;
}

.searchable-link:hover {
    cursor: pointer;
    background: #eaeaea;
}

.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid~.invalid-feedback {
    display: block;
}

.dataTables_length label select {
    width: 65px !important;
}

div.dt-button-collection {
    padding: 0;
}

.buttons-columnVisibility {
    display: block;
}

.buttons-columnVisibility.active {
    background-color: rgba(128, 128, 128, 0.1);
    font-weight: bolder;
}

label.required::after {
    content: " *";
    color: red;
    margin-left: 2px;
}


/* Nav bar styles */
/* --- Navbar Auto Hide --- */
.navbar.fixed-top {
    top: 0;
    transition: top 0.4s ease-in-out;
}

/* When hidden, slide up completely */
.navbar.fixed-top.navbar-hidden {
    top: -80px;
}

/* Marble Mania top bar */
body.fixed-top-padding {
    padding-top: 70px;
}

/* global alert (banner which appears for a few seconds on top) styles */
#global-alert-container .alert {
    margin-bottom: 0.5rem;
    /* spacing between stacked alerts */
    border-radius: 0.25rem;
    /* neat, professional rounded corners */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    /* subtle shadow for depth */
}

/* Shopping Cart container styling */
main.container-fluid.cart-wrapper {
    padding-top: 20px;
    /* pushes content below the fixed navbar */
    padding-left: 1rem;
    padding-right: 1rem;
    /* matches Bootstrap container gutters */
    max-width: 1320px;
    /* matches .container width at xl breakpoint (Bootstrap 5) */
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991.98px) {
    main.container-fluid.cart-wrapper {
        padding-top: 80px;
        /* slightly less on mobiles */
    }
}


/* Specific styling used on product / product-bundle show blades */
.product-thumbnail.active-thumbnail {
    border-color: #007bff !important;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.similar-products-wrapper {
    overflow-x: auto;
    /* Enable horizontal scrolling */
    white-space: nowrap;
    /* Prevent items from wrapping */
    padding-bottom: 15px;
    /* Add some space for scrollbar on Windows */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.similar-product-card {
    display: inline-block;
    /* Make cards line up horizontally */
    vertical-align: top;
    /* Align cards to the top */
    width: 256px;
    /* Fixed width for each card, adjust as needed */
    margin-right: 15px;
    /* Spacing between cards */
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 0.25rem;
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.similar-product-card:hover {
    transform: translateY(-5px);
    /* Simple hover effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.similar-product-card img {
    width: 100%;
    height: 180px;
    /* Fixed height for image */
    object-fit: contain;
    /* Ensure image fits without cropping */
    border-bottom: 1px solid #eee;
    padding: 5px;
}

.similar-product-card .card-body {
    padding: 10px;
    white-space: normal;
    /* Allow text to wrap within the card */
}

.similar-product-card .product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.similar-product-card .product-price {
    font-size: 0.9rem;
    color: #007bff;
    /* Primary color for price */
    font-weight: 700;
}

/* Optional: Hide scrollbar for aesthetics (some browsers only) */
.similar-products-wrapper::-webkit-scrollbar {
    height: 8px;
}

.similar-products-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.similar-products-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.similar-products-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.thumbnail-gallery {
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
}

#mainProductImageWrapper {
    position: relative;
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#mainProductImageWrapper a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

#mainProductImageWrapper img,
#mainProductImageWrapper video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    transition: transform 0.25s ease-in-out;
}

#mainProductImageWrapper img:hover {
    transform: scale(1.02);
    transition: transform 0.25s ease-in-out;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    #mainProductImageWrapper {
        height: 300px;
    }

    .thumbnail-gallery {
        margin-top: 0.75rem;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    #mainProductImageWrapper {
        height: 380px;
    }
}

/* Storefront image container style */
.card-img-container {
    height: 10vh;
    /* Approximately 10% of viewport height */
    min-height: 120px;
    /* Ensures consistent minimum size */
}

.card-img-container img {
    max-height: 100%;
    width: auto;
}

/* Marble Mania buttons */
.btn-store-card {
    background-color: #E4A668;
    /* Bootstrap Primary Blue */
    color: #fff;
    font-weight: 500;
    border-radius: 0 0 0.5rem 0.5rem;
    /* rounded bottom corners */
    text-transform: none;
    letter-spacing: 0.3px;
    transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-store-card:hover,
.btn-store-card:focus {
    background-color: #F3B87C;
    /* Slightly darker blue on hover */
    color: #fff;
    box-shadow: 0 0 0 0.2rem #F3B87C;
}

.btn.btn-checkout {
    background-color: #E4A668;
    border-color: #E4A668;
    color: #fff;
}

.btn.btn-checkout:hover {
    background-color: #F3B87C;
    border-color: #F3B87C;
}

.btn.btn-add-to-cart {
    background-color: #E4A668;
    border-color: #E4A668;
    color: #fff;
}

.btn.btn-add-to-cart:hover {
    background-color: #F3B87C;
    border-color: #F3B87C;
}

.btn.btn-more-info {
    background-color: #50B165;
    border-color: #50B165;
    color: #fff;
}

.btn.btn-more-info:hover {
    background-color: #60C777;
    border-color: #60C777;
}

.variant-btn.active {
    border: 2px solid #E4A668;
    background-color: #fdebd0;
    /* soft orange tint */
    color: #222;
    font-weight: 600;
}

/* storefront cards */
.card-text-heading {
    color: #50B165 !important;
    /* standard Green */
    text-decoration: none;
    font-weight: 500;
}

.card-text-description {
    color: #7f7f7f !important;
    /* subtle medium gray */
    text-decoration: none;
    /* remove underline */
    transition: color 0.15s ease-in-out;
}

.card-text-description:hover,
.card-text-description:focus {
    color: #555 !important;
    /* darker on hover for readability */
}

.card-text-price {
    color: #343434 !important;
    font-weight: 600;
}

.card-text-price span {
    color: inherit;
    /* ensures nested spans follow same color */
}

/* Checkout & Order Custom classes */
.order-summary-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-info-block {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    width: 100%;
}

.order-product-card {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 120px;
}

.order-product-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 0.4rem;
    border: 1px solid #dee2e6;
    margin-right: 1rem;
    background: #f8f9fa;
}

/* --- fix squashed bundle items on mobile --- */
@media (max-width: 768px) {
    .order-product-card {
        flex-direction: column;
        /* image on top, details under */
        align-items: flex-start;
        text-align: left;
        min-height: auto;
        /* let it grow naturally */
        padding: 0.75rem;
    }

    .order-product-img {
        width: 100%;
        height: auto;
        /* maintain aspect ratio */
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    .order-product-details {
        width: 100%;
    }

    .order-product-options small {
        display: block;
        margin-top: 0.25rem;
    }

    .order-product-controls {
        flex-wrap: wrap;
        justify-content: space-between;
    }

}

.order-product-details {
    flex: 1 1 0;
    min-width: 0;
}

.order-product-controls {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-top: 0.2em;
}

.order-product-error {
    color: #dc3545;
    font-size: 0.92em;
    margin-top: 0.1em;
}

.order-summary-badge {
    font-size: 1rem;
    padding: 0.5em 1em;
    border-radius: 1em;
}

.order-product-name {
    font-weight: 600;
    font-size: 1.05em;
    margin-bottom: 0.2em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-product-price {
    font-weight: 500;
    margin-left: 1em;
    font-size: 1em;
}

@media (max-width: 767.98px) {
    .order-product-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem 0.5rem;
    }

    .order-product-img {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* ✅ Order Status Tracker styles */
.order-status-steps {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
    position: relative;
}

.order-status-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #dee2e6;
    z-index: 1;
}

.order-status-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.order-status-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dee2e6;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6c757d;
}

.order-status-step.active .order-status-circle {
    background: #4da7c7;
    color: #fff;
}

.order-status-step.completed .order-status-circle {
    background: #60C777;
    color: #fff;
}

.order-status-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.order-product-options {
    font-size: 0.85em;
    /* Slightly smaller for options */
    color: #6c757d;
    /* Muted color */
    margin-left: 10px;
    /* Indent options slightly */
    display: block;
    /* Ensure it takes its own line if space is tight */
}

.order-product-badge {
    font-size: 0.75em;
    padding: 0.2em 0.5em;
    margin-right: 3px;
    background-color: #6c757d;
    /* Bootstrap 4 secondary badge color */
    color: #fff;
    border-radius: 0.25rem;
}