html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: white;
  font-family: "poppins", sans-serif;
}

/*navbar*/
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 7%;
  background-color: #645240;
  border-bottom: 1px solid black;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.navbar .navbar-logo img {
  height: 55px;
  width: auto;
}

.navbar-nav a {
  color: white;
  display: inline-block;
  font-size: 1.3rem;
  margin: 0 1rem;
  text-decoration: none;
}

.navbar-nav a:hover {
  color: #ffdf01;
}

.navbar-nav a::after {
  content: "";
  display: block;
  padding-bottom: 0.5rem;
  border-bottom: 0.1rem solid;
  color: #dabe00;
  transform: scaleX(0);
  transition: 0.2s linear;
}

.navbar .navbar-nav a:hover::after {
  transform: scaleX(0.5);
}

.navbar .navbar-extra a {
  color: white;
  margin: 0 0.5rem;
}

.navbar .navbar-extra a:hover {
  color: #ffdf01;
}

.navbar .navbar-extra i {
  font-size: 2rem;
}

#hamburger-menu {
  display: none;
}

/*shopping cart*/
#shopping-cart-button {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#shopping-cart-button .quantity-badge {
  position: absolute;
  top: -6px;
  right: -6px;

  min-width: 18px;
  padding: 2px 6px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: red;
  color: white;

  font-size: 12px;
  font-weight: bold;
  font-family: Arial, sans-serif;

  border-radius: 999px;
  line-height: normal;

  z-index: 9999;
}

.shopping-cart {
  position: absolute;
  top: 100%;
  right: -100%;
  height: 100vh;
  width: 35rem;
  padding: 0 1.5rem;
  background-color: rgb(190, 158, 101);
  color: #ffffff;
  transition: 0.3s;
}

.shopping-cart.active {
  right: 0;
}

.shopping-cart .cart-item {
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #333;
  position: relative;
  text-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
}

.shopping-cart img {
  height: 6rem;
  border-radius: 10%;
}

.shopping-cart h3 {
  font-size: 1.4rem;
  font-family: agbalumo;
}

.shopping-cart .item-price {
  font-size: 1.2rem;
  color: white;
}

.shopping-cart .cart-item #add,
.shopping-cart .cart-item #remove {
  display: inline-block;
  padding: 2px 5px;
  cursor: pointer;
  margin: 0 8px;
  background-color: #645240;
  color: #dabe00;
  font-weight: bold;
  font-size: 1.1rem;
}

.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: white;
  padding: 5px;
  font-size: 1rem;
  width: 70%;
}

.form-container .checkout-button {
  padding: 6px 14px;
  background-color: #645240;
  color: #dabe00;
  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;
  display: flex;
  align-items: center;
  background-image: url("../img/background3.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 1) 3%,
    rgba(255, 255, 255, 0) 25%
  );
  pointer-events: none;
}

.hero .content {
  padding: 1.4rem 7%;
  max-width: 60rem;
}

.hero .content h1 {
  font-size: 5rem;
  color: white;
  text-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
  margin-bottom: 0.5rem; /* ← kecilkan jarak ke p */
}

.hero .content p {
  color: white;
  text-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
  font-size: 1.6rem;
  margin-top: 0; /* ← hilangkan jarak default */
  line-height: 1.4;
  font-weight: 100;
}

.hero .content .cta {
  margin-top: 1rem;
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 1.4rem;
  color: #dabe00;
  background-color: #645240;
  border-radius: 0.5rem;
  box-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
  text-decoration: none;
}

/*menu roti*/
.roti {
  color: #645240;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem 5%;
}

.roti h2,
.contact h2 {
  font-family: agbalumo;
  text-align: center;
  font-size: 80px;
  margin-bottom: 1rem;
  color: #645240;
}

.roti .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.roti .product-card {
  text-align: center;
  border: 1px solid #666;
  padding: 2rem;
  box-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
}

.roti .product-icons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.roti .product-icons a {
  width: 4rem;
  height: 4rem;
  color: white;
  margin: 0.3rem;
  border: 1px solid white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #645240;
}

.roti .product-icons a:hover {
  background-color: #dabe00;
  border: 1px solid white;
}

.roti .product-image {
  padding: 1rem 0;
}

.roti .product-image img {
  height: 25rem;
}

.roti .product-content h3 {
  font-size: 2rem;
  font-family: agbalumo;
}

.roti .product-price {
  font-size: 1.3rem;
  font-weight: bold;
}

/*kontak*/
.contact {
  padding: 6rem 7%;
  text-align: center;
}

.contact p {
  max-width: 40rem;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.6;
}

.contact .row {
  display: block; /* HAPUS FLEX */
  margin-top: 2rem;
}

.contact .map {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 1rem;
}

/*qris*/
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* CARD / BOX */
.overlay-content {
  background: white;
  width: 350px;
  max-width: 90%;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* QR IMAGE */
.overlay-content img {
  width: 250px;
  margin: 15px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.overlay .bukti {
  padding: 6px 14px;
  background-color: #645240;
  color: #dabe00;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 20px;
  cursor: pointer;
}

.overlay .tutup {
  padding: 6px 14px;
  background-color: black;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 20px;
  cursor: pointer;
}

/* ANIMATION */
.overlay-content {
  animation: popup 0.3s ease;
}

@keyframes popup {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* WAJIB untuk Alpine */
[x-cloak] {
  display: none !important;
}

/*footer*/
footer {
  background-color: #645240;
  text-align: center;
  padding: 1rem 0;
  margin-top: 3rem;
}

footer .social {
  padding: 1rem 0;
}

footer .social a {
  color: white;
  margin: 0.5rem;
}

footer .social a:hover,
footer .links a:hover {
  color: #dabe00;
}

footer .links {
  margin-bottom: 0.5rem;
}

footer .links a {
  color: white;
  margin: 0.3rem;
  text-decoration: none;
}

footer .credit {
  font-size: 0.7rem;
  color: white;
}

/*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 .navbar-nav {
    position: absolute;
    top: 100%;
    right: -100%;
    background-color: #645240;
    width: 30rem;
    height: 100vh;
    transition: 0.3s;
  }

  .navbar .navbar-nav.active {
    right: 0;
  }

  .navbar .navbar-nav a {
    display: block;
    margin: 1.5rem;
    padding: 0.5rem;
    font-size: 2rem;
    line-height: 1;
  }

  .navbar .navbar-nav a::after {
    transform-origin: 0 0;
  }

  .navbar .navbar-nav a:hover:after {
    transform: scaleX(0.4);
  }
}

/*Mobile*/
@media (max-width: 450px) {
  html {
    font-size: 55%;
  }

  #hamburger-menu {
    display: inline-block;
  }

  .navbar .navbar-nav a {
    display: block;
    margin: 0.5rem 1rem;
    padding: 0.6rem 1rem;
    font-size: 2rem;
    line-height: 1;
  }

  .navbar .navbar-nav a::after {
    transform-origin: 0 0;
  }

  .navbar .navbar-nav a:hover:after {
    transform: scaleX(0.4);
  }
}
