:root {
  --green: #2e7d32;
  --light-green: #a5d6a7;
  --white: #fff;
  --gray: #f1f1f1;
  --dark: #333;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--gray);
  color: var(--dark);
   padding-bottom: 70px;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

header {
  background-color: var(--green);
  color: var(--white);
  padding: 20px 0;
}

header h1 {
  display: inline-block;
  margin: 0;
}

header nav {
  float: right;
}

header nav a {
  color: var(--white);
  margin-left: 20px;
  text-decoration: none;
  font-weight: bold;
}

.admin-link {
  color: #151311;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
 text-box-edge: right;
}

.admin-link i {
  color: #4d4a49;
}



.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background-color: #fff;
  margin: 8% auto;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.modal-content h2 {
  margin-bottom: 20px;
  font-size: 24px;
  text-align: center;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box;
}

.modal-content button {
  width: 100%;
  padding: 12px;
  background-color: #28a745;
  color: white;
  border: none;
  margin-top: 10px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #218838;
}

.modal-links {
  text-align: right;
  margin-bottom: 10px;
}

.modal-links a {
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
}

.modal-footer {
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
}

.modal-footer a {
  color: #007bff;
  text-decoration: none;
}
.modal-content select {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background-color: #fff;
}


.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}

.close:hover {
  color: #000;
}




.hero {
  background: url('https://images.unsplash.com/photo-1576402187873-45d7cbe6b8bb?auto=format&fit=crop&w=1200&q=60') no-repeat center center/cover;
  color: #1e956a;
  text-align: center;
  padding: 80px 20px;
}

.hero h2 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2em;
}

.btn {
  display: inline-block;
  background-color: var(--green);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 20px;
}

.products {
  padding: 40px 0;
}

.products h3 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--green);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.product-grid div {
  background: var(--white);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
}






header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav a {
  margin-left: 15px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #459f66;
  padding: 6px 12px;
  border-radius: 20px;
}

.user-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}


.user-profile-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.user-profile-content {
  background-color: #fff;
  margin: 2% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

.user-profile-content input {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.user-profile-content button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: none;
  border-radius: 4px;
  background-color: #27ae60;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.user-profile-content button:hover {
  opacity: 0.9;
}

.user-profile-content .close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

/*pp on user profile*/
.profile-pic-container {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 10px auto;
}

.profile-pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #3498db;
}

.profile-pic-container .edit-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  padding: 6px;
  cursor: pointer;
  border: 1px solid #ccc;
  font-size: 14px;
  color: #2c3e50;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.profile-field {
  margin-bottom: 15px;
}





/* Basic structure */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: black;
  color: white;
}

.nav-links {
  display: flex;
  gap: 15px;
}

.menu-link {
  color: white;
  text-decoration: none;
  background-color: black;
  padding: 8px 12px;
  border-radius: 5px;
}

.menu-link:hover {
  background-color: #333;
}

.menu-icon {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: white;
}

/* Responsive styling */
@media (max-width: 768px) {
  .menu-icon {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    background-color: black;
    padding: 10px;
    border-radius: 5px;
    width: 180px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 1000;
  }

  .nav-links.show {
    display: flex;
  }
}



.category-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  overflow-x: auto;
}

.category-btn {
  padding: 10px 20px;
  border-radius: 25px;
  border: none;
  background-color: #e0e0e0;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
  white-space: nowrap;
}

.category-btn:hover,
.category-btn.active {
  background-color: #4caf50;
  color: white;
}

.product-category {
  margin-bottom: 40px;
}

.product-row {
    display: flex
;
    flex-wrap: nowrap;
    gap: 1px;
}

.product-card {
  width: calc(25% - 20px);
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  text-align: center;
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.product-card h5 {
  margin: 10px 0 5px;
}

.product-card p {
  color: #444;
}

.product-card button {
  margin-top: 10px;
  padding: 8px 15px;
  background-color: #4caf50;
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
}

.product-card button:hover {
  background-color: #3c9c45;
}
/* Responsive styles */
@media (max-width: 1024px) {
  .product-card {
    width: calc(33.333% - 20px); /* 3 per row */
  }
}

@media (max-width: 768px) {
  .product-card {
    width: calc(50% - 20px); /* 2 per row */
  }
}

@media (max-width: 480px) {
  .product-card {
    width: 100%; /* 1 per row */
  }
}




.ad-slider {
  overflow: hidden;
  width: 100%;
  margin-top: 20px;
}

.ad-track {
  display: flex;
  animation: slideAds 20s linear infinite;
  gap: 40px;
}

.ad-item {
  min-width: 200px;
  text-align: center;
  flex-shrink: 0;
}

.ad-item img {
  width: 100px;
  height: auto;
  border-radius: 10px;
}

@keyframes slideAds {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}






/* Disable horizontal sliding */
.ad-slider {
  overflow: hidden;
  position: relative;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px; /* Adjust based on image height */
}

.ad-track {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  animation: none !important; /* Prevent any slider animation */
  transition: none !important;
}

/* One ad at a time, large view */
.ad-item.large-ad {
  text-align: center;
  padding: 20px;
  max-width: 300px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  animation: fadeIn 0.5s ease-in-out;
}

.ad-item.large-ad img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.special-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: crimson;
  color: white;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 4px;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
}

.new-price {
  color: #27ae60;
  font-weight: bold;
  font-size: 18px;
}

/* Fade-in animation when ad changes */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/*line below products section*/
.product-divider {
  border: none;
  border-top: 4px solid #80eea0;
  margin: 20px 0;
}






footer {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 79px;
  width: 100%;
  background-color: transparent;
  z-index: 1000;
}

/* Sticky Footer Container */
.sticky-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: white;
  border-top: 1px solid #ccc;
  display: flex;
  justify-content: space-around;
  padding: 6px 0 4px;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Footer Buttons */
.sticky-footer button {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 4px 0;
}

/* Icons */
.sticky-footer i {
  font-size: 20px;
  margin-bottom: 2px;
  color: #1e2a23;
}

/* Text Label Below Icon */
.sticky-footer span {
  font-size: 18px;
  font-weight: 600;
}

/* Green Price Style for Order Total */
#orderText {
  color: #379d6a; /* Avocado green */
  font-weight: bold;
      font-size: 18px
}
#cartText {
  font-weight: bold;
}




#notificationCount {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: red;
  color: white;
  border-radius: 9999px;
  font-size: 10px;
  padding: 2px 4px;
  display: none; /* JS will show it when count > 0 */
}


/*product quantity style*/
.product-card {
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 8px;
  margin: 10px;
  width: 170px;
  text-align: center;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.product-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 4px;
}

.product-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 13px;
  margin-bottom: 6px;
}

.product-name {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price {
  color: #27ae60;
  font-weight: bold;
  font-size: 13px;
  margin-left: 4px;
}

.product-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.qty-input {
  width: 40px;
  padding: 3px;
  font-size: 12px;
  text-align: center;
}


.message-modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.message-modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  font-size: 20px;
  animation: messageFadeIn 0.3s ease-in-out;
  
}

.message-modal-content h3 {
  margin-top: 0;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
  font-size: 20px;
}
/*messages */
.message-close {
  float: right;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
    color: red;
}

.message-close:hover {
  color: red;
}

#messagesContainer {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 14px;
}

#messagesContainer div {
  background: #f9f9f9;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#messageDot {
  position: absolute;
  top: -2px;       /* adjust for vertical alignment */
  right: -14px;     /* adjust for horizontal alignment */
  width: 12px;
  height: 12px;
  background-color: green;
  border-radius: 50%;
  border: 2px solid white;
  display: none;   /* hidden by default */
  z-index: 10;
}








@keyframes messageFadeIn {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}


.message-item {
  background: #e9e6e6;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.message-content {
  display: flex;
  flex-direction: column;
}

.message-text {
  font-size: 19px;
  color: #333;
  margin-bottom: 4px;
  word-wrap: break-word;
}

.message-meta {
  align-self: flex-end; /* moves it to right end */
}

.message-time {
    font-size: 14px;
    background: #eafaeded;
    color: #131413;
}

.message-item {
  display: flex;
  align-items: flex-start;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message-icon {
  width: 40px;
  height: 40px;
  margin-right: 10px;
}



.message-text {
  margin: 0;
  font-size: 14px;
  color: #333;
}

.message-meta {
  font-size: 12px;
  color: #888;
  text-align: right; /* align text to the right within its container */
 
}








/*cart styles*/
.cart-badge {
  position: absolute;
  top: -6px;
  right: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #000;
  font-size: 11px;
  font-weight: bold;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(79, 172, 254, 0.8);
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
