:root {
  --primary: #0565e3;
  --bg: #fafafa;
  --text-main: #2d2d2d;
}

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

html {
  scroll-behavior: smooth; /* Membuat transisi antar section jadi halus */
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text-main);
  background-color: var(--bg);
}

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

.navbar .navbar-logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #010101;
  font-style: italic;
  white-space: nowrap;
}

.navbar .navbar-logo span {
  color: var(--primary);
}

.navbar .navbar-nav a {
  color: #2d2d2d;
  display: inline-block;
  font-size: 1.2rem;
  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 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .navbar-extra a {
  color: #010101;
  margin: 0 0.3rem;
  display: flex;
  align-items: center;
}

.navbar .navbar-extra a:hover {
  color: var(--primary);
}

/* Akun Dropdown */
.akun-dropdown {
  position: relative;
}

.akun-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 0.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 16rem;
  overflow: hidden;
  z-index: 9999;
}

.akun-menu.active {
  display: block;
}

.akun-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  color: #2d2d2d;
  font-size: 1.1rem;
  transition: 0.2s;
}

.akun-menu a:hover {
  background: #fff0f8;
  color: var(--primary);
}

#hamburger-menu {
  display: none;
}

/* Navbar Search form */
.navbar .search-form {
  position: absolute;
  top: 100%;
  right: 7%;
  background-color: var(--bg);
  width: 30rem;
  height: 3rem;
  display: flex;
  align-items: center;
  transform: scaleY(0);
  transform-origin: top;
  transition: 0.3s;
}

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

.navbar .search-form #search-box {
  height: 100%;
  width: 100%;
  font-size: 2.5rem;
  background-color: var(--bg);
  color: var(--text-main);
  padding: 1rem;
}

.navbar .search-form label {
  cursor: pointer;
  font-size: 2rem;
  margin-left: 1.5rem;
  color: var(--text-main);
}

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

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

.shopping-cart {
  position: absolute;
  top: 100%;
  right: -100%;
  height: 100vh;
  width: 35rem;
  padding: 0 1.5rem;
  background-color: #fff;
  color: var(--primary);
  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 #666;
  position: relative;
}

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

.shopping-cart h3 {
  font-size: 1.4rem;
  color: var(--text-main);
}

.shopping-cart .item-price {
  font-size: 1.2rem;
  color: var(--text-main);
}

.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 .remove-item {
  position: absolute;
  right: 1rem;
  cursor: pointer;
  color: var(--text-main);
}
.shopping-cart .remove-item:hover {
  color: var(--primary);
} */

.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: var(--primary);
  color: var(--text-main);
  padding: 5px;
  font-size: 1rem;
  width: 70%;
}

.form-container .checkout-button {
  padding: 6px 14px;
  background-color: var(--primary);
  color: #fff;
  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;
  margin-top: 5.6rem;
  position: relative;
}

.hero::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 5%;
  bottom: 0;
  background: linear-gradient(
    0deg,
    rgba(250, 250, 250, 1) 0%,
    rgba(250, 250, 250, 0) 100%
  );
}

.hero .content {
  padding: 1.4rem 7%;
  max-width: 60rem;
}

.hero .content h1 {
  font-size: 3rem;
  color: #2d2d2d;
  text-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
  line-height: 1.2;
}

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

.hero .content p {
  color: #bebebe;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.4rem;
  margin-top: 1rem;
  line-height: 1.4;
  font-weight: 400;
  text-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
  mix-blend-mode: difference;
}

.hero .content .cta {
  margin-top: 1rem;
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 1.4rem;
  color: var(--bg);
  background-color: var(--primary);
  border-radius: 0.5rem;
  box-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);
}

.hero .content .cta:hover {
  color: var(--text-main);
}

/* About, Products, and Contact Section */
.about,
.products,
.contact {
  padding: 8rem 7% 1.4rem;
}

.about h2,
.products h2,
.contact h2 {
  color: #2d2d2d;
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 3rem;
}

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

.about .row {
  display: flex;
}

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

.about .row .about-img img {
  width: 100%;
}

.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: 400;
  line-height: 2.1;
}

/* products Section */
.products p {
  text-align: center;
}

.products .row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* kalau ukuran nya udah lebih kecil dari 30 rem bikin jadi 1 kolom dan kalau lebih besar bikin jadi kolom semuat nya */
  gap: 1.5rem;
  margin-top: 4rem;
}

.products .product-card {
  text-align: center;
  border: 1px solid var(--primary);
  padding: 2rem;
}

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

.products .product-icons a {
  width: 4rem;
  height: 4rem;
  color: #101010;
  border: 1px solid var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.products .product-icons a:hover {
  background-color: #1A6FB5;
  border: 1px solid var(--primary);
}

.products .product-image {
  padding: 1rem 0;
}

.products .product-image img {
  height: 25rem;
}

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

/* ini hanya akan color outline saja */
.products .product-stars,
.modal-satu .product-stars,
.modal-dua .product-stars,
.modal-tiga .product-stars,
.modal-empat .product-stars,
.modal-lima .product-stars,
.modal-enam .product-stars {
  font-size: 1.7rem;
  padding: 0.8rem;
  color: var(--primary);
}

/* karena svg jadi harus pake fill bisa full berubah warna */
.products .product-stars .star-full,
.modal-satu .product-stars .star-full,
.modal-dua .product-stars .star-full,
.modal-tiga .product-stars .star-full,
.modal-empat .product-stars .star-full,
.modal-lima .product-stars .star-full,
.modal-enam .product-stars .star-full {
  fill: var(--primary);
}

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

/* Contact Section */
.contact h2 {
  margin-bottom: 1rem;
}

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

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

.contact .row .map {
  flex: 1 1 45rem;
  width: 100%;
  object-fit: cover;
}

.contact .row form,
.contact .row .contact-form {
  flex: 1 1 45rem;
  padding: 5rem 2rem;
  text-align: center;
}

.contact .row form .input-group,
.contact .row .contact-form .input-group {
  display: flex;
  align-items: center;
  margin-top: 2rem;
  background-color: #fff;
  border: 1 solid #eee;
  padding-left: 0.5rem;
}

.contact .row .contact-form .input-group input {
    padding-left: 0.5rem;
}

.contact .row form .btn,
.contact .row .contact-form .btn {
  margin-top: 3rem;
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 1.7rem;
  color: var(--bg);
  background-color: var(--primary);
  cursor: pointer;
}

.contact .row form .btn:hover,
.contact .row .contact-form .btn:hover {
  color: var(--text-main);
}

.contact .row .contact-form .input-group textarea {
  display: block;
  width: 100%;
  padding: 2rem;
  font-size: 1.7rem;
  background: none;
  color: #010101;
  font-family: 'Poppins', sans-serif;
  resize: vertical;
  border: none;
  outline: none;
}

/* 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: var(--bg);
  margin: 1rem;
}

footer .socials a:hover,
footer .links a:hover {
  color: var(--text-main);
}

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

footer .links a {
  color: var(--bg);
  padding: 0.7rem 1rem;
}

footer .credit {
  font-size: 0.8rem;
  color: var(--bg);
}

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

/* Modal Box */
.modal-produk {
  position: fixed;
  z-index: 9998;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6rem 1rem 3rem;
  pointer-events: none; /* overlay tidak blokir scroll body */
}

.modal-container {
  position: relative;
  background-color: var(--bg);
  color: var(--text-main);
  border-radius: 1.2rem;
  border: 1px solid #ddd;
  width: 100%;
  max-width: 52rem;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: animateModal 0.3s ease;
  padding: 0;
  pointer-events: auto;
}

@keyframes animateModal {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-container .close-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  color: var(--text-main);
  cursor: pointer;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: 0.2s;
}

.modal-container .close-icon:hover {
  background-color: #1A6FB5;
  color: var(--primary);
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.modal-content .product-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.modal-content .product-content h3 {
  font-size: 1.8rem;
  color: var(--text-main);
}

.modal-content p {
  font-size: 1.2rem;
  line-height: 1.8rem;
  color: #666;
}

.modal-content .product-stars {
  display: flex;
  gap: 0.3rem;
  padding: 0;
}

.modal-content .product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-main);
}

.modal-content a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: fit-content;
  background-color: var(--primary);
  color: #fff;
  padding: 0.8rem 1.6rem;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  transition: 0.2s;
}

.modal-content a:hover {
  background-color: #1A6FB5;
}

/* ===========================
   Ulasan / Testimonial Section
   =========================== */

.ulasan {
  padding: 8rem 7% 4rem;
}

.ulasan h2 {
  color: #2d2d2d;
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

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

.ulasan > p {
  text-align: center;
  font-size: 1.2rem;
  color: #999;
  font-weight: 400;
  margin-bottom: 4rem;
}

.ulasan-slider {
  position: relative;
  overflow: hidden;
  max-width: 70rem;
  margin: 0 auto;
}

.ulasan-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ulasan-card {
  min-width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.ulasan-inner {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 1.2rem;
  padding: 3rem;
  box-shadow: 0 4px 24px rgba(43, 143, 216, 0.07);
}

.ulasan-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.ulasan-avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ulasan-info {
  flex: 1;
}

.ulasan-nama {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2d2d2d;
  margin-bottom: 0.3rem;
}

.ulasan-produk {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
}

.ulasan-stars {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
}

.ulasan-komentar {
  font-size: 1.4rem;
  color: #555;
  line-height: 1.8;
  font-style: italic;
  font-weight: 400;
}

.ulasan-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2d2d2d;
  transition: 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.ulasan-nav:hover {
  background: #1A6FB5;
  border-color: var(--primary);
  color: #fff;
}

.ulasan-prev {
  left: -2rem;
}
.ulasan-next {
  right: -2rem;
}

.ulasan-dots {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2.5rem;
}

.ulasan-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: none;
  background: #ddd;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.ulasan-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* ===========================
   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: #fff;
    width: 30rem;
    height: 100vh;
    transition: 0.3s;
  }

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

  .navbar .navbar-nav a {
    color: #010101;
    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);
  }
  .navbar .search-form {
    width: 90%;
    right: 2rem;
  }

  .hero {
    min-height: auto;
  }
  .hero .content h1 {
    padding-right: 25rem;
  }
  .hero .content p {
    padding-right: 31rem;
  }

  .about .row {
    flex-wrap: wrap;
  }
  .about .row .about-img img {
    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.5rem;
  }

  p {
    font-size: 1.5rem;
  }

  .contact .row {
    flex-wrap: wrap;
  }
  .contact .row .map {
    height: 30rem;
  }
  .contact .row form {
    padding-top: 0;
  }
  
  .products .row {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Ulasan */
  .ulasan-inner {
    padding: 2rem;
  }
  .ulasan-prev {
    left: -1rem;
  }
  .ulasan-next {
    right: -1rem;
  }
  .ulasan-nama {
    font-size: 1.4rem;
  }
  .ulasan-komentar {
    font-size: 1.3rem;
  }

  /* Modal tablet */
  .modal-produk {
    padding: 2rem 1rem;
    align-items: center;
    pointer-events: none;
  }

  .modal-container {
    width: 92%;
    max-width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    pointer-events: auto;
  }
}

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

  .hero {
    min-height: auto;
  }

  .hero .content h1 {
    padding-right: 0;
    font-size: 3.5rem;
    padding-top: 5rem;
    text-align: center;
  }

  .hero .content p {
    padding-right: 0;
    font-size: 2.5rem;
    padding-top: 3rem;
    text-align: center;
  }

  .hero .content .cta {
    font-size: 2.5rem;
    margin-top: 3.5rem;
    margin-left: 8.5rem;
    margin-bottom: 49rem;
  }
  
  .products .row {
    grid-template-columns: 1fr;
  }

  /* Ulasan */
  .ulasan-nav {
    display: none;
  }
  .ulasan-card {
    padding: 0;
  }
  .ulasan-inner {
    padding: 1.8rem;
  }

  /* Modal mobile — muncul dari bawah */
  .modal-produk {
    padding: 5rem 1rem 2rem;
    align-items: center;
    pointer-events: none;
  }

  .modal-container {
    width: 94%;
    max-width: 94%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 1.2rem;
    margin: auto;
    animation: animateModal 0.3s ease;
    pointer-events: auto;
  }
}
