@import url("variables.css");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  opacity: 0;
  transition: opacity 0.5s ease;
  background-color: var(--back-body);
  color: var(--text-default);
}

.body-wrapper {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 40px 40px;
  position: relative;
}

@media (max-width: 768px) {
  .fixed {
    z-index: 1;
    position: fixed;
    height: 80px;
    background-color: var(--back-body);
    width: calc(100% - 40px);
    padding-bottom: 20px 0;
  }
}

@media (max-width: 767px) {
  .body-wrapper {
    padding: 20px 16px 40px;
  }
  .fixed {
    width: calc(100% - 32px);
  }
}

main {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  gap: 100px;
}

footer {
  margin-top: 100px;
}

li {
  list-style: none;
}

body section:first-child {
  margin-top: 20px;
}

/* Header */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */

.logo {
  display: block;
  width: 100px;
  height: 60px;
}

/* Navigation */

.main-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.nav-list {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

div.nav-item {
  display: flex;
  gap: 8px;
  width: 72px;
  height: 28px;
  justify-content: space-between;
  align-items: center;
}

div.nav-item .svg-coffee-cup {
  margin-bottom: 4px;
}

/* Burger */

.btn-burger {
  display: none;
}

@media (max-width: 768px) {

  /* Burger */

  .btn-burger {
    display: block;
  }

  /* Navigation */

  .main-nav {
    position: fixed;
    right: -100%;
    top: 0;
    width: calc(100%);
    height: calc(100vh);
    margin-top: 100px;
    padding-top: 60px;
    flex-direction: column;
    justify-content: flex-start;
    gap: 100px;
    --link-default: 600 32px/125% var(--main-font);
    font: var(--link-default);
    background-color: var(--back-body);
    z-index: 1;
    opacity: 0;
    transition: right 0.7s ease, opacity 0.7s ease;
  }

  .nav-open {
    right: 0;
    opacity: 1;
  }

  .nav-list {
    flex-direction: column;
    justify-content: flex-start;
    max-height: 340px;
    gap: 60px;
  }

  /* Link Menu in navigation */

  div.nav-item {
    width: auto;
    height: auto;
    gap: 16px;
    flex-grow: 1;

    & svg {
      width: 40px;
      height: 40px;
    }
  }
}

/* Section Enjoy */

.section-enjoy {
  padding: 100px;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  /* background: url(../assets/img/img-hero.jpg) center/cover no-repeat; */
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}

.section-enjoy > :nth-child(-n + 2) {
  max-width: 530px;
}

#coffee-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

@media (max-width: 1439px) {
  .section-enjoy {
    padding: 100px 60px;
  }
}

@media (max-width: 767px) {
  .section-enjoy {
    padding: 60px 16px;
  }
}

/* Section Favourite coffee */

.section-fv-coffee {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section-fv-coffee > .title-m,
.section-menu > .title-m {
  text-align: center;
}

/* Slider layout */

.slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.slider-content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.slides-overflow {
  max-width: 480px;
  overflow: hidden;
}

.slides-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 300%;
  overflow: hidden;
  transition: margin-left 0.7s ease;
}

.slider-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slider-img-wrapper {
  max-width: 480px;
  max-height: 480px;
  overflow: hidden;
  
}

.slider-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.slider-arrow-left {
  transform: rotate(180deg);
  margin-left: 4px;
}

.slider-arrow-right {
  margin-right: 4px;
}

@media (max-width: 1439px) {
  .slider-arrow-right,
  .slider-arrow-left  {
    margin: 0;
  }
}

@media (max-width: 767px) {
  .slider-arrow-right,
  .slider-arrow-left {
    display: none;
  }
  .slider-content-wrapper {
    justify-content: center;
  }
}

/* Slider Pagination */

.slider-pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.slider-pagination-item {
  width: 40px;
  height: 4px;
  border-radius: 100px;
  background-color: var(--border-inverse);
  position: relative;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  display: block;
  background-color: var(--border-default);
  width: 0%;
  height: 100%;
  transform-origin: left center;
  transition: transform 0.5s ease;
  top: 0;
  left: 0;
  /* animation: fillBar 3s forwards; */
}

@keyframes fillBar {
  to {
    width: 100%;
  }
}

@keyframes emptyBar {
  to {
    width: 0%;
  }
}

/* Section About */

.section-about {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Gallery */

.gallery-wrapper {
  display: flex;
  gap: 40px;
  width: 100%;
  justify-content: space-between;
  /* flex-wrap: wrap; */
}

.gallery-column {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.gallery-item {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transition: scale 0.5s ease;
}

@media (hover:hover) {
  .gallery-img:hover {
    scale: 0.92;
  }
}

.gallery-item {
  max-width: 660px;
}

.gallery-column:nth-child(1) .gallery-item:nth-child(1),
.gallery-column:nth-child(2) .gallery-item:nth-child(2) {
  height: 590px;
}

.gallery-column:nth-child(1) .gallery-item:nth-child(2),
.gallery-column:nth-child(2) .gallery-item:nth-child(1) {
  height: 430px;
}

@media (max-width: 768px) {
  .gallery-wrapper {
    flex-direction: column;
  }
  .gallery-item {
    max-width: 768px;
  }
  .gallery-column:nth-child(1) .gallery-item:nth-child(2),
  .gallery-column:nth-child(2) .gallery-item:nth-child(1) {
    display: none;
  }
  .gallery-img {
    transform: scale(1.06);
  }
  @media (hover:hover) {
    .gallery-img:hover {
      scale: 0.96;
    }
  }
}

@media (max-width: 380px) {
  .gallery-img {
    transform: scale(1.23);
  }
}


/* Mobile App Section */

.section-mobile-app {
  width: 100%;
  display: flex;
  gap: 100px;
  justify-content: space-between;
  align-items: center;
}

.leftbar {
  flex-basis: 630px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.btn-wrapper {
  display: flex;
  gap: 20px;
}

.rightbar {
  flex-basis: 630px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-app-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1100px) {
  .section-mobile-app {
    flex-direction: column;
  }
  .leftbar {
    flex-basis: auto;
    max-width: 630px;
    align-self: flex-start;
  }
  .rightbar {
    flex-basis: auto;
    max-width: 630px;
  }
}

@media (max-width: 768px) {
  .leftbar {
    min-width: 100%;
  }
}

@media (max-width: 520px) {
  .btn-wrapper {
    flex-direction: column;
  }
  .section-mobile-app {
    gap: 40px;
  }
}

/* Footer */

.footer {
  display: flex;
  align-items: center;
  gap: 100px;
  padding: 100px;
  border-radius: 40px;
  background-color: var(--back-container);
  color: var(--text-inverse);
}

.footer-content-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex-basis: 530px;
}

.social-wrapper {
  display: flex;
  gap: 12px;
}

.footer-content-right,
.contact-list {
  display: flex;
  flex-direction: column;
}

.footer-content-right {
  gap: 40px;
}

.contact-list {
  gap: 20px;
}

.contact-item {
  width: fit-content;
  display: flex;
  gap: 8px;
  padding-right: 4px;
}

.contact-item a {
  color: var(--text-inverse);
  display: flex;
  gap: 8px;
}

@media (max-width: 1439px) {
  .footer {
    padding: 100px 60px 104px 60px;
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-content-left {
    flex-basis: auto;
  }
}

@media (max-width: 767px) {
  .footer {
    padding: 60px 16px 63px 16px;
    gap: 40px;
  }
}

/* Menu Section */

.section-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 39px;
}

@media (max-width:768px) {
  .section-menu {
    gap: 37px;
  }
}

.section-menu > h1.title-m {
  max-width: 800px;
}

/* Tabs */

input[type="radio"],
input[type="checkbox"] {
display: none;
}

.tab-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.chips {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px 14px 7px 8px;
  border-radius: 100px;
  border: 1px solid var(--border-inverse);
  cursor: pointer;
  transition: border 0.5s ease, background-color 0.5s ease, color 0.5s ease;
}

@media (hover:hover) {
  .chips:hover {
    border: 1px solid var(--border-default);
    background-color: var(--border-default);
    color: var(--text-inverse);

    & span.chips-icon {
      background-color: var(--back-body);
    }
  }
}

.tab-wrapper input:checked + .chips {
  border: 1px solid var(--border-default);
  background-color: var(--border-default);
  color: var(--text-inverse);

  & span.chips-icon {
    background-color: var(--back-body);
  }
}

.chips-icon {
  background-color: var(--border-inverse);
  color: var(--text-default);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  border-radius: 100px;
  transition: background-color 0.5s ease;
}

.chips-icon.coffee {
  background-image: url(../assets/img/chips/chips-icon-1.png);
}

.chips-icon.tea {
  background-image: url(../assets/img/chips/chips-icon-2.png);
}

.chips-icon.desserts {
  background-image: url(../assets/img/chips/chips-icon3.png);
}

@media (max-width: 400px) {
  .tab-wrapper {
    gap: 5px;
  }
}

/* Product card */

.product-item {
  display: flex;
  flex-direction: column;
  border-radius: 40px;
  border: 1px solid var(--border-inverse);
  max-width: 310px;
  height: 506px;
}

@media (hover:hover) {
  .product-item:hover {
    cursor: pointer;
    & .product-img {
      scale: 0.95;
    }
  }
}

.product-img-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 40px;
  overflow: hidden;
  flex-basis: 310px;
}

.product-img {
  width: 340px;
  height: 340px;
  scale: 1;
  transition: scale 0.5s ease;
}

.product-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 12px;
}

.info {
  flex-grow: 1;
}

.products-wrapper {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.section-menu button {
  display: none;
}

.non-active {
  pointer-events: none;
  cursor: default;
}

@media only screen and (min-width: 1090px) and (max-width: 1439px) {
  .products-wrapper {
    width: 70%;
  }
}

@media (max-width: 768px) {
  .section-menu {
    gap: 39px;
  }
}

.hidden {
  display: none;
}
