:root {
  --primary: #b6895b;
  --bg: #010101;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  border: none;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
}

/* 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 #5c4228;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.navbar .navbar-logo {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  font-style: italic;
}

.navbar .navbar-logo span {
  color: var(--primary);
}

.navbar .navbar-nav a {
  color: #fff;
  display: inline-block;
  font-size: 1.3rem;
  margin: 0 1rem;
}

.navbar .navbar-nav a:hover {
  color: var(--primary);
}

.navbar .navbar-nav a::after {
  content: "";
  display: block;
  padding-bottom: 0.5rem;
  border-bottom: 0.1rem 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,
.navbar .navbar-extra button:hover {
  color: var(--primary);
}

#hamburger-menu {
  display: none;
}

/* body */
body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg);
  color: #fff;
}

/* hero section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-image: url("../img/bg.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    0deg,
    rgba(1, 1, 3, 1) 3%,
    rgba(255, 255, 255, 0) 25%
  );
}

.hero .content {
  padding: 1.4rem 7%;
  max-width: 60rem;
}

.hero .content h1 {
  font-size: 7em;
  color: #fff;
  text-shadow: 5px 5px 7px rgba(3, 3, 5, 1);
  text-align: var(--bg);
  line-height: 1;
}

.hero .content span {
  color: var(--primary);
}

.hero .content h3 {
  font-size: 4rem;
  color: #fff;
  text-shadow: 5px 5px 7px rgba(3, 3, 5, 1);
  text-align: var(--bg);
}

.hero .content p {
  font-size: 1rem;
  color: #fff;
  text-shadow: 5px 5px 7px rgba(1, 1, 2, 1);
  text-align: var(--bg);
  line-height: 0.1;
}

/* product */
.product h2,
.contact h2,
.product-pintu h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 1rem;
}
.product h2 span,
.contact h2 span,
.product-pintu h2 span {
  color: var(--primary);
}

.product,
.contact,
.product-pintu {
  padding: 1rem 7% 1.4rem;
}

.product-jendela {
  padding: 1rem 7% 1.4rem;
  margin-top: 4rem;
}

.product-pintu,
.product-jendela {
  align-items: center;
  display: flex;
  justify-content: center;
  padding-bottom: 1rem;
  padding: auto 0 1.4rem;
}

.product-pintu .row,
.product-jendela .row {
  display: flex;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.product-pintu .row .image-section,
.product-jendela .row .image-section {
  flex: 1;
  padding: 0;
  align-items: right;
}

.product-pintu .row .image-section img,
.product-jendela .row .image-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-pintu .row .info-section,
.product-jendela .row .info-section {
  flex: 1;
  padding: 1rem;
}

.product-pintu .row .info-section h2,
.product-jendela .row .info-section h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.product-pintu .row .info-section form,
.product-jendela .row .info-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.product-pintu .row .info-section form p {
  font-size: 2rem;
}

.product-jendela .row .info-section form p {
  font-size: 2rem;
  text-align: right;
}

.product-pintu .row .info-section form select, 
.product-pintu .row .info-section form input {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.product-jendela .row .info-section form select, 
.product-jendela .row .info-section form input {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: right;
}

.product-pintu .row .info-section form button,
.product-jendela .row .info-section form button {
  padding: 12px;
  font-size: 1em;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.product-pintu .row .info-section form button:hover,
.product-jendela .row .info-section form button:hover {
  background-color: #3a1f03;
}

#input-lubang,
#input-gendong {
  display: none; /* Sembunyikan semua input dinamis di awal */
}

.input-group {
  padding: 10px;
  border: 1px dashed #ddd;
  border-radius: 4px;
  margin-top: 5px;
}
.input-group label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 10px;
  position: relative;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 15px;
  top: 10px;
}
.close:hover {
  color: black;
}
#gambar-kusen {
  width: 100%;
  max-width: 300px;
  margin: 10px auto;
  display: block;
  border-radius: 5px;
}
#hasil-estimasi {
  margin-top: 20px;
  padding: 15px;
  background-color: #f0f8ff;
  border-radius: 5px;
}
#hasil-estimasi p {
  margin: 5px 0;
}

/* Style Modal */
.modal {
  display: none; /* awalnya disembunyikan */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Konten Modal */
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 400px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
}

.modal h3 {
  margin: 10px 0;
  color: #333;
}

.modal p {
  color: #010101;
  font-size: 16px;
  margin: 10px 0;
}

/* Tombol Keranjang */
.btn-keranjang {
  background: #28a745;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-keranjang:hover {
  background: #1e7e34;
}

/* Tombol close (X) */
.close {
  color: #aaa;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: black;
}

/* Contact Section */
.contact .row {
  display: flex;
  margin-top: 2rem;
  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: 1px solid #eee;
  padding-left: 2rem;
}

.contact .row form .input-group input {
  width: 100%;
  padding: 2rem;
  font-size: 1.7rem;
  background: none;
  color: #fff;
}

.contact .row form .btn {
  margin-top: 3rem;
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 1.7rem;
  color: #fff;
  background-color: var(--primary);
  cursor: pointer;
}

/* footer */

footer {
  background-color: var(--primary);
  text-align: center;
  padding: 1rem 0 3rem;
  margin-top: 3rem;
}

footer .socials {
  padding: 1rem 0;
}

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 {
  color: #fff;
  padding: 0.7rem 1rem;
}

footer .credit {
  font-size: 0.8rem;
}

footer .credit a {
  color: var(--bg);
  font-weight: 700;
}

/* media queries */
/* Leptop */
@media (max-width: 1366px) {
  html {
    font-size: 75%;
  }
}
/* tablet */
@media (max-width: 768px) {
  html {
    font-size: 62.5%;
  }

  #hamburger-menu {
    display: inline-block;
  }

  .navbar-nav {
    position: absolute;
    top: 100%;
    right: -100%;
    background-color: #fff;
    width: 30rem;
    height: 100vh;
    transition: 0.3s;
  }

  .navbar .navbar-logo {
    font-size: 1rem;
  }

  .navbar .navbar-nav.active {
    right: 0;
  }

  .navbar .navbar-nav a {
    color: var(--bg);
    display: block;
    margin: 1.5rem;
    padding: 0.5rem;
    font-size: 2rem;
  }

  .navbar .navbar-nav a::after {
    transform-origin: 0 0;
  }

  .navbar .navbar-nav a:hover::after {
    transform: scaleX(0.2);
  }

  .hero {
    min-height: 40vh;
  }

  .hero::after {
    height: 40vh;
  }

  .hero .content {
    max-width: 100%;
    margin-top: 5rem;
  }

  .hero .content h1 {
    font-size: 3rem;
    color: #fff;
    text-shadow: 5px 5px 7px rgba(3, 3, 5, 1);
    text-align: var(--bg);
    line-height: 1;
  }

  .hero .content h3 {
    font-size: 2rem;
    color: #fff;
    text-shadow: 5px 5px 7px rgba(3, 3, 5, 1);
    text-align: var(--bg);
  }

  .hero .content p {
    font-size: 0.5rem;
    color: #fff;
    text-shadow: 5px 5px 7px rgba(1, 1, 2, 1);
    text-align: var(--bg);
    line-height: 0.1;
  }

  .about .row,
  .product .row,
  .product .card {
    flex-wrap: wrap;
  }

  .about .row .about-img img {
    height: 24rem;
    object-fit: cover;
    object-position: center;
  }

  .about .row .content {
    padding: 0;
  }

  .about .row .content h3 {
    margin-top: 1rem;
    font-size: 2rem;
  }

  .about .row .content p {
    font-size: 1.6rem;
  }

  .product-pintu .row .info-section form,
  .product-jendela .row .info-section form {
    gap: 0.5rem;
  }

  .product-pintu .row .info-section form p,
  .product-jendela .row .info-section form p {
    font-size: 1rem;
    padding: 0;
  }

  .product-pintu .row .info-section form input,
  .product-pintu .row .info-section form select,
  .product-pintu .row .info-section form button,
  .product-jendela .row .info-section form input,
  .product-jendela .row .info-section form select,
  .product-jendela .row .info-section form button {
    padding: 5px;
    font-size: 1rem;
    border-radius: 6px;
  }

  .contact .row {
    flex-wrap: wrap;
  }

  .contact .row .map {
    height: 30rem;
  }

  .contact .row form {
    padding-top: 0;
  }
}

/* phone */
@media (max-width: 450px) {
  html {
    font-size: 55%;
  }
}
