:root {
  --primary: #b6895b;
  --bg: #010101;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  border: none;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: white;
}

/* navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 7%;
  background-color: rgba(1, 1, 1, 0.8);
  border-bottom: 1px solid #513c28;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.navbar-logo {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.navbar-logo span {
  color: #b6895b;
}

.navbar-nav a {
  color: #fff;
  display: inline-block;
  font-size: 1.3rem;
  margin: 0 1rem;
  text-decoration: none;
  transition: 0.3s;
}

.navbar-nav a:hover {
  color: #b6895b;
  transform: scale(1.1);
}

.navbar-extra a {
  color: #fff;
  margin: 0 0.5rem;
  text-decoration: none;
}

.navbar-extra a:hover {
  color: #b6895b;
}

#hamburger-menu {
  display: none;
}

/* navbar search form */
/* Search Form */
.search-form {
  position: absolute;
  top: 100%;
  right: 7%;
  background-color: #fff;
  width: 50rem;
  height: 5rem;
  display: flex;
  align-items: center;
  transform: scaleY(0);
  transform-origin: top;
  transition: 0.3s;
  z-index: 999;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-form input {
  height: 100%;
  width: 100%;
  font-size: 1.6rem;
  color: #333;
  padding: 1rem;
  border: none;
  outline: none;
  background: none;
}

.clear-btn {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  padding: 0.5rem;
}

.clear-btn.visible {
  opacity: 1;
  visibility: visible;
}

.clear-btn i {
  color: #666;
  width: 1.5rem;
  height: 1.5rem;
}

.clear-btn:hover i {
  color: var(--primary);
}

.search-form.active {
  transform: scaleY(1);
}

.search-box {
  color: var(--bg);
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-buttons {
  position: absolute;
  right: 1rem;
  display: flex;
  gap: 1rem; /* Menambah jarak menjadi 1rem antara tombol */
}

.search-btn,
.clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  padding: 0.5rem;
}

.search-btn.visible,
.clear-btn.visible {
  opacity: 1;
  visibility: visible;
}

.search-btn i,
.clear-btn i {
  color: #666;
  width: 1.5rem;
  height: 1.5rem;
}

.search-btn:hover i,
.clear-btn:hover i {
  color: var(--primary);
}

/* shopping cart */
#shopping-cart-button {
  position: relative;
}

#shopping-cart-button .quantity-badge {
  display: inline-block;
  padding: 1px 5px;
  background-color: red;
  border-radius: 6px;
  font-size: 0.8rem;
  position: absolute;
  top: 0;
  right: -10px;
}

.shopping-cart {
  position: absolute;
  top: 100%;
  right: -100%;
  height: 100vh;
  width: 35rem;
  background-color: white;
  padding: 0 1.5rem;
  color: var(--bg);
  transition: 0.3s;
}

.shopping-cart .cart-item {
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #666;
  position: relative;
}

.shopping-cart img {
  height: 4rem;
  border-radius: 50%;
}

.shopping-cart h3 {
  font-size: 1.4rem;
}

.shopping-cart .item-price {
  font-size: 1.2rem;
}

.shopping-cart .cart-item #add,
.shopping-cart #remove {
  display: inline-block;
  padding: 2px 5px;
  cursor: pointer;
  margin: 0 8px;
  background-color: black;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
}

.shopping-cart.active {
  right: 0;
}

.shopping-cart h4 {
  font-size: 1.6rem;
  margin-top: -1rem;
  text-align: center;
}

/* form checkout */
.form-container {
  width: 100%;
  display: flex;
  justify-content: center;
  border-top: 1px dashed black;
  margin-top: 1rem;
  padding: 1rem;
}

.form-container h5 {
  font-size: 1rem;
  text-align: center;
}

.form-container form {
  width: 100%;
  text-align: center;
}

.form-container label {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 1rem 0;
}

.form-container span {
  text-align: right;
}

.form-container input {
  background-color: #ddd;
  padding: 5px;
  font-size: 1rem;
  width: 70%;
}

.form-container .checkout-button {
  padding: 6px 14px;
  background-color: royalblue;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 20px;
  margin: 1rem auto;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .search-form {
    width: 90%;
    right: 2rem;
  }
}

/* Hero section */
.hero {
  background-image: linear-gradient(rgba(1, 1, 1, 0.5), rgba(1, 1, 1, 0.5)), url('../img/header-bg.jpg');
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  mask-image: linear-gradient(rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0));
}

.hero .content {
  padding: 1.4rem 7%;
  text-align: center;
  width: 100%;
  position: fixed;
}

.hero .content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
}

.hero .content p {
  font-size: 1.5rem;
  margin: 1rem 0 2rem 0;
  font-weight: 100;
  mix-blend-mode: difference;
}

.hero .content a {
  padding: 0.7rem 1.5rem;
  background-color: var(--primary);
  color: #fff;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: 500;
  margin-top: 1rem;
}

.hero .content span {
  color: var(--primary);
}

/* Tablet */
@media (max-width: 768px) {
  .hero {
    height: 80vh;
  }

  .hero .content h1 {
    font-size: 2.5rem;
  }

  .hero .content p {
    font-size: 1.2rem;
  }

  .hero .content a {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
}

/* Smartphone */
@media (max-width: 450px) {
  .hero {
    height: 70vh;
  }

  .hero .content h1 {
    font-size: 2rem;
  }

  .hero .content p {
    font-size: 1rem;
  }

  .hero .content a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* about section */
.about,
.menu,
.order {
  padding: 8rem 1.4rem 7%;
}

.about h2,
.menu h2,
.order h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 3rem;
}

.about .row .about-img {
  flex: 1 1 45rem;
}

.about .row .about-img img {
  width: 100%;
  mask-image: url(menu/coffe.svg);
  mask-size: 50%;
  mask-repeat: no-repeat;
  mask-position: center;
}

.about h2 span,
.menu h2 span,
.order h2 span {
  color: var(--primary);
}

.about .row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.about .row .content {
  flex: 1 1 35rem;
  padding: 0 1rem;
}

.about .row .content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.about .row .content p {
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
  font-weight: 100;
  mix-blend-mode: difference;
  line-height: 1.6;
}

/* menu section */
.menu h2 {
  margin-bottom: 1rem;
}

.menu p {
  text-align: center;
  max-width: 30rem;
  margin: auto;
  font: 1.2rem;
  font-weight: 100;
  line-height: 1.6;
}

.menu .row {
  display: flex;
  flex-wrap: wrap;
  margin-top: 5rem;
  justify-content: center;
}

.menu .row .menu-card {
  text-align: center;
  padding-bottom: 2rem;
}

.menu .row .menu-card img {
  border-radius: 50%;
  width: 80%;
}

.menu .row .menu-card .menu-card-title {
  margin-top: 1rem auto 0.5rem;
}
/* order section */
.order .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.order .order-card {
  border: 1px solid #666;
  text-align: center;
  padding: 2rem;
}

.order .order-icons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.order .order-icons a {
  width: 4rem;
  height: 4rem;
  color: #fff;
  margin: 0.3rem;
  border: 1px solid #666;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order .order-icons a:hover {
  background-color: var(--primary);
  border: 1px solid var(--primary);
}

.order .order-img {
  padding: 1rem 0;
}

.order .order-img img {
  height: 25rem;
}

.order .order-content h3 {
  font-size: 2rem;
}

.order .product-stars {
  font-size: 1.7rem;
  padding: 0.8rem;
  color: var(--primary);
}

.order .product-stars .star-full {
  fill: var(--primary);
}

.order .product-price {
  font-size: 1.3rem;
  font-weight: bold;
}

/* contact section */

.contact {
  padding: 8rem 7% 1.4rem;
}

.contact p {
  text-align: center;
}

.contact h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 3rem;
}

.contact h2 span {
  color: var(--primary);
}

.contact .row {
  display: flex;
  margin-top: 2rem;
  background-color: #222;
  flex-wrap: wrap;
}

.contact .row .contact-info {
  flex: 1 1 30rem;
  padding: 3rem 2rem;
  color: #fff;
}

.contact .row .contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact .row .contact-info p {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chat-section {
  flex: 1 1 50rem;
  padding: 2rem;
}

.chat-container {
  background-color: #fff;
  height: 300px;
  overflow-y: auto;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 5px;
}

.chat-message {
  background-color: #1d1d1d;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  border-radius: 5px;
}

.chat-message .name {
  font-weight: bold;
  color: var(--primary);
}

.chat-message .time {
  font-size: 0.8rem;
  color: #666;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group input,
.input-group textarea {
  padding: 0.8rem;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.submit-btn {
  padding: 0.8rem 2rem;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.submit-btn:hover {
  background-color: #876445;
}

.lokasi {
  margin: 20px 0;
  text-align: center;
}

.lokasi iframe {
  width: 100%;
  max-width: 600px;
  height: 450px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/*footer  */
footer {
  background-color: var(--primary);
  text-align: center;
  padding: 1rem 0 3rem;
  margin-top: 3rem;
}

footer .social {
  padding: 1rem 0;
}

footer .social a {
  color: #fff;
  margin: 1rem;
}

footer .social a:hover,
footer .links a:hover {
  color: var(--bg);
}

footer .links {
  margin-bottom: 1.2rem;
}

footer .links a {
  color: white;
  padding: 0.7rem 1rem;
}

footer .credit {
  font-size: 0.8rem;
}

footer .credit a {
  color: var(--bg);
  font-weight: 700;
}

/* modal box */
/* Item detail */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-container {
  position: relative;
  background-color: #fefefe;
  color: var(--bg);
  margin: 15% auto;
  padding: 1.2rem;
  border: 1px solid #666;
  width: 80%;
  animation: animatedModal 0.5s;
}

.modal-container .close-icon {
  position: absolute;
  right: 1rem;
}

.modal-content {
  display: flex;
  flex-wrap: nowrap;
}

.modal-content img {
  height: 20rem;
  margin-right: 2rem;
  margin-bottom: 2rem;
}

.modal-content p {
  font-size: 1.2rem;
  line-height: 1.8rem;
  margin-top: 1.2rem;
}

.modal-content a {
  display: flex;
  gap: 1rem;
  width: 12rem;
  background-color: var(--primary);
  color: #fff;
  margin-top: 1rem;
  padding: 1rem 1.6rem;
}

/* modal aniamtion */
@keyframes animatedModal {
  from {
    top: -30px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

/* Media Queries */

/* Laptop */
@media (max-width: 1366px) {
  html {
    font-size: 75%;
  }

  /* tablet */
  @media (max-width: 768px) {
    html {
      font-size: 62.5%;
    }
    #hamburger-menu {
      display: inline-block;
    }
    .navbar {
      padding: 1.4rem 4%;
    }

    .navbar-nav {
      position: absolute;
      top: 100%;
      right: -100%;
      background-color: #fff;
      width: 30rem;
      height: 100vh;
      transition: 0.3s;
    }

    .navbar-nav.active {
      right: 0;
    }

    .navbar-nav a {
      color: #010101;
      display: block;
      margin: 1.5rem;
      padding: 0.5rem;
      font-size: 2rem;
    }

    .navbar-nav a:hover {
      color: #b6895b;
    }

    .hero {
      height: 100vh; /* Ubah dari 80vh menjadi 100vh */
    }

    .hero .content h1 {
      font-size: 3rem;
    }

    .hero .content p {
      font-size: 1.7rem;
    }

    .hero .content a {
      padding: 0.8rem 2rem;
      font-size: 1.2rem;
    }
    .about .row {
      flex-wrap: wrap;
    }

    .about .row .about-img img {
      height: 24rem;
      object-fit: cover;
      object-position: center;
      mask-size: 35%;
    }

    .about .row .content {
      padding: 0;
    }

    .about .row .content h3 {
      margin-top: 1rem;
      font-size: 2rem;
    }

    .about .row .content p {
      font-size: 1.6rem;
    }

    .menu p {
      font-size: 1.2rem;
    }

    .modal-content {
      flex-wrap: wrap;
    }
  }

  /* smartphone */
  @media (max-width: 450px) {
    html {
      font-size: 55%;
    }

    .hero {
      height: 100vh; /* Ubah dari 70vh menjadi 100vh */
    }

    .hero .content h1 {
      font-size: 3rem;
    }

    .hero .content p {
      font-size: 1.3rem;
    }

    .hero .content a {
      padding: 0.7rem 1rem;
      font-size: 1rem;
    }
  }
}
