body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: #f8fff8;
  color: #1a3c1a;
  background-size: cover;
  padding-top: 100px;
}

.section {
  scroll-margin-top: 120px;
}

.kategori {
  margin-top: 100px;
}
/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);

  position: fixed;     /* agar tetap di posisi atas saat scroll */
  top: 0;              /* tempel di bagian atas halaman */
  left: 0;
  right: 0;
  z-index: 1000;
  color: #2b7a2b;       /* supaya tidak ketimpa elemen lain */
}

.navbar .logo {
  color: #2b7a2b;
  font-size: 22px;
  font-weight: 700;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

.navbar a {
  text-decoration: none;
  color: #1a3c1a;
  font-weight: 500;
}

.navbar a.active {
  color: #2b7a2b;
  font-weight: 700;
}

.navbar a:hover {
  color: #2b7a2b;
}

.basket-icon {
  position: relative;
  padding: 8px 15px;
  background-color: #2e7d32;
  color: white !important;
  border-radius: 20px;
  font-weight: 600;
}

.basket-icon:hover {
  background-color: #1b5e20;
}

.basket-count {
  background-color: #ff9800;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  margin-left: 5px;
  min-width: 18px;
  display: inline-block;
  text-align: center;
}

/* Hero Section */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 80px;
  background: linear-gradient(90deg, #e8f5e9 0%, #ffffff 100%);
  border-radius: 10px;
  margin-top: 80px;
}

.card-container {
  display: flex;
  flex-wrap: wrap;         /* biar otomatis pindah ke bawah kalau sempit */
  justify-content: center; /* rata tengah */
  gap: 20px;               /* jarak antar card */
  padding: 20px;
}

.card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 10px;
    padding: 15px;
    width: 250px;
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    -webkit-transition: transform 0.3s, box-shadow 0.3s;
    -moz-transition: transform 0.3s, box-shadow 0.3s;
    -ms-transition: transform 0.3s, box-shadow 0.3s;
    -o-transition: transform 0.3s, box-shadow 0.3s;
}

.card img {
  width: 100%;       /* biar menyesuaikan lebar card */
  height: 150px;     /* tinggi tetap, biar rapi */
  border-radius: 10px 10px 0 0; /* sudut atas gambar melengkung */
  margin-bottom: 10px;
}

.hero-text {
  max-width: 50%;
}

.hero-text h2 {
  font-size: 32px;
  margin-bottom: 10px;
  color: #1b5e20;
}

.hero-text p {
  font-size: 18px;
  margin-bottom: 20px;
  color: #2e7d32;
}

.btn {
  display: inline-block;
  background-color: #2e7d32;
  color: white;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
}

.btn:hover {
  background-color: #1b5e20;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.hero-image img {
  width: 500px;
}

/* Khusus halaman Tips: pastikan gambar ilustrasi pas dan responsif */
.tips .hero-image img {
  width: min(420px, 100%);
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .tips .hero-image img {
    width: 100%;
  }
}


/* Footer */
footer {
  text-align: center;
  padding: 15px;
  background-color: #ffffff;
  border-top: 1px solid #d9d9d9;
  font-size: 14px;
  color: #2b7a2b;
}

/* Slider gambar di dalam kartu */
.card-slider {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  border-radius: 10px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.card-slider::-webkit-scrollbar { display: none; }

.slider-track {
  display: flex;
  gap: 8px;
  width: max-content;
}

.card-slider img {
  flex: 0 0 calc((100% - 16px) / 3);
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  scroll-snap-align: start;
  /* Fade in */
  opacity: 0;
  transform: translateY(6px);
  animation: fade-in-image .6s ease-out forwards;
}

.card-slider img:nth-child(2) { animation-delay: .08s; }
.card-slider img:nth-child(3) { animation-delay: .16s; }
.card-slider img:nth-child(4) { animation-delay: .24s; }
.card-slider img:nth-child(5) { animation-delay: .32s; }
.card-slider img:nth-child(6) { animation-delay: .40s; }

@keyframes fade-in-image {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .slider-track { gap: 6px; }
  .card-slider img {
    flex-basis: calc((100% - 12px) / 3);
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-slider img {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Promotional Pop-up Modal */
.promo-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease-in;
  pointer-events: none;
}

.promo-modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.promo-modal-content {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
  position: relative;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.promo-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #2b7a2b;
  cursor: pointer;
  z-index: 1;
  transition: color 0.3s ease;
}

.promo-close:hover {
  color: #1b5e20;
}

.promo-header {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: white;
  padding: 25px 30px;
  border-radius: 15px 15px 0 0;
  text-align: center;
}

.promo-header h2 {
  margin: 0;
  font-size: 24px;
  color: white;
}

.promo-body {
  padding: 30px;
}

.promo-title {
  font-size: 20px;
  font-weight: 700;
  color: #1b5e20;
  margin-bottom: 15px;
  text-align: center;
}

.promo-description {
  font-size: 16px;
  color: #2e7d32;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.promo-benefits {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.promo-benefits li {
  padding: 8px 0;
  color: #1a3c1a;
  font-size: 15px;
}

.promo-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 25px;
  flex-wrap: wrap;
}

.btn-promo {
  background-color: #2e7d32;
  color: white;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-promo:hover {
  background-color: #1b5e20;
  transform: scale(1.05);
}

.btn-secondary {
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid #2e7d32;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #c8e6c9;
  transform: scale(1.05);
}

.promo-dont-show {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #2b7a2b;
  cursor: pointer;
}

.promo-dont-show input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
  .promo-modal-content {
    max-width: 95%;
    margin: 20px;
  }

  .promo-header h2 {
    font-size: 20px;
  }

  .promo-title {
    font-size: 18px;
  }

  .promo-description {
    font-size: 14px;
  }

  .promo-actions {
    flex-direction: column;
  }

  .btn-promo,
  .btn-secondary {
    width: 100%;
  }
}

/* Order Button Styles */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-direction: column;
}

.btn-order {
  background-color: #2e7d32;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-size: 14px;
}

.btn-order:hover {
  background-color: #1b5e20;
  transform: scale(1.05);
}

.btn-basket {
  background-color: #ff9800;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-size: 14px;
}

.btn-basket:hover {
  background-color: #f57c00;
  transform: scale(1.05);
}

.price {
  font-weight: 700;
  color: #2e7d32;
  font-size: 16px;
  margin: 10px 0;
}

/* Order Form Modal */
.order-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-in;
  overflow-y: auto;
}

.order-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.order-modal-content {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 0;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
  position: relative;
}

.order-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #2b7a2b;
  cursor: pointer;
  z-index: 1;
  transition: color 0.3s ease;
}

.order-close:hover {
  color: #1b5e20;
}

.order-header {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: white;
  padding: 25px 30px;
  border-radius: 15px 15px 0 0;
  text-align: center;
}

.order-header h2 {
  margin: 0;
  font-size: 24px;
  color: white;
}

.order-form {
  padding: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1a3c1a;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2e7d32;
}

.form-group input[readonly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
  flex-wrap: wrap;
}

.form-actions .btn {
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 15px;
}

.form-actions .btn-secondary {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 2px solid #2e7d32;
}

.form-actions .btn-secondary:hover {
  background-color: #c8e6c9;
  transform: scale(1.05);
}

.form-actions .btn-promo {
  background-color: #2e7d32;
  color: white;
}

.form-actions .btn-promo:hover {
  background-color: #1b5e20;
  transform: scale(1.05);
}

/* Responsive Design for Order Form */
@media (max-width: 768px) {
  .order-modal-content {
    max-width: 95%;
    margin: 10px;
  }

  .order-header h2 {
    font-size: 20px;
  }

  .order-form {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

/* Basket Modal Styles */
.basket-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-in;
  overflow-y: auto;
}

.basket-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.basket-modal-content {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 0;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
  position: relative;
}

.basket-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #2b7a2b;
  cursor: pointer;
  z-index: 1;
  transition: color 0.3s ease;
}

.basket-close:hover {
  color: #1b5e20;
}

.basket-header {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: white;
  padding: 25px 30px;
  border-radius: 15px 15px 0 0;
  text-align: center;
}

.basket-header h2 {
  margin: 0;
  font-size: 24px;
  color: white;
}

.basket-body {
  padding: 30px;
}

.basket-items {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.basket-empty {
  text-align: center;
  color: #999;
  padding: 40px;
  font-style: italic;
}

.basket-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 10px;
}

.basket-item-info {
  flex: 1;
}

.basket-item-name {
  font-weight: 600;
  color: #1a3c1a;
  margin-bottom: 5px;
}

.basket-item-details {
  font-size: 14px;
  color: #666;
}

.basket-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.basket-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.basket-item-quantity button {
  background-color: #2e7d32;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.basket-item-quantity button:hover {
  background-color: #1b5e20;
}

.basket-item-quantity input {
  width: 50px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 5px;
}

.basket-item-remove {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}

.basket-item-remove:hover {
  background-color: #d32f2f;
}

.basket-item-price {
  font-weight: 700;
  color: #2e7d32;
  min-width: 100px;
  text-align: right;
}

.basket-total {
  padding: 20px;
  background-color: #e8f5e9;
  border-radius: 10px;
  text-align: right;
  font-size: 20px;
  color: #1b5e20;
  margin-bottom: 20px;
}

.basket-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.basket-items-list {
  margin-bottom: 20px;
}

.order-basket-item {
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 5px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.order-basket-item-name {
  font-weight: 600;
  color: #1a3c1a;
}

.order-basket-item-details {
  font-size: 14px;
  color: #666;
}

@media (max-width: 768px) {
  .basket-modal-content {
    max-width: 95%;
    margin: 10px;
  }

  .basket-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .basket-item-price {
    text-align: left;
    width: 100%;
  }

  .basket-actions {
    flex-direction: column;
  }

  .basket-actions .btn {
    width: 100%;
  }

  .card-actions {
    flex-direction: column;
  }

  .popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
  }
  
  .popup-isi {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
  }
  
}