:root {
  --color-red: #EE293D;
  --color-black: #000;
  --color-white: #FFF;
  --color-bg: #F9F9F9;
  --color-muted: #555;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-black);
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background: var(--color-black);
  color: var(--color-white);
}

header {
  position: sticky;
  top: 0;
  background: var(--color-white); /* Consistent with the provided image */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 100;
}

/* Header/Navbar Styling */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping */
  padding: 15px 20px;
  background-color: var(--color-white);
  gap: 10px;
}

.navbar .logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-red);
}

.nav-center,
.nav-right {
  display: flex; /* Make them flex containers */
  align-items: center;
  gap: 15px;
  flex-wrap: wrap; /* Allow wrapping within these containers too */
}

/* Ensure nav-right takes up available space next to nav-center for better alignment */
.nav-right {
  margin-left: auto; /* Push nav-right to the right */
}

.nav-right a,
.nav-right button,
.nav-center a {
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  transition: all 0.3s ease;
}

.nav-right a:hover,
.nav-center a:hover {
  background-color: #eee;
}

.search-form {
  display: flex; /* Use flexbox for search input and button */
  align-items: center;
  width: auto; /* Let content determine width for desktop */
  max-width: 400px;
  margin: 0; /* Remove top/bottom margin for desktop */
}

.search-form input {
  flex-grow: 1; /* Allow input to grow */
  padding: 10px 15px;
  border-radius: 6px 0 0 6px;
  border: 1px solid #ccc;
  min-width: 120px; /* Ensure input is not too small */
}

.search-form button {
  padding: 10px 15px;
  border: none;
  background: var(--color-red);
  color: white;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

#darkToggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  color: var(--color-black); /* Visible on white header */
}

.hero {
  position: relative;
  height: 75vh;
  background: url('../img/hero-bg.jpg') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: grid;
  place-items: center;
}

.hero-text {
  text-align: center;
  color: var(--color-white);
}

.hero-text h1 {
  font-size: 3em;
  margin: 0;
}

.hero-text p {
  margin: 10px 0;
  font-size: 1.2em;
}

footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: 20px;
  text-align: center;
}

footer a {
  color: var(--color-white);
  font-weight: bold;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.produk-title {
  text-align: center;
  margin-top: 40px;
  font-size: 2em;
  color: var(--color-black);
}

body.dark .produk-title {
  color: var(--color-white);
}

.filter-bar {
  text-align: center;
  margin: 20px auto 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--color-white);
  color: var(--color-black);
  border: 1px solid var(--color-muted);
  margin: 8px;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 gambar per baris */
  gap: 20px;
  padding: 0 20px 60px;
}

.product-card {
  text-align: center;
}

.product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

.product-card .img-wrapper {
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
}

/* Penataan isi di bawah gambar */
.product-card h3,
.product-card .badge,
.product-card .price {
  margin: 8px 0;
}

.product-card .btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 18px;
  background: var(--color-red);
  color: var(--color-white);
  border-radius: 20px;
  font-weight: bold;
  transition: 0.3s ease;
  text-decoration: none;
}

.product-card .btn:hover {
  background: #cc2a30;
  transform: scale(1.05);
}

.product-detail {
  padding: 50px 20px;
  background: var(--color-bg);
}

.detail-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1000px;
  margin: auto;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 30px;
}

.detail-image img {
  width: 100%;
  max-width: 350px;
  border-radius: 10px;
  object-fit: cover;
}

.detail-info {
  flex: 1;
}

.detail-info h2 {
  margin-top: 0;
  font-size: 1.8em;
}

.detail-info .badge {
  display: inline-block;
  background: var(--color-red);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.85em;
  margin: 10px 0;
}

.detail-info .price {
  font-size: 1.5em;
  color: var(--color-red);
  margin-bottom: 20px;
}

.detail-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-form select,
.detail-form input[type="number"] {
  padding: 8px 12px;
  border: 1px solid var(--color-muted);
  border-radius: 6px;
}

.btn-checkout {
  background: var(--color-red);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-checkout:hover {
  background: #cc2a30;
}

.detail-section {
  padding: 60px 20px;
  background: var(--color-bg);
}

.detail-container {
  max-width: 1000px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}

.detail-left img {
  max-width: 400px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.detail-right {
  flex: 1;
  min-width: 280px;
}

.detail-right h2 {
  margin-top: 0;
  font-size: 2em;
}

.detail-right .badge {
  display: inline-block;
  background: var(--color-red);
  color: white;
  font-size: 0.8em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.detail-right .price {
  font-size: 1.6em;
  font-weight: bold;
  margin-bottom: 10px;
}

.detail-right .desc {
  margin-bottom: 25px;
}

.form-detail {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-detail select,
.form-detail input[type="number"] {
  padding: 10px;
  border: 1px solid var(--color-muted);
  border-radius: 8px;
  font-size: 1em;
}

.checkout {
  max-width: 900px;
  margin: 50px auto;
  padding: 0 20px 60px;
}

.checkout-title {
  text-align: center;
  margin-bottom: 30px;
}

.checkout-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.checkout-summary {
  flex: 1 1 300px;
  background: var(--color-white);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.checkout-summary img.checkout-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 15px;
}

.checkout-info {
  text-align: left;
}

.checkout-form {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
}

.checkout-form button.btn-checkout {
  margin-top: 10px;
  background: var(--color-red);
  color: var(--color-white);
  font-weight: bold;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.checkout-form button.btn-checkout:hover {
  background: #cc2a30;
}

.payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
}

.payment-card {
  flex: 1 1 120px;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background-color: #fff;
  position: relative;
}

.payment-card:hover {
  border-color: var(--color-red);
}

.payment-card input[type="radio"] {
  position: absolute;
  top: 10px;
  right: 10px;
}

.payment-card img {
  max-width: 50px;
  margin-bottom: 10px;
}

.payment-card span {
  display: block;
  font-weight: bold;
  color: #333;
}

.payment-card input[type="radio"]:checked + img + span {
  color: var(--color-red);
}

body.dark .payment-card {
  background-color: #222;
  border-color: #444;
}

body.dark .payment-card span {
  color: #fff;
}

.cart-section {
  padding: 40px 20px;
}

.cart-container {
  max-width: 1000px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.cart-container h2 {
  margin-bottom: 30px;
  text-align: center;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.cart-table th,
.cart-table td {
  border-bottom: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}

.cart-table img {
  height: 70px;
  border-radius: 8px;
}

.cart-table input[type="number"] {
  width: 60px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-update,
.btn-checkout {
  background: var(--color-red);
  color: #fff;
  padding: 10px 20px;
  border: none;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

.btn-update:hover,
.btn-checkout:hover {
  background: #cc2a30;
}

.btn-delete {
  background: transparent;
  color: red;
  font-weight: bold;
  text-decoration: none;
}

.empty-cart {
  text-align: center;
  font-size: 1.2em;
  padding: 50px;
  color: #666;
}

.warning {
  color: #c00;
  font-size: 0.95em;
}

/* Detail Produk */
.detail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  gap: 40px;
}

.detail img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  object-fit: cover;
}

.detail-info {
  flex: 1;
  max-width: 500px;
}

.detail-info h2 {
  margin: 0 0 10px;
}

.detail-info .badge {
  background: var(--color-red);
  color: var(--color-white);
  padding: 4px 12px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 10px;
}

.detail-info .price {
  font-size: 1.5em;
  margin: 10px 0;
  color: var(--color-black);
}

.detail-info select,
.detail-info input[type="number"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.detail-info .btn {
  padding: 10px 20px;
  background: var(--color-red);
  color: var(--color-white);
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.detail-info .btn:hover {
  background: #c9212b;
}

/* Cart Table */
.cart-container {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.cart-container h2 {
  text-align: center;
  margin-bottom: 30px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #ccc;
}

.cart-table img {
  width: 80px;
  border-radius: 8px;
}

.cart-table input[type="number"] {
  width: 60px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #aaa;
}

.cart-table .btn-remove {
  background: transparent;
  border: none;
  color: var(--color-red);
  cursor: pointer;
  font-weight: bold;
}

.cart-summary {
  text-align: right;
  margin-top: 20px;
}

.cart-summary h3 {
  margin-bottom: 10px;
}

.cart-summary .btn-checkout {
  padding: 10px 20px;
  background: var(--color-red);
  color: var(--color-white);
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.cart-summary .btn-checkout:hover {
  background: #c9212b;
}

.checkout-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.dark .checkout-container {
  background: #222;
  color: #fff;
}

.checkout-container h2 {
  margin-bottom: 20px;
  text-align: center;
}

.order-items table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.order-items th,
.order-items td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: center;
}

.total-row {
  background: #f5f5f5;
}

.payment-form {
  text-align: left;
}

.payment-form label {
  display: block;
  margin-bottom: 10px;
}

.va {
  font-size: 1.2em;
  background: #f8f8f8;
  padding: 10px;
  border-radius: 5px;
}

.cart-container {
  max-width: 960px;
  margin: auto;
  padding: 20px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.cart-table th,
.cart-table td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
}

.cart-table img {
  border-radius: 5px;
  margin-right: 10px;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.cart-summary .btn {
  padding: 10px 20px;
}

a.hapus-link {
  color: red;
  font-size: 1.2em;
  text-decoration: none;
}

a.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* ===== Cart Styles ===== */
.cart-container {
  max-width: 1000px;
  margin: 50px auto;
  background: var(--color-white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

body.dark .cart-container {
  background: #1f1f1f;
  color: var(--color-white);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.cart-table th,
.cart-table td {
  text-align: center;
  padding: 12px 10px;
  border-bottom: 1px solid #ddd;
}

.cart-table th {
  background: var(--color-red);
  color: var(--color-white);
}

body.dark .cart-table th {
  background: #cc2a30;
}

.cart-table img {
  height: 80px;
  border-radius: 8px;
}

.cart-qty {
  width: 60px;
  padding: 5px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #ccc;
}

body.dark .cart-qty {
  background: #333;
  border-color: #555;
  color: var(--color-white);
}

.cart-total {
  text-align: right;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 20px;
}

.checkout-warning {
  background: #ffe1e1;
  padding: 12px;
  color: #cc0000;
  font-weight: bold;
  margin-top: 20px;
  border-radius: 8px;
}

body.dark .checkout-warning {
  background: #401515;
  color: #ff6b6b;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  flex-wrap: wrap;
  gap: 10px;
}

.cart-actions .btn {
  padding: 10px 25px;
  background: var(--color-red);
  color: var(--color-white);
  font-weight: bold;
  border-radius: 30px;
  text-decoration: none;
  transition: background 0.3s;
}

.cart-actions .btn:hover {
  background: #cc2a30;
}

/* Checkbox styling */
.cart-checkbox {
  transform: scale(1.4);
  cursor: pointer;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: bold;
  background: var(--color-red);
  color: white;
}

.radio-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
  gap: 15px;
}

.cart-footer .total {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--color-black);
}

.cart-footer .btn-checkout {
  padding: 12px 24px;
  background: var(--color-red);
  color: var(--color-white);
  border: none;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cart-footer .btn-checkout:hover {
  background: #c9212b;
}

body.dark .cart-footer .total {
  color: var(--color-white);
}

.checkout-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin: 40px auto;
  padding: 20px;
  max-width: 1000px;
}

.checkout-summary,
.checkout-form {
  flex: 1 1 400px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.checkout-form form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkout-form h3 {
  margin-bottom: 10px;
}

.payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.payment-card {
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  width: 130px;
  cursor: pointer;
  transition: border 0.2s;
  position: relative;
}

.payment-card:hover {
  border-color: var(--color-red);
}

.payment-card img {
  width: 40px;
  margin-bottom: 8px;
}

.va {
  font-size: 0.9em;
  margin-top: 8px;
  color: var(--color-red);
  background: #fcecec;
  padding: 8px;
  border-radius: 6px;
}

body.dark .checkout-summary,
body.dark .checkout-form {
  background: #222;
  color: white;
}

body.dark .payment-card {
  background: #333;
  border-color: #555;
}

body.dark .va {
  background: #552525;
  color: #ffdada;
}

.naruto-animation {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 180px;
  height: auto;
  z-index: 9999;
  opacity: 0.9;
  pointer-events: none; /* Supaya tidak mengganggu klik */
  animation: narutoMove 6s linear infinite;
}

@keyframes narutoMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(100vw, -100vh);
  }
}

/* Efek Zoom pada "Stok Terbatas" */
.stok-terbatas {
  font-weight: bold;
  color: red;
  display: inline-block;
  transform-origin: center;
  animation: zoomText 2s ease-in-out infinite alternate;
}

@keyframes zoomText {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.2); /* Reduced zoom for better visibility */
    opacity: 0.8; /* Increased opacity for better visibility */
  }
}

.profil-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.profil-tabs button {
  padding: 10px 24px;
  border-radius: 30px;
  background: transparent;
  border: 2px solid var(--color-red);
  color: var(--color-red);
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.profil-tabs button:hover,
.profil-tabs button.active-tab {
  background: var(--color-red);
  color: #fff;
}

.tab-content {
  display: none;
  animation: fadeSlide 0.4s ease;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.05);
}

.tab-content.active {
  display: block;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profil-title {
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 20px;
}

.stok-terbatas {
  margin-top: 10px;
}

.update-form-group {
  display: flex;
  flex-direction: column; /* Changed to column for stacking inputs */
  gap: 15px;
  margin-bottom: 15px;
}

.update-form-group input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1em;
  font-family: 'Segoe UI', sans-serif;
}

.update-form-group input:focus {
  border-color: var(--color-red);
  outline: none;
}

.btn-checkout.full-btn {
  width: 100%;
  padding: 14px;
  font-size: 1em;
  font-weight: bold;
  margin-top: 10px; /* Added margin for spacing */
}

/* === Tambahan Final Profil UI === */
.profil-section {
  padding: 60px 20px;
  background: var(--color-bg);
}

.profil-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.05);
}

.order-card {
  background: #f8f8f8;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.order-card h4 {
  margin-bottom: 10px;
}

.order-card ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.alert-success,
.alert-error {
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-weight: bold;
}

.alert-success {
  background: #e2fbe2;
  color: #237b23;
}

.alert-error {
  background: #fce1e1;
  color: #b32020;
}

/* Form di profil: update & lacak */
.update-form-group input,
#lacakForm input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

#updateForm .btn-checkout,
#lacakForm .btn-checkout {
  width: 100%;
  padding: 14px;
  font-size: 1.05em;
  font-weight: bold;
  border-radius: 8px;
  margin-top: 15px;
}

/* ==== Responsive Media Queries (Consolidated) ==== */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column; /* Stack logo, nav-center, nav-right vertically */
    align-items: flex-start; /* Align items to the left */
    padding: 10px 15px;
  }

  .nav-center,
  .nav-right {
    flex-direction: column; /* Stack items inside nav-center and nav-right */
    align-items: stretch; /* Make items take full width */
    width: 100%; /* Ensure they take full width */
    margin-top: 10px; /* Add space between sections */
    gap: 0; /* Remove gap, use padding/margin on individual items if needed */
  }

  .nav-center a,
  .nav-right a,
  .nav-right button {
    display: block; /* Make links/buttons block-level to take full width */
    width: 100%;
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee; /* Separator for stacked links */
  }

  /* Remove border-bottom from the last item in nav-center and nav-right */
  .nav-center a:last-child,
  .nav-right a:last-child:not(.search-form button), /* Exclude search button */
  .nav-right button:last-child {
    border-bottom: none;
  }

  .search-form {
    flex-direction: row; /* Keep search input and button side-by-side */
    width: 100%; /* Take full width of its parent (.nav-right) */
    margin: 10px 0; /* Add margin for spacing from other elements */
  }

  .search-form input {
    width: auto; /* Let flex-grow handle the width */
    border-radius: 6px 0 0 6px;
  }

  .search-form button {
    width: auto; /* Let content determine width */
    border-radius: 0 6px 6px 0;
  }

  .hero-text h1 {
    font-size: 2.2em;
    padding: 0 20px;
  }
  .hero-text p {
    font-size: 1em;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 produk per baris */
    padding: 0 10px 40px;
  }

  .product-card img {
    height: 140px;
  }

  .product-card .img-wrapper {
    height: 200px;
    padding: 8px;
  }

  .detail-container {
    flex-direction: column;
    padding: 20px;
    align-items: center;
  }

  .detail-left img {
    max-width: 100%;
  }

  .detail-right {
    width: 100%;
  }

  .cart-table th,
  .cart-table td {
    font-size: 0.9em;
    padding: 8px;
  }

  .profil-container {
    padding: 20px;
  }

  h2,
  h3 {
    text-align: center;
  }

  .profil-tabs {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .profil-container > div[style*="flex-wrap"] {
    flex-direction: column;
    align-items: center;
  }

  .profil-container input {
    font-size: 1em;
  }

  .btn-checkout {
    width: 100%;
    text-align: center;
  }

  .order-card {
    font-size: 0.95em;
    padding: 12px;
  }

  .arrow-right {
    display: inline-block;
    margin-top: 5px;
  }

  #updateForm input,
  #lacakForm input {
    font-size: 1em;
  }

  .alert-success {
    margin: 10px auto;
    font-size: 0.95em;
    padding: 10px;
  }
}

@media (max-width: 600px) {
  h1, h2, h3 {
    font-size: 1.4em;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 0.9em;
  }
  
  .tab-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr; /* 1 produk per baris di HP kecil */
  }

  .product-card .img-wrapper {
    height: auto;
  }
}