@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* General Styles */
body {
  font-family: poppins, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  text-align: center;
  transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  
}

*:focus {
  outline: none !important;
}


/* Header */
header {
  color: rgb(0, 0, 0);
  padding: 20px;
}

header h1 {
  margin: 0;
  margin-top: 30px;
  font-size: 24px;
  font-weight: 600;
}

header p {
  font-size: 16px;
  margin-top: 5px;
}




#log-out {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 5px;
  transition: background-color 0.3s ease, transform 0.2s;
  cursor: pointer;
  z-index: 999;
}

#log-out a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 30px;
  color: black;
  transition: transform 0.2s ease;
}

#log-out:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) { 
  #log-out {
    display: none;
  }
  
}









/* Overlay for clicking outside */
.filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
  opacity: 0;
  z-index: 1000;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}

/* Show overlay when popup is active */
.filter-popup.active ~ .filter-overlay {
  opacity: 1;
  visibility: visible;
}

/* Filter Popup */
.filter-popup {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  padding: 20px;
  padding-left: 35px;
  transition: left 0.3s ease-in-out;
  z-index: 1001;
  overflow-y: auto;
  
}

.filter-popup h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  margin-bottom: 15px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  font-weight: 600;
}

/* Close Icon */
.filter-close {
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.filter-close:hover {
  color: #ff4d4d;
}

/* Show Popup */
.filter-popup.active {
  left: 0;
}

/* Filter Options */
#filter-options {
  display: flex;
  flex-direction: column;
}

#filter-options h4 {
  font-size: 16px;
  margin-top: 10px;
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
}

#filter-options label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  padding: 5px 0;
}

#filter-options input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

/* Clear Filter Button */
#filter-options button {
  width: 100%;
  margin-top: 25px;
  padding: 10px;
  margin-bottom: 25px;
  background: #ff4d4d;
  color: white;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

#filter-options button:hover {
  background: #e60000;
}

/* === NO DEALS FOUND MESSAGE === */
.no-deals-message {
  text-align: center;
  font-size: 18px;
  color: #030303;
  margin: 20px;
}

.no-deals-message button {
  background-color: #ff4d4d;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  border-radius: 5px;
}

.no-deals-message button:hover {
  background-color: #e63939;
}




/* Deals Section */
main {
  padding-top: 40px;
  padding-bottom: 70px;
  padding-left: 120px;
  padding-right: 120px;
}

#deals-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Deal Card */
.deal-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(189, 189, 189, 0.418);
  text-align: left;
  transition: box-shadow 0.3s ease-in-out; 
  overflow: hidden;
  position: relative;
  min-height: 420px; 
  max-width: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.deal-card:hover {
  box-shadow: 0 6px 12px rgba(155, 155, 155, 0.733);}

/* Deal Image */
.deal-image {
  width: 100%;
  height: 130px;
  object-fit: cover;
  position: relative;
}

/* Expiration Tag */
.expiration-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff5833f1;
  color: white;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
}

/* Category Tags */
.categories {
  margin: 10px 15px;
}

.category {
  display: inline-block;
  color: white;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
  margin-right: 5px;
  cursor: default;
}



/* Deal Content */
.deal-content {
  padding: 10px 15px; 
  flex-grow: 1;
}

.deal-content h2 {
  font-size: 18px;
  color: #000000;
  margin: 0;
  margin-bottom: 5px;
  padding: 0px;
  font-weight: 600;
}

.deal-content p {
  font-size: 14px;
  color: #555;
  margin-top: 5px;
  margin: 0;
  padding: 0px;

}

/* Coupon and Buttons - Fixed Bottom */
.deal-bottom-section {
  padding: 10px 15px;
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Divider */
.divider {
  height: 1px;
  background: #ddd;
  margin-bottom: 15px;
  
}

/* Coupon Code */
.coupon {
  display: block;
  background: #ffffff;
  padding: 10px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border: 2px solid  #b1afaf;
  border-radius: 5px;
  cursor: pointer;
}

.coupon:hover {
  border: 2px solid #222;
}

.coupon i {
  padding-left: 5px;
}


/* Buttons */
.deal-buttons {
  display: flex;
  justify-content: space-between;
  padding: 15px 0px;
}

.btn {
  padding: 12px;
  border: none;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  border-radius: 5px;
  text-decoration: none;
  flex: 1;
  margin: 0px;
}

.more-details {
  background: #616161;
  color: white;
  margin-right: 5px;
  font-weight: 600;
}

.more-details:hover {
  background: #4b4a4a;
}

.redeem-now {
  background: #7834d9;
  color: white;
  margin-left: 5px;
  font-weight: 600;
}

.redeem-now:hover {
  background: #622baf;
}



/* Responsive Design */
@media (max-width: 768px) {
  #deals-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  header h1 {
    font-size: 21px;
  }

  header p {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  #deals-container {
    grid-template-columns: 1fr;
  }
}

/* MODAL STYLING */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 10px;
  z-index: 9999;
}

/* Centered Modal Content */
.modal-content {
  background: white;
  width: 95%;
  padding: 20px;
  border-radius: 10px;
  text-align: left;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-in-out;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  max-width: 450px;
  height: auto;
  max-height: 90vh; 
  overflow: auto;
}


/* Fixed Top Section */
.modal-fixed-header {
  position: relative;
  top: 0;
  background: white;
  z-index: 10;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.modal-fixed-header h2 {
  margin-top: 12px;
  font-weight: 600;
  
}

/* Scrollable Content */
.modal-scrollable {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
  max-height: 50vh;
}

.modal-scrollable p {
margin-top: 10px;
margin-bottom: 10px;
}

.modal-scrollable strong {
  font-weight: 600;
}

/* Fixed Bottom Buttons */
.modal-fixed-footer {
  position: sticky;
  bottom: 0;
  background: white;
  z-index: 10;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid #ddd;
}

/* Show Modal */
.modal-overlay.active {
  display: flex;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
  opacity: 1;
}

/* Close Button */
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
}


/* Style for modal steps list */
#modal-steps {
  list-style-type: disc; /* Default bullet points */
  padding-left: 30px; /* Indent for better readability */
  margin-top: 10px;
}

/* Style for each step */
#modal-steps li {
  color: #333; /* Dark gray text */
  margin-bottom: 6px;
  line-height: 1.4;
}

/* Optional: Custom bullet icon */
#modal-steps li::marker {
  color: #000000; /* Custom bullet color */
}


/* Coupon Code */
#modal-coupon {
  background-color: transparent;
  padding: 12px 0px;
  font-size: 16px;
  text-align: center;
  border-radius: 5px;
  margin-bottom: 15px;
  cursor: pointer;
  display: block;
  width: 100%;
  border: 2px solid  #b1afaf;
  font-weight: 600;
}


#modal-coupon:hover {
  border: 2px solid #222;
}


/* Redeem Now Button */
#modal-redeem {
  display: block;
  background: #7834d9;
  color: white;
  font-size: 16px;
  border-radius: 5px;
  text-decoration: none;
  width: 100%;
  text-align: center;
  margin-top: 10px;
  margin-left: 0;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0px;
  font-weight: 600;
}


#modal-redeem:hover {
  background: #622baf;
}


/* ===== Custom Scrollbar for Website & Modal ===== */

/* For WebKit Browsers (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 8px; /* Thin scrollbar */
}



/* Scrollbar inside modal (if needed, add a class for modal) */
.modal-scrollable::-webkit-scrollbar {
  width: 6px; /* Even thinner scrollbar inside modal */
}


/* ===== For Firefox ===== */
* {
  scrollbar-width: thin;
}






/* Responsive Modal */
@media (max-width: 480px) {

  main {
    padding: 20px;
  }

  

  .modal-content {
    width: 95%;
    max-width: 50vh; /* Smaller width */
    max-height: 80vh; /* Increase for small screens */
  }
  .modal-scrollable {
    max-height: calc(80vh - 300px); /* More space for scrolling */
  }

  .modal-image {
    height: 160px;
  }
}



   /* Unique Bottom Navigation Bar */
   #custom-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    z-index: 999;
    transition: transform 0.3s ease-in-out;
}

/* Hide on scroll */
#custom-bottom-bar.hidden {
    transform: translateY(100%);
}

/* Button Wrapper to balance spacing */
.button-wrapper {
    flex: 1; /* Equal spacing for both sides */
    display: flex;
    justify-content: center;
}

/* Buttons */
#custom-bottom-bar button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #000000;
    font-weight: bold;
    text-decoration: none;
    padding: 10px 25px;
}

#custom-bottom-bar i {
    font-size: 18px;
margin-right: 5px;
}

/* Separator */
.separator {
    width: 1px;
    height: 24px;
    background: #000000;
}

@media (min-width: 768px) {
  #custom-bottom-bar {
      width: 300px; /* Fixed width */
      height: 60px; /* Fixed height */
      bottom: 20px;
      right: auto;
      left: 39%;
      border-radius: 7px;
      justify-content: space-around;
      padding: 10px;
      z-index: 1000;
      background-color: #ffc107;
      

  }

  /* Hide separator on desktop */
  .separator {
    width: 1px;
    height: 24px;
    background: #000000;
  }

  /* Center buttons inside the box */
  .button-wrapper {
      flex: none;
      width: auto;
  }

  /* Hide on scroll */
#custom-bottom-bar.hidden {
  transform: translateY(100px);
}

}






