/* =================== RESET & LAYOUT DASAR =================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 14px;
  background-color: #ffffff;
  color: #222;
  line-height: 1.6;
}

.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-container > footer {
  margin-top: auto;
  background-color: #9d0000;
  color: white;
  text-align: center;
  padding: 12px 20px;
  font-size: 14px;
  border-top: 1px solid #ddd;
}

body {
  padding-top: 80px;
  justify-content: center;
}

/* =================== HEADER =================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 32px;
  background-color: #e2e2e2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 50px;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 10;
  font-size: 14px;
  font-weight: bold;
  color: #e60000;
  justify-content: center;
}

.logo img {
  display: block;
  height: 50px;
}

/* =================== NAVIGASI =================== */
.Navigasi {
  display: flex;
  justify-content: center;
  background-color: #9d0000;
  border-radius: 5px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.0888);
}

.Sub-Navigasi {
  list-style-type: none;
  display: flex;
  gap: 4px;
}

.Sub-Navigasi > li {
  position: relative;
}

.Sub-Navigasi a {
  color: white;
  font-weight: bold;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s;
}

.Sub-Navigasi a:hover {
  background-color: white;
  color: black;
}

.Sub-Kategori {
  display: none;
  position: absolute;
  top: 105%;
  left: 0;
  background-color: #ecf0f1;
  min-width: 190px;
  z-index: 1;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  list-style: none;
}

.Sub-Kategori li {
  border-bottom: 1px solid #ccc;
}

.Sub-Kategori li:last-child {
  border-bottom: none;
}

.Sub-Kategori a {
  color: #2c3e50;
  padding: 10px 16px;
  text-decoration: none;
}

.Sub-Kategori a:hover {
  background-color: #9d0000;
  color: white;
}



/* Desktop: tampil saat hover */
@media (min-width: 768px) {
  .Menu-Kategori:hover .Sub-Kategori {
    display: block;
    margin-bottom: 100px;
  }
}


/* =================== SEARCH BOX =================== */
.search-box {
  background: #eee;
  width: 550px;
  border-radius: 5px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
}

.search-box input[type="search"] {
  border: none;
  background: transparent;
  outline: none;
  padding: 5px 10px;
  width: 100%;
}

/* =================== HEADER NAV & BUTTON =================== */
.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.Keranjang-Button {
  padding: 8px 15px;
  background-color: #9d0000;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.Keranjang-Button:hover {
  background-color: white;
  color: #222;
}

.cart-icon {
  width: 20px;
  height: 20px;
  fill: white;
  transition: fill 0.3s ease;
}

.cart-icon:hover {
  fill: #222;
}

.Register-Login-Button a {
  padding: 10px 16px;
  background-color: #9d0000;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.Register-Login-Button a:hover {
  background-color: #ffffff;
  color: #222;
}

/* =================== MODAL LOGIN & REGISTER =================== */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fff;
  margin: 6% auto;
  padding: 30px;
  border-radius: 10px;
  width: 380px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.3);
  position: relative;
  transition: width 0.3s ease;
}

.modal-content.register-active {
  width: 500px;
}

.close {
  position: absolute;
  top: 1px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: #9d0000;
}

.tab-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  cursor: pointer;
  background-color: #f1f1f1;
  border: none;
  font-weight: bold;
}

.tab-btn.active {
  background-color: #9d0000;
  color: white;
}

.tab-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  height: 0;
  overflow: hidden;
  display: none;  
}

.tab-content.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  height: auto;
  display: block;
}

.modal-content form {
  display: flex;
  flex-direction: column;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  padding: 8px;
  margin: 8px 0 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
  resize: none;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  border-color: #9d0000;
  outline: none;
}

.btn-cancel, .btn-submit {
  padding: 10px;
  background-color: #9d0000;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.btn-cancel {
  background-color: #9d0000;
}

.btn-cancel:hover, .btn-submit:hover {
  background-color: #117a65;
}

.btn-submit:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.form-group {
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 1px;
  color: #333;
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;  
}

.form-row .form-group {
  flex: 1;
  min-width: 48%;
}

.login-link a {
  text-decoration: none;
  color: #9d0000;
}

.login-link a:hover {
  color: #117a65;
}

/* =================== BANNER =================== */
.Benner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1px; /* Atur jarak antara teks dan carousel */
  padding: 50px;
  background: linear-gradient(to right, #9d0000, #ff0000);
  color: white;
  flex-wrap: wrap;

  /* ✅ tambahkan ini */
  overflow: visible;
}


.Benner .text {
  max-width: 500px;
  margin-right: 20px; /* Tambahan opsional */
  
}

.Benner h1 {
  font-size: 32px;
  margin-bottom: 16px;
  
}

.Benner p {
  font-size: 18px;
  line-height: 1.6;
}

.Benner img {
  width: 400px;
  height: auto;
}

.product-section h1 {
  padding-left: 20px;
  padding-top: 10px;
}

/* SLIDESHOW */
/* Pusatkan carousel */
.carousel-container {
  width: 50%;
  display: flex;
  justify-content: right;
  align-items: center;
  overflow: visible; /* penting agar bayangan terlihat */
}

/* Ukuran dan animasi carousel */
.container {
  position: relative;
  width: 110px;       /* cukup besar agar tidak terjepit */
  height: 200px;      /* ditambah agar gambar tidak terpotong */
  transform-style: preserve-3d;
  animation: animate 60s linear infinite;
}

@keyframes animate {
  0% {
    transform: perspective(1000px) rotateY(0deg);
  }
  100% {
    transform: perspective(1000px) rotateY(360deg);
  }
}

/* Posisi tiap slide */
.container span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--i)* 45deg)) translateZ(250px);
  -webkit-box-reflect: below -57px linear-gradient(transparent ,transparent 65%,#0007);
}


/* Gambar dalam slide */
.container span img {
  width: 100%;
  height: 100%;
  object-fit: contain;     /* tampil penuh tanpa terpotong */
  border-radius: 8px;      /* lembutkan sudut */  
}

/* =================== PRODUK =================== */
.daftar-produk {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  padding: 20px;
}

.card-produk {
  width: 280px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 16px;
  box-sizing: border-box;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;     /* penting untuk hilangkan underline */
  color: #222;               /* ubah warna teks menjadi hitam */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.card-produk:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-produk img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.card-produk h3 {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 8px;
  color: #000;
  text-decoration: none;
}

.tabel-produk-info {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
  text-decoration: none;
}

.tabel-produk-info th {
  text-align: left;
  vertical-align: top;
  padding-right: 8px;
  font-weight: bold;
  width: 80px;
}

.tabel-produk-info td {
  text-align: left;
  vertical-align: top;
  text-decoration: none
}

.tabel-produk-info a {
  text-decoration: none;
  color: #222;
}

.tabel-produk-info a:hover {
  color: #9d0000;
}

.card-link {
  text-decoration: none;
  color: #222;
}

.harga-produk {
  color: #9d0000; /* Merah elegan */
  font-size: 1.2em; /* Sedikit lebih besar */
  justify-items: center;
}


/* =================== FOOTER =================== */
footer {
  background-color: #9d0000;
  color: white;
  padding: 18px;
  text-align: center;
  font-size: 14px;
}

.footer-detail {
  max-width: 100%;   /* atau 1100px, sesuaikan */
  margin:  auto;
  padding: 10px 20px;
  background-color: #ebe9e9;
  position: relative;
}


/* =================== RESPONSIVE UNTUK MOBILE =================== */
@media (max-width: 768px) {
  /* Header */
  .header {
    flex-direction: column;
    padding: 8px 5px;
    gap: 10px;
  }

  .header-center {
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    align-content: center;
  }
  
  .header-nav {
      gap: 4px;
      height: 40px;
  }

  .logo img {
    height: 40px;
  }

.modal {
  display: none;
  justify-content: center; /* Center horizontal */
  align-items: flex-start;     /* Center vertical */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  overflow-y: auto;
  margin-top: auto;
  padding: 0px 20px 0px 20px; /* biar ada jarak di layar kecil */
  padding-top: 0px;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 7px;
  width: auto;
  max-width: 100%; /* Biar nggak terlalu lebar */
  box-shadow: 0 5px 10px rgba(0,0,0,0.3);
  position: relative;
  margin: auto; /* pastikan auto center */
}

.form-group {
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-row {
  flex: 2;
  max-width: 100%;
  gap: 5px;
}

.modal-content input, .modal-content select, .modal-content textarea {
    padding: 10px;
    margin: 8px 0 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    resize: none;
}


.tab-buttons {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  margin-bottom: 12px;
  width: 100%;
}

  .modal-content {
    margin-top: 210px;
    padding: 8px;
    width: 100%;
    max-width: 370px;
  }
  
  .modal-content.register-active {
      width: 100%;
      margin-bottom: 150px;
  }

.close {
  position: absolute;
  top: -5px;
  right: 6px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
}

  /* Banner */
  .Benner {
    flex-direction: column;
    padding: 0px 0px;
    text-align: center;
    margin-top: 80px;
  }

  .Benner .text {
    max-width: 100%;
    margin: 0 0 4px 0;
    order: 1; /* pastikan teks tampil dulu */
  }

  .Benner h1 {
    font-size: 24px;
    margin-bottom: 0;
  }

  .Benner p {
    font-size: 14px;
  }

  .carousel-container {
    width: 50%;
    justify-content: center;
    margin-bottom: 15px;
    order: 2; /* pastikan teks tampil dulu */
  }

  .container span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--i)* 45deg)) translateZ(140px);
  -webkit-box-reflect: below -57px linear-gradient(transparent ,transparent 65%,#0007);
}

  .container {
    width: 80px;
    height: 150px;
  }

  /* Produk */
  .product-section h1 {
    font-size: 14px;
    padding: 8px 0px 0px 8px;
  }

  .card-link h3 {
    font-size: 12px;
    padding: 0px;
    margin: 0;
  }

  .harga-produk {    
    font-size: 12px;
  }

  .tabel-produk-info {
    font-size: 12px;
  }

  .tabel-produk-info th {
    width: 10px;
    color: #117a65;
  }

  .daftar-produk {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 5px;
  }

  .card-produk {
    width: 100%; /* satu kolom di HP */
    padding: 4px;
    height: 250px;
    overflow-y: auto;
  }

  .card-produk img {
    height: 140px;
    margin-bottom: 0px;
  }

  /* Footer */
  footer {
    font-size: 12px;
    padding: 12px;
  }
}

/* === SUB MENU KATEGORI MOBILE & TABLET === */
@media (max-width: 768px) {
      .Menu-Kategori {
    position: relative;
  }
    

  .Menu-Kategori > .Sub-Kategori {
    display: none;
    position: static !important;  /* override paksa absolute */
    width: 100% !important;
    margin: 5px 0px 0px 0px;
    padding: 0;
    list-style: none;
    border: 1px solid #ccc;
    border-radius: 0 0 8px 8px;
    box-shadow: none;
    background: #fff;
  }




  .Sub-Kategori > li {
  border-bottom: none
}
}


/* Tampilkan hanya di mobile & tablet */
@media (max-width: 991px) {
    
  .search-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    max-width: 43%;
    order: 1;    
  }

.search-box {
  background: #eee;
  width: 100%;
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
}

.search-box input[type="search"] {
  border: none;
  background: transparent;
  outline: none;
  padding: 5px 10px;
  width: 100%;
}

}

  /* Navigasi versi offcanvas */
@media (max-width: 768px) {
  .Navigasi {
  background: #9d0000; /* Merah */
  height: 40px;
  width: 100%;
  padding: 0px;
}

.Sub-Navigasi > li a {
    width: 100%;
    text-align: center;
    padding: 9px 0px 9px 0px;
}

.Sub-Navigasi > li {
    width: 100%;
    align-items: center;
}

.Sub-Navigasi a:hover {
    width: 100%;
    text-align: center;
    padding: 9px 0px 9px 0px;
}

.Sub-Navigasi {
  position: relative;
  z-index: 2000; /* lebih tinggi */
  bottom: 0px;
  height: 100%;
  width: 100%;
    
}

.Sub-Kategori a {
  font-weight: normal;
}


  .Sub-Kategori > li a {
    padding: 2px 0px 2px 10px;
    display: block;
    color: rgb(50, 50, 50);
    font-weight: bold;
    text-decoration: none;
    font-weight: normal;
    text-align: left;
  }
  
  /* --- Tampilan Mobile (klik/tekan) --- */
  .Menu-Kategori { position: relative; }
  .Menu-Kategori:focus-within .Sub-Kategori {
    display: block;
    position: static; /* biar mengalir ke bawah */
  }

  .Button-Menu {
    cursor: pointer;
    padding: 8px;
    color: #fff;
    border-radius: 0px;
  }
}


