/* File: assets/css/multi.css */
/* Bring only those which affects mobile responsive design first */
/* ============================ */
/* first: Filter (Sidebar), Listing, Cards */ 

/* Main Content */
    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0.3rem 1rem;
    }

    .category-header {
      margin-bottom: 1.5rem;
    }

    .category-header h1 {
      font-size: 1.75rem;
      margin-bottom: 0.25rem;
    }

    .category-header p {
      color: var(--gray);
    }

    /* Layout */
    .category-layout {
      display: grid;
      grid-template-columns: 250px 1fr;
      gap: 1.5rem;
    }

/* breadcrumb */
.breadcrumb {
  display: flex;
  list-style: none;
  padding: 0.5rem;
  margin: 0 0 1rem;         
    font-size: 0.875rem;
    color: var(--dark);
    gap: 0.1rem;
    }
    .breadcrumb-item {
    margin-right: 0.5rem;
    }

.breadcrumb li {
  display: inline;
}
.breadcrumb li + li:before {
  content: ">";
  margin: 0 0.5rem;
  color: var(--gray);
}
.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}

/* Chips */
.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f9f9f9;
  max-width: 95%;
}
.horizontal-scroll::-webkit-scrollbar {
  height: 8px;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.chip-btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: #f1f3f6;
  color: #333;
  border: 1px solid #e0e0e0;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.chip-btn:hover, .chip-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Filter (Sidebar) */
 .sidebar {
      background: var(--white);
      padding: 1.5rem;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      height: fit-content;
      position: sticky;
      top: 80px;
      /* border-top: 1px solid var(--gray);
      z-index: 10; */
    }

    .sidebar h3 {
      margin-bottom: 1rem;
      font-size: 1rem;
      color: rgb(128, 130, 130);
    }
    .filter-group {
      margin-bottom: 1.5rem;
    }
    .filter-list {
      list-style: none;
    }
    .filter-list li {
      margin-bottom: 0.5rem;
    }
      .filter-list a {
      display: flex;
      justify-content: space-between;
      color: var(--dark);
      text-decoration: none;
      padding: 0.5rem 0;
    }
     .filter-list a:hover {
      color: var(--primary);
    }

    /* Modern input number styling */
    .price-input::-webkit-outer-spin-button,
    .price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    }
    .price-input {
      width: 100%;
      padding: 0.5rem;
      /* border: 3px solid var(--gray); */
      border-radius: var(--radius);
      margin: 0.5rem 0;
      border: 2px solid var(--gray);
      box-shadow: 0 1px 3px rgba(0, 0,0,0.1)
    }

    

    .price-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
    }
    button.apply-btn {
        background: var(--primary);
        color: white;
        border: none;
        border-radius: var(--radius);
        padding: 0.75rem 1rem;
        cursor: pointer;
        font-size: 1rem;
        margin-top: 1rem;
    }

/* Filter Toggle Button */
.filter-toggle {
    display: none;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 0.5rem;
    cursor: pointer;        
    font-size: 1rem;
    margin-bottom: 1rem;
}
.fiter-icon {
    margin-right: 0.5rem;
}  
/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 50;
}   



/* Results Grid */

.section-title {
      font-size: 1.3rem;
      margin-bottom: 0.3rem;
      color: var(--dark);
        font-weight: 600;
    }
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.listing-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.listing-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.listing-card img {
            width: 100%;
            height: 160px;
            object-fit: cover;
        }

.listing-link {
            text-decoration: none;
            color: inherit;
            display: block;
        }
/* .listing-image {
    height: 200px;
    overflow: hidden;
    position: relative;
} */

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.listing-card:hover .listing-image img {
    transform: scale(1.05);
}

.listing-image.no-image {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.listing-image.no-image i {
    font-size: 50px;
}

.listing-details {
    padding: 15px;
}

.listing-details h3 {
    font-size: 16px;
    margin: 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-details .price {
    font-weight: bold;
    font-size: 18px;
    color: var(--primary);
    margin: 0 0 8px;
}

.listing-details .location,
.listing-details .date {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Pagination styles */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
.clearfix {
    overflow: hidden;
}
/* .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    /* margin: 2rem 0 1rem 0; */
/*} */
.pagination a, .pagination span {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 5px;
    background: #f0f2f5;        
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.pagination a:hover {
    background: #007bff;
    color: #fff;
}
.pagination .active {
    background: #007bff;
    color: #fff;
    pointer-events: none;
}

/* MEDIA QUERIES */
@media (max-width: 768px) {
    .category-layout {
        grid-template-columns: 1fr;
      }

      .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s;
        overflow-y: auto;
      }

      .sidebar.active {
        left: 0;
      }

      .sidebar-overlay.active {
        display: block;
      }

      .filter-toggle {
        display: block;
        margin-bottom: 1rem;
      }

      .filter-btn {
        padding: 0.75rem 1rem;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: var(--radius);
        cursor: pointer;
      }

      .close-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
      }

        .listings-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .listing-card {
        min-width: 0; /* Prevent overflow */
    }
}

