:root {
  --green-dark: #0f3d2e;
  --green-mid: #2f5d4a;
  --cream: #f5f3ef;
  --white: #ffffff;
  --text-dark: #10362a;
  --border: #d8ddd8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--cream);
  color: var(--text-dark);
}

/* ---------- TOP HEADER ---------- */
.top-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 140px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

/* LEFT SIDE */
.top-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--green-dark);
  text-decoration: none;
}

.top-header-left p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

/* Desktop/Mobile greeting visibility */
.greeting-desktop {
  display: inline;
}

.greeting-mobile {
  display: none;
}

.auth-separator {
  color: var(--green-dark);
}

/* CREDITS DISPLAY */
.credits-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0f3d2e, #2f5d4a);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}

.credits-display:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 61, 46, 0.3);
}

.credits-display .credits-amount {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.credits-display .material-icons-outlined {
  font-size: 16px;
}

/* RIGHT SIDE */
.top-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

.top-header-right a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--green-dark);
}

/* ---------- MOBILE MENU ---------- */
/* Desktop nav links container */
.desktop-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.desktop-nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--green-dark);
}

/* Mobile menu button - hidden on desktop */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--green-dark);
  border-radius: 8px;
  transition: background 0.15s ease;
}

.mobile-menu-btn:hover {
  background: rgba(15, 61, 46, 0.08);
}

.mobile-menu-btn.active {
  background: rgba(15, 61, 46, 0.1);
}

.mobile-menu-btn .material-icons-outlined {
  font-size: 24px;
  display: block;
}

/* Mobile dropdown menu - hidden by default */
.mobile-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  min-width: 180px;
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-nav-dropdown.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--green-dark);
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s ease;
}

.mobile-nav-dropdown a:last-child {
  border-bottom: none;
}

.mobile-nav-dropdown a:hover {
  background: #f8faf8;
}

.mobile-nav-dropdown a .material-icons-outlined {
  font-size: 20px;
  color: #6b857a;
}

/* ---------- HEADER ---------- */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 140px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;

  position: fixed;
  top: 49px;
  left: 0;
  right: 0;
  z-index: 99;
}


.logo {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--green-dark);
}

.search {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.search input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  outline: none;
}

.search button {
  background: var(--green-dark);
  color: white;
  border: none;
  padding: 0 18px;
}

.header-right {
  font-size: 14px;
}

.logout {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark);
}

/* ---------- HERO ---------- */
.hero {
  margin: 32px;
  padding: 12px 12px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--green-mid), #4f7c6a);
  color: white;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: 44px;
}

.hero p {
  margin-top: 10px;
  font-size: 16px;
  opacity: 0.9;
}

/* ---------- LISTINGS ---------- */
.section {
  padding: 140px 140px 80px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 340px));
  gap: 32px;
}

/* ---------- AIRBNB STYLE CARD lol ---------- */
.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px rgba(0,0,0,0.1);
}

.image-wrap {
  position: relative;
}

.image-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* IMAGE CONTAINER */
.image-wrap {
  position: relative;
  height: 220px;
  background: #f6f7f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* LOGO MODE */
.logo-wrap img {
  max-width: 70%;
  max-height: 70%;
  width: auto;
  height: auto;
  object-fit: contain;
}


.save-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.save-btn span {
  font-size: 20px;
  color: #d46b6b;
}

.your-listing-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 61, 46, 0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ---------- BODY ---------- */
.listing-body {
  padding: 16px 18px 18px;
}

.listing-title {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
}

.rating {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
}

.rating span.material-icons-outlined {
  font-size: 14px;
}

.listing-meta {
  font-size: 13px;
  color: #6b857a;
  margin: 4px 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-meta .material-icons-outlined {
  font-size: 15px;
}

.listing-meta.listed-by {
  margin-bottom: 10px;
}

.listing-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.listing-details span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 8px;
}

.listing-footer .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price {
  font-size: 16px;
  font-weight: 600;
  color: var(--green-dark);
}

.price span {
  font-size: 13px;
  font-weight: 400;
}

.listing-footer .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f0f4f0;
  color: var(--green-dark);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 600;
}

.listing-footer .share-btn:hover {
  background: #e8f0e8;
  transform: scale(1.05);
}

.listing-footer .share-btn .material-icons-outlined {
  font-size: 18px;
}

.listing-footer .purchase-btn {
  background: var(--green-dark);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.listing-footer .purchase-btn:hover {
  background: #0c2f25;
}

/* ---------- CREATE LISTING BUTTON ---------- */
.create-listing-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  background: var(--green-dark);
  color: white;
  text-decoration: none;

  padding: 14px 22px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 600;

  box-shadow: 0 18px 32px rgba(0,0,0,0.25);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
  z-index: 999;
}

.create-listing-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px rgba(0,0,0,0.3);
  background: #0c2f25;
}

/* Icon */
.create-listing-btn .btn-icon {
  width: 18px;
  height: 18px;
  color: white;
}

/* Mobile spacing */
@media (max-width: 600px) {
  .create-listing-btn {
    bottom: 20px;
    right: 20px;
  }
}


/* ---------- FILTER BAR ---------- */
.filter-bar {
  margin: 12px 0 24px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.filter-tabs button {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-dark);
}

.filter-tabs button.active {
  background: var(--green-dark);
  color: white;
}

.results-count {
  font-size: 13px;
  color: #6b857a;
  white-space: nowrap;
}

/* ---------- EMPTY STATE (PROMINENT) ---------- */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 35px 24px 140px;
  width: 100%;
}

.empty-card {
  width: 100%;
  max-width: 720px;
  padding: 64px 56px;
  text-align: center;
  background: transparent;
  margin: 0 auto;
}

.empty-icon {
  width: 110px;
  height: 110px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(15,61,46,0.18),
    rgba(15,61,46,0.08)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
}

.empty-icon svg {
  width: 54px;
  height: 54px;
}

.empty-card h2 {
  font-family: "Playfair Display", serif;
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--green-dark);
}

.empty-card p {
  font-size: 17px;
  color: #5f756b;
  margin: 0 auto 36px;
  max-width: 520px;
  line-height: 1.65;
}

.empty-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.empty-cta.primary {
  background: var(--green-dark);
  color: white;
  padding: 16px 34px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 20px 48px rgba(0,0,0,0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.empty-cta.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 56px rgba(0,0,0,0.26);
}

.empty-hint {
  font-size: 13px;
  color: #7a9187;
}

/* ---------- SEARCH SUGGESTIONS ---------- */

.search-suggestions {
  margin-top: 24px;
}

.suggestions-label {
  font-size: 14px;
  color: #5f756b;
  display: block;
  margin-bottom: 12px;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.suggestion-chip {
  background: rgba(15, 61, 46, 0.08);
  border: 1px solid rgba(15, 61, 46, 0.15);
  color: var(--green-dark);
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.suggestion-chip:hover {
  background: rgba(15, 61, 46, 0.15);
  transform: translateY(-2px);
}

/* ---------- MARKETPLACE LAYOUT ---------- */
.marketplace-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  margin-top: 24px;
}

/* ---------- FILTER SIDEBAR ---------- */
.filter-sidebar {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 16px;
  height: fit-content;
  position: sticky;
  top: 140px;
}

.filter-block {
  margin-bottom: 22px;
}

.filter-block h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--green-dark);
}

.filter-block label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
  cursor: pointer;
}

.filter-block input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.filter-block input[type="range"] {
  width: 100%;
  margin-top: 8px;
}

.range-label {
  font-size: 12px;
  color: #6b857a;
  margin-top: 6px;
}

/* ---------- DAYS FILTER PILLS ---------- */
.days-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.day-pill {
  padding: 8px 14px;
  border: 2px solid var(--border);
  background: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #6b857a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.day-pill:hover {
  border-color: var(--green-dark);
  color: var(--green-dark);
}

.day-pill.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: white;
}

/* ---------- PRICE FILTER ---------- */
.price-filter {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-input-wrap {
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  transition: border-color 0.2s;
}

.price-input-wrap:focus-within {
  border-color: var(--green-dark);
}

.price-symbol {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
}

.price-input-wrap input {
  width: 100%;
  padding: 10px 8px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  outline: none;
}

.price-input-wrap input::-webkit-outer-spin-button,
.price-input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Custom range slider */
.filter-block input[type="range"] {
  -webkit-appearance: none;
  height: 6px;
  background: linear-gradient(to right, var(--green-dark) 0%, var(--green-dark) var(--value, 100%), #e0e0e0 var(--value, 100%), #e0e0e0 100%);
  border-radius: 3px;
  outline: none;
}

.filter-block input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--green-dark);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}

.filter-block input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.filter-block input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--green-dark);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ---------- DAYS TOGGLE GROUP ---------- */
.days-toggle-group {
  display: flex;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.days-toggle {
  flex: 1;
  padding: 8px 4px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #6b857a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.days-toggle:hover {
  color: var(--green-dark);
}

.days-toggle.active {
  background: white;
  color: var(--green-dark);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ---------- FILTER DIVIDER ---------- */
.filter-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ---------- SIDEBAR PROMO ---------- */
.sidebar-promo {
  background: linear-gradient(135deg, #f0f7f4 0%, #e8f5e9 100%);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.promo-icon {
  width: 44px;
  height: 44px;
  background: var(--green-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.promo-icon .material-icons-outlined {
  color: white;
  font-size: 22px;
}

.promo-content strong {
  display: block;
  font-size: 14px;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.promo-content p {
  margin: 0 0 12px;
  font-size: 12px;
  color: #5f6f68;
  line-height: 1.4;
}

.promo-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
}

.promo-link:hover {
  text-decoration: underline;
}

/* ---------- SIDEBAR STATS ---------- */
.sidebar-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.sidebar-stat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-stat .material-icons-outlined {
  width: 36px;
  height: 36px;
  background: #f5f7f5;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--green-dark);
}

.sidebar-stat div {
  flex: 1;
}

.sidebar-stat strong {
  display: block;
  font-size: 13px;
  color: var(--green-dark);
}

.sidebar-stat span {
  font-size: 11px;
  color: #8a9a94;
}

/* ---------- AD BUTTON UPDATE ---------- */
.ad-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ad-btn .material-icons-outlined {
  font-size: 18px;
}

/* ---------- RIGHT CONTENT ---------- */
.marketplace-content {
  display: flex;
  flex-direction: column;
}

/* ---------- TABLET ---------- */
@media (max-width: 1200px) {
  .top-header,
  .header,
  .section {
    padding-left: 80px;
    padding-right: 80px;
  }
}

@media (max-width: 900px) {
  .marketplace-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: relative;
    top: 0;
  }

  .top-header,
  .header,
  .section {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  /* Mobile menu visibility */
  .desktop-nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  /* Hide filter sidebar completely on mobile */
  .filter-sidebar {
    display: none !important;
  }

  /* Make marketplace layout single column without sidebar */
  .marketplace-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
  }

  /* Smaller logo in header on mobile */
  .header .logo {
    font-size: 20px;
  }

  /* Hide "Marketplace" text in header on mobile */
  .header-right {
    display: none;
  }

  /* Adjust header grid for mobile (only logo and search) */
  .header {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 14px 16px;
    top: 52px;
    position: fixed;
    left: 0;
    right: 0;
    align-items: center;
  }

  /* Make search bar more compact on mobile */
  .search {
    height: 40px;
  }

  .search input {
    padding: 0 14px;
    font-size: 14px;
    height: 100%;
  }

  .search button {
    padding: 0 14px;
    height: 100%;
  }

  /* Adjust top header for mobile */
  .top-header {
    padding: 10px 16px;
  }

  .top-header-left {
    gap: 8px;
  }

  .top-header-left p {
    font-size: 13px;
  }

  /* Mobile: Show mobile greeting, hide desktop greeting */
  .greeting-desktop {
    display: none !important;
  }

  .greeting-mobile {
    display: inline !important;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
  }

  /* Hide "or" separator on mobile when logged out - cleaner look */
  .auth-separator {
    display: inline;
    font-size: 13px;
  }

  /* Section padding adjustment for fixed headers */
  .section {
    padding: 120px 16px 100px;
  }

  /* Force listings to stack vertically (single column) */
  .listings {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  /* Make listing cards full width on mobile - aligned with heading */
  .listing-card {
    width: 100%;
  }

  /* Increase image height on mobile for larger cards */
  .image-wrap {
    height: 200px;
  }

  /* Adjust section header for mobile */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 12px;
  }

  .section-header h2 {
    font-size: 22px;
  }

  /* Empty state adjustments for mobile */
  .empty-card {
    padding: 40px 24px;
  }

  .empty-card h2 {
    font-size: 28px;
  }

  .empty-card p {
    font-size: 15px;
  }

  /* Create listing floating button adjustment */
  .create-listing-btn {
    bottom: 16px;
    right: 16px;
    padding: 12px 18px;
    font-size: 13px;
  }

  .create-listing-btn .btn-icon {
    width: 16px;
    height: 16px;
  }

  /* ========== NOTIFICATION POPUP MOBILE STYLES ========== */
  
  /* Make notification popup full-width on mobile */
  .notification-popup {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    border-radius: 20px 20px 0 0 !important;
  }

  .notification-popup.active {
    animation: slideUpMobile 0.3s ease !important;
  }

  @keyframes slideUpMobile {
    from {
      opacity: 0;
      transform: translateY(100%) !important;
    }
    to {
      opacity: 1;
      transform: translateY(0) !important;
    }
  }

  /* Hide the arrow on mobile (not needed for bottom sheet) */
  .notification-popup::before,
  .notification-popup::after {
    display: none !important;
  }

  .popup-inner {
    border-radius: 20px 20px 0 0 !important;
    border: none !important;
    border-top: 3px solid #0f3d2e !important;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.25) !important;
  }

  /* Add a drag handle indicator for mobile */
  .popup-inner::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 12px auto 8px;
  }

  .popup-header {
    padding: 8px 16px 14px !important;
    flex-wrap: wrap;
    gap: 10px;
  }

  .popup-header h3 {
    font-size: 18px !important;
    width: 100%;
    text-align: center;
  }

  .popup-header .popup-header-btns {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }

  .popup-header .mark-all-btn,
  .popup-header .clear-all-btn {
    flex: 1;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }

  .popup-content {
    max-height: calc(85vh - 120px) !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Notification items on mobile */
  .notif-item {
    padding: 14px 16px !important;
  }

  .notif-icon {
    width: 36px !important;
    height: 36px !important;
  }

  .notif-icon span {
    font-size: 18px !important;
  }

  .notif-title {
    font-size: 14px !important;
  }

  .notif-message {
    font-size: 13px !important;
  }

  .notif-time {
    font-size: 11px !important;
  }

  /* Gift card section on mobile */
  .notif-gift-card {
    padding: 10px !important;
  }

  .notif-gift-card-code {
    font-size: 14px !important;
    word-break: break-all;
  }

  .notif-copy-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px !important;
  }

  /* Empty state on mobile */
  .notif-empty {
    padding: 40px 20px !important;
  }

  .notif-empty-icon {
    width: 48px !important;
    height: 48px !important;
  }

  .notif-empty-icon span {
    font-size: 24px !important;
  }

  /* Make overlay darker on mobile for better focus */
  .popup-overlay.active {
    background: rgba(0, 0, 0, 0.5) !important;
  }
}

/* ---------- SMALL MOBILE ---------- */
@media (max-width: 480px) {
  .header .logo {
    font-size: 18px;
  }

  .search input {
    padding: 8px 12px;
    font-size: 13px;
  }

  .top-header-right {
    gap: 12px;
  }

  .top-header-right a {
    font-size: 12px;
  }

  .listing-body {
    padding: 12px 14px 14px;
  }

  .listing-title {
    font-size: 14px;
  }

  .listing-meta {
    font-size: 12px;
  }

  .price {
    font-size: 15px;
  }

  .listing-footer button {
    padding: 8px 14px;
    font-size: 12px;
  }

  /* Small mobile notification adjustments */
  .popup-header h3 {
    font-size: 16px !important;
  }

  .popup-header .mark-all-btn,
  .popup-header .clear-all-btn {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  .notif-item {
    padding: 12px 14px !important;
    gap: 10px !important;
  }

  .notif-icon {
    width: 32px !important;
    height: 32px !important;
  }

  .notif-icon span {
    font-size: 16px !important;
  }

  .notif-title {
    font-size: 13px !important;
  }

  .notif-message {
    font-size: 12px !important;
  }

  .notif-gift-card-code {
    font-size: 13px !important;
  }
}

.ad-btn {
  display: block;              /* full-width */
  width: 100%;
  text-align: center;          /* center text */
  text-decoration: none;

  background-color: #0f3d2e;
  color: white;

  padding: 12px 0;
  border-radius: 10px;
  border: 1px solid #0f3d2e;

  font-size: 14px;
  font-weight: 700;

  transition: 
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.ad-btn:hover {
  background-color: #0c2f25;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ---------- PURCHASE MODAL ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: white;
  width: 90%;
  max-width: 420px;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-card h3 {
  margin: 0 0 12px;
  font-family: "Playfair Display", serif;
  font-size: 24px;
  color: var(--green-dark);
}

.modal-card p {
  color: #5f6f68;
  font-size: 15px;
  margin: 0 0 24px;
  line-height: 1.5;
}

.modal-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--green-dark);
  text-transform: uppercase;
}

.modal-input:focus {
  border-color: var(--green-dark);
  outline: none;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.modal-btn.primary {
  background: var(--green-dark);
  color: white;
}

.modal-btn.primary:hover {
  background: #0c2f25;
  transform: translateY(-2px);
}

.modal-btn.secondary {
  background: transparent;
  color: #6b857a;
}

.modal-btn.secondary:hover {
  color: var(--green-dark);
  background: #f0f4f0;
}

.validation-message {
  color: #dc2626;
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 600;
  min-height: 20px;
}