:root {
  --card-bg: #ffffff;
  --text-color: #111;
  --highlight: #c1a92e;
}
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--card-bg);
  color: var(--text-color);
}

body.dark-mode {
  --card-bg: #121212;
  --text-color: #f9f9f9;
  --highlight: #d3b647;
  background-color: #121212;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Shared buttons */
.btn, .buy-btn {
  display: inline-block;
  background-color: var(--highlight);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn:hover, .buy-btn:hover {
  background-color: #a0882e;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ddd;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.main-header .logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #2d2d2d;
}

.dark-mode .main-header {
  background-color: #222;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
}

.hamburger {
  font-size: 24px;
  margin-right: 20px;
  cursor: pointer;
}

.sidebar {
  background-color: var(--card-bg);
  width: 270px;
  padding: 1rem;
  height: 100%;
  overflow-y: auto;
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out, background 0.3s ease;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar .menu > li {
  margin-bottom: 10px;
  font-weight: bold;
  cursor: pointer;
}

.sidebar .submenu {
  list-style: none;
  padding-left: 20px;
  margin-top: 5px;
  display: none;
}

.sidebar .menu > li:hover .submenu,
.sidebar .menu > li:focus-within .submenu {
  display: block;
}

.sidebar .submenu li {
  font-weight: normal;
  margin: 5px 0;
  cursor: pointer;
}
.menu-item:hover {
  color: var(--highlight);
}

/* Hero Section */
.hero {
  background: linear-gradient(to right, grey, green, gold);
  color: white;
  padding: 50px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2em;
}

/* Search Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: #eee;
  padding: 15px;
  justify-content: center;
}

.filters input,
.filters select {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 250px;
  height: 100%;
  background-color: var(--card-bg);
  overflow-y: auto;
  transition: left 0.3s ease;
  z-index: 999;
  padding: 1rem;
}

.sidebar.active {
  left: 0;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.4);
  width: 100%;
  height: 100%;
  z-index: 998;
}

.overlay.active {
  display: block;
}

/* =======================
   HOMEPAGE SPECIFIC
========================== */
.home-hero {
  padding: 4rem 2rem;
  background: linear-gradient(to right, #f4f4f4, #e8e8e8);
  text-align: center;
}

.home-hero h1 {
  font-size: 2.5rem;
  color: var(--highlight);
}

.home-services {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 2rem;
}

/* =======================
   LANDING PAGE SPECIFIC
========================== */
.landing-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
}

.subcat-filter {
  text-align: center;
  margin-bottom: 2rem;
}

.subcat-filter input,
.subcat-filter select {
  padding: 10px 15px;
  margin: 0.5rem;
  width: 80%;
  max-width: 250px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 25px;
  outline: none;
  transition: all 0.3s ease;
}

.subcat-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.subcat-card {
  background-color: var(--card-bg);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.subcat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.subcat-card img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

.subcat-card .price {
  color: var(--highlight);
  font-weight: bold;
}

/* ===========================
   CATEGORY & LISTINGS SECTIONS
=========================== */
.categories,
.listings {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.categories h2,
.listings h2 {
  margin-bottom: 1rem;
}

.category-grid,
.listing-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background-color: var(--card-bg);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: background 0.3s ease;
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
}

/* Footer */
.footer {
  background-color: #ddd;
  color: #333;
  text-align: center;
  padding: 20px 10px;
  margin-top: 40px;
}

body.dark-mode .footer {
  background-color: #1f1f1f;
  color: #aaa;
}

/* ===========================
   MEDIA QUERIES
=========================== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .menu-toggle,
  .mode-toggle {
    padding: 8px 10px;
    font-size: 22px;
  }

  .sidebar {
    width: 80%;
  }
}
.post-ad-container, .admin-container {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  background-color: var(--bg, #fff);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.post-ad-container form input,
.post-ad-container form textarea,
.post-ad-container form select {
  width: 100%;
  margin: 10px 0;
  padding: 10px;
}

.ad-card {
  background: #f5f5f5;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.ad-card img {
  width: 100%;
  border-radius: 6px;
}

button.approve-btn {
  background-color: green;
  color: white;
  margin-right: 10px;
}

button.reject-btn {
  background-color: red;
  color: white;
}
