@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400&display=swap');  /*font for the site*/
*{  /*styles for everything*/
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   font-family: 'Poppins',sans-serif;
}

.banner { grid-area: header; ;font-size: 12px; background-color: #0e6b96;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);}  /*styling for the banner. determines colour, font size ect.*/

.article { overflow: hidden; grid-area: article; font-family:verdana;font-size: 22px;background-color: #F0F0F0; margin-right: 20px; background-color: #ffffff; box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.2), 0px 0px 30px 0px rgba(0, 0, 0, 0.29); padding: 20px;}  /*styling for the article div. Determines font-size, padding.*/

.footer { grid-area: footer;  font-size: 30px;  text-align:center;background-color: #0e6b96;box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.2), 0px 0px 30px 0px rgba(0, 0, 0, 0.29);}  /*styling for the footer. determines font size, background colour ect.*/

.nav {grid-area: nav;  font-size: 15px;  text-align:center;background-color: #F0F0F0;;margin-left:20px;}  /*styling for the side nav. determines the text alingment and margin ect.*/

body{  /*styling for the body of the site. determines the grid, its sizing ect.*/
  display: grid;
  grid-template-areas: 
    "header header"
    "nav article"
    "footer footer";
  grid-template-rows: 100px 1fr 70px;  
  grid-template-columns: 15% 1fr;
  grid-row-gap: 20px;
  grid-column-gap: 20px;
  min-height: 100vh;
  margin: 0;
  background:#F0F0F0;
}

nav.top-nav{  /*styling for the responsive top nav*/
   display: flex;
   width: 100%;
   background: #0e6b96;
   position: relative;
   justify-content: space-between;
   text-align: center;
   padding: 15px 30px;
}
nav.top-nav .icon img{  /*styling for the icon img in the top nav*/
   height: 100%;
   width: 150px;
   color: #fff;
   cursor: pointer;
}
nav.top-nav ol{  /*styling for top nav button group (list)*/
   display: flex;
   list-style: none;
   margin: auto 0;
}
nav.top-nav ol li{  /*styling for the top nav buttons (items inside list)*/
   margin: 0 2px;
}

nav.top-nav ol li a{  /*styling for the buttons in the list. determines font size, colour ect.*/
   color: #fff;
   font-size: 15px;
   text-decoration: none;
   text-transform: capitalize;
   letter-spacing: 1px;
   padding: 5px 2.5px;
}
nav.top-nav ol li:hover a{  /*hover effects for the top nav buttons*/
   background: #fff;
   color: #0a5071;
}

nav.top-nav .search_box{  /*styling for the search div. Incldes search bar, catergory select and adv search button*/
   display: flex;
   margin: auto 0;
   height: 55px;
   line-height: 35px;
}
nav.top-nav .search_box input{  /*styling for the search input. determines size, background ect.*/
   border: none;
   outline: none;
   background: #fff;
   height: 100%;
   padding: 0 10px;
   font-size: 15px;
   width: 250px;
   transition: 0.5s ease;
}

nav.top-nav #search_button {  /*styling for the search button. determines colour, size ect*/
    border: none; 
    outline: none;
    background: rgb(30, 178, 223);
    height: 100%;
    padding: 0 10px;
    font-size: 15px;
    width: 75px;
    border-radius: 0px 5px 5px 0px;
    cursor: pointer;
    margin-left: -1px;
}

nav.top-nav #search_button:hover {   /*hover effects for the search button*/
   background: rgb(29, 198, 250);
}

nav.top-nav #search_cat {  /*styling for the category selecter. determines border radius, size ect*/
    border: none;
    outline: none;
    background: #fff;
    height: 100%;
    padding: 0 10px;
    font-size: 15px;
    width: 100px;
    border-radius: 5px 0px 0px 5px;
    cursor: pointer;
    margin-right: -1px;
} 

nav.top-nav a.adv_search{  /*styling for the advanced search button*/
  margin-left: 5px;
  text-decoration: none;
  color: rgb(30, 178, 223);
  border-radius: 5px;
  transition: all .5s ease;
  font-size: 15px;
}
nav.top-nav a.adv_search:hover{  /*hover effects for the advanced search button*/
  color: #ffffff;
}

nav.top-nav .bar{  /*label for hidden checkbox (hamburger and cross button)*/
   position: relative;
   margin: auto;
   display: none;
}
nav.top-nav .bar span{  /*styling for the hamburger and cross button*/
   position: absolute;
   color: #fff;
   font-size: 35px;
}
input[type="checkbox"]{  /*hides checkbox in the nav bar*/
   -webkit-appearance: none;
   display: none;
}

nav.side-nav{  /*styling for the side nav*/
  padding: 5px 0px 5px 10px;
  top: 0;
  bottom: 0;
  background: #ffffff;
  box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.2), 0px 0px 30px 0px rgba(0, 0, 0, 0.29);
}
nav.side-nav ul {  /*styling for the list that houses the buttons in the side nav*/
  position: relative;
  list-style-type: none;
}
nav.side-nav ul li a#main {  /*styling for the buttons in the side nav*/
  padding-left: 10px;
  display: flex;
  align-items: center;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 15px;
  text-decoration: none;
  color: #000;
  padding: 10px 30px;
  margin-right: 10px;
  height: 50px;
  transition: 0.5s ease;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  z-index: 1;
}
nav.side-nav h2{  /*styling for the h2 in the side nav*/
  padding: 10px 10px 10px 0px;
}
nav.side-nav ul li a:hover {  /*hover effects for the dropdown buttons*/
  background: #f0f0f0;
  padding-left: 40px;
}
nav.side-nav ul li a#main:hover {  /*hover effects for the main nav buttons*/
  background: #f0f0f0;
  padding-left: 40px;
}
nav.side-nav ul li.dropdown a#main:hover {  /*changes margin to 0 on dropdown buttons so two menus are connected*/
  margin-right: 0;
}
nav.side-nav ul ul {  /*styling for the dropdown nav button list*/
  position: absolute;
  left: 100%;
  width: 250px;
  top: 0;
  visibility: hidden;
  opacity: 0;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.2), 0px 0px 30px 0px rgba(0, 0, 0, 0.29);
  border-left: 10px solid #0e6b96;
  transition: 0.5s ease-in;
  z-index: 10;
}
nav.side-nav ul ul a {  /*styling for the dropdown nav buttons*/
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 1.15em;
  text-decoration: none;
  color: #000;
  padding: 10px 30px;
  height: 50px;
  transition: 0.5s ease;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  z-index: 1;
}
nav.side-nav ul span {  /*stlying for the arrow icon*/
  position: absolute;
  right: 20px;
  font-size:1.5em;
}
nav.side-nav ul .dropdown {  /*sets postition of the dropdown buttons*/
  position: relative;
}
nav.side-nav ul .dropdown:hover ul {  /*makes the dropdown button visible when hovering on a button*/
  visibility: visible;
  opacity: 1;
}

.book_click{  /*styles for the clickable book div*/
  text-decoration: none;
  color: #000000;
}
.book_click:hover .product-image{  /*hover effects for the img*/
  transform: scale(1.05);
  transition: all 0.2s ease;
}
.book_click:hover .product-brand{  /*hover effects for the book title*/
  font-size:22px;
  transition: all 0.2s ease;
}
.book_click:hover .product-short-description{  /*hover effects for the author*/
  font-size:23px;
  transition: all 0.2s ease;
}
/* PRODUCTS */
.product {  /**/
  position: relative;
  overflow: hidden;
  padding: 20px;
  background-color: #ffffff;
}

.product-category {  /*styling for the slider titles*/
  text-align: left !important;
  padding: 0 5vw;
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 15px;
  text-transform: capitalize;
}

.product-container {  /*styling for the slider container*/
  padding: 0 5vw;
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.product-container::-webkit-scrollbar {  /*hides the scrollbar on each slider*/
  display: none;
}

.product-card {  /*styling for the div that holds all the cover image, title, ect*/
  flex: 0 0 auto;
  width: 150px;
  height: 400px;
  margin-right: 40px;
}

.product-image {  /*styling for the image container*/
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.product-thumb {  /*styling for the image*/
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-info {  /*styling for the info container*/
  width: 100%;
  height: 100px;
  padding-top: 10px;
}

.product-brand {  /*stlying for the book title*/
  text-transform: uppercase;
  font-size: 20px;
  transition: all 0.2s ease;
}

.product-short-description {  /*styling for the book author*/
  width: 100%;
  height: 20px;
  line-height: 20px;
  overflow: hidden;
  opacity: 0.5;
  text-transform: capitalize;
  margin: 5px 0;
  transition: all 0.2s ease;
}

.pre-btn,
.nxt-btn {  /*styling for the left/right buttons for the sliders*/
  border: none;
  width: 5vw;
  height: 100%;
  position: absolute;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fff 100%);
  cursor: pointer;
  z-index: 8;
}

.pre-btn {  /*styling for the left button*/
  left: 0;
  transform: rotate(180deg);
}

.nxt-btn {  /*styling for the right button*/
  right: 0;
}

.pre-btn img,
.nxt-btn img {  /*styling for the arrow image*/
  opacity: 0.2;
}

.pre-btn:hover img,
.nxt-btn:hover img {  /*hover effect for the arrow image*/
  opacity: 1;
}

.title{  /**/
  text-align: center;
}

#arrowImg{  /*sizing for the arrow image*/
  width: 26px;
  height: 44px;
}

@media screen and (max-width: 1150px){  /*when screen size is smaller than 1150px*/
  body{  /*resets grid sizing to accomidate for the smaller screen size*/
    grid-template-rows: 170px 1fr 70px;
    grid-template-columns: 20% 1fr;  
  }
    
  nav.top-nav{  /*changes styling of the top nav*/
    display: block;
    padding: 0;
  }
  nav.top-nav .icon{  /*changes styling of the logo*/
    display: inline-block;
    padding: 15px 30px;
  }
  nav.top-nav .search_box{  /*changes styling of the search box div*/
    width: 100%;
    justify-content: center;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
  }
  nav.top-nav .search_box input{  /*changes size of the search input*/
    width: 45%;
    height: 55px;
  }
  nav.top-nav #search_cat {  /*changes width of the category selector*/
    width: 150px;
  }
  nav.top-nav ol{  /*changes styling for the list of buttons*/
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 0;
    visibility: hidden;
    transition: 0.3s;
    position: relative;
    z-index: 999;
  }
  nav.top-nav ol li{  /*changes styling for the top nav button group*/
    text-align: center;
    opacity: 0;
  }
  nav.top-nav ol li a{  /*changes styling for the top nav dropdown buttons*/
    color: #000;
    font-size: 28px;
    padding: 25px; 
    display: block;
    transition: 0.45s ease-in-out;
  }

  nav.top-nav ol li a:hover{  /*changes hover effects for the top nav dropdown buttons*/
    background: rgb(240, 240, 240);
    color: #0a5071;
  }

  nav.top-nav ol li:nth-child(1){  /*moves the top nav buttons for the dropdown menu*/
    transform: translateX(-150px);
  }
  nav.top-nav ol li:nth-child(2){  /*moves the top nav buttons for the dropdown menu*/
    transform: translateX(-200px);
  }
  nav.top-nav ol li:nth-child(3){  /*moves the top nav buttons for the dropdown menu*/
    transform: translateX(-250px);
  }
  nav.top-nav ol li:nth-child(4){  /*moves the top nav buttons for the dropdown menu*/
    transform: translateX(-300px);
  }
  nav.top-nav ol li:nth-child(5){  /*moves the top nav buttons for the dropdown menu*/
    transform: translateX(-350px);
  }
  nav.top-nav .bar{  /*shows the cross and hamburger buttons and sets size ect.*/
    display: block;
    position: absolute;
    top: 20px;
    right: 80px;
    cursor: pointer;
  }
  nav.top-nav .bar #times{  /*sets cross as display none by default*/
    display: none;
  }
  #check:checked ~ nav.top-nav .bar #times{  /*sets cross to visible when the check is checked*/
    display: block;
  }
  #check:checked ~ nav.top-nav .bar #bars{  /*hides hamburger icon when it is clicked*/
    display: none;
  }
  #check:checked ~ nav.top-nav ol{  /*makes buttons visible when checkbox is checked*/
    visibility: visible;
    height: 368px;
    box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.2), 0px 0px 30px 0px rgba(0, 0, 0, 0.29);
  }
  #check:checked ~ nav.top-nav ol li:nth-child(1),
  #check:checked ~ nav.top-nav ol li:nth-child(2),
  #check:checked ~ nav.top-nav ol li:nth-child(3),
  #check:checked ~ nav.top-nav ol li:nth-child(4){  /*makes buttons visible*/
    transform: translateX(0);
    opacity: 1;
  }
}

@media screen and (max-width: 800px){  /*when screen size is smaller than 800px*/
  body{ /*changes the sizing of the grid columns*/
    grid-template-columns: 30% 1fr;  
  }
  nav.top-nav .search_box input{  /*changes size of the search input*/
    width: 25%;
    height: 55px;
    font-size: 10px;
    height: 50px;
  }
  nav.top-nav #search_cat {  /*changes the category selecters size*/
  width: 100px;
  font-size: 10px;
  }
  nav.top-nav #search_button {  /*changes search button size*/
    font-size: 10px;
  }
  nav.top-nav a.adv_search{  /*changes advanced search button size*/
    font-size: 10px;
  }
  nav.side-nav ul li a#main {  /**/
    font-size: 10px;
    padding-left: 15px;
  }
  h1{  /*changes font size of the page title*/
    font-size: 25px;
  }
  h3{  /*changes font size of the page description*/
    font-size:15px;
  }
  .product-category {  /*changes font size for the slider title*/
    font-size: 20px;
  }
}