@import url('https://fonts.googleapis.com/css2?family=Jost:wght@100..900&display=swap');

:root {
  --brown: #6b4f3b;
  --brown-dark: #4e3729;
}

/* ─── BASE ───────────────────────── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Jost", sans-serif;
}

body {
  background: #f5f5f5;
}

/* ─── LISTING HEADER ───────────────────────── */

.listing {
  padding: 120px 20px 60px;
}

.listing-top {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.listing-heading {
  font-size: 28px;
  font-weight: 500;
  color: #2c2c2c;
}

/* CONTROLS */
.listing-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-btn {
  padding: 10px 14px;
  border: none;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sort-select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
}

/* ─── GRID ───────────────────────── */

.listing-grid {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

/* CARD */
.listing-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: 0.3s ease;
  position: relative;
}

.listing-card:hover {
  transform: translateY(-6px);
}

/* IMAGE */
.card-link {
  text-decoration: none;
  color: inherit;
}

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

/* INFO */
.listing-info {
  padding: 12px 15px;
}

.listing-info h3 {
  font-size: 15px;
  margin-bottom: 5px;
  color: #222;
}

.price {
  color: var(--brown);
  font-weight: 600;
}

/* TAGS */
.product-tags {
  padding: 10px 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 4px 8px;
  background: #f1f1f1;
  border-radius: 20px;
  text-decoration: none;
  color: #555;
  transition: 0.3s;
}

.tag:hover {
  background: var(--brown);
  color: white;
}

/* ACTIONS */
.listing-actions {
  display: flex;
  gap: 10px;
  padding: 15px;
}

.btn-cart,
.btn-buy {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-cart {
  background: #eee;
}

.btn-cart:hover {
  background: #ddd;
}

.btn-buy {
  background: var(--brown);
  color: white;
}

.btn-buy:hover {
  background: var(--brown-dark);
}

/* ─── EMPTY STATE ───────────────────────── */

.no-products {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}

.no-products i {
  font-size: 50px;
  color: #ccc;
  margin-bottom: 10px;
}

.reset-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--brown);
  text-decoration: none;
}

/* ─── FILTER DRAWER ───────────────────────── */

.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 100;
}

.filter-overlay.active {
  opacity: 1;
  visibility: visible;
}

.filter-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 20px rgba(0,0,0,0.1);
  padding: 20px;
  transition: 0.35s ease;
  z-index: 110;
  overflow-y: auto;
}

.filter-drawer.active {
  right: 0;
}

.filter-drawer h3 {
  margin-bottom: 20px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group h4 {
  margin-bottom: 10px;
  font-size: 14px;
  color: #444;
}

.filter-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #555;
  cursor: pointer;
}

/* FILTER BUTTONS */
.filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.reset-btn,
.apply-btn {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.reset-btn {
  background: #eee;
}

.apply-btn {
  background: var(--brown);
  color: white;
}

/* ─── RESPONSIVE ───────────────────────── */

/* TABLET */
@media (max-width: 1024px) {

  .listing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .listing-top {
    gap: 15px;
  }

  .card-link img {
    height: 320px;
  }

  .listing-heading {
    font-size: 26px;
  }
}

/* MOBILE */
@media (max-width: 600px) {

  /* KEEP 2 PRODUCTS IN A ROW */
  .listing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .listing {
    padding: 100px 15px 40px;
  }

  .listing-top {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 25px;
  }

  .listing-heading {
    font-size: 22px;
  }

  .listing-controls {
    width: 100%;
    display: flex;
    gap: 10px;
  }

  .filter-btn,
  .sort-select {
    flex: 1;
    font-size: 13px;
    padding: 9px;
  }

  /* CARD */
  .listing-card {
    border-radius: 10px;
  }

  .card-link img {
    height: 220px;
  }

  .listing-info {
    padding: 10px;
  }

  .listing-info h3 {
    font-size: 13px;
    line-height: 1.4;
  }

  .price {
    font-size: 14px;
  }

  /* TAGS */
  .product-tags {
    padding: 8px 10px;
    gap: 5px;
  }

  .tag {
    font-size: 10px;
    padding: 3px 7px;
  }

  /* BUTTONS */
  .listing-actions {
    flex-direction: column;
    gap: 6px;
    padding: 10px;
  }

  .btn-cart,
  .btn-buy {
    font-size: 12px;
    padding: 7px;
  }

  /* FILTER DRAWER */
  .filter-drawer {
    width: 85%;
  }

  /* WISHLIST */
  .wishlist-btn {
    width: 34px;
    height: 34px;
    top: 0.7rem;
    right: 0.7rem;
  }

  .wishlist-btn i {
    font-size: 1rem;
  }
}

/* ─── WISHLIST ───────────────────────── */

.listing-card {
  position: relative;
}

.wishlist-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 10;
  transition: all 0.3s;
}

.wishlist-btn:hover {
  transform: scale(1.1);
}

.wishlist-btn i {
  color: #e74c3c;
  font-size: 1.2rem;
}

.wishlist-btn.active i {
  font-weight: 900;
}