:root {
  /* colors */
  --middle-blue-green: hsl(176, 35%, 63%);
  --sonic-silver: hsl(0, 0%, 44%);
  --eerie-black: hsl(0, 0%, 9%);
  --ocean-green: hsl(148, 45%, 58%);
  --candy-spanink: hsl(356, 65%, 63%);
  --cultured: hsl(0, 0%, 96%);
  --white: hsl(0, 0%, 100%);
  --black: hsl(0, 0%, 0%);

  /* tyspanograspanhy */

  --ff-jost: 'Jost', sans-serif;
  --fs-1: 2.5rem;
  --fs-2: 1.75rem;
  --fs-3: 1.625rem;
  --fs-4: 1.5rem;
  --fs-5: 1.375rem;
  --fs-6: 1.25rem;
  --fs-7: 1.125rem;
  --fs-8: 0.938rem;
  --fs-9: 0.875rem;
  --fs-10: 0.813rem;
  --fw-500: 500;
  --fw-600: 600;

  /* transition  */

  --transition-1: 0.25s ease;
  --transition-2: 0.75s ease;
  --cubic-out: cubic-bezier(0.51, 0.03, 0.64, 0.28);
  --cubic-in: cubic-bezier(0.33, 0.85, 0.56, 1.02);

  /* sspanacing */

  --section-spacing: 60px;
}

/* httspans://spaniccalil.li/blog/a-modern-css-reset */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
* {
  margin: 0;
  padding: 0;
  font: inherit;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul,
ol {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

/* Set core body defaults */
body {
  text-rendering: ospantimizeSpeed;
  line-height: 1.5;
  background-color: var(--white);
  color: var(--sonic-silver);
  font-family: var(--ff-jost);
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}
a {
  text-decoration: none;
  color: unset;
}

/* Make images easier to work with */
img,
picture,
svg {
  max-width: 100%;
  height: 100%;
  display: block;
}
img {
  object-fit: cover;
}
/* input */
input,
button {
  border: none;
  background-color: unset;
  display: block;
}

/* headings  */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--fw-600);
  color: var(--eerie-black);
}

/* Remove all animations, transitions and smooth scroll for spaneospanle that spanrefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------
  General styles
  ----------------
*/

.d-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.container {
  width: 95%;
  margin-inline: auto;
}

.primary-btn {
  border: 1px solid var(--black);
  padding: 0.75rem 3rem;
  color: var(--white);
  background-color: var(--black);
}

.primary-btn:is(:hover, :focus) {
  background-color: unset;
  color: var(--black);
}

.btn {
  transition: var(--transition-1);
  -webkit-transition: var(--transition-1);
  -moz-transition: var(--transition-1);
  -ms-transition: var(--transition-1);
  -o-transition: var(--transition-1);
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  font-weight: var(--fw-600);
  cursor: pointer;
}

.secondary-btn:is(:hover, :focus) {
  background-color: var(--black);
  color: var(--white);
}

.btn-outline {
  margin-block-start: 4rem;
  margin-inline: auto;
  padding-inline: 2rem;
  padding-block: 1rem;
  border: 1px solid var(--black);
}

.btn-outline:is(:hover, :focus) {
  background-color: var(--black);
  color: var(--white);
}

.section-title {
  font-size: var(--fs-2);
  margin-bottom: 1.875rem;
  text-align: center;
}

label {
  position: absolute;
  top: -999px;
  left: -999px;
}
/* --------------
  Header section/
  Navbar
  ----------------
*/

.search-form {
  display: none;
}

header {
  /* padding: 1rem; */
}

.nav-open-menu {
  width: 35px;
  height: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.nav-open-menu span {
  width: 100%;
  height: 2px;
  background-color: var(--black);
}

.nav-open-menu span:nth-child(2) {
  transform: scale(0.5);
  transform-origin: right;
  transition: var(--transition-1);
}

.nav-open-menu:is(:hover, :focus) span:nth-child(2) {
  transform: scale(1);
}

.header-actions {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding-block: 1rem;
  box-shadow: 0 -2px 20px hsla(0, 0%, 0%, 0.1);
  color: var(--eerie-black);
  background-color: var(--white);
  z-index: 3;
}

.header-actions span {
  display: block;
  font-size: var(--fs-10);
}

.header-actions button .header-action-icon {
  font-size: var(--fs-6);
}

.header-actions button {
  width: 75px;
  cursor: pointer;
  position: relative;
}

.header-actions i {
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: var(--fs-10);
  width: 20px;
  height: 20px;
  background-color: var(--middle-blue-green);
  border-radius: 50%;
}

.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(--black);
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-1);
  -webkit-transition: all var(--transition-1);
  -moz-transition: all var(--transition-1);
  -ms-transition: all var(--transition-1);
  -o-transition: all var(--transition-1);
}

.overlay.active {
  opacity: 0.7;
  visibility: visible;
}

.navbar {
  position: fixed;
  top: 0;
  right: -300px;
  max-width: 250px;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  padding: 1rem;
  z-index: 6;
  visibility: hidden;
  transition: 0.25s var(--cubic-out);
}

.navbar.active {
  visibility: visible;
  transform: translateX(-300px);
  transition: 0.5s var(--cubic-in);
}

.navbar .top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  margin-block-end: 2.5rem;
}

.navbar .top-navbar .nav-close-menu {
  display: flex;
  align-items: center;
}

.navbar .top-navbar .nav-close-menu ion-icon {
  font-size: var(--fs-5);
  color: var(--eerie-black);
  cursor: pointer;
}

.navbar .navbar-links li {
  padding-block: 1rem;
}

.navbar .navbar-links li:not(:last-child) {
  border-bottom: 1px solid var(--cultured);
}

.navbar .navbar-links li a {
  color: var(--eerie-black);
}

/* --------------
  Header section/
  hero
  ----------------
*/

section.hero-section {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: left;
  width: 100%;
  min-height: 80vh;
  /* display: flex; */
  /* align-items: center;  */
}

section .hero-title {
  font-size: var(--fs-1);
  line-height: 1;
  margin-bottom: 2.18rem;
  max-width: 12ch;
}

section .hero-subtitle {
  color: var(--eerie-black);
  font-size: var(--fs-4);
  font-weight: var(--fw-600);
  margin-bottom: 1.25rem;
}

/* --------------
  Main section/
  Services
  ----------------
*/

.service-container {
  flex-flow: row wrap;
  justify-content: center;
  padding-block-start: var(--section-spacing);
}
.service-container > * {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 250px;
  margin-inline: auto;
}

.service-container > *:not(:last-child) {
  margin-bottom: 2.5rem;
}

.service-container .service-info h2.service-title {
  font-size: var(--fs-7);
}

/* --------------
  Main section/
  category
  ----------------
*/

.category-container {
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.category-container picture {
  position: relative;
  aspect-ratio: 2 / 2.35;
  overflow: hidden;
}

.category-container picture img {
  transition: var(--transition-2);
}

.category-container picture img:is(:hover) {
  transform: scale(1.125);
  -webkit-transform: scale(1.125);
  -moz-transform: scale(1.125);
  -ms-transform: scale(1.125);
  -o-transform: scale(1.125);
}

.category-container button {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--white);
  width: max-content;
  -webkit-transform: translateX(-50%);
  -moz-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  -o-transform: translateX(-50%);
  padding-inline: 1rem;
  padding-block: 0.5rem;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.6);
}

/* --------------
  Main section/
  Products 
  ----------------
*/

section.products-container {
  padding-block: var(--section-spacing);
}

section .products-cards,
section .products-sort {
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

section .products-title,
section .products-sort {
  text-align: center;
}

section .products-sort h3 {
  margin-inline: 1.5vw;
  transition: var(--transition-1);
  -webkit-transition: var(--transition-1);
  -moz-transition: var(--transition-1);
  -ms-transition: var(--transition-1);
  -o-transition: var(--transition-1);
  cursor: pointer;
}

section .products-sort h3:is(:hover, :focus) {
  color: var(--middle-blue-green);
}

section .products-cards article picture {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 2.35;

}

section .products-cards article h3 {
  margin-top: 1rem;
}

section .products-cards article picture div.product-card-action {
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  width: 100%;
  background-color: var(--black);
}

section .products-cards article picture div.product-card-action > * {
  padding: 0.5rem;
  color: var(--white);
  font-family: var(--fw-600);
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-1);
  -webkit-transition: var(--transition-1);
  -moz-transition: var(--transition-1);
  -ms-transition: var(--transition-1);
  -o-transition: var(--transition-1);
}

section
  .products-cards
  article
  picture
  div.product-card-action
  button
  span.add-cart {
  font-size: 0.75rem;
  margin-inline: 0.3125rem;
}

section
  .products-cards
  article
  picture
  div.product-card-action
  button:nth-child(1),
section
  .products-cards
  article
  picture
  div.product-card-action
  button:last-child {
  background-color: var(--white);
  color: var(--black);
}

section
  .products-cards
  article
  picture
  div.product-card-action
  button:nth-child(1):is(:hover, :focus),
section
  .products-cards
  article
  picture
  div.product-card-action
  button:last-child:is(:hover, :focus) {
  background-color: var(--black);
  color: var(--white);
}

section
  .products-cards
  article
  picture
  div.product-card-action
  button:nth-child(2) {
  flex-grow: 1;
}

/* --------------
  Main section/
 Blog 
  ----------------
*/

section.blog-container {
  padding-block: var(--section-spacing);
}

section div.blog-article {
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

section div.blog-article figure {
  overflow: hidden;
}

section div.blog-article .article-content {
  text-align: center;
}
section div.blog-article .article-content .article-meta-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
}

section div.blog-article .article-content .article-meta-items li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

section div.blog-article .article-content .article-meta-items li a {
  font-size: var(--fs-9);
  font-weight: var(--fw-500);
  text-transform: uppercase;
}

section div.blog-article .article-content h3.article-title {
  font-size: var(--fs-6);
}

/* --------------
  Main section/
Newsletter
  ----------------
*/

section.newsletter-container {
  padding-block: var(--section-spacing);
}

section.newsletter-container .newsletter-wrapper {
  background-color: var(--cultured);
  background-image: url('./assets/images/newsletter-bg.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left;
  padding-block: var(--section-spacing);
}

section.newsletter-container .newsletter-content {
  padding-inline: 1rem;
}

section.newsletter-container .newsletter-content .newsletter-desc {
  text-align: center;
}

section.newsletter-container form {
  position: relative;
}

section.newsletter-container form > * {
  width: 100%;
  margin-bottom: 1rem;
}

section.newsletter-container form input {
  background-color: var(--white);
  padding: 1rem 3rem;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
}

section.newsletter-container form i {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-180%);
  -webkit-transform: translateY(-180%);
  -moz-transform: translateY(-180%);
  -ms-transform: translateY(-180%);
  -o-transform: translateY(-180%);
}

/* --------------
  Footer section
  ----------------
*/

.footer {
  padding-block-start: var(--section-spacing);
  background-color: var(--cultured);
}

div.top-footer .footer-brand a.brand-logo {
  display: inline-block;
  margin-bottom: 1rem;
}

div.top-footer .footer-brand p.footer-desc {
  line-height: 1.6;
}

div.top-footer .footer-brand ul.footer-social-links {
  display: flex;
  margin-block: 1.9375rem;
  gap: 0.625rem;
  justify-content: flex-start;
  align-items: center;
}

div.top-footer .footer-brand ul.footer-social-links li {
  line-height: 0;
  width: 35px;
  height: 35px;
  border: 1px solid var(--sonic-silver);
  border-radius: 50%;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
  color: var(--black);
  transition: var(--transition-1);
  -webkit-transition: var(--transition-1);
  -moz-transition: var(--transition-1);
  -ms-transition: var(--transition-1);
  -o-transition: var(--transition-1);
  display: grid;
  place-items: center;
}

div.top-footer .footer-brand ul.footer-social-links li:is(:hover, :focus) {
  background-color: var(--black);
  color: var(--white);
}

div.top-footer ul.footer-list {
  padding-block: 25px;
}

div.top-footer ul.footer-list:last-child {
  padding-bottom: 4rem;
}

div.top-footer ul.footer-list h4 {
  font-size: var(--fs-5);
  margin-bottom: 1rem;
}

div.top-footer ul.footer-list li {
  padding-block: 0.25rem;
  transition: var(--transition-1);
}

div.top-footer ul.footer-list li:is(:hover, :focus) {
  color: var(--black);
}

div.bottom-footer {
  text-align: center;
  background-color: var(--white);
  padding-block: 2rem;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
}

div.bottom-footer > * {
  margin-bottom: 1rem;
}

div.bottom-footer > *:last-child {
  margin-bottom: 4rem;
}

div.bottom-footer .bottom-footer-list ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

div.bottom-footer .bottom-footer-list ul li:is(:hover, :focus) {
  color: var(--eerie-black);
  transition: var(--transition-1);
}

div.bottom-footer .bottom-footer-payment {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

/* --------------
 Media Query 
  ----------------
*/

/**
 * responsive for larger than 480px screen
 */

@media (min-width: 30em) {
  /**
   * CUSTOM PROPERTY
   */

  :root {
    /**
     * typography
     */

    --fs-1: 3rem;
    --fs-2: 2rem;
  }

  /* ** service section  */

  .service-container > *:last-child {
    margin-bottom: 2.5rem;
  }

  /* 
  ** category & products
  */

  div.category-container,
  section.products-container {
    padding: 0;
  }

  div.category-container {
    padding-bottom: var(--section-spacing);
  }

  div.category-container picture,
  div.products-cards article {
    flex-basis: 45%;
  }

  footer.footer div.footer-container div.top-footer {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: center;
  }

  footer.footer div.footer-container div.top-footer .footer-list:first-child {
    flex-basis: 100%;
  }

  footer.footer
    div.footer-container
    div.top-footer
    .footer-list:not(:first-child) {
    flex-basis: 45%;
  }

  footer.footer div.footer-container div.top-footer div.footer-brand p {
    max-width: 470px;
  }
}

/**
 * responsive for larger than 580px screen
 */

@media (min-width: 36.25em) {
  /**
   * CUSTOM PROPERTY
   */

  :root {
    /**
     * typography
     */

    --fs-1: 3.75rem;
    --fs-2: 2.375rem;
    --fs-3: 2.25rem;
  }

  /**
   * REUSED STYLE
   */

  .container {
    max-width: 550px;
    margin-inline: auto;
  }

  /* footer */
}

/**
 * responsive for larger than 768px screen
 */

@media (min-width: 48em) {
  /**
   * REUSED STYLE
   */

  .container {
    max-width: 700px;
  }

  /**
   * HERO
   */

  section.hero-section {
    background-position: center;
    min-height: 800px;
  }
  /* blog section */

  section.blog-container div.blog-article article {
    flex-basis: calc(50% - 10px);
  }

  /* newsletter section */
  section.newsletter-container
    div.newsletter-wrapper
    div.newsletter-content
    form {
    display: flex;
    /* justify-content: space-between; */
    width: 65%;
    margin: 2rem auto;
  }

  section.newsletter-container form > * {
    margin: 0;
    width: 0;
  }

  section.newsletter-container form button {
    flex-basis: 35%;
    border-radius: 0 5px 5px 0;
    -webkit-border-radius: 0 5px 5px 0;
    -moz-border-radius: 0 5px 5px 0;
    -ms-border-radius: 0 5px 5px 0;
    -o-border-radius: 0 5px 5px 0;
  }

  section.newsletter-container form input {
    flex-grow: 1;
  }

  section.newsletter-container form i {
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
  }

  /* footer */

  footer.footer
    div.footer-container
    div.top-footer
    .footer-list:not(:first-child) {
    flex-basis: calc(33% - 10px);
  }

  div.top-footer ul.footer-list:last-child {
    padding: 0;
  }

  div.top-footer ul.footer-list {
    padding-bottom: 2rem;
  }

  div.bottom-footer {
    flex-flow: row wrap;
    gap: 2rem;
  }

  div.bottom-footer > * {
    margin-bottom: 0.25rem;
  }
}

/**
 * responsive for larger than 992px screen
 */

@media (min-width: 62em) {
  :root {
    /**
     * typography
     */

    --fs-1: 5rem;
  }

  .container {
    max-width: 950px;
  }

  div.bottom-footer > *:last-child {
    margin-bottom: 0;
  }

  /* --------------
 Media Query - navigation section 
  ----------------
*/
  .search-form {
    display: block;
  }

  .nav-open-menu,
  .header-actions button:nth-child(2),
  .overlay,
  nav.navbar .top-navbar,
  nav.navbar .nav-close-menu {
    display: none;
  }
  
  nav.navbar {
    all: unset;
    position: absolute;
    top: 81px;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--white);
    border-top: 1px solid var(--cultured);
  }

  nav.navbar .navbar-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 1.25rem;
  }

  nav.navbar .navbar-links li {
    color: var(--eerie-black);
    font-weight: var(--fw-600);
    font-size: var(--fs-7);
    padding: 0;
  }
  nav.navbar .navbar-links li:nth-of-type(1) a {
    color: var(--middle-blue-green);
  }

  nav.navbar .navbar-links li a:is(:focus, :hover) {
    color: var(--middle-blue-green);
    transition: var(--transition-1);
  }

  .header-actions {
    all: unset;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
  }

  .header-actions button {
    max-width: 50px;
  }

  .header-actions i {
    right: 5px;
  }
  div.search-form {
    width: max-content;
    position: relative;
  }

  div.search-form input {
    padding: 12px 30px;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
    width: 280px;
    border: 1px solid hsla(0, 0%, 0%, 0.1);
  }

  div.search-form ion-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--eerie-black);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
  }
}

@media (min-width: 963px) {
  div.bottom-footer {
    padding-inline: 2rem;
    margin-bottom: 4rem;
  }

  div.bottom-footer > * {
    margin: 0;
  }
  div.bottom-footer > *:last-child {
    margin: 0;
  }
}

/**
 * responsive for larger than 991px screen
 */

@media (min-width: 992px) {
  /* products & category & blog */
  div.category-container
    picture:not(div.category-container
      picture:nth-of-type(1), div.category-container picture:nth-of-type(2)) {
    flex-basis: calc(23.5% - 1rem);
  }

  div.products-cards article,
  section.blog-container div.blog-article article {
    flex-basis: calc(32.666% - 1rem);
  }
  /* footer */

  div.bottom-footer {
    margin: 0;
  }

  footer.footer div.footer-container div.top-footer {
    justify-content: flex-start;
    gap: 1rem;
  }

  footer.footer div.footer-container div.top-footer .footer-list:first-child {
    flex-basis: 45%;
  }

  footer.footer
    div.footer-container
    div.top-footer
    .footer-list:not(:first-child) {
    flex-basis: calc(18.333% - 1rem);
  }

  footer.footer div.footer-container div.top-footer div.footer-brand p {
    max-width: 320px;
  }
}

/**
 * responsive for larger than 1200px screen
 */

@media (min-width: 75em) {
  /**
   * CUSTOM PROPERTY
   */

  :root {
    /**
     * typography
     */

    --fs-1: 6.25rem;
  }
  /**
   * REUSED STYLE
   */

  .container {
    max-width: 1150px;
  }
}
