:root {
    --main-theme-color: #00001a;
    --theme-text: #80d4ff;
    --min-width-for-desktop: 993;
    --label-background: #1a1a1a;
    --label-text: grey;
    --field-text: #fff;
    --table-border: #404040;
    --background: black;
    --sidebar-background: #00001a;
    --sidebar-label-text: #80d4ff;
    --hover-background: #80d4ff;
    --hover-foreground: black;
    --button-text: #80d4ff;
    --radio-selected: #2196F3;
    --sliderImageWidth: 170;
    --sliderImageHeight: 240;
    --carouselRadius: 300;
    --animationTime: 500;
    --tileWidth: 400;
    --tileHeight: 470;
    --tileGap: 20;
    --checkoutBtnWidth: 150;
}

/******************************************************************************/
/*  COMMON                                                                    */
/******************************************************************************/
* {
    margin: 0;
    padding: 0;
}

html,
body {
    touch-action: none;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Trebuchet MS";
    background: var(--background);
    color: var(--label-text);
    font-variation-settings: 'wght' 900;
    position: fixed;
    overflow: hidden;
}

.container {
    display: grid;
    margin: 0;
    grid-template-rows: 60px 1fr 40px;
    grid-template-columns: 300px 1fr;
    grid-template-areas:
        "header   header"
        "content  content"
        "footer   footer";
    position: fixed; /* CRITICAL: Prevents the parent from shifting */
    top: 0;
    left: 0;
    overflow: hidden; /* Stops the "Scroll-to-ID" from moving the parent */
    height: 100vh;
    width: 100vw;
}


content {
    grid-area: content;
    display: flex;
}

p {
    margin-top: 25px;
    margin-bottom: 25px;
}

iframe {
    width: 100%;
    border: none;
z-index: 1;
}

/******************************************************************************/
/*  HEADING                                                                   */
/******************************************************************************/
header {
    position: sticky; /* Or fixed */
    top: 0;
    grid-area: header;
    display: -webkit-box;
    display: -ms-felxbox;
    display: flex;
    width: 100%;
    height: 100%;
    background-color: var(--main-theme-color);
    justify-content: space-between;
    z-index: 9999 !important;
}

header img {
    padding: 0;
    margin-left: 8px;
    margin-right: 8px;
    height: 60px;
}

heading {
    display: flex;
    height: 100%;
    align-items: center;
    font-size: 32px;
    padding-left: 16px;
    color: var(--theme-text);
}

/******************************************************************************/
/*  SIDEBAR                                                                   */
/******************************************************************************/
button[menu-button] {
    font-size: 40px;
    height: 60px;
    margin: 0;
    padding: 0;
    font-weight: normal;
    float: left;
    width: 60px;
    border: none;
    display: block;
    color: var(--button-text);
    background-color: var(--main-theme-color);
    outline: 0;
    transition: background-color calc(var(--animationTime) *1ms);
}

.cart-button {
    fill: var(--button-text);
    height: 60px;
    display: flex;
    background-color: var(--main-theme-color);
    padding: 0px 8px 0px 8px;
    transition: background-color calc(var(--animationTime) *1ms);
}

.cart-button:hover {
    background-color: var(--button-text);
    fill: var(--main-theme-color);
}

#cart {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qty-in-cart {
    margin: 0px 8px 0px 4px;
    display: flex;
    width: 30px;
    height: 30px;
    border-radius: 15px;
    font-family: Verdana;
    font-size: 16px;
    justify-content: center;
    align-items: center;
    color: var(--main-theme-color);
    background: var(--button-text);
}

#menu-sidebar {
    position: relative;
    height: 100%;
    width: 300px;
    z-index: 1000;
    background-color: var(--sidebar-background);
    position: fixed !important;
    border-right: 1px solid var(--theme-text);
    padding-left: 30px;
    display: list-item;
    opacity: .9;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
}

/* When this class is present, it slides in */
#menu-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

@keyframes animateleft {
    from {
        left: -300px;
        opacity: 0;
    }

    to {
        left: 0px;
        opacity: 1;
    }
}

@keyframes animateright {
    from {
        left: 0px;
        opacity: 1;
    }

    to {
        left: -300px;
        opacity: 0;
    }
}

/* Sidebar Container */
#menu-sidebar ul {
    list-style: none;
    padding-left: 1.2rem;
    /* Indent for nesting */
    margin: 0;
}

#menu-sidebar .toc-root {
    padding-left: 0;
    /* No indent for top level */
}

/* Individual Items */
#menu-sidebar li {
    position: relative;
    padding: 4px 0;
}

#menu-sidebar a {
    text-decoration: none;
    color: white;
    display: block;
    font-size: 0.9rem;
    cursor: pointer;
}

#menu-sidebar a:hover {
    color: #007bff;
}

/* Collapsible Logic */
.toc-has-children>ul {
    display: none;
    /* Hide children by default */
}

.toc-open>ul {
    display: block;
    /* Show children when parent is open */
}

/* Add a small triangle/arrow */
.toc-has-children::before {
    content: '\25B6';
    position: absolute;
    left: -1rem;
    font-size: 0.6rem;
    top: 8px;
    transition: transform 0.2s;
    cursor: pointer;
}

.toc-open::before {
    transform: rotate(90deg);
}

/* The sidebar link style when its section is on screen */
.toc-root a.active {
    color: #007bff;
    font-weight: bold;
    background-color: rgba(0, 123, 255, 0.05);
    border-left: 3px solid #007bff;
    padding-left: 10px; /* Slight shift for emphasis */
    transition: all 0.2s ease;
}


button {
    color: var(--button-text);
    background-color: var(--main-theme-color);
    border: none;
    margin-top: 16px;
    margin-bottom: 16px;
    font-weight: bold;
    cursor: pointer;
}

button[sidebar] {
    margin-top: 0px;
    margin-bottom: 0px;
    width: 100%;
    display: block;
    padding: 8px 16px;
    text-align: left !important;
    border: none;
    white-space: normal;
    float: none;
    outline: 0;
    background-color: var(--sidebar-background);
    font-weight: normal;
    font-size: 16px;
    color: var(--sidebar-label-text);
    transition: background-color calc(var(--animationTime) *1ms);
    -webkit-transition: background-color calc(var(--animationTime) *1ms);
}

button[sidebar]:last-of-type {
    position: absolute;
    margin-bottom: 60px;
    bottom: 60px;
}

.help {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--background);
    background: var(--theme-text);
    /* transform: translateY(1px); */
}

/******************************************************************************/
/*  BUTTONS                                                                   */
/******************************************************************************/
@media (hover: hover) {
    button:hover {
        background-color: var(--hover-background) !important;
        color: var(--hover-foreground) !important;
    }

    table:hover[is-button] {
        background-color: var(--hover-background);
        color: var(--hover-foreground) !important;
        cursor: pointer;
        opacity: 0.5;

        td.field {
            color: inherit !important;
        }

        td.sublabel {
            background: inherit;
        }
    }

    tr:hover[row-button] {
        background-color: var(--hover-background);
        color: var(--hover-foreground) !important;
        cursor: pointer;
        opacity: 0.5;

        td {
            color: inherit;
        }
    }

    radiobutton.hover:hover {
        background-color: var(--hover-background);
        color: var(--hover-foreground) !important;
    }
}

/******************************************************************************/
/*  CONTEXT HELP AND OVERLAYS                                                 */
/******************************************************************************/
.selectedoverlay {
    display: block;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #31C21D;
    z-index: 2;
    cursor: pointer;
}

.overlay,
#instruction {
    position: fixed;
    display: none;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
    cursor: pointer;
}

@keyframes reveal {
    from {
        opacity: 0;
        display: none;
    }

    to {
        opacity: 1;
        display: block;
    }
}

@keyframes hide {
    from {
        opacity: 1;
        display: block;
    }

    to {
        opacity: 0;
        display: none;
    }
}

.main-content {
    overflow: hidden;
    display: -webkit-box;
    display: -ms-felxbox;
    display: flex;
    width: 100%;
    height: 100%;
    /* background-image: url("../../images/logo.avif"); */
    -webkit-perspective: 1000px;
    perspective: 1000px;
    transform-style: preserve-3d;
    padding-left: 348px;
    padding-right: 16px;
    transition: padding-left calc(var(--animationTime) *1ms);
    overflow-y: auto;
}

/******************************************************************************/
/*  PRODUCT LIST                                                              */
/******************************************************************************/
.test-img-content {
    max-height: calc(100vh - 200px);
    /* padding-bottom: 200px; */
}

.product-frame {
    display: flex;
    flex-direction: row;
}

.single-product-frame {
    margin: 10px;
    padding: 10px;
    /* width: 85%; */
    max-height: calc(100vh - 120px);
    border: thin solid var(--theme-text);
    box-shadow: 0px 0px 14px var(--theme-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

img.single-product {
    max-width: 100%;
    max-height: calc(100vh - 400px);
    display: flex;
    flex-direction: column;
    width: auto;
    object-fit: contain;
    align-items: center;
}

.single-product-price {
    font-family: Verdana;
    color: var(--theme-text);
    font-size: 2em;
    font-weight: bold;
    padding-left: 16px;
}

.single-product-overlay {
    background-color: rgba(0, 0, 0, 0.9) !important;
}




@media screen and (orientation:landscape) {
    /* Needs a lanscape mode setting up */
}

/******************************************************************************/
/*  OVERRIDES FOR MOBILES AND TABLETS                                         */
/******************************************************************************/
@media (max-width: 992px) {
    .single-product-frame {
        max-height: calc(100vh - 120px);
        display: flex;
        flex-direction: column;
        width: auto;
    }


    /* img.single-product {
max-height: calc(100vh - 200px);
display: flex;
flex-direction: column;
width: auto;
object-fit: contain;
align-items: center;
} */
    .product-frame {
        padding: 20px;
    }

    .product-frame img {
        width: 80%;
        padding: 1px;
        margin-left: auto;
        margin-right: auto;
        border-radius: 5px;
        box-shadow: 0px 0px 14px var(--theme-text);
        border: thin solid var(--theme-text);
    }

    heading {
        font-size: 24px !important;
        padding-right: 16px;
    }

    .submit-area {
        margin-left: 10px;
    }

    .submit-area-nosidebar button {
        height: 40px;
        font-size: 18px;
        margin-right: 10px;
        margin-left: 10px;
    }

    #overlay-content {
        position: absolute;
        top: 10%;
        left: 5%;
        right: 5%;
        font-family: sans-serif;
        font-size: 22px;
        color: white;
    }

    .context-help {
        position: absolute;
        top: 10%;
        left: 5%;
        right: 5%;
        font-size: 22px !important;
        color: white;
    }

    .main-content {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .single-product-frame {
        width: 85%;
        margin: 0px;
    }
}

/******************************************************************************/
/*  OVERRIDES FOR DESKTOP                                                     */
/******************************************************************************/
/* if width is changed here it should be matched in closeSidebar() function */
@media (min-width: 993px) {
    .submit-area {
        margin-left: 210px;
    }

    button[menu-button] {
        display: none !important;
    }

    nav[left] {
        display: block !important;
    }

    progbar {
        margin-left: 200px;
    }

    #overlay-content,
    #instruction {
        position: absolute;
        top: 50%;
        left: 50%;
        font-size: 30px;
        font-family: sans-serif;
        color: white;
        transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
        z-index: 999;
    }

    .context-help {
        position: absolute;
        top: 50%;
        left: 50%;
        font-family: sans-serif;
        font-size: 30px !important;
        color: white;
        transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
        z-index: 999;
    }

    .test-img-content {
        display: flex;
        flex-wrap: wrap;
        /* margin: 20px 0px 20px 0px; */
        justify-content: center;
        gap: calc(var(--tileGap)*1px);
    }

    .product-frame {
        display: flex;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        opacity: 0;
        transition: opacity calc(var(--animationTime) * 1ms) ease;
        border-radius: 5px;
        /* margin-top: 20px; */
        box-shadow: 0px 0px 14px var(--theme-text);
        border: thin solid var(--theme-text);
        padding: 8px 8px 8px 8px;
        height: calc(var(--tileHeight)*1px);
        width: calc(var(--tileWidth)*1px);
    }

    .product-frame img {
        max-width: 100%;
        max-height: 100%;
        margin: auto;
        object-fit: contain;
        /* maintains aspect ratio */
    }

    .product-frame.visible {
        opacity: 1;
    }

    img.preview-test {
        transition: reveal 2s ease;
    }

    #menu-sidebar {
        position: relative;
        /* Fits back into your Grid layout */
        transform: translateX(0);
        /* Always visible */
        transition: none;
        /* No sliding on desktop */
    }

    #menu-button {
        display: none;
        /* Hide the hamburger icon on desktop */
    }
}

footer {
    grid-area: footer;
    display: flex;
    height: 100%;
    align-items: center;
    bottom: 0;
    background-color: var(--main-theme-color);
    z-index: 1;
    padding-left: 16px;
    color: var(--theme-text);
    font-size: 25px;
    font-family: "DancingScript";
}

.notification-box {
    font-family: sans-serif;
    display: none;
    background: var(--background);
    width: auto;
    height: auto;
    position: absolute;
    padding: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    border-radius: 10px;
    border: outset;
    border-width: thin;
    border-color: lightgrey;
    z-index: 999;
}

form.upload-form {
    padding: 10px 0px 10px 0px;
}

/* Submit buttons without sidebar */
.notification-button {
    padding-block-end: 100px;
    padding-bottom: 80px;
    margin-left: 10px;
    margin-right: 10px;
    bottom: 80px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.notification-button[login=on] {
    padding-bottom: 0px;
    margin-left: -10px;
    margin-right: -10px;
}

.notification-button button {
    flex: auto;
    height: 60px;
    font-size: 25px;
    margin-right: 10px;
    margin-left: 10px;
}

/******************************************************************************/
/*  DROP DOWN LIST                                                            */
/******************************************************************************/
.ddl {
    width: 100%;
    height: 35px;
    font-weight: bold;
    font-size: 18px;
}

input.field {
    width: 100%;
    height: 35px;
    font-weight: bold;
    font-size: 18px;
}

/* Progress bar */
/******************************************************************************/
/*  PROGRESS BAR                                                              */
/******************************************************************************/
progbar {
    grid-area: progbar;
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: left;
}

.progress-bar {
    height: 6px;
    width: 100%;
    border: solid darkblue 2px;
    border-radius: 6px;
    /* margin-top: 16px;
 margin-bottom: 16px; */
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: lightblue;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: width 0.25s;
}

.progress-bar-text {
    padding: 5px 0px 5px 2px;
    font-family: sans-serif;
    color: var(--themetext);
}

/******************************************************************************/
/*  SVG CONTAINER                                                             */
/******************************************************************************/
svgbox {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    /* flex-direction: column; */
    z-index: -1;
    /* margin: auto;
   padding: auto;
   position: absolute; */
    transform: translate(-50%, -50%);
}

svgbox text {
    /* width: 100%;
   height: 100%;
   margin: auto;
   position: absolute;
   display: flex; */
    font-family: frijole;
    /* font-weight: bolder; */
    font-size: 18px !important;
    fill: #c68c53;
}

@supports (-webkit-touch-callout: none) {
    /* CSS specific to iOS devices svgbox */
    /* svgbox textPath {
     letter-spacing: 2px;
   } */
}
