:root {
  --bg: #fdfaf6;
  --primary: #6f4e37;
  --accent: #d3a87c;
  --text: #3e2f2f;
  --light: #fffaf0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: 'Varela Round', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  animation: fadeIn 0.8s ease-in;
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, var(--primary), var(--accent));
  color: white;
  padding: 1.5rem 2rem;
  flex-wrap: wrap;
}

.branding h1 {
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
}

.branding p {
  font-size: 1rem;
  opacity: 0.9;
}

.navlinks {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.navlinks a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.navlinks a:hover {
  color: var(--light);
}

.shop, .order {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  height: 70vh;
  align-items: center;
  text-align: center;
}

.section {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.section h2, .section h3 {
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

ul {
  list-style: none;
}

.menu li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed #ccc;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

li div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price {
  font-weight: bold;
  color: var(--accent);
}
a{
  text-decoration: none;
  color: #fff;
}
button {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: var(--primary);
}

footer {
  text-align: center;
  padding: 1.5rem;
  background-color: #f0e6dc;
  font-size: 0.9rem;
  /* margin-top: 2rem; */
}

.home {
    text-align: center;
    /* padding: 2rem 1rem; */
    /* background-image: url(../img/kapita_banner.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; */
    /* height: 90vh; */
    width: 100%;
}

.home h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* existing styles for .modal and .modal-content already in place */

.modal {
  display: none; 
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: #fff;
  padding: 20px;
  max-width: 400px;          /* slightly larger on desktop */
  width: 90%;                /* use 90% width on mobile */
  margin: 80px auto;
  border-radius: 8px;
  box-sizing: border-box;
}

.modal-content h2 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

#userForm input {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}

#userForm button {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 5px;
}

/* Responsive header */
header.topbar {
  display: flex;
  flex-wrap: wrap;             /* wrap items on small screens */
  justify-content: space-between;
  align-items: center;
  /* padding: 10px; */
  gap: 15px;
}

header.topbar .branding h1 {
  font-size: 1.5rem;
  margin: 0;
}

#userInfo {
  display: block;
  font-size: 0.9rem;
  font-weight: bold;
  /* margin-top: 4px; */
}

#updateUserLink {
  display: inline-block;
  font-size: 0.8rem;
  margin-top: 4px;
}

/* nav links stack on small screens */
.navlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.navlinks a {
  text-decoration: none;
  font-size: 0.9rem;
}


.menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.cart-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 1.5rem;
  max-height: 80vh;
  overflow-y: auto;
  margin: 2rem auto;
  width: 95%; /* mobile default width */
}
.order-status-panel {
  background: #fff;
  border-radius: 12px;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); */
  padding: -0.5rem;
  /* max-height: 60vh; */
  overflow-y: auto;
  margin: 2rem auto;
  width: 100%;
}
.order-status-panel h2 {
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}
.order-status-panel li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed #ccc;
  font-size: 0.95rem;
}
.order-status-panel .status {
  font-weight: bold;
  color: var(--accent);
}
.toast {
  position: fixed;
  /* bottom: 20px; */
  top: 180px;
  right: 20px;
  min-width: 250px;
  padding: 15px 20px;
  background-color: var(--primary);
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.success {
  background-color: #4CAF50; /* green */
}
.toast.error {
  background-color: #f44336; /* red */
}
.cover-text{
  width: 100%; height: 100%; align-content: end;
}
.btn-ordernow{
  background-color: var(--accent);
    padding: 15px 40px;
    border-radius: 10px;
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
.btn-ordernow:hover{
  background-color: var(--accent);
  color: #fff;
  transition: background 0.3s ease;
}
.btn-container{
  margin-top: 20px;
  width: 100%;
}
.btn-ordernow-white{
  text-decoration: none;
  background-color: #fff;
  padding: 10px 20px;
  color: #321c08;
  border-radius: 5px;
}
.btn-ordernow-white:hover{
  background-color: var(--accent);
  color: #fff;

}
.option-group {
  margin-left: 10px;
  padding: 5px 0;
}
.option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.option small {
  font-size: 13px;
  color: #555;
}


@media (min-width: 768px) {
  /* display menu + cart side by side on bigger screens */
  .container-flex {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  .menu {
    flex: 1;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .cart-panel {
    width: 300px;
    flex-shrink: 0;
    margin-top: 2rem;
  }
}

@media (max-width: 767px) {
  .cart-panel {
    width: 95%;
  }
}

@media (max-width: 600px) {
 
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .navlinks {
    width: 100%;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
  }

  .section {
    padding: 1rem;
  }

  .order-status-panel li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .order-status-panel li div {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  button {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
  }

  .modal-content {
    width: 95%;
  }
  .toast{
      top: 250px;
      right: 40px;
      left: 50px;
  }
  .branding{
    height: 100%;
    width: 100%;
    text-align: center;
  }
}
