:root {
  --primary: rgb(181, 0, 0);
  --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: #fff;
  min-height: 3000px;
}
/* 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 var(--primary);
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  right: 0;
}
.navbar .judul {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
}
.navbar .judul span {
  color: var(--primary);
}
.navbar .navbar-nav a {
  color: #fff;
  display: inline-block;
  margin: 0 1rem;
  font-size: 1.2rem;
}
.navbar .navbar-nav a:hover {
  color: var(--primary);
}
.navbar .navbar-nav a::after {
  content: "";
  display: block;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--primary);
  transform: scaleX(0);
  transition: 0.2s linear;
}
.navbar .navbar-nav a:hover::after {
  transform: scaleX(0.5);
}
.navbar .navbar-extra a {
  color: #fff;
  margin: 0 0.5rem;
}
.navbar .navbar-extra a:hover {
  color: var(--primary);
}
#hamburger-menu {
  display: none;
}
/* search start */
.navbar .search-form {
  position: absolute;
  top: 100%;
  right: 7%;
  background-color: white;
  width: 50rem;
  display: flex;
  flex-direction: column;
  transform: scaleY(0);
  transform-origin: top;
  transition: 0.3s;
  padding: 0;
}
.navbar .search-form.active {
  transform: scaleY(1);
}
.navbar .search-form .search-input-container {
  display: flex;
  align-items: center;
  padding: 0;
  height: 4rem;
}
.navbar .search-form input {
  height: 100%;
  width: 100%;
  font-size: 1.4rem;
  color: var(--bg);
  padding: 1rem;
  border: none;
}
.navbar .search-form label {
  cursor: pointer;
  font-size: 1rem;
  margin-right: 1.5rem;
  margin-top: 0.5rem;
  color: var(--bg);
}

/* Search Results Styling */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s;
  color: var(--bg);
}

.search-result-item:hover {
  background-color: #f5f5f5;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-content h4 {
  font-size: 14px;
  margin: 0;
  color: #333;
  font-weight: 500;
}

.search-result-content p {
  font-size: 12px;
  margin: 5px 0 0 0;
  color: var(--primary);
  font-weight: bold;
}

.search-result-item i {
  color: #999;
  font-size: 16px;
}

/* Highlight untuk item yang dicari */
.menu-card.highlight {
  animation: highlightPulse 2s ease-in-out;
  border: 2px solid var(--primary);
}

@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(181, 0, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(181, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(181, 0, 0, 0);
  }
}
.search-result-content .search-hint {
  font-size: 10px;
  color: #666;
  margin-top: 3px;
  display: block;
  font-style: italic;
}
/* Tambahkan di akhir file */
.search-highlight {
  animation: searchHighlight 3s ease-in-out;
  border: 3px solid var(--primary) !important;
  box-shadow: 0 0 30px rgba(181, 0, 0, 0.7) !important;
  transform: scale(1.02);
  transition: all 0.3s ease;
  z-index: 10;
  position: relative;
}

@keyframes searchHighlight {
  0% {
    box-shadow: 0 0 10px rgba(181, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(181, 0, 0, 0.9);
  }
  100% {
    box-shadow: 0 0 10px rgba(181, 0, 0, 0.3);
  }
}

/* Pastikan menu-card memiliki border yang bisa diubah */
.menu .row .menu-card {
  border: 1px solid #666;
  transition: all 0.3s ease;
}

/* 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;
  color: var(--bg);
  background-color: white;
  padding: 0 1.5rem;
  transition: 0.3s;
}
.shopping-cart.active {
  right: 0;
}
.shopping-cart .cart-item {
  margin: 2rem 0;
  display: flex;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #666;
  align-items: center;
  position: relative;
}
.shopping-cart h3 {
  font-size: 1.4rem;
}
.shopping-cart .item-price {
  font-size: 1.2rem;
}
.shopping-cart .cart-item #add,
.shopping-cart .cart-item #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 img {
  height: 4rem;
  border-radius: 50%;
}

.shopping-cart h4 {
  font-size: 1.6rem;
  margin-top: -1rem;
  text-align: center;
}
/* Checkout form */
.form-container {
  width: 100%;
  display: flex;
  justify-content: center;
  border-top: 1px dashed black;
  margin-top: 1rem;
  padding: 1rem;
}
.form-container h5 {
  text-align: center;
  font-size: 1rem;
}
.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;
}
.form-container .checkout-button.disabled {
  background-color: #999;
  cursor: not-allowed;
}
/* hero section */
.hero {
  min-height: 100vh;
  max-width: 100vw;
  display: flex;
  align-items: center;
  background-image: url(../img/nasgorHero.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 20%;
  bottom: 0;
  background: linear-gradient(0deg, rgba(1, 1, 3, 1) 8%, rgba(255, 255, 255, 0) 50%);
}
.hero .content {
  padding: 1.4rem 7%;
  max-width: 45rem;
}
.hero .content h1 {
  font-size: 4em;
  text-shadow: 1px 1px 4px var(--primary);
}
.hero .content h1 span {
  color: var(--primary);
  text-shadow: 1px 1px 4px #fff;
}
.hero .content p {
  font-size: 1.4rem;
  margin-top: 1rem;
  line-height: 1.6;
  font-weight: 100;
  text-shadow: 1px 1px 3px var(--primary);
  mix-blend-mode: difference;
}
.hero .content .cta {
  color: #fff;
  margin-top: 1rem;
  display: inline-block;
  padding: 1rem 3rem;
  background-color: var(--primary);
  font-size: 1.3rem;
  border-radius: 0.5rem;
  box-shadow: 1px 1px 3px #fff, -1px -1px 3px #fff;
}
/* about section */
.about,
.menu,
.contact {
  padding: 8rem 7% 1.4rem;
}
.about h2,
.menu h2,
.contact h2 {
  font-size: 2.6rem;
  text-align: center;
  margin-bottom: 3rem;
}
.about h2 span,
.menu h2 span,
.contact h2 span {
  color: var(--primary);
}
.about .row {
  display: flex;
}
.about .row .about-img {
  flex: 1 1 45rem;
}
.about .row .about-img img {
  width: 100%;
  border-radius: 2rem;
}
.about .row .content {
  justify-content: center;
  align-items: center;
  flex: 1 1 35rem;
  padding: 0 1rem;
}
.about .row .content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.about .row .content p {
  font-size: 1.4rem;
  margin-top: 1rem;
  line-height: 1.6;
  font-weight: 100;
  text-shadow: 1px 1px 3px var(--primary);
}

/* menu section */
.menu h2 {
  margin-bottom: 1rem;
}
.menu p,
.contact p {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 100;
  line-height: 1.6;
  margin: auto;
  max-width: 30rem;
}
.menu .row {
  display: flex;
  flex-wrap: wrap;
  margin-top: 4rem;
  gap: 1rem;
  justify-content: center;
}
.menu .row .menu-card {
  /* min-width: 20rem; */
  max-width: 20rem;
  text-align: center;
  padding-bottom: 4rem;
  border: 1px solid #666;
  padding: 2rem 2rem;
}
.menu .row .menu-card .menu-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  gap: 0.5rem;
}
.menu .row .menu-card .menu-icons a {
  color: white;
  width: 4rem;
  height: 4rem;
  border: 1px solid #666;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.menu .row .menu-card .menu-icons a:hover {
  background-color: var(--primary);
  border: 1px solid var(--primary);
}
.menu .row .menu-card img {
  border-radius: 50%;
  height: 16rem;
  width: 16rem;
}
.menu .row .menu-card .menu-content h3 {
  font-size: 1.6rem;
  margin: 1rem;
}
.menu .row .menu-card .menu-stars {
  padding: 0 1rem 1rem;
  color: var(--primary);
}

.menu .row .menu-card .menu-price {
  font-size: 1.4rem;
  font-weight: bold;
}

.menu .tombol {
  display: flex;
  justify-content: center;
}
.menu .tombol-show {
  margin-top: 2rem;
  cursor: pointer;
  padding: 1rem 2rem;
  border-radius: 2rem;
  background-color: var(--primary);
  color: white;
}
.menu .tombol-show:hover {
  background-color: #666;
}

/* contact section */
.contact .row {
  margin-top: 2rem;
  display: flex;
  background-color: #222;
}
.contact .row .map {
  flex: 1 1 45rem;
  width: 100%;
  object-fit: cover;
}
.contact .row form {
  flex: 1 1 45rem;
  padding: 5rem 2rem;
  text-align: center;
}
.contact .row form .input-group {
  display: flex;
  align-items: center;
  margin-top: 2rem;
  background-color: var(--bg);
  border: solid 1px #eee;
  padding-left: 2rem;
}
.contact .row form .input-group input,
.contact .row form .input-group textarea {
  width: 100%;
  padding: 2rem;
  font-size: 1.7rem;
  background: none;
  color: #fff;
}
.contact .row form .btn {
  margin-top: 3rem;
  padding: 1rem 3rem;
  font-size: 1.7rem;
  background-color: var(--primary);
  color: #fff;
  cursor: pointer;
}
/* footer  */
footer {
  background-color: var(--primary);
  text-align: center;
  padding: 1rem 0;
  margin-top: 3rem;
  padding-bottom: 3rem;
}
footer .socials {
  padding: 1rem 0;
  margin-bottom: 1rem;
}
footer .socials a {
  color: #fff;
  margin: 1rem;
}
footer .socials a:hover,
footer .links a:hover {
  color: var(--bg);
}
footer .links {
  margin-bottom: 1.4rem;
}
footer .links a {
  padding: 0.7rem 1rem;
  color: #fff;
}
footer .credit {
  font-size: 0.8rem;
}
footer .credit a {
  color: var(--bg);
  font-weight: 700;
}
/* modal menu */
.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.7);
}
.modal-container {
  position: relative;
  background-color: #fefefe;
  color: var(--bg);
  margin: 15% auto;
  padding: 1.2rem;
  border: 1px solid #666;
  width: 80%;
  animation: animateModal 0.5s;
}
/* modal animation */
@keyframes animateModal {
  from {
    top: -300px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}
.modal-container .close-icon {
  position: absolute;
  right: 1rem;
}
.modal-content {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
}
.modal-content h3 {
  font-size: 2rem;
}
.modal-content img {
  width: 350px;
  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;
}

/* media query untuk responsive web */
/* laptop */
@media (max-width: 1366px) {
  html {
    font-size: 80%;
  }
}
/* tablet */
@media (max-width: 768px) {
  html {
    font-size: 62.5%;
  }
  #hamburger-menu {
    display: inline-block;
  }
  /* navbar */
  .navbar .navbar-nav {
    position: absolute;
    right: -100%;
    top: 100%;
    height: 100vh;
    background-color: #fff;
    width: 30rem;
    transition: 0.3s;
  }
  .navbar .navbar-nav.active {
    right: 0;
  }
  .navbar .navbar-nav a {
    color: var(--bg);
    display: block;
    margin: 2rem;
    padding: 8px;
    font-size: 2rem;
  }
  .navbar .navbar-nav a::after {
    transform-origin: 0 0;
  }

  .navbar .navbar-nav a:hover::after {
    transform: scaleX(0.2);
  }
  .navbar .search-form {
    width: 90%;
    right: 5%;
  }

  .search-results {
    max-height: 300px;
  }

  .search-result-item {
    padding: 10px;
  }

  .search-result-content h4 {
    font-size: 13px;
  }
  /* about */
  .about .row {
    flex-wrap: wrap;
  }
  .about .row .about-img img {
    height: 24rem;
    object-fit: cover;
    object-position: center;
  }
  .about .row .content {
    padding: 0;
  }

  .menu .row {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom */
    gap: 1rem; /* jarak antar card */
    justify-items: center;
  }

  .menu .row .menu-card {
    width: 100%;
    max-width: 18rem;
    padding: 1.5rem;
  }

  .menu .row .menu-card img {
    width: 10rem;
    height: 10rem;
  }

  .menu .row .menu-card .menu-content h3 {
    font-size: 1.2rem;
  }

  .menu .row .menu-card .menu-price {
    font-size: 1rem;
  }
}

/* contact */
.contact h2 {
  margin-bottom: 1rem;
}
.contact .row {
  flex-wrap: wrap;
}
.contact .row .map {
  height: 30rem;
}
.contact .row form {
  padding-top: 0;
}
/* modal */

.modal-container {
  padding: 0rem;
}
.modal-container .close-icon {
  position: absolute;
  right: 0.2rem;
}
.modal-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.modal-content img {
  margin-top: 2rem;
  max-width: 100%;
  margin-right: 0;
}
.modal-content .product-content {
  margin-left: 0;
}
.modal-content h3 {
  text-align: center;
}
.modal-content a {
  width: 100%;
  display: flex;
  justify-content: center;
}
.modal-content .product-price {
  color: black;
  width: 100%;
  text-align: center;
  font-weight: bold;
  font-size: 1.6rem;
}

/* hp */
@media (max-width: 480px) {
  html {
    font-size: 55%;
  }
  /* untuk hp kecil banget (misalnya <480px) tetap 2 kolom tapi ukuran card lebih kecil */

  .menu .row {
    padding: 1rem;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .menu .row .menu-card {
    max-width: 15rem;
    padding: 1rem;
  }
  .menu .row .menu-icons,
  .row .menu-image,
  .row .menu-content,
  .row .menu-price {
    max-width: 12rem;
  }
  .menu .row .menu-card .menu-icons svg {
    width: 2rem;
    height: 2rem;
  }

  .menu .row .menu-card img {
    width: 10rem;
    height: 10rem;
  }

  .menu .row .menu-card .menu-content h3 {
    font-size: 1rem;
  }
  .menu .row .menu-card .menu-content .menu-stars svg {
    width: 1.5rem;
    height: 1.5rem;
  }

  .menu .row .menu-card .menu-price {
    font-size: 0.9rem;
  }
}
