/* Basic Reset */
* {
  margin: 0; padding: 0; box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
  height: 100%;
  background: #f5f5f5;
  color: #222;
}

/* Center content on landing */
.centered {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f8cdda, #1d2b64);
  color: white;
  text-align: center;
  padding: 0 20px;
}

.fade-in {
  animation: fadeIn 2s ease forwards;
  opacity: 0;
  font-size: 2rem;
  margin-bottom: 30px;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.btn {
  background: #ff4081;
  border: none;
  padding: 15px 40px;
  font-size: 1.2rem;
  border-radius: 30px;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #e73370;
}

/* Hide sections */
.hidden {
  display: none;
}

/* Shop layout */
#shop {
  display: flex;
  height: 100vh;
  background: #fff;
}

/* Categories nav */
#categories {
  width: 180px;
  background: #222;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.category-btn {
  background: transparent;
  border: none;
  color: white;
  padding: 15px 20px;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.3s ease;
}

.category-btn:hover, .category-btn.active {
  background: #ff4081;
}

/* Products grid */
#products {
  flex: 1;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
  gap: 20px;
  overflow-y: auto;
}

.product-card {
  background: #fafafa;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-card img {
  max-width: 100%;
  border-radius: 8px;
  height: 160px;
  object-fit: cover;
}

.product-name {
  margin: 10px 0 5px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
}

.product-price {
  color: #ff4081;
  font-weight: 700;
  margin-bottom: 10px;
}

.add-btn {
  background: #ff4081;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.add-btn:hover {
  background: #e73370;
}

/* Cart sidebar */
#cart {
  width: 300px;
  background: #222;
  color: white;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#cart h2 {
  margin-bottom: 15px;
}

#cartItems {
  flex: 1;
  list-style: none;
  overflow-y: auto;
}

#cartItems li {
  margin-bottom: 12px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

.cart-item-name {
  font-weight: 600;
}

.cart-item-qty {
  font-size: 0.9rem;
  color: #ccc;
}

#cartTotal {
  margin-top: 20px;
  font-weight: 700;
  font-size: 1.2rem;
  border-top: 1px solid #444;
  padding-top: 10px;
}
/* Checkout button */
#checkoutBtn {
  margin-top: 20px;
}

/* Modal overlay for address and payment */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

/* Modal content box */
.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content input {
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.modal-content img {
  margin-top: 20px;
  border-radius: 12px;
}