:root {
    --white1: #ffffff;
    --white2: #f3f1f1;
    --white3: #c7c8c9;
    --text-color: #000000;
    --binocular-color: invert(1);
    --checkbox-background-color: #ebedef;
}

body{
    margin: 0;
    background-color: var(--white2);
    font-family: 'Lato', sans-serif;
}

hr {
    margin: 0rem;
    width: 80%;
}
* {
    font-family: inherit;
}

#i1-display{
    display: grid;
    height: 100vh;
    grid-template-columns: .15fr 1fr;
    grid-template-rows: 4rem 1fr;
    grid-template-areas: 
    "aside i16-div" 
    "aside main";
}

aside{
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 3.5rem 1fr 3.5rem;
    grid-template-areas: "i3-div" "i10-div" "i12-div";
    background-color: var(--white2);
    grid-area: aside;
    margin: 10px;
    overflow: hidden;
}

#i3-div{
    grid-area: i3-div;
    background-color: var(--white1);
    display: flex;
    border-radius: 8px 8px 0 0 ;
    /* align-items: center; */
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-color: var(--white3);
}

#i10-div{
    grid-area: i10-div;
    background-color: var(--white1);
    overflow-y: auto;
    min-height: 0;
}

#i12-div{
    grid-area: i12-div;
    background-color: var(--white1);
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top-width: 1px;
    border-top-style: solid;
    border-color: var(--white3);
    flex-shrink: 0;
}
#i6-filters-title{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

#i7-button{
    display: none;
    background-color: var(--white1);
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 100%;
    color: var(--text-color);
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    cursor: pointer;
    border: none;
    padding: 0;
}

#i4-button{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 100%;
    color: var(--text-color);
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    border: 1px;
}

.i5-button-image{
    width: 25px;
    height: 25px;
    filter: var(--binocular-color);
}

#i11-filters{
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 12px;
    border-radius: 8px 8px 8px 8px;
    background-color: var(--white1);
    width: 100%;
    height: 100%;
}


#i13-filter-button{
    display: flex;
    width: 80%;
    height: 60%;
    align-items: center;
    justify-content: center;
}

#i14-button{
    display: none;
    background-color: var(--white1);
    grid-area: i14-button;
    margin: 10px 0px 10px 10px;
    border-radius: 8px;
    border: none;
}

#i15-button-right{
    width: 35px;
    height: 35px;
    filter: var(--binocular-color);
}

#i8-button-image-left{
    width: 35px;
    height: 35px;
    filter: var(--binocular-color);
}

#i16-div{
    background-color: var(--white1);
    grid-area: i16-div;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-right: 10px;
    border-radius: 8px;
}

#i17-search-input {
    height: 100%;
}

main{
    grid-area: main;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 3rem 1fr;
    grid-template-areas: "i19-header-container" "i30-table-content";
    grid-area: main;
    margin-right: 10px;
    margin-bottom: 10px;
    overflow-y: hidden;
}

#i19-header-container{
    display: flex;
    grid-area: i19-header-container;
    background-color: var(--white1);
    border-radius: 8px 8px 0 0;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

#i19-header-container div{
    display: flex;
    height: 100%;
    color: var(--text-color);
    align-items: center;
    font-size: 1rem;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

#i20-header-image{
    width: 90px;
    justify-content: center;
}

#i21-header-name{
    width:220px;
}

#i22-header-formfactor{
    width:110px;
}

#i23-header-os{
    width:150px;
}

#i24-header-screen-size{
    width:110px;
}

#i25-header-memory{
    width:110px;
}

#i26-header-cpu{
    width:180px;
}

#i27-header-storage{
    width:110px;
}

#i28-header-graphics{
    width:180px;
}

#i29-header-price{
    width:120px;
}

#i30-table-content{
    grid-area: i30-table-content;
    background-color: var(--white1);
    overflow-y: scroll;
    border-radius: 0 0 8px 8px;
    position: relative; /* see if i need to keep this after I add more elements into this div */
    min-height: calc(100vh - 200px); /* see if i need to keep this after I add more elements into this div */
}

#i9-button-ghost{
    width: 80px;
    height: 100%;
}

#i2-aside:target ~ .c2-aside{
    display: grid;
}


.c3-div{
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 6px;
    background-color: var(--secondary-color);
    width: 100%;
    min-height: auto;
    padding: 6px 0;
}

.c4-label{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 1.4rem;
    color: var(--text-color);
    font-size: 1rem;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin-top: 0.3rem;
    margin-bottom: .5rem;
  }

  .c5-div {
    width: 70%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .c5-div label {
    color: var(--text-color);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
    cursor: pointer;
    position: relative;
  }


  .c6-range-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
  }
  .c7-range-slider {
    height: 5px;
    background-color: #bdc3c7;
    border-radius: 2px;
    width: 70%;
    position: absolute;
  }
  .c8-range-selected {
    height: 5px;
    left: 0%;
    right: 0%;
    position: absolute;
    border-radius: 5px;
    background-color: #0d6efd;
  }
  .c9-range-input {
    position: relative;
    width: 70%;
  }
  .c9-range-input input {
    position: absolute;
    justify-content: center;
    left: 0%;
    width: 100%;
    height: 5px;
    top: -9px;
    margin-right: 0;
    margin-left: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
  }
  .c9-range-input input::-webkit-slider-thumb {
    height: 1.35rem;
    width: 1.35rem;
    border-radius: 50%;
    border: 2px solid #0d6efd;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.10);
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
  }
  .c9-range-input input:active::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
    border: 2px solid #0d6efd;
    background-color: #fefefe;
  }
  .c9-range-input input::-moz-range-thumb {
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    border: 2px solid #0d6efd;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.10);
    pointer-events: auto;
    -moz-appearance: none;
    cursor: pointer;
  }
  .c9-range-input input:active::-moz-range-thumb {
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
    border: 2px solid #0d6efd;
    background-color: #fefefe;
  }
  .c10-price-display {
    margin-top: .5rem;
    width: 70%;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
  }



/* disable scrollbar  for chrome because I cannot figure out how to make z-index properly without extra time I dont want to spend right now.*/
::-webkit-scrollbar {
    display: none;
}


/* Bootstrap form-check styling for filters START */
  .form-check {
    display: flex;
    align-items: center;
    width: 100%;
  }
  .form-check-reverse {
    flex-direction: row-reverse;
    justify-content: space-between;
  }
  .form-check-input {
    margin-right: 8px;
    cursor: pointer;
  }
  .form-check-label {
    color: var(--text-color);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    cursor: pointer;
    margin: 0;
    padding: 0;
  }

/* Bootstrap form-check styling for filters END */

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    #i1-display{
        display: grid;
        height: 100vh;
        grid-template-columns: .2fr 1fr;
        grid-template-rows: 50px 1fr;
        grid-template-areas: "i14-button i16-div" "main main";
   }
    aside{
        display: none;
        top: 0px;
        margin: 0;
        position: fixed;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        z-index: 5;
        overflow: hidden;
        box-sizing: border-box;
   }
    #i3-div{
        border-radius: 0px 0px 0px 0px ;
   }
    #i9-button-ghost{
        display: none;
   }
    main{
        margin-right: 5px;
        margin-left: 5px;
        margin-bottom: 5px;
        overflow: hidden;
   }
    #i16-div{
        margin: 5px 5px 5px 5px;
        border-radius: 8px;
   }
    #i14-button{
        margin-left: 5px;
        margin-top: 5px;
        margin-bottom: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
   }
    #i7-button{
        display: flex;
   }
    #i4-button{
        display: flex;
   }
    #i12-div{
        border-radius: 0px 0px 0px 0px ;
        flex-shrink: 0;
   }
    #i19-header-container div{
        font-size: .75rem;
   }
    #i21-header-name{
       width:150px;
   }
    #i29-header-price{
       width:85px;
   }
    #i20-header-image{
       width:70px;
   }
    .c9-range-input input::-webkit-slider-thumb {
        height: 1.55rem;
        width: 1.55rem;
    }
    .c9-range-input input::-moz-range-thumb {
        height: 1.35rem;
        width: 1.35rem;
    }
    .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 601px) and (max-width: 1800px) {
    #i1-display{
        display: grid;
        height: 100vh;
        grid-template-columns: 80px 1fr;
        grid-template-rows: 65px 1fr;
        grid-template-areas: "i14-button i16-div" "main main";
   }
    aside{
        display: none;
        margin: 0;
        position: fixed;
        top: 10px;
        width: 280px;
        height: calc(100% - 20px);
        border-radius: 0px 8px 8px 0px ;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
        z-index: 5;
   }
   #aside {
        display: none;
   }
    #i3-div{
        border-radius: 0px 8px 0px 0px ;
   }
    #i12-div{
        border-radius: 0px 0px 8px 0px ;
   }
    main{
        margin-right: 10px;
        margin-left: 10px;
        margin-bottom: 10px;
        overflow: hidden;
   }
    #i9-button-ghost{
        display: none;
   }
    #i14-button{
        display: flex;
        align-items: center;
        justify-content: center;
   }
    #i16-div{
        margin: 10px;
   }
    #i7-button{
        display: flex;
        border-radius: 0px 8px 0px 0px ;
   }
    #i4-button{
        display: flex;
   }
    #i19-header-container div{
        font-size: .85rem;
   }
    .c4-label {
        font-size: .85rem;
    }
    .c5-div label {
        font-size: .85rem;
    }
}

/* Sortable header styles */
.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

/* Removed hover background color change */

.sort-arrow {
    font-size: 0.8em;
    margin-left: 5px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.sort-arrow.active {
    opacity: 1;
}

.sort-arrow.asc::after {
    content: "▲";
}

.sort-arrow.desc::after {
    content: "▼";
}
