/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;600&family=Unbounded:wght@700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,500;0,600;0,700;1,700&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: #145da0;
  --black-color: hsl(220, 12%, 8%);
  --white-color: hsl(48, 90%, 90%);
  --text-color: hsl(220, 8%, 28%);
  --body-color: hsla(49, 28%, 92%, 1.00);
  --shadow-img: drop-shadow(0 16px 24px hsla(0, 0%, 0%, .2));

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --second-font: "Unbounded", sans-serif;
  --biggest-font-size: 3rem;
  --bigger-font-size: 2.5rem;
  --big-font-size: 2rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 6rem;
    --bigger-font-size: 4.5rem;
    --big-font-size: 3.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body,
input,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--black-color);
}

input,
button {
  border: none;
  outline: none;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-bold);
  font-family: var(--second-font);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 1rem;
}

.section__title, 
.section__subtitle {
  text-align: center;
  font-family: var(--second-font);
}

.section__title {
  font-size: var(--big-font-size);
  border-bottom: 2px solid var(--black-color);
  margin-bottom: 2rem;
}

.section__subtitle {
  display: block;
  font-size: var(--h2-font-size);
  margin-bottom: 2rem;
}

.main {
  overflow: hidden;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;  
  background-color: var(--first-color);
  z-index: var(--z-fixed);
  transition: box-shadow .4s;
}

nav {
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  color: var(--white-color);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
}

.nav__logo img {
  width: 10rem;
}

.nav__toggle,
.nav__close{
  display: inline-flex;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    background-color: var(--first-color);
    width: 80%;
    height: 100%;
    padding: 8rem 3.5rem 0;
    box-shadow: -4px 0 16px hsla(0, 0%, 0%, .1);
    transition: right .4s;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  row-gap: 3.5rem; 
}

.nav__link {
  color: var(--white-color);
  font-family: var(--second-font);
  transition: color .4s; 
}

.nav__link:hover {
  color: var(--black-color);
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Show menu */
.show-menu {
  right: 0px;
}


/* Add shadow header */
.shadow-header {
  box-shadow: 0 4px 16px hsla(0, 0%, 0%, .1);
}

/* Active link */
.active-link {
  color: var(--black-color);
}


/*=============== BUTTON ===============*/
.button {
  display: inline-flex;
  background-color: var(--black-color);
  color: var(--white-color);
  padding: 1rem 2rem;
  font-weight: var(--font-semi-bold);
  border-radius: .75rem;
  transition: box-shadow .4s;
}

.button:hover {
  box-shadow: 0 8px 24px hsla(0, 0%, 0%, .2);
}

/*=============== DETAIL ===============*/
.detail {
  background-color: var(--body-color);
}

.detail__container {
  display: block;
  margin-bottom: 4rem;
}

.detail__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  margin: auto;
  box-sizing: border-box;
}

.product__image {
    width: 70%;
}

.product__info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    padding-top: 4rem;
    gap: 2rem;
}

.product__name {
  font-size: var(--h2-font-size);
}

.product__price {
  color: green;
}

.product__detail {
  text-align: justify;
}

.product__info .cta-button {
  background-color: #187ad6;
  color: #fff;
  text-decoration: none;
  margin: 5px;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;  
  transition: transform .4s;
}

.cta-button:hover {
  background-color: #c9261a;
  transform: translateY(-.25rem);
}

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--first-color);
  padding-block: 2rem 1rem;
}

.footer__container {
  display: flex;
  justify-content: center;
}

.footer__content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* biar rapi kalau ada konten tambahan */
  gap: 1.5rem;
  width: 100%;
}

.footer__social {
  display: flex;
  justify-self: center;
  column-gap: 1rem;
}

.footer__social-link {
  font-size: 1.5rem;
  color: var(--white-color);
  transition: transform .4s;
}

.footer__social-link:hover {
  transform: translateY(-.25rem);
}

.footer__copy {
  display: block;
  margin-top: 1rem;
  color: var(--white-color);
  text-align: center;
  font-size: var(--small-font-size);
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: .6rem;
  background-color: #b8c6d3ff;
}

::-webkit-scrollbar-thumb {
  background-color: #145da0;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #00101fff;
}


/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -50%;
  background-color: var(--white-color);
  box-shadow: 0 4px 16px hsla(0, 0%, 0%, .1);
  color: var(--black-color);
  display: inline-flex;
  padding: 6px;
  font-size: 1.25rem;
  border-radius: .5rem;
  z-index: var(--z-tooltip);
  transition: bottom .4s transform .4s;
}

.scrollup:hover {
  transform: translateY(-.5rem);
}


/* Show Scroll Up */
.show-scroll {
  bottom: 3rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .container {
    margin-inline: 1rem;
  }

  /* ========== PRODUCT ========== */
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .nav__menu {
    width: 55%;
  }

  .product__container{
    grid-template-columns: 400px;
    justify-content: center;
  }

    /*=============== PRODUCT ===============*/

.detail__content {
  flex-direction: row;
}

.product__image {
    width: 50%;
}

.product__info {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: start;
    padding-top: 4rem;
    gap: 2rem;
}

.product__name {
  font-size: var(--h1-font-size);
}

.product__info {
  font-size: var(--normal-font-size);
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;  /* agar full lebar */
  text-align: center;
  padding: 1rem 0;
  z-index: 100;
}
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

  .section {
    padding-block: 7rem 2rem;
  }

  .nav {
    height: clac(var(--header-hight) + 2rem);
  }
  .nav__toggle,
  .nav__close {
    display: none;
  }
  .nav__menu {
    width: initial;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 4rem;
  }


  /* ========== FOOTER ========== */  
  .footer__container {
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }
  .footer__content {
    grid-template-columns: repeat(3, max-content);
    column-gap: 4rem;
  }
  .footer__logo {
    align-self: start;
  }
  .footer__logo img {
    width: 2rem;
  }
  .footer__logo span {
    font-size: var(--h3-font-size);
  }
  .footer__social {
    justify-self: initial;
  }
  .footer__title {
    text-align: initial;
  }

  .scrollup {
    right: 3rem;
  }
}

/* For 2K resolutions (2048 x 1152, 2048 x 1536) */
@media screen and (min-width: 2040px) {
  body {
    zoom: 1.4;
  }
}
