@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,700;1,300&display=swap');

*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
}

:root {
  --primaryColor: #f09d51;
  --mainWhite: #fff;
  --mainBlack: #222;
  --mainGrey: #ececec;
  --mainSpacing: 0.1rem;
  --mainTransition: all 0.3s linear;
}

/* nav */
.nav{
  position: fixed;
  background-color: var(--mainGrey);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
  padding: 20px 130px;
  font-size: 23px;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.nav .comfy{
  font-weight: bold;
  letter-spacing: 5px;
  font-size: 25px;
}

.nav span{
  color: var(--primaryColor);
}

.cart-icon{
  position: relative;
  cursor: pointer;
}

.menu-bar{
  cursor: pointer;
}

.cart-number{
  width: 20px;
  height: 20px;
  border-radius: 5px;
  position: absolute;
  background-color: var(--primaryColor);
  font-size: 15px;
  text-align: center;
  top: -12px;
  right: -4px;
  color: var(--mainWhite);
}

/* nav ends */

/* header */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: calc(100vh - 30px);
  background: url("./images/hero-bcg.jpeg") center/cover no-repeat;
  margin-top: 50px;
}

.furniture{
  background-color: rgba(236, 236, 236, 0.8);
  height: 200px;
  width: calc(100% - 600px);
  text-transform: uppercase;
  text-align: center;
  padding: 30px 0;
}

.coll{
  font-size: 55px;
  font-weight: 600;
  margin-bottom: 20px;
  opacity: .8;
}

.header .btn{
  text-transform: uppercase;
  background-color: var(--primaryColor);
  border: none;
  padding: 10px 30px;
  font-size: 20px;
  cursor: pointer;
  transition: var(--mainTransition);
}

.header .btn:hover{
   color: var(--primaryColor);
   border: 1px solid var(--primaryColor);
   background-color: transparent;
}
/* header ends */

/* products headdr*/
.product-header{
  text-align: center;
  margin: 30px 0;
  font-size: 30px;
  text-transform: capitalize;
}
/* product header ends */

/* products items */
.products-items{
  display: grid;
  width: 90%;
  margin: auto;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  align-items: center;
  text-align: center;
  margin-bottom: 50px;
}

.image{
  height: 180px;
  object-fit: cover;
}

.product-image{
  position: relative;
  overflow: hidden;
}

.product-image:hover .cart-entry{
  transform: translateX(0%);
}

.product-image:hover .image{
  opacity: .6;
}

.cart-entry{
  position: absolute;
  width: 200px;
  padding: 10px 20px;
  background-color: var(--primaryColor);
  cursor: pointer;
  top: 60%;
  right: 0;
  transform: translateX(100%);
  transition: var(--mainTransition);
  border: none;
  text-transform: uppercase;
  font-weight: bold;
}

.cart-entry i{
  color: var(--mainBlack);
  transition: var(--mainTransition);
}

.cart-entry i:hover {
  color: var(--mainWhite);
}

.image{
  width: 100%;
  margin-bottom: 10px;
}

.title{
  margin-bottom: 10px;
  font-size: 20px;
  text-transform: capitalize;
  font-weight: 500;
}

.price{
  color: var(--primaryColor);
  font-weight: bold;
}
/* products items ends */

/* cart sidebar */
.cart-overlay{
  position: fixed;
  background-color: rgba(240, 157, 81, .7);
  width: 100%;
  top: 0;
  bottom: 0;
  z-index: 2;
  transition: var(--mainTransition);
  transform: translateX(100%);
}

.show-overlay{
  transform: translateX(0%);
}

.cart{
  position: fixed;
  background-color: var(--mainGrey);
  width: 33%;
  z-index: 3;
  top: 0;
  right: 0;
  bottom: 0;
  padding: 20px 20px;
  overflow-y: scroll;
}

.show-cart{
  visibility: visible;
}

.closebtn{
  font-size: 25px;
  cursor: pointer;
}

.sidebar-title{
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  opacity: .8;
  margin-bottom: 20px;
}

.urTotal{
  text-align: center;
  text-transform: capitalize;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  opacity: .8;
}

.cart-content{
  margin-bottom: 20px;
}
.cart-item{
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cart-product{
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.cart-product-text p{
  margin-bottom: 10px;
}

.remove{
  color: grey;
  cursor: pointer;
}

.img{
  width: 100px;
}

.cart-item img{
  width: 100%;
}


.icon i{
  color: var(--primaryColor);
  cursor: pointer;
}

.sidebar-btn{
  text-align: center;
}

.clearbtn{
  text-transform: uppercase;
  background-color: var(--primaryColor);
  border: none;
  padding: 10px 30px;
  font-size: 20px;
  cursor: pointer;
}

.clearbtn:hover{
  color: var(--primaryColor);
  border: 1px solid var(--primaryColor);
  background-color: transparent;
}
/* cart sidebar ends */

/* Media query */
@media (max-width: 769px){
  .nav{
    justify-content: space-around;
    padding: 17px 10px;
  }
  .furniture{
    height: 200px;
    width: 100%;
    text-transform: uppercase;
    text-align: center;
  }
  .coll {
    font-size: 30px;
  }
  .cart{
    width: 100%;
  }
}
