/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

body.page {
  background: hsl(42, 24%, 78%);
  color: #2f3e34;
  padding-bottom: 100px;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, #9caf88, #b7c4a3);
  color: #1f2d23;
  padding: 24px 20px;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.header h1 {
  font-size: 26px;
  font-weight: 700;
}

.header p {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 4px;
}

/* ===== ICON MENU ===== */
.icon-menu {
  display: flex;
  justify-content: space-around;
  margin-top: 18px;
}

.icon-menu button {
  background: #eef2ea;
  border: none;
  padding: 12px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.icon-menu button:hover {
  background: #dde5d5;
  transform: scale(1.1);
}

/* ===== WISHLIST GRID ===== */
.wishlist-grid {
  padding: 20px;
  display: grid;
  gap: 16px;
}

/* ===== ITEM CARD ===== */
.wishlist-item {
  background: #ffffff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  position: relative;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wishlist-photo {
  background: #eef2ea;
  height: 90px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7d6f;
  margin-bottom: 10px;
}

.wishlist-item h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

/* ===== REMOVE BUTTON ===== */
.remove-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f3f5f1;
  border: none;
  border-radius: 50%;
  padding: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.remove-btn:hover {
  background: #e2e7dd;
}

/* ===== QTY CONTROL ===== */
.qty-control {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.qty-control button {
  background: #9caf88;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.qty-control button:hover {
  background: #879c74;
}

.qty-control button:active {
  transform: scale(0.9);
}

.qty {
  font-size: 16px;
  font-weight: 600;
}

/* ===== PRICE ===== */
.item-total {
  font-weight: 700;
  color: #4b5f52;
}

/* ===== CHECKOUT BAR ===== */
.checkout-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -6px 16px rgba(0,0,0,0.08);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.checkout-bar strong {
  font-size: 16px;
}

.checkout-bar button {
  background: linear-gradient(135deg, #9caf88, #7e9270);
  border: none;
  color: white;
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.checkout-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* ===== CHECKOUT PAGE ===== */
.checkout-box {
  background: white;
  margin: 20px;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 14px;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-top: 12px;
}

.checkout-btn {
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(135deg, #9caf88, #7e9270);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
/* ================= HOME PAGE ================= */

/* BANNER */
.banner {
  padding: 20px;
  background: #f3efe6;
}

.banner h2 {
  margin-bottom: 12px;
}

.banner-photo {
  height: 140px;
  border-radius: 16px;
  background: #d8d2c2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #555;
}

/* PRODUCTS GRID */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  padding: 20px;
}

/* PRODUCT CARD */
.product-card {
  background: #ede8e8;
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.product-photo {
  height: 110px;
  border-radius: 14px;
  background: #e6e1d6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 10px;
}

.product-card h3 {
  font-size: 15px;
  margin: 4px 0;
}

.price {
  font-weight: 600;
  color: #6b7d5a;
  margin-bottom: 8px;
}

.buy-btn {
  width: 100%;
  border: none;
  padding: 8px;
  border-radius: 999px;
  background: #9caf88;
  color: #1f2a1f;
  font-weight: 600;
  cursor: pointer;
}

.buy-btn:hover {
  background: #889f72;
}
/* ================= HOME PAGE (SAFE) ================= */
.page-home {
  background-color: #ffffff;
}

/* HEADER */
.page-home .header {
  background-color: #9caf88;
  text-align: center;
  padding: 20px;
}

.page-home .header h1 {
  font-size: 32px;
  font-weight: 600;
}

.page-home .header p {
  font-size: 14px;
  margin-top: 4px;
}

/* ICON MENU */
.page-home .icon-menu {
  margin-top: 15px;
}

.page-home .icon-menu button {
  background: white;
  border: none;
  padding: 10px;
  border-radius: 50%;
  margin: 0 6px;
  cursor: pointer;
}

/* BANNER */
.page-home .banner {
  padding: 20px;
  font-weight: 600;
}

/* PRODUCTS GRID */
.page-home .products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 20px;
}

/* PRODUCT CARD */
.page-home .product-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 15px;
}

.page-home .photo {
  background: #eee;
  height: 80px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-home .product-card button {
  width: 100%;
  padding: 8px;
  background-color: #9caf88;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}
/* ===== ADD TO WISHLIST ANIMATION ===== */
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.added {
  animation: pop 0.3s ease;
  background-color: #7e9270 !important;
}
/* ===== CART BADGE ===== */
.cart-btn {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e63946;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 50%;
}
.cart-btn {
  position: relative;
  font-size: 22px;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e53935;
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 999px;
  display: none;
}
.chat-box {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  padding: 16px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 12px;
}

.chat {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 8px;
  font-size: 14px;
}

.chat.user {
  background: #c7d8c2;
  align-self: flex-end;
}

.chat.seller {
  background: #f2eee9;
  align-self: flex-start;
}

.chat-input {
  display: flex;
  gap: 8px;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #ccc;
}

.chat-input button {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: #7a9b8a;
  color: white;
  cursor: pointer;
}
.chat-box {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  padding: 16px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 12px;
}

.chat {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.chat.user {
  background: #c7d8c2;
  align-self: flex-end;
}

.chat.seller {
  background: #f2eee9;
  align-self: flex-start;
}

.chat-input {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #ccc;
}

.chat-input button {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: #7a9b8a;
  color: white;
  cursor: pointer;
}

.wa-btn {
  text-align: center;
  padding: 12px;
  background: #25D366;
  color: white;
  border-radius: 14px;
  font-weight: bold;
  text-decoration: none;
}
.profile-box {
  max-width: 360px;
  margin: 24px auto;
  padding: 20px;
  background: #f2eee9;
  border-radius: 20px;
  text-align: center;
}

.avatar {
  font-size: 60px;
  margin-bottom: 12px;
}

.profile-box label {
  display: block;
  text-align: left;
  margin-top: 12px;
  font-size: 14px;
}

.profile-box input {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #ccc;
  margin-top: 4px;
}

.profile-box button {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: none;
  background: #7a9b8a;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

#profileStatus {
  margin-top: 10px;
  font-size: 14px;
}
.profile-box {
  position: relative;
  z-index: 5;
}
.logout-btn {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: none;
  background: #c97c7c;
  color: white;
  font-weight: bold;
  cursor: pointer;
}
.icon-menu button {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}
/* =====================
   PROFILE PAGE ONLY
===================== */

.profile-page {
  background: #f4f6f3;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-page .card {
  background: #ffffff;
  width: 380px;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.profile-page h2 {
  text-align: center;
  color: #4a6b57;
  margin-bottom: 16px;
}

.profile-page h3 {
  color: #4a6b57;
  font-size: 16px;
  margin: 14px 0 8px;
}

.profile-page label {
  font-size: 13px;
  color: #555;
  display: block;
  margin-top: 10px;
}

.profile-page input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #dcdcdc;
}

.profile-page button {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: #8fae9e;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.profile-page button.logout {
  background: #c96a6a;
}

.profile-page hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 16px 0;
}

.profile-page ul {
  padding-left: 18px;
  margin: 6px 0;
}

.profile-page li {
  font-size: 13px;
  color: #444;
  margin-bottom: 6px;
}

.profile-page p {
  font-size: 13px;
}
/* =====================
   PROFILE ICON MENU
===================== */

.profile-page .icon-menu {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  background: #8fae9e;
  padding: 10px 18px;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  z-index: 1000;
}

.profile-page .icon-menu button {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: 0.2s ease;
}

.profile-page .icon-menu button:hover {
  transform: scale(1.1);
}

.profile-page .icon-menu button:hover {
  transform: scale(1.1);
}

.profile-page .icon-menu button:hover {
  transform: scale(1.1);
}
.profile-page .card {
  margin-top: 80px;
}