:root {
    --light-bg: #ffffff;
    --dark-text: #000000;
    --light-text: #ffffff;
    --transparent-bg: rgba(0, 0, 0, 0.8);
}

@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #000000;
        --dark-text: #ffffff;
    }
}

html {
    font-size: 12px;
    position: relative;
    min-height: 100%;
}

html, body {
    height: 100%; /* Allows the body to use the full screen height */
    margin: 0;
}

body {
    display: flex;
    flex-direction: column; /* Stacks header, main, and footer vertically */
}

    body > :first-child {
        flex: 1;
    }


.btn-gray {
    color: #000000;
    background-color: #636363;
    border-color: #636363;
}

    .btn-gray:hover,
    .btn-gray:focus,
    .btn-gray:active {
        color: #000000;
        background-color: #585858;
        border-color: #585858;
    }

.btn-expandable {
    background-color: transparent;
    box-shadow: none !important;
    border: none !important;
    transform: scaleX(2);
}

    .btn-expandable:not(.collapsed) {
        margin-top: -2px;
    }

    .btn-expandable.collapsed {
        margin-top: -12px;
    }

    .btn-expandable:not(.collapsed)::after {
        content: "\2303";
        font-weight: 500;
    }

    .btn-expandable.collapsed::after {
        content: "\2304";
        font-weight: 700;
    }

/* navbar */
.my-navbar {
    width: 100%;
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.5s ease;
}

.my-navbar-bg {
    background-color: var(--light-bg);
}

.my-navbar-text {
    color: var(--dark-text);
    transition: color 0.5s ease;
}

    .my-navbar-text.btn-dark {
        color: var(--light-text);
    }

.my-navbar-logo {
    width: 150px;
}

.sticky-active {
    background-color: var(--transparent-bg) !important;
}

    .sticky-active .my-navbar-text {
        color: var(--light-text);
    }

    .sticky-active .my-navbar-logo {
        content: url('/images/PoolwerxLogo-Dark.png');
    }

/* #offcanvas-navbar */
#offcanvas-navbar .offcanvas-body {
    justify-items: center;
}
#offcanvas-navbar .my-navbar-logo {
    width: min(70vw, 300px);
}

#offcanvas-navbar .my-navbar-text {
    color: var(--light-text);
    width: 90vw;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
}

    #offcanvas-navbar .my-navbar-text:hover {
        background-color: #4d4d4d;
    }

#offcanvas-navbar hr.divider {
    margin: 1.5rem 0;
    border: none; /* Removes default browser styles */
    border-top: 1px solid white; /* Add your visible top border */
    height: 0; /* Ensures no extra block height */
    width: 100%;
    overflow: visible;
}

/* offcanvas-cookie */
#offcanvas-cookie {
    height: auto !important;
}

    #offcanvas-cookie .offcanvas-body {
        padding: 1.5rem !important;
    }

    #offcanvas-cookie .cookies-panel {
        display: grid;
        grid-template-columns: 30px 1fr auto;
        gap: 10px 10px;
        align-items: start;
        justify-items: start;
    }

/* others */

img#madeInCanada {
    width: 7rem;
    height: auto;
}

#vendors a {
    margin: 10px;
}

#vendors img {
    height: 35px;
    width: auto;
}

#myImageGallery img {
    min-width: 200px;
    max-width: 25vw;
    height: auto;
}

.my-liner-prompt-container {
    width: 80vw;
    border-radius: 10px;
    box-shadow: 0px 4px 12px 0px rgba(255, 255, 255, 0.5);
}

.my-prompt-text {
    font-size: 23pt;
    font-weight: 700;
    line-height: 1.25;
}

.my-liner-pattern-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 1.5rem;
}

.my-liner-pattern-card {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 120px 1fr;
    place-items: center;
}

    .my-liner-pattern-card img.my-liner-pattern {
        width: 100%;
        box-sizing: border-box;
        aspect-ratio: 350 / 451; /* Width is 350px, height is 451px*/
        object-fit: cover;
        object-position: top center;
    }

    .my-liner-pattern-card img {
        box-sizing: border-box;
        border: solid 1px white;
        border-radius: 5px;
    }

    .my-liner-pattern-card img:hover {
        cursor: pointer;
        box-shadow: 0px 4px 10px 0px rgb(0, 0, 0, 0.5);
    }

    .my-liner-pattern-card .my-carousel {
        display: grid;
        grid-template-columns: repeat(2, 40%);
        grid-column-gap: 10px;
        justify-content: center;
    }
       
    .my-liner-pattern-card > :last-child {
        width: 100%;
        display: flex;
        flex-direction: column;
        text-align: center;
        text-wrap: wrap;
        padding: 5px 20px;
    }


.my-thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
    object-position: center
}

/* address - complete */
.address-complete {
    display: flex;
    flex-direction: column;
    padding: 5px 10px 5px 10px;
}

    .address-complete > :first-child {
        font-weight: bold;
    }

    .address-complete > :last-child {
        color: var(--bs-secondary);
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 25px;
    }

    .address-complete:hover {
        color: var(--bs-light);
        background-color: var(--bs-secondary-rgb);
        cursor: pointer;
    }

        .address-complete:hover > :last-child {
            color: var(--bs-light-rgb);
        }

/* general */

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.dropdown-toggle.hide-arrow::after,
.dropdown-toggle.hide-arrow::before {
    display: none !important;
}

button > .spinner-border {
    display: none !important;
}

button.show-spinner {
    pointer-events: none;
    box-shadow: none;
}

    button.show-spinner > .spinner-border {
        display: inline-block !important;
    }

.my-backdrop {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2500;
    background-color: var(--transparent-bg) !important;
    display: none;
}

    .my-backdrop.fade {
        display: flex !important;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }

    .my-backdrop.show {
        display: flex !important;
    }

    .my-backdrop.fade.show {
        opacity: 1;
        visibility: visible;
    }

.my-message-box {
    min-width: 80vw;
    max-width: 50rem;
}

    .my-message-box.info .card-header {
        color: var(--light-text) !important;
        background-color: var(--bs-primary) !important;
    }

    .my-message-box.error .card-header {
        color: var(--bs-warning) !important;
        background-color: var(--bs-danger) !important;
    }

.brightness-60 {
        filter: brightness(60%); /* Reduces brightness to 60% of original */
    }

.crop-150px {
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: top;
}

.my-overlay-item {
    position: absolute !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Precisely centers the text */
    z-index: 10;
}

    .my-overlay-item.my-warranty {
        width: 60%;
        min-height: 10rem;
        top: 100%;
        background-color: #f2f2f2;
        border: outset 2px rgba(255, 255, 255, 0.5);
        border-radius: 10px;
        padding: 10px 15px;
    }

.row.my-warranty {
    row-gap: 100px;
    margin-bottom: 100px;
}

/* Grid column */
.grid-col-1 {
    grid-column: 1 !important;
}

.grid-col-2 {
    grid-column: 2 !important;
}

.grid-col-3 {
    grid-column: 3 !important;
}

.grid-col-4 {
    grid-column: 4 !important;
}

.grid-col-5 {
    grid-column: 5 !important;
}

.grid-col-6 {
    grid-column: 6 !important;
}

.grid-col-7 {
    grid-column: 7 !important;
}

.grid-col-8 {
    grid-column: 8 !important;
}

/* Grid row */
.grid-row-1 {
    grid-row: 1 !important;
}

.grid-row-2 {
    grid-row: 2 !important;
}

.grid-row-3 {
    grid-row: 3 !important;
}

.grid-row-4 {
    grid-row: 4 !important;
}

.grid-row-5 {
    grid-row: 5 !important;
}

.grid-row-6 {
    grid-row: 6 !important;
}

.grid-row-7 {
    grid-row: 7 !important;
}

.grid-row-8 {
    grid-row: 8 !important;
}

/* carousel */
.my-carousel {
    width: 100%;
}

    .my-carousel:has(.my-track) {
        overflow:  hidden;
        position: relative;
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); /* Optional: add side fade masks */
    }

    .my-track {
        display: flex;
        width: max-content;
        gap: 10px;
        animation: scroll 20s linear infinite;
    }

    .my-track > img {
        width: auto;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
    }

.my-carousel:hover > .my-track {
    animation-play-state: paused; /* Pause animation when user hovers over the carousel */
}

.my-carousel.pause > .my-track {
    animation-play-state: paused;
}

.carousel-item > .carousel-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw; /* Take up full viewport width */
    height: 80vh; /* Take up full viewport height */
    object-fit: contain; /* Show the FULL image, no cropping, no stretching */
}

@keyframes scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

@media (min-width: 576px) {
    .my-navbar-logo {
        width: 200px;
    }

    #vendors img {
        height: 40px;
    }
}

@media (min-width: 768px){
    html {
        font-size: 14px;
    }

    .fs-md-1 {
        font-size: 2.5rem !important;
    }

    .fs-md-2 {
        font-size: 2rem !important;
    }

    .fs-md-3 {
        font-size: 1.75rem !important;
    }

    .fs-md-4 {
        font-size: 1.5rem !important;
    }

    .fs-md-5 {
        font-size: 1.25rem !important;
    }

    .fs-md-6 {
        font-size: 1rem !important;
    }

    .w-md-50{
        width: 50% !important;
    }

    .my-navbar-logo {
        width: 250px;
    }

    img#madeInCanada {
        width: 10rem;
        height: auto;
    }

    #vendors a {
        margin: 15px;
    }

    #vendors img {
        height: 50px;
    }

    .my-track {
        gap: 20px;
    }

    .my-liner-prompt-container {
        width: 60vw;
    }

    .my-prompt-text {
        font-size: 30pt;
    }

    .my-message-box {
        min-width: 600px;
    }

    #offcanvas-cookie .offcanvas-body {
        padding: 2rem !important;
    }
}

@media (min-width: 992px) {
    .fs-lg-1 {
        font-size: 2.5rem !important;
    }

    .fs-lg-2 {
        font-size: 2rem !important;
    }

    .fs-lg-3 {
        font-size: 1.75rem !important;
    }

    .fs-lg-4 {
        font-size: 1.5rem !important;
    }

    .fs-lg-5 {
        font-size: 1.25rem !important;
    }

    .fs-lg-6 {
        font-size: 1rem !important;
    }

    .w-lg-50 {
        width: 50% !important;
    }

    .fw-lg-bold {
        font-weight: bold !important;
    }

    .fw-bold.lg-reset {
        font-weight: normal !important;
    }

    .text-white.lg-reset {
        color: var(--dark-text) !important;
    }

    .brightness-60.lg-reset {
        filter: brightness(100%) !important;
    }

    .crop-150px.lg-reset {
        height: auto;
    }

    .my-overlay-item.lg-reset {
        position: relative !important;
        top: 0;
        left: 0;
        transform: none !important;
        z-index: 0;
    }

    img#madeInCanada {
        width: 12rem;
        height: auto;
    }

    .my-liner-pattern-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 16px;
    }

    .fs-xl-1 {
        font-size: 2.5rem !important;
    }

    .fs-xl-2 {
        font-size: 2rem !important;
    }

    .fs-xl-3 {
        font-size: 1.75rem !important;
    }

    .fs-xl-4 {
        font-size: 1.5rem !important;
    }

    .fs-xl-5 {
        font-size: 1.25rem !important;
    }

    .fs-xl-6 {
        font-size: 1rem !important;
    }

    .w-xl-50 {
        width: 50% !important;
    }

    .grid-col-xl-1 {
        grid-column: 1 !important;
    }

    .grid-col-xl-2 {
        grid-column: 2 !important;
    }

    .grid-col-xl-3 {
        grid-column: 3 !important;
    }

    .grid-col-xl-4 {
        grid-column: 4 !important;
    }

    .grid-col-xl-5 {
        grid-column: 5 !important;
    }

    .grid-col-xl-6 {
        grid-column: 6 !important;
    }

    .grid-col-xl-7 {
        grid-column: 7 !important;
    }

    .grid-col-xl-8 {
        grid-column: 8 !important;
    }

    .grid-row-xl-1 {
        grid-row: 1 !important;
    }

    .grid-row-xl-2 {
        grid-row: 2 !important;
    }

    .grid-row-xl-3 {
        grid-row: 3 !important;
    }

    .grid-row-xl-4 {
        grid-row: 4 !important;
    }

    .grid-row-xl-5 {
        grid-row: 5 !important;
    }

    .grid-row-xl-6 {
        grid-row: 6 !important;
    }

    .grid-row-xl-7 {
        grid-row: 7 !important;
    }

    .grid-row-xl-8 {
        grid-row: 8 !important;
    }

    .my-navbar-logo {
        width: 350px;
    }

    .my-navbar-text {
        font-size: 1.2rem;
    }

    .my-liner-pattern-container {
        grid-template-columns: repeat(4, 1fr);
    }

    .my-liner-prompt-container {
        width: 50vw;
    }

    .my-prompt-text {
        font-size: 40pt;
    }

    #offcanvas-cookie .cookies-panel {
        grid-template-columns: 30px 190px 1fr 20px 30px 190px 1fr;
        column-gap: 5px;
    }
}

@media (min-width: 1400px) {
    .fs-xxl-1 {
        font-size: 2.5rem !important;
    }

    .fs-xxl-2 {
        font-size: 2rem !important;
    }

    .fs-xxl-3 {
        font-size: 1.75rem !important;
    }

    .fs-xxl-4 {
        font-size: 1.5rem !important;
    }

    .fs-xxl-5 {
        font-size: 1.25rem !important;
    }

    .fs-xxl-6 {
        font-size: 1rem !important;
    }

    .my-liner-prompt-container {
        width: 40vw;
    }

    .my-prompt-text {
        font-size: 40pt;
    }

    #offcanvas-cookie .cookies-panel {
        grid-template-columns: 30px 200px 1fr 30px 30px 200px 1fr;
    }
}