:root {
  /* variables colors */
  --color-primary-dark: #1d1d1d;
  --color-primary-dark-80: #1d1d1dcc;
  --color-primary-light: #eaeae8;
  --color-primary-white: #ffffff;
  --color-label-purple: #d4b0d9;
  --color-label-greenish: #d9d6b0;

  /* variables for mobile */
  --font-size-header: 32px;
  --font-size-body-large: 18px;
  --font-size-special-product: 8px;
}

*,
*::before,
*::after {
  /* reset */
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: var(--color-primary-dark);
  font-size: 16px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

button {
  cursor: pointer;
  border: none;
}

body {
  box-sizing: border-box;
  color: var(--color-primary-dark);
  padding: 0 16px 0 16px;
  margin: 0;
}
a {
  text-decoration: none;
  color: var(--color-primary-dark);
}

.header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.header__topbar {
  position: sticky;
  left: 0;
  top: 0;
  padding: 24px 0 24px 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-primary-white);
  z-index: 2;
}

.header__logo {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  height: fit-content;
  align-items: center;
}

.header__logo-img:hover .letter-path {
  fill: var(--color-primary-white);
}

.header__logo-img:hover .background-path {
  fill: var(--color-primary-dark);
}

.header__mobile-nav-button,
.modal__close-button {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: fit-content;
  gap: 8px;
  cursor: pointer;
}

.header__sidebar {
  overflow: hidden;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100%;
  background-color: transparent;
  transition: background-color 0.4s ease;
  pointer-events: none;
}

.header__sidebar--active {
  background-color: var(--color-primary-dark-80);
  pointer-events: auto;
}

.header__sidebar--active .header__mobile-nav {
  transform: translateX(-100%);
}

.header__mobile-nav {
  position: absolute;
  right: -290px;
  top: 0;
  transform: translateX(0);
  background-color: var(--color-primary-white);
  height: 100%;
  width: 290px;
  margin-left: auto;
  padding: 0 16px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 80px;
  transition: 0.3s;
}

.header__mobile-nav-topbar {
  padding: 24px 0 24px 0;
  display: flex;
  justify-content: space-between;
}

.header__mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  list-style: none;
}

.header__logo-desktop-tagline {
  display: none;
}

.header__desktop-nav {
  display: none;
}

.header__desktop-user {
  display: none;
}

.hero-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-section__title-img {
  max-width: 918px;
}

.hero-section__main-img-wrapper {
  position: relative;
  flex: 1;
  overflow: hidden;
  border-radius: 8px;
}

.hero-section__main-img {
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
}

.featured-products-section {
  padding: 36px 0 32px 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.featured-products-section__heading-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.featured-products-section__heading-title {
  font-size: var(--font-size-header);
}

.swiper {
  position: relative;
  width: 100%;
}

.swiper-slide {
  position: relative;
  width: 300px;
}

.swiper__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 24px;
}

.swiper__card-img-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
  background-color: var(--color-primary-light);
  border-radius: 6px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper__card-labels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px 0 12px;
}

.swiper__card-header {
  font-size: var(--font-size-body-large);
}

.swiper__card-favourite-button {
  position: absolute;
  top: 16px;
  left: 260px;
  height: 24px;
  width: 24px;
  background: transparent;

  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  cursor: pointer;
}

.swiper__card-favourite-icon:hover path {
  fill: var(--color-primary-dark);
}

.swiper__card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  border-radius: 1000px;
  padding: 4px 12px 4px 12px;
}

.swiper__card-badge--bestseller {
  background-color: var(--color-label-greenish);
}

.swiper__card-badge--limited {
  background-color: var(--color-label-purple);
}

.swiper__button {
  position: absolute;
  border: 1px solid var(--color-primary-light);
  background-color: var(--color-primary-white);
  width: 64px;
  height: 64px;

  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 1000px;
  cursor: pointer;
  z-index: 1;
}

.swiper__button--next {
  right: 10px;
  top: 50%;
  transform: translate(-50%, -50%);
}

.swiper__button-icon {
  width: 21.33px;
  height: 21.33px;
}
.swiper-pagination {
  position: relative !important;
  width: 100% !important;
  height: 1px !important;
  background-color: var(--color-primary-light) !important;
  z-index: 1 !important;
}

.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
  background: var(--color-primary-dark);
  height: 100%;
}

.product-listing-section {
  padding: 24px 0 64px 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.product-listing-section__heading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.product-listing-section__select {
  border: none;
  outline: none;
  font-weight: 700;
}

.product-listing-section__select-option {
  border: none;
  outline: none;
  font-weight: 700;
}

.product-listing-section__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  position: relative;
  gap: 10px;
}

.product-listing-section__grid-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--color-primary-light);
  border-radius: 8px;
  padding: 8px;
}

.product-listing-section__grid-item-title {
  position: absolute;
}

.product-listing__grid-item-img {
  width: 100%;
}

.product-listing-section__banner {
  position: relative;
  grid-row: 3 / 6;
  grid-column: 1/-1;
  border-radius: 6px;
  /* overflow: hidden; */

  padding: 32px 24px 32px 24px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.product-listing-section__banner-img {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  z-index: -1;
  border-radius: 6px;
}

.product-listing-section__banner-header {
  text-align: center;
}

.product-listing-section__banner-title {
  font-weight: 700;
  font-size: var(--font-size-header);
}

.product-listing-section__banner-link {
  background-color: var(--color-primary-white);
  padding: 12px 48px 12px 48px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-listing-section__grid-scroll-trigger {
  position: absolute;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
}

.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  z-index: 999;
  background-color: var(--color-primary-dark-80);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
}

.modal--active {
  visibility: visible;
}

.modal__container {
  position: relative;
  background-color: var(--color-primary-light);
  width: 312px;
  height: 420px;
  padding: 16px;
}

.modal__header {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 2;
  justify-content: space-between;
}

.modal__img-wrapper {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal__img {
  height: 100%;
}

/* variables,styles for desktop */
@media (min-width: 1200px) {
  :root {
    --font-size-body-large: 20px;
    --font-size-header: 42px;
  }

  body {
    padding: 0 42px 0 42px;
  }

  .header__mobile-nav-button {
    display: none;
  }

  .header__sidebar {
    display: none;
  }

  .header__logo-desktop-tagline {
    display: inline;
  }

  .header {
    gap: 80px;
  }

  .header__topbar {
    padding: 32px 0 32px 0;
  }

  .header__logo-wrapper {
    display: flex;
    align-items: center;
    gap: 32px;
  }

  .header__desktop-nav {
    display: block;
  }

  .header__desktop-nav-list {
    display: flex;
    gap: 42px;
    list-style: none;
  }

  .header__desktop-nav-item a {
    position: relative;
  }

  .header__desktop-nav-item a::before {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 2px;
    width: 100%;
    background-color: var(--color-primary-dark);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
  }

  .header__desktop-nav-item a:hover::before {
    transform: scaleX(1);
  }

  .header__desktop-user {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .hero-section {
    gap: 42px;
  }

  .featured-products-section {
    gap: 42px;
  }

  .swiper-slide {
    width: 441px;
  }

  .swiper__card-img-wrapper {
    width: 441px;
    height: 441px;
  }

  .swiper__card-favourite-button {
    left: 401px;
  }

  .swiper__card-img {
    width: 380px;
    height: 380px;
  }

  .swiper_button {
    width: 72px;
    height: 72px;
  }

  .swiper__button-icon {
    width: 24px;
    height: 24px;
  }

  .product-listing-section {
    gap: 64px;
  }

  .product-listing-section__heading-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }

  .product-listing-section__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .product-listing-section__grid-item {
    padding: 32px;
  }

  .product-listing-section__banner {
    grid-row: 2;
    grid-column: 2 / span 2;
    padding: 32px 96px 32px 96px;
  }

  .modal__container {
    width: 840px;
    height: 620px;
    padding: 32px;
  }
}
