:root {
  --very-light-pink: #C7C7C7;
  --text-input-field: #F7F7F7;
  --hospital-green: #ACD9B2;
  --white: #FFFFFF;
  --black: #000000;
  --dark: #232830;

  --sm: 14px;
  --md: 16px;
  --lg: 18px;

  --card-size: 232px;
  --add-to-chart-icon-size: 40px;

  --mobile-card-size: 152px;
  --mobile-add-to-chart-icon-size: 36px;

  --product-img-size: 100px;

  --padding-products-cards: 18px;
}

* {
  box-sizing: border-box;

  margin: 0;
  padding: 0;
}

body {
  font-family: 'Quicksand', sans-serif;
}

ul,
ol {
  list-style: none;
}

a {
  display: block;
}

/* Desktop Navigation */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;

  border-bottom: 1px solid var(--very-light-pink);
  padding: 0 18px;
  height: 60px;

  background-color: var(--white);
}

nav a {
  text-decoration: none;
}

.mobile-menu-icon {
  display: none;

  border: none;

  background-color: var(--white);
  cursor: pointer;
}

.left-side {
  display: flex;
  align-items: center;
  gap: 24px;
}

.left-side img {
  width: 150px;
}

.left-side ul {
  display: flex;

  list-style: none;
}

.left-side ul a {
  border: 1px solid #00000000;
  padding: 8px;

  font-size: var(--md);

  border-radius: 8px;
  color: var(--very-light-pink);
}

.left-side ul a:hover {
  border: 1px solid var(--hospital-green);

  color: var(--hospital-green);
}

.right-side {
  display: flex;
  align-items: center;
  gap: 16px;
}

.right-side .account {
  display: flex;
  justify-content: center;
  gap: 8px;

  cursor: pointer;
}

.account p {
  font-size: var(--sm);
  font-weight: 300;

  color: var(--black);
}

.right-side .cart-icon {
  display: grid;
  place-content: center;

  cursor: pointer;
}

.right-side .no-notification {
  display: none;
}

/* .right-side .notification {
      display: none;
    } */

/* Desktop menu */

.desktop-menu {
  position: absolute;
  top: 60px;
  right: 52px;

  border: 1px solid var(--very-light-pink);
  border-radius: 4px;
  padding: 24px;
  width: 152px;
  height: auto;

  text-align: end;

  background-color: var(--white);
}

.desktop-menu li {
  padding-bottom: 28px;

  list-style: none;
}

.desktop-menu a {
  font-size: var(--md);
  font-weight: bold;

  text-decoration: none;
  color: var(--black);
}

/*Sign out*/
.desktop-menu li:last-child {
  padding-top: 16px;
  padding-bottom: 0;
  border-top: 1px solid var(--very-light-pink);
}

/*Sign out link*/
.desktop-menu li:last-child a {
  font-size: var(--sm);

  color: var(--hospital-green);
}

/* Mobile menu */

.mobile-menu {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 32px;
  height: 100vh;

  background-color: var(--white);
}

.mobile-menu .close-icon {
  position: absolute;

  right: 32px;
}

.mobile-menu h1 {
  margin-bottom: 36px;

  font-size: var(--lg);
  text-transform: uppercase;
}

.mobile-menu__categories li,
.mobile-menu__orders li {
  margin-bottom: 36px;
}

.mobile-menu__orders {
  border-top: 1px solid var(--very-light-pink);
  padding-top: 36px;
}

.nav-list a {
  margin-bottom: 24px;

  font-weight: bold;

  text-decoration: none;
  color: var(--dark);
}

.mobile-menu__account li {
  margin-bottom: 4px;
}

.mobile-menu__account a {
  font-size: var(--sm);
  font-weight: 400;
}

.mobile-menu__account li:last-child a {
  color: var(--hospital-green);
}

/* Aside (shopping cart & product detail) */

aside {
  position: absolute;
  top: 60px;
  right: 0;

  display: flex;
  flex-direction: column;
  gap: 18px;

  box-shadow: -2px 0px 2px 0px hsla(0, 0%, 0%, 0.122);
  padding: 12px 8px;
  width: 384px;
  height: calc(100% - 60px);

  background-color: var(--white);
}

/* my shopping cart */

.shopping-cart__header {
  display: flex;
  align-items: center;
  gap: 24px;
}

.shopping-cart__back-icon {
  --icon-size: 24px;

  display: block;

  width: var(--icon-size);
  height: var(--icon-size);

  background: no-repeat center/contain url('./assets/icons/vector.svg');
}

.shopping-cart__title {
  font-size: var(--lg);
  font-weight: bold;

  color: var(--black);
}

.shopping-cart__items {
  overflow-y: auto;
}

.item {
  display: flex;
  align-items: center;
  gap: 16px;

  margin-bottom: 16px;
  width: 100%;

  color: var(--very-light-pink);
}

.item__img {
  border-radius: 20px;
  width: 76px;
  height: 76px;

  object-fit: cover;
  object-position: center;
}

.item__description {
  font-size: var(--sm);
  font-weight: 400;
}

.item__price {
  margin-left: auto;

  font-size: var(--md);
  font-weight: 700;

  color: var(--dark);
}

.close-icon {
  --area-size: 40px;
  --icon-size: 12px;

  display: block;

  width: var(--area-size);
  height: var(--area-size);

  background: no-repeat center/var(--icon-size) url('./assets/icons/close.svg');

  cursor: pointer;
}

.shopping-cart__total {
  display: flex;
  align-items: center;

  margin-top: auto;
  border-radius: 10px;
  padding-inline: 14px;
  min-height: 76px;

  font-weight: bold;
  font-size: var(--sm);

  background-color: var(--text-input-field);
  color: var(--black);
}

.total__money {
  margin-left: auto;
  font-size: var(--lg);
  color: var(--dark);
}

.primary-button {
  border: none;
  border-radius: 8px;
  width: 100%;
  height: 48px;

  font-size: var(--md);
  font-weight: bold;

  background-color: var(--hospital-green);
  color: var(--white);

  cursor: pointer;
}

.checkout-button {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Product details */

.product-details {
  justify-content: space-around;

  padding: 0 16px 16px 16px;
}

.close-icon__bubble {
  position: absolute;
  top: 16px;
  border-radius: 50%;

  box-shadow: 0px 0px 8px rgba(128, 128, 128, 0.247);
  background-color: var(--white);
}

.product-details .image-container {
  display: flex;
  justify-content: center;

  margin: 12px 0;
  border-radius: 16px;
  width: 100%;
  height: 50%;

  object-fit: cover;
  overflow: hidden;
}

.product-info p:nth-child(1) {
  margin-bottom: 8px;

  font-size: var(--lg);
  font-weight: bold;
}

.product-info p:nth-child(2) {
  margin-bottom: 24px;

  font-size: var(--lg);

  color: var(--very-light-pink);
}

.product-info p:nth-child(3) {
  margin-bottom: 28px;

  font-size: var(--md);

  color: var(--very-light-pink);
}

.primary-button {
  border: none;
  border-radius: 8px;
  width: 100%;
  height: 48px;

  font-size: var(--md);
  font-weight: bold;

  background-color: var(--hospital-green);
  color: var(--white);

  cursor: pointer;
}

.add-to-cart-button {
  display: flex;
  justify-content: center;
  align-items: center;

  font-size: var(--md);
}

/* Products list */

.main-container {
  padding-top: 20px;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--card-size));
  gap: 24px;
  place-content: center;
}

.product-card {
  width: var(--card-size);
}

.product-card>img {
  margin-bottom: 12px;
  border-radius: 16px;
  width: var(--card-size);
  height: var(--card-size);

  object-fit: cover;
  cursor: pointer;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: inherit;
}

.product-card__description {
  display: flex;
  flex-direction: column;

  max-width: 50%;

  overflow-x: hidden;
}

.product-card__price {
  margin-bottom: 4px;

  font-size: var(--md);
  font-weight: bold;
}

.product-card__name {
  font-size: var(--sm);

  color: var(--very-light-pink);
}

.product-card__icon img {
  width: var(--add-to-chart-icon-size);

  object-fit: contain;
}

/* Helpers */

.inactive {
  display: none;
}

@media (max-width: 640px) {
  .mobile-menu-icon {
    display: block;
  }

  .left-side img {
    width: 128px;
  }

  .left-side ul {
    display: none;
  }

  .right-side .account {
    display: none;
  }

  .desktop-menu {
    display: none;
  }

  aside {
    width: 100%;
  }

  .shopping-cart__header {
    display: none;
  }

  /* Products list */

  .cards-container {
    grid-template-columns: repeat(auto-fill, var(--mobile-card-size));
  }

  .product-card {
    width: var(--mobile-card-size);
  }

  .product-card>img {
    width: var(--mobile-card-size);
    height: var(--mobile-card-size);
  }

  .description img {
    width: var(--mobile-add-to-chart-icon-size);
  }
}

@media (min-width: 641px) {
  .mobile-menu {
    display: none;
  }
}