* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

: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%);
  --shade: hsla(0, 0%, 0%, 0.75);
}

img {
  max-width: 100%;
  display: block;
}

button {
  background-color: transparent;
  cursor: pointer;
  border: none;
}

button.primary {
  background-color: var(--Orange);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
}

a {
  color: var(--Dark-grayish-blue);
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 1rem;
}

.navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.navigation button {
  background-color: var(--Light-grayish-blue);
  padding: 0.5rem;
  height: 40px;
  width: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.navigation button:hover path {
  stroke: var(--Orange);
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
}

header {
  height: 64px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: white;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.06);
}

header > hr {
  display: none;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-items-wrapper {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -100%;
  width: 100%;
  background-color: var(--shade);
  opacity: 0;
  transition: left 0.5s, opacity 0.5s;
  z-index: 999999;
}

.nav-items-wrapper.active {
  left: 0;
  opacity: 1;
}

.menu.close {
  position: absolute;
  top: 1rem;
  left: 1rem;
}
.nav-items {
  background-color: white;
  height: 100%;
  width: 70%;
  padding: 5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.nav-items a {
  font-weight: 700;
  color: black;
}

.cart {
  position: relative;
}

.cart-chip {
  position: absolute;
  background-color: var(--Orange);
  color: white;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.625rem;
  top: -5px;
  right: -5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: visibility 0.2s 0s, opacity 0.3s 0s, transform 0.5s 0s;
}

.cart-chip.show {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
}

.cart-items-wrapper {
  position: fixed;
  width: 90%;
  max-width: 350px;
  right: 1.2rem;
  top: -100%;
  transition: top 0.5s;
  background-color: rgba(255, 255, 255);
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
  gap: 0.5rem;
  z-index: 99;
}

.cart-items-wrapper.open {
  top: 6rem;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
}

.cart-header {
  padding-block: 0.5rem;
  display: flex;
  flex-direction: column;
}

.cart-header h4 {
  padding: 0.8rem 1rem;
}

.cart-header-divider {
  border: 1px solid var(--Light-grayish-blue);
}
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.8rem;
}

.cart-items .empty {
  text-align: center;
  font-weight: bold;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-image {
  width: 35px;
  border-radius: 0.2rem;
  overflow: hidden;
}

.cart-content {
  flex: 1;
  color: var(--Dark-grayish-blue);
}

.cart-content h6 {
  font-weight: 400;
  font-size: 0.875rem;
}

.cart-content span {
  font-size: 0.75rem;
}
.cart-content span:nth-of-type(2) {
  color: var(--Very-dark-blue);
  font-weight: 700;
  margin-left: 0.5rem;
}

.profile {
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 50%;
  transition: border-color 0.5s;
}

.profile:hover {
  border-color: var(--Orange);
}

/* main area */
main {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3rem;
}

main.container {
  padding: 0;
}

section.left {
  display: flex;
  flex-direction: column;
}

section.left .display {
  position: relative;
}
section.left .display .navigation {
  left: 1rem;
  right: 1rem;
}

.thumbnails {
  display: none;
}

section.right {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

section.right .header span {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  font-size: 0.75rem;
  color: var(--Orange);
}
section.right .header h1 {
  margin-top: 0.5rem;
  font-size: 2rem;
}
section.right p {
  color: var(--Dark-grayish-blue);
  font-size: 0.875rem;
  line-height: 1.5;
}

section.right .pricing {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
section.right .pricing div {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
section.right .pricing div span {
  color: var(--Orange);
  background-color: hsl(26, 68%, 93%);
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  font-weight: bold;
}
section.right .pricing h5 {
  color: var(--Grayish-blue);
  text-decoration: line-through;
}

section.right .actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
section.right .actions .quantity {
  background-color: var(--Light-grayish-blue);
  border-radius: 0.5rem;
  padding: 1rem 0.5rem;
  display: flex;
  gap: 1rem;
}
section.right .actions .quantity span {
  flex: 1;
  text-align: center;
  font-weight: bold;
  user-select: none;
}
section.right .actions button:hover {
  opacity: 0.8;
}
section.right .actions > button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  font-weight: bold;
}

.modal {
  display: none;
}
/* media query: tablet */
@media screen and (min-width: 768px) {
  header {
    box-shadow: none;
  }
  header > hr {
    display: block;
  }
  .menu {
    display: none;
  }

  .nav-left {
    gap: 2rem;
  }
  .nav-items-wrapper {
    position: static;
    height: auto;
    opacity: 1;
    background-color: transparent;
    z-index: auto;
  }
  .nav-items {
    flex-direction: row;
    background-color: transparent;
    width: auto;
    padding: 0;
  }
  .nav-items a {
    font-weight: normal;
    color: initial;
    position: relative;
  }

  .nav-items a::before {
    content: "";
    position: absolute;
    top: 200%;
    width: 100%;
    height: 2px;
    opacity: 0;
    background-color: var(--Orange);
    transition: opacity 0.5s;
  }

  .nav-items a:hover {
    color: var(--Dark-grayish-blue);
  }
  .nav-items a:hover::before {
    opacity: 1;
  }

  /* main area */
  main {
    flex-direction: row;
  }

  main.container {
    padding: 1rem;
    padding-top: 50px;
  }

  section.left {
    gap: 1rem;
  }

  section.left .display {
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
  }
  section.left .display .navigation {
    display: none;
  }

  .thumbnails {
    display: flex;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
  }

  .thumbnails div {
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid transparent;
  }
  /* section.left .thumbnails div:has(.active, :hover) {
    border-color: var(--Orange);
  } */

  .thumbnails div.active {
    cursor: not-allowed;
    /* pointer-events: none; */
  }
  .thumbnails div.active,
  .thumbnails div:hover {
    border-color: var(--Orange);
  }
  .thumbnails img {
    transition: transform 0.5s, opacity 0.5s;
  }
  .thumbnails div:hover img,
  .thumbnails div.active img {
    opacity: 0.5;
    transform: scale(1.05);
  }

  section.right .pricing {
    flex-direction: column;
    gap: 0.5rem;
  }

  section.right .actions {
    flex-direction: row;
  }
  section.right .actions .quantity {
    flex: 1;
  }
  section.right .actions > button {
    flex: 2;
  }

  /* modal */
  .modal {
    display: grid;
    place-items: center;
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    transition: opacity 0.5s, visibility 0.2s;
    z-index: 99999999999999999;
  }

  .modal.open {
    opacity: 1;
    visibility: visible;
  }
  .modal .content {
    position: relative;
    width: 400px;
  }
  .modal .content .close {
    position: absolute;
    top: -2rem;
    right: 0;
  }
  .modal .images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* align-items: center; */
  }
  .modal .images .main {
    position: relative;
  }
  .modal .images .main img {
    border-radius: 1rem;
  }
  .modal .images .main .navigation {
    left: -1rem;
    right: -1rem;
  }
  .modal .images .thumbnails {
    max-width: 90%;
    margin-inline: auto;
  }
}

/* media query: small laptop */
@media screen and (min-width: 1024px) {
  main {
    gap: 5rem;
  }
}
