/* =================== 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;
}

/* =================== 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;
}

.Menu-Kategori:hover .Sub-Kategori {
  display: block;
}

/* =================== SEARCH BOX =================== */
.search-box {
  background: #eee;
  width: 40%;
  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%;
}

/* =================== HEADER NAV & BUTTON =================== */
.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.Keranjang-Button {
  padding: 8px 16px;
  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: 8px 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;
}

.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: space-between;
  padding: 40px;
  background: linear-gradient(to right, #9d0000, #ff0000);
  color: white;
  flex-wrap: wrap;
}

.Benner .text {
  max-width: 500px;
}

.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;
}
/* BAGIAN PROFIL TOKO */
.profil-toko {
  display: flex;
  flex-wrap: wrap;
  padding: 2rem;
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  gap: 2rem;
}

.info-toko {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}


.info-toko h2.judul-toko {
  font-size: 24px;
  color: #9d0000;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.logo-toko {
  flex: 0 0 180px;
}

.logo-toko img {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


.judul {
  padding-top: 15px;
  color: #000000;
  text-align: center;
}

.tabel-profil-toko {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
  font-size: 16px;
  color: #333;
  background-color: #fdfdfd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.tabel-profil-toko th,
.tabel-profil-toko td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.tabel-profil-toko th {
  width: 35%;
  background-color: #f4f4f4;
  color: #000000;
  font-weight: bold;
  border-bottom: 1px solid #e0e0e0;
}

.tabel-profil-toko td {
  background-color: #fff;
  border-bottom: 1px solid #eee;
}

.tabel-profil-toko tr:last-child th,
.tabel-profil-toko tr:last-child td {
  border-bottom: none;
}


/* BAGIAN GALERI PRODUK */
.card-produk {
  position: relative;
    width: 350px;
    max-width: 350px;
    height: 450px;
    max-height: 450px;
    overflow-y: hidden;
}



.produk-toko {
  padding: 20px;
}

.produk-toko h3 {
  text-align: center;
}

.produk-toko h2 {
  margin-bottom: 1rem;
}

.daftar-produk {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start; /* bisa juga 'center' kalau mau ditengah */
}

.card-produk img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}


.card-link:hover .card-produk {
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
  transform: scale(1.02);
  transition: 0.3s;
  cursor: pointer;
  overflow-y: auto;
}

.tabel-produk-info {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
  color: #333;
}

.tabel-produk-info th {
  text-align: left;
  vertical-align: top;
  padding: 6px 12px;
  width: 130px; /* agar rata dan sejajar */
  background-color: #f9f9f9;
  font-weight: bold;
  border-bottom: 1px solid #eee;
  border-top: 1px solid #eee;
}

.tabel-produk-info td {
  padding: 6px 12px;
  vertical-align: top;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  border-top: 1px solid #eee;
}

/* Desktop: tampil saat hover */
@media (min-width: 768px) {
  .Menu-Kategori:hover .Sub-Kategori {
    display: block;
    margin-bottom: 100px;
  }
}


/* =================== Mobile =================== */
@media (max-width: 768px) {
  .page-container {
    width: 1200px;
    max-width: 100%;
  }
  /* Header */
  .header {
    padding: 8px 8px;
    gap: 10px;
  }

  .header-center {
    flex-direction: row;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
  }

  .logo img {
    height: 40px;
  }

  .search-box {
  width: 100%;
  padding: 5px 0px;
  }

  .header-nav {
    display: none;
  }

  .Benner {
    width: 100%;
    margin: 20px 0px 0px;
    height: 250px;  
  }

  .Benner .text {
    margin: 20px 0px 0px;
  }

  .Benner h1 {
    margin-bottom: 0px;
  }

  .Benner img {
    display: none;
  }

  .profil-toko {
    display: flex;
    justify-content: center;
  }

  .info-toko {
    display: flex;
  }

  .info-toko h2.judul-toko {
    width: 100%;
    max-width: 400px;
    text-align: center;
    font-size: 18px;
    margin-bottom: 4px;
  }

  .tabel-profil-toko th {
    font-size: 12px;
    font-weight: normal;
  }

    .tabel-profil-toko td {
    font-size: 12px;
    font-weight: normal;
  }

.tabel-profil-toko td, 
.tabel-profil-toko th {
    padding: 5px 8px; /* atas-bawah 12px, kiri-kanan 8px */
}

.produk-toko h2 {
  margin-bottom: 0%;
}


  /* Menu utama (Home, Kategori, Tentang) */
  .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;
  }

  /* --- 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: 10px;
    color: #fff;
    border-radius: 0px;
  }

  .Navigasi {
  background: #9d0000; /* Merah */
  height: 40px;
  width: 100%;
  padding: 0px;
}

.Sub-Navigasi {
  position: relative;
  z-index: 2000; /* lebih tinggi */
  bottom: 0px;
  height: 100%;
  width: 100%;
}

.Sub-Navigasi > li {
    width: 100%;
    align-items: center;
}

.Sub-Navigasi a {
    width: 100%;
    text-align: center;
    padding: 9px 0px 9px 0px;
}

.Sub-Kategori 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;
}

.Sub-Kategori li {
    border-bottom: none;
}

  .container-navbar {
    display: none;
  }


/* Produk */
.produk-toko {
  padding: 0px;
}
  .produk-toko h2 {
    font-size: 14px;
    padding: 10px 0px 10px 10px;
  }
  .product-section h1 {
    font-size: 14px;
  }

  .card-link h3 {
    font-size: 12px;
    padding: 0px;
    margin: 0;
  }

  .harga-produk {    
    font-size: 12px;
  }

  .tabel-produk-info {
    padding: 0px 5px 0px;
  }

  .tabel-produk-info tr {
    font-size: 10px;
 
  }
  .tabel-produk-info th {
    width: 78px;
    color:#333;
    font-weight: normal;   
  }

  .tabel-profil-info td {
    font-size: 10px;
  }

  .daftar-produk {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 0px 5px 15px;
    margin-top: 0px;
    margin-left: 0px;    
  }

  .card-produk {
    width: 100%; /* satu kolom di HP */
    padding: 8px;
  }

  .card-produk img {
    height: 140px;
  }

  .card-produk {
    display: grid;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    align-items: stretch;
    max-height: 350px;
    min-height: 350px;
    overflow-y: auto;    
  }


  /* Footer */
  footer {
    font-size: 12px;
    padding: 12px;
  }

}
