@media (prefers-color-scheme: light) {
    body{
        margin: 0;
        font-size: 100%;
        max-width: 400px;
        display: block;
        margin-left: auto;
        margin-right: auto;
        font-family: Arial, Helvetica, sans-serif;
        -webkit-tap-highlight-color: transparent;
        background-color: white;
    }

    html{
        scroll-behavior: smooth;
    }

    ::-webkit-scrollbar{
        width: 0;
        height: 0;
        background: transparent;
    }

    #header{
        max-width: 400px;
        display: block;
        margin-left: auto;
        margin-right: auto;
        position: fixed;
        height: auto;
        width:100%;
        overflow: hidden;
        background-color: black;
        z-index: 2;
        font-size: 100%;
    }

    .form-popup {
        max-width: 400px;
        display: none;
        position: fixed;
        z-index: 9999;
        background: white;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    /* Add styles to the form container */
    .form-container {
        padding: 10px;
        background-color: white;
    }

    .size {
        overflow: auto;
        white-space: nowrap;
        display: flex;
    }

    .redirect {
        text-align: center; 
        display: flow-root;
    }

    #icon{
        font-size: 150%;
    }

    #go-back{
        display: inline-block;
        color: orange;
        margin: 4%;
    }

    #preference-method {
        display: inline-block;
        margin: 4%;
        color: white;
        font-size: 133%;
    }

    #cart{
        color: orange;
        margin: 4% 4%;
        display: inline-block;
        float: right;
        position: relative;
    }

    #cart-value{
        position: absolute;
        color: white;
        top: -5px;
        right: -8px;
        font-size: 0.7em;
    }

    .nav{
        overflow-x: auto;
        width: auto;
        height: 100%;
        background-color: white;
        white-space: nowrap;
        padding: 15px;
    }

    .nav a{
        display: inline;
        margin: 14px 2%;
        padding: 5px;
        border-radius: 10px;
        text-decoration: none;
        border: solid orange;
        color: orange;
    }

    .container{
        top: 50px;
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    .footer{
        width: 100%;
        height: 100px;
        background-color: black;
    }

    .content-wrapper{
        position: relative;
        float: left;
        width: 40%;
        height: 200px;
        margin: 5% 5% 10% 5%;
        border-radius: 5px;
        align-content: center;
        border: none;
        outline: none;
        background: transparent;
    }

    .content-rapper:after{
        content: "";
        display: block;
        padding-bottom: 100%;
    }

    #img-wrapper{
        width: 100%;
        height: 70%;
        border-radius: 5px;
    }

    #desc{
        font-size: 100%;
        font-weight: bold;
        width: 100%;
        display: block;
        color: black;
        opacity: 0.9;
        text-align: center;
    }

    #price{
        font-size: 80%;
        color: grey;
    }

    .title{
        display: block;
        width: 100%;
        background-color: white;
        text-align: center;
        padding: 1%;
        font-weight: bold;
    }

    .category{
        width: 100%;
        overflow: hidden;
    }

    .example-modal{
        background: rgba(90, 90, 90, 0.5);
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 9999;
        width: 100%;
        right: 0;
        display: none;
    }

    .example-modal .modal { 
        max-width: 400px;
        width: fit-content;
        height: fit-content;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: transparent!important;
        display: block;    
        position: fixed;
        right: 0;
        bottom: 0;
        z-index: 1040;
        overflow: hidden;
    }

    .modal-body {
        justify-content: space-between;
        display: flex;
        position: relative;
        padding: 15px;
    }

    .modal-dialog {
        position: relative;
        margin: 30px auto;
    }

    .modal-content {
        box-shadow: 0 2px 3px rgba(0,0,0,0.125) !important;
        position: relative;
        background-color: #fff;
    }

    .modal-header {
        border-bottom-color: #f4f4f4;
        min-height: 16.43px;
        padding: 15px;
        border-bottom: 1px solid #e5e5e5;
    }

    .modal-footer {
        border-top-color: #f4f4f4;
        padding: 15px;
        text-align: right;
        border-top: 1px solid #e5e5e5;
    }

    .btncancel {
        background: none;
        border: none;
        width: 100%;
        text-align: right;
    }

    .size-content-wrapper {
        background-color: whitesmoke;
        height: 200px;
        width: 200px;
    }

    #size-desc{
        white-space: normal;
        font-size: 100%;
        font-weight: bold;
        width: 100%;
        height: 20%;
        display: block;
        color: black;
        opacity: 0.9;
        text-align: center;
    }

    .size {
        column-gap: 10px;
    }

    .soldouttext{
        position: absolute;
        z-index: 1;
        margin: 0 auto;
        left: 0;
        right: 0;        
        text-align: center;
        top: 40%; /* Adjust this value to move the positioned div up and down */
        background: rgba(0, 0, 0, 0.8);
        font-family: Arial,sans-serif;
        color: #fff;
        width: 60%; /* Set the width of the positioned div */
    }

    #goTopBtn {
        width: 50px;
        height: 50px;
        display: none;
        position: fixed;
        bottom: 20px;
        right: 30px;
        z-index: 99;
        font-size: 18px;
        background-color: black;
        border: none;
        outline: none;
        color: white;
        cursor: pointer;
        padding: 15px;
        border-radius: 50%;
    }

    .element-visible {
        background-color: cornsilk;
    }

    #search-btn {
        padding: 0 10px 8px 10px;
        display: flex; 
        justify-content: center;
    }

    #search {
        padding: 0 10px;
        width: 100%; 
        border: 1px solid white; 
        justify-content: center; 
        display: flex;
        height: 25px;
        border-radius: 10px;
    }
}

@media (prefers-color-scheme: dark) {
    body{
        margin: 0;
        font-size: 100%;
        max-width: 400px;
        display: block;
        margin-left: auto;
        margin-right: auto;
        font-family: Arial, Helvetica, sans-serif;
        -webkit-tap-highlight-color: transparent;
        background-color: white;
    }

    html{
        scroll-behavior: smooth;
    }

    ::-webkit-scrollbar{
        width: 0;
        height: 0;
        background: transparent;
    }

    #header{
        max-width: 400px;
        display: block;
        margin-left: auto;
        margin-right: auto;
        position: fixed;
        height: auto;
        width:100%;
        overflow: hidden;
        background-color: black;
        z-index: 2;
        font-size: 100%;
    }

    .form-popup {
        max-width: 400px;
        display: none;
        position: fixed;
        z-index: 9999;
        background: white;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    /* Add styles to the form container */
    .form-container {
        padding: 10px;
        background-color: white;
    }

    .size {
        overflow: auto;
        white-space: nowrap;
        display: flex;
    }

    .redirect {
        text-align: center; 
        display: flow-root;
    }

    #icon{
        font-size: 150%;
    }

    #go-back{
        display: inline-block;
        color: orange;
        margin: 4%;
    }

    #preference-method {
        display: inline-block;
        margin: 4%;
        color: white;
        font-size: 133%;
    }

    #cart{
        color: orange;
        margin: 4% 4%;
        display: inline-block;
        float: right;
        position: relative;
    }

    #cart-value{
        position: absolute;
        color: white;
        top: -5px;
        right: -8px;
        font-size: 0.7em;
    }

    .nav{
        overflow-x: auto;
        width: auto;
        height: 100%;
        background-color: white;
        white-space: nowrap;
        padding: 15px;
    }

    .nav a{
        display: inline;
        margin: 14px 2%;
        padding: 5px;
        border-radius: 10px;
        text-decoration: none;
        border: solid orange;
        color: orange;
    }

    .container{
        top: 50px;
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    .footer{
        width: 100%;
        height: 100px;
        background-color: black;
    }

    .content-wrapper{
        position: relative;
        float: left;
        width: 40%;
        height: 200px;
        margin: 5% 5% 10% 5%;
        border-radius: 5px;
        align-content: center;
        border: none;
        outline: none;
        background: transparent;
    }

    .content-rapper:after{
        content: "";
        display: block;
        padding-bottom: 100%;
    }

    #img-wrapper{
        width: 100%;
        height: 70%;
        border-radius: 5px;
    }

    #desc{
        font-size: 100%;
        font-weight: bold;
        width: 100%;
        display: block;
        color: black;
        opacity: 0.9;
        text-align: center;
    }

    #price{
        font-size: 80%;
        color: grey;
    }

    .title{
        display: block;
        width: 100%;
        background-color: white;
        text-align: center;
        padding: 1%;
        font-weight: bold;
    }

    .category{
        width: 100%;
        overflow: hidden;
    }

    .example-modal{
        background: rgba(90, 90, 90, 0.5);
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 9999;
        width: 100%;
        right: 0;
        display: none;
    }

    .example-modal .modal { 
        max-width: 400px;
        width: fit-content;
        height: fit-content;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: transparent!important;
        display: block;    
        position: fixed;
        right: 0;
        bottom: 0;
        z-index: 1040;
        overflow: hidden;
    }

    .modal-body {
        justify-content: space-between;
        display: flex;
        position: relative;
        padding: 15px;
    }

    .modal-dialog {
        position: relative;
        margin: 30px auto;
    }

    .modal-content {
        box-shadow: 0 2px 3px rgba(0,0,0,0.125) !important;
        position: relative;
        background-color: #fff;
    }

    .modal-header {
        border-bottom-color: #f4f4f4;
        min-height: 16.43px;
        padding: 15px;
        border-bottom: 1px solid #e5e5e5;
    }

    .modal-footer {
        border-top-color: #f4f4f4;
        padding: 15px;
        text-align: right;
        border-top: 1px solid #e5e5e5;
    }

    .btncancel {
        background: none;
        border: none;
        width: 100%;
        text-align: right;
    }

    .size-content-wrapper {
        background-color: whitesmoke;
        height: 200px;
        width: 200px;
    }

    #size-desc{
        white-space: normal;
        font-size: 100%;
        font-weight: bold;
        width: 100%;
        height: 20%;
        display: block;
        color: black;
        opacity: 0.9;
        text-align: center;
    }

    .size {
        column-gap: 10px;
    }

    .soldouttext{
        position: absolute;
        z-index: 1;
        margin: 0 auto;
        left: 0;
        right: 0;        
        text-align: center;
        top: 40%; /* Adjust this value to move the positioned div up and down */
        background: rgba(0, 0, 0, 0.8);
        font-family: Arial,sans-serif;
        color: #fff;
        width: 60%; /* Set the width of the positioned div */
    }

    #goTopBtn {
        width: 50px;
        height: 50px;
        display: none;
        position: fixed;
        bottom: 20px;
        right: 30px;
        z-index: 99;
        font-size: 18px;
        background-color: black;
        border: none;
        outline: none;
        color: white;
        cursor: pointer;
        padding: 15px;
        border-radius: 50%;
    }

    .element-visible {
        background-color: cornsilk;
    }

    #search-btn {
        padding: 0 10px 8px 10px;
        display: flex; 
        justify-content: center;
    }

    #search {
        padding: 0 10px;
        width: 100%; 
        border: 1px solid white; 
        justify-content: center; 
        display: flex;
        height: 25px;
        border-radius: 10px;
    }
}