:root {
  --orange: hsl(26, 100%, 55%);
  --pale-orange: hsl(25, 100%, 94%);
  --very-dark-blue: hsl(220, 13%, 13%);
  --dark-grayish-blue: hsl(219, 9%, 45%);
  --grayish-blue: hsl(220, 14%, 75%);
  --light-grayish-blue: hsl(223, 64%, 98%);
  --white: hsl(0, 0%, 100%);
  --black: hsl(0, 0%, 0%);
  --light-black: rgba(0, 0, 0, 0.5);
  --semi-black: rgba(0, 0, 0, 0.75);
  --lightbox-black: hsl(0, 0%, 75%);
  --light-gray: rgba(241, 241, 241, 0.815);

  --font-family: "Kumbh Sans", sans-serif;
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-optical-sizing: auto;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  padding: 0 30px;
}

.header {
  /* background-color: red; */
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--light-gray);
  padding: 20px 0;
}

/* Start Navigation style */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* mobile navigation */
.navbar .mobile-nav {
  display: block;
  outline: none;
  border: none;
  margin-right: 20px;
  background: transparent;
  cursor: pointer;
}

.navbar .mobile-nav img {
  transition: all 0.3s ease;
}

.navbar .mobile-nav img:hover {
  filter: brightness(0);
}

.nav {
  position: fixed;
  left: -70%;
  top: 0;
  bottom: 0;
  z-index: 999;
  background-color: var(--white);
  width: 70%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: left 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
}

.nav.open {
  left: 0;
  opacity: 1;
  visibility: visible;
}

.nav .close-btn {
  outline: none;
  border: none;
  background: transparent;
  margin: 15px 0 0 15px;
  cursor: pointer;
}

.nav .close-btn img {
  transition: all 0.3s ease;
}

.nav .close-btn img:hover {
  filter: brightness(0);
}

/* For showing overlay background just under mobile men */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--light-black);
  width: 100%;
  height: 100%;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

.nav-list {
  display: flex;
  flex-direction: column;
  align-items: start;
  list-style-type: none;
  margin-top: 36px;
}

.nav-list li {
  margin: 0 15px;
  padding-bottom: 15px;
}

.nav-list li a {
  text-decoration: none;
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: rgb(59, 59, 59);
  transition: all 0.3s ease;
}

.nav-list li a:hover {
  color: var(--orange);
}
/* End Navigation style */

/* Start Avatar style */
.avatar {
  display: flex;
  align-items: center;
  position: relative;
}

.avatar .cart {
  position: relative;
  margin-right: 30px;
  cursor: pointer;
  outline: none;
  border: none;
  background: transparent;
}

.avatar .cart img {
  transition: all 0.3s ease-in-out;
}

.avatar .cart img:hover {
  filter: brightness(0);
}

.avatar .avatar-logo {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.avatar .avatar-logo img {
  width: 100%;
  height: 100%;
  width: 40px;
  position: relative;
}

.avatar .avatar-logo::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 50%;
  border: none;
  transition: border 0.3s ease-in-out;
}

.avatar .avatar-logo:hover::after {
  border: 2px solid var(--orange);
}
/* End Avatart style */

/* Start Cart item style */
.hidden-cart {
  position: absolute;
  right: 0;
  top: 50px;
  width: 300px;
  background-color: var(--white);
  box-shadow: 0 16px 18px 0 rgba(65, 65, 65, 0.247);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px); /* Move slightly up */
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.avatar .hidden-cart.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Cart badge */
.cart-badge {
  position: absolute;
  right: -10px;
  top: -13px;
  color: var(--white);
  background-color: var(--orange);
  padding: 2px 5px;
  border-radius: 50%;
  font-size: 10px;
}

.hidden-cart h4 {
  padding: 15px;
}

.hidden-cart .cart-item {
  display: flex;
  border-top: 1px solid rgba(228, 228, 228, 0.74);
  padding: 15px;
  align-items: center;
  justify-content: space-between;
}

.hidden-cart .cart-empty {
  width: 100%;
  height: 150px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden-cart .cart-item img {
  width: 100%;
  height: 100%;
  max-width: 40px;
  max-height: 40px;
  border-radius: 4px;
}

.hidden-cart .cart-item-details {
  margin: 0 10px;
  font-size: 14px;
}

.hidden-cart-price {
  margin-top: 4px;
}

.cart-item .remove-btn button {
  border: none;
  outline: none;
  cursor: pointer;
  background: transparent;
}

.cart-item .remove-btn button img {
  transition: all 0.3s ease-in-out;
}

.cart-item .remove-btn button img:hover {
  filter: brightness(0);
}

/* Checkout button */
.hidden-cart .checkout-btn {
  padding: 0 15px;
  margin-bottom: 15px;
}
.hidden-cart .checkout-btn button {
  width: 100%;
  outline: none;
  border: 2px solid hsl(25, 100%, 94%);
  background-color: var(--orange);
  padding: 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* End Cart item style */

/* Attribution */
.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

/* ======= start product details section ======= */
.product-details {
  display: grid;
  margin: 15px;
  justify-content: space-between;
  /* align-items: center; */
}

/* Large image */
.img-lg {
  outline: none;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

.img-lg img {
  width: 100%;
  border-radius: 10px;
}

/* Small image for image list */
.img-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  column-gap: 15px;
  margin-top: 20px;
}

.img-list img {
  width: 100%;
  border-radius: 10px;
}

/* thumbnail */
.thumbnail-btn {
  outline: none;
  border: none;
  background: transparent;
  cursor: pointer;
}

.thumbnail-active {
  border: 2px solid var(--orange);
  border-radius: 10px;
}

.product-description {
  display: flex;
  flex-direction: column;
  margin-top: 30px;
}

.subtitle {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--light-black);
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.cart-title {
  font-size: 32px;
  line-height: 1.4;
  margin-bottom: 30px;
}

.product-info {
  font-size: 14px;
  color: var(--light-black);
  margin-bottom: 20px;
  line-height: 1.6;
}

.price-discount {
  display: flex;
  align-items: center;
  column-gap: 20px;
  margin-bottom: 10px;
}

.price-discount .main-price {
  font-weight: 600;
  font-size: 22px;
  color: var(--black);
}

.price-discount .discount-btn {
  outline: none;
  border: none;
  padding: 4px 8px;
  background-color: var(--black);
  color: var(--white);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.price-prev {
  margin-bottom: 25px;
}

.price-prev del {
  font-size: 14px;
  font-weight: 600;
  color: var(--light-black);
}

.plus-minus-btns {
  background-color: var(--light-grayish-blue);
  display: grid;
  border-radius: 6px;
  padding: 3px 8px;
  grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
}

.plus-minus-btns label {
  display: flex;
  justify-content: center;
}

.plus-minus-btns button {
  cursor: pointer;
}

.plus-minus-btns button,
.plus-minus-btns input {
  padding: 8px;
  outline: none;
  border: none;
  background-color: transparent;
  text-align: center;
}

/* Cart increment */
.cart-increment {
  display: grid;
  grid-template-columns: 1fr 2fr;
  column-gap: 15px;
  align-items: center;
}

.cart-number::-webkit-inner-spin-button,
.cart-number::-webkit-outer-spin-button {
  -webkit-appearance: none; /* Removes the buttons in Chrome, Safari, and Edge */
  appearance: none; /* Removes the buttons in modern browsers */
  margin: 0; /* Prevents any additional spacing */
}

.cart-number {
  font-size: 14px;
  font-weight: 600;
  color: var(--light-black);
  text-align: center;
  -moz-appearance: textfield; /* Removes the buttons in Firefox */
}

/* Cart button */
.cart-btn .add-to-cart-btn {
  outline: none;
  border: none;
  padding: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--black);
  font-weight: 600;
  background-color: var(--orange);
  column-gap: 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.cart-btn .add-to-cart-btn img {
  filter: brightness(0);
  transition: all 0.3s ease;
}

.cart-btn .add-to-cart-btn:hover {
  color: var(--white);
}

.cart-btn .add-to-cart-btn:hover img {
  filter: brightness(1);
}

/* Cart Increment and Decrement button hover for svg img */
.increment img,
.decrement img {
  filter: brightness(1);
  transition: all 0.3s ease;
}
.increment:hover img,
.decrement:hover img {
  filter: brightness(0);
}
/* ======= End product details section ======= */

/* Lightbox */
.lightbox {
  display: none;
}

@media (min-width: 768px) {
  .container {
    max-width: 1140px;
    margin: 0 auto;
  }
  .navbar .mobile-nav {
    display: none !important;
  }

  .nav {
    position: relative !important;
    margin-left: 40px;
    left: 0;
    opacity: 1;
    visibility: visible;
    background: transparent;
  }

  .overlay {
    display: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    margin-top: 0;
  }

  .nav-list li {
    padding-bottom: 0;
  }

  .nav-list li a {
    color: rgb(116, 116, 116);
  }

  .nav .close-btn {
    display: none;
  }

  .nav-list li a:hover {
    color: var(--black);
  }

  .nav-list li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -32px;
    width: 0;
    height: 4px;
    background-color: hsla(26, 100%, 55%, 0.541);
    transition: width 0.3s ease;
  }

  .nav-list li a:hover::after {
    width: 100%;
    background-color: var(--orange);
  }

  /* ======= start product details section ======= */
  .product-details {
    grid-template-columns: 1fr 1fr;
    column-gap: 80px;
    margin: 30px;
  }

  .product-description {
    justify-content: center;
    margin-top: 0;
  }
  /* ======= End product details section ======= */

  /* Light box */
  .lightbox {
    display: grid;
    position: absolute;
    left: 50%;
    top: 50%;
    opacity: 0;
    visibility: hidden;
    width: 0;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0s ease, width 0s ease,
      transform 0s ease;
  }

  .lightbox-img-wrapper {
    display: flex;
    overflow-x: hidden;
    width: 400px;
    /* column-gap: 10px; */
  }

  .lightbox.open {
    opacity: 1;
    visibility: visible;
    width: fit-content;
  }

  .overlay-lightbox {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    opacity: 0;
    visibility: hidden;
    background-color: var(--semi-black);
    z-index: 9998;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease,
      visibility 0.3s ease;
  }

  .overlay-lightbox.open {
    opacity: 1;
    visibility: visible;
    width: 100vw;
    height: 100vh;
  }

  .lightbox .close-icon {
    display: flex;
    justify-content: end;
    margin-bottom: 15px;
  }

  .close-icon-btn {
    outline: none;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .close-icon-btn img {
    filter: brightness(0) invert(1);
  }

  .close-icon-btn:hover img {
    filter: sepia(1) saturate(10) hue-rotate(-20deg) brightness(1.2);
    transition: filter 0.3s ease;
  }

  .lightbox-img-container {
    position: relative;
  }

  .lightbox-main-img {
    width: 100%;
    height: auto;
    max-width: 450px;
    border-radius: 10px;
    object-fit: cover;
    /* overflow: auto; */
  }

  .slide {
    position: absolute;
    outline: none;
    border: none;
    background-color: var(--white);
    padding: 14px 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .slide:hover img {
    filter: sepia(1) saturate(10) hue-rotate(-20deg) brightness(1.2);
    transition: filter 0.3s ease;
  }

  .prev-slide {
    left: -20px;
    top: 50%;
    transform: translate(0, -50%);
  }

  .next-slide {
    right: -20px;
    top: 50%;
    transform: translate(0, -50%);
  }

  .prev-slide img,
  .next-slide img {
    width: 10px;
  }

  .thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    column-gap: 10px;
    margin-top: 15px;
    padding: 0 30px;
  }

  .thumbnail-btn img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
  }
}

@media (min-width: 992px) {
  .cart-title {
    font-size: 48px;
    line-height: 1.4;
  }

  .product-details {
    margin: 60px;
  }
}
