@import url("https://fonts.googleapis.com/css?family=Inter:400,700");

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", Helvetica, sans-serif;
  color: #000000;
  background-color: #f5f5f5;
  line-height: 1.6;
}

/* Header styles */
.main-header {
  background-color: #ffffff;
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  max-width: 214px;
  height: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
}

.main-nav li {
  margin-right: 20px;
}

.main-nav a {
  color: #333;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  transition: color 0.2s;
}

.main-nav a.active {
  color: #efc037;
  font-size: 24px;
}

.main-nav a:hover {
  color: #1abc9c;
}


.user-actions {
  display: flex;
  align-items: center;
}

.new-ad-btn {
  background-color: #1abc9c;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-right: 20px;
  transition: background-color 0.2s;
}

.new-ad-btn:hover {
  background-color: #16a085;
}

.user-profile {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  cursor: pointer;
}

.user-menu {
  position: absolute;
  top: 60px;
  right: 20px;
  background-color: #ffffff;
  border-radius: 10px;
  border: 0.5px solid #000000;
  padding: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: none;
}

.user-menu ul {
  list-style: none;
}

.user-menu li {
  margin-bottom: 15px;
}

.user-menu a {
  display: flex;
  align-items: center;
  color: #000000;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.user-menu a:hover {
  color: #1abc9c;
}

.user-menu img {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.user-menu .logout {
  font-weight: 700;
  color: #1abc9c;
  font-size: 18px;
}

/* Hero section */
.hero {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.hero h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 36px;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Category navigation */
.category-nav {
  background-color: #ffffff;
  border-radius: 10px;
  border: 3px solid #1abc9c;
  max-width: 1060px;
  margin: 20px auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-nav ul {
  display: flex;
<<<<<<< HEAD
  justify-content: center;
  list-style: none;
  padding: 0;
  gap: 5px;
  flex-wrap: wrap;
=======
  justify-content: space-around;
  list-style: none;
  padding: 0;
>>>>>>> 8615dbf (new subscription & boosted Ads)
}

.category-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #777;
  text-decoration: none;
  font-size: 14px;
<<<<<<< HEAD
  padding: 12px 8px;
=======
  padding: 15px 10px;
>>>>>>> 8615dbf (new subscription & boosted Ads)
  transition: transform 0.2s, color 0.2s;
}

.category-nav a.active {
  color: #000000;
  font-weight: 600;
}

.category-nav a:hover {
  transform: translateY(-3px);
  color: #1abc9c;
}

.category-nav i {
<<<<<<< HEAD
  font-size: 22px;
  margin-bottom: 5px;
=======
  font-size: 24px;
  margin-bottom: 8px;
>>>>>>> 8615dbf (new subscription & boosted Ads)
  color: #777;
}

.category-nav a.active i {
  color: #1abc9c;
}

.category-nav a:hover i {
  color: #1abc9c;
}

/* Featured ads section */
.featured-ads {
  max-width: 1420px;
  margin: 20px auto;
  padding: 20px;
  background-color: #d9d9d9;
  border-radius: 10px;
}

.featured-ads h2 {
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: #333;
}

.ad-slider {
  position: relative;
  padding: 0 20px;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.2s;
}

.slider-btn:hover {
  background-color: #1abc9c;
  color: #ffffff;
}

.slider-btn.prev {
  left: -15px;
}

.slider-btn.next {
  right: -15px;
}

.ad-cards {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 20px;
  padding: 10px 0;
  scrollbar-width: none; /* Firefox */
}

.ad-cards::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.ad-card {
  flex: 0 0 auto;
  width: 165px;
  background-color: #ffffff;
  border-radius: 10px;
  padding: 10px;
  scroll-snap-align: start;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ad-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ad-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ad-badge {
  position: absolute;
  top: 0px;
  left: 0px;
  background-color: #EFC037;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 1;
}

.ad-image {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 5px;
}

.ad-card h3 {
  font-size: 12px;
  font-weight: 700;
  margin: 10px 0 5px;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-card .price {
  font-size: 12px;
  font-weight: 700;
  color: #000000;
}

/* Main content layout */
.main-content {
  display: flex;
  max-width: 1440px;
  margin: 20px auto;
  gap: 20px;
  padding: 0 20px;
}

/* Sidebar */
.sidebar {
  width: 300px;
  flex-shrink: 0;
}

.search-section {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-section h2, 
.map-container h2 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
  border-bottom: 2px solid #1abc9c;
  padding-bottom: 5px;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.search-input,
.address-input,
.category-select,
.state-select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  font-size: 14px;
  transition: border-color 0.2s;
}

.search-input:focus,
.address-input:focus,
.category-select:focus,
.state-select:focus {
  border-color: #1abc9c;
  outline: none;
}

.price-slider-container {
  position: relative;
  width: 100%;
  padding: 10px 0;
}

.price-slider {
  width: 100%;
  margin: 5px 0;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
}
.raduis-slider {
  width: 100%;
  margin: 5px 0;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1abc9c;
  cursor: pointer;
}

.price-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1abc9c;
  cursor: pointer;
  border: none;
}

.raduis-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1abc9c;
  cursor: pointer;
}

.raduis-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1abc9c;
  cursor: pointer;
  border: none;
}

.price-values {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 12px;
  color: #666;
}

.raduis-values {
  display: flex;
  justify-content: space-between;
  margin-top: 1px;
  font-size: 12px;
  color: #666;
}

.search-btn {
  background-color: #1abc9c;
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.search-btn:hover {
  background-color: #16a085;
}

.map-container {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.map-image {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); */
  gap: 15px;
  /* row-gap: 10; Colle les lignes entre elles */
  flex: 1;
}

.product-card {
  background-color: #ffffff;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  padding: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%;
  /* min-height: 270px;
  max-height: 300px;
  height: auto; */
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 5px;
}

.product-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 10px 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.condition {
  display: inline-block;
  background-color: #1abc9c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 45px;
  margin-bottom: 5px;
}

.price {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 5px;
}

.product-details {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #908c8c;
  flex-wrap: wrap;
}

.location-icon {
  font-size: 14px;
  margin-right: 4px;
  color: #1abc9c;
}

.product-details span {
  margin-right: 8px;
}

.product-details time {
  font-size: 11px;
  color: #999;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .main-content {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    padding: 10px;
  }
  
  .logo {
    margin-bottom: 10px;
  }
  
  .main-nav {
    margin: 10px 0;
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .user-actions {
    margin-top: 10px;
  }
  
  .category-nav ul {
    flex-wrap: wrap;
  }
  
  .hero h1 {
    font-size: 24px;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .ad-cards {
    gap: 10px;
  }
  
  .ad-card {
    width: 140px;
  }
}

/* Good template for css */
/* SOLUTION SIMPLE - ZERO SPACING */
    /* .product-grid {
      flex: 1;
    }
    
    .product-grid h2 {
      margin-bottom: 20px;
      font-size: 24px;
      color: #333;
    }
    
    .product-container {
      display: flex;
      flex-wrap: wrap;
      margin: 0 -5px;
    }
    
    .product-card {
      width: calc(25% - 10px);
      margin: 0 5px 0 5px;
      background-color: #ffffff;
      border-radius: 10px;
      border: 1px solid #e0e0e0;
      padding: 10px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .product-image {
      width: 100%;
      height: 120px;
      object-fit: cover;
      border-radius: 5px;
      margin-bottom: 8px;
    }
    
    .product-card h3 {
      font-size: 14px;
      font-weight: 700;
      margin: 5px 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    .condition {
      display: inline-block;
      background-color: #1abc9c;
      color: #ffffff;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 45px;
      margin: 2px 0;
    }
    
    .price {
      font-size: 14px;
      font-weight: 700;
      color: #000000;
      margin: 2px 0;
    }
    
    .product-details {
      display: flex;
      align-items: center;
      font-size: 12px;
      color: #908c8c;
      flex-wrap: wrap;
    }
    
    .location-icon {
      font-size: 14px;
      margin-right: 4px;
      color: #1abc9c;
    }
    
    .product-details span {
      margin-right: 8px;
    }
    
    .product-details time {
      font-size: 11px;
      color: #999;
    }
    
    @media (max-width: 1024px) {
      .main-content {
        flex-direction: column;
      }
      
      .sidebar {
        width: 100%;
        margin-bottom: 20px;
      }
      
      .product-card {
        width: calc(33.333% - 10px);
      }
    }
    
    @media (max-width: 768px) {
      .header-content {
        flex-direction: column;
        padding: 10px;
      }
      
      .logo {
        margin-bottom: 10px;
      }
      
      .main-nav {
        margin: 10px 0;
      }
      
      .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
      }
      
      .user-actions {
        margin-top: 10px;
      }
      
      .category-nav ul {
        flex-wrap: wrap;
      }
      
      .hero h1 {
        font-size: 24px;
      }
      
      .product-card {
        width: calc(50% - 10px);
        padding: 8px;
      }
    }
    
    @media (max-width: 480px) {
      .product-card {
        width: 100%;
        margin: 0 0 10px 0;
        padding: 6px;
      }
      
      .product-image {
        height: 100px;
      }
    } */