/* =========================
   LISTING PAGE
   ========================= */

/* ----- Toolbar ----- */
.listing-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.listing-toolbar-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

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

.listing-label{
  font-size:.7rem;
  font-weight:600;
  letter-spacing:.08rem;
  text-transform:uppercase;
  color:#6c757d;
  white-space:nowrap;
}

.listing-select .form-select{
  width:auto;
  min-width:140px;
}

/* ----- Empty state ----- */
.listing-empty{
  border: 1px dashed #ddd;
  border-radius: 14px;
  padding: 24px;
  background: #fafafa;
}

/* ========= Select Pop (dropdown compact) ========= */

.select-pop{ position: relative; }

.select-pop-native{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.select-pop-trigger{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 8px;
  border:1px solid #eee;
  background:#fff;
  border-radius:12px;
  cursor:pointer;
  white-space:nowrap;
}

.select-pop-trigger:hover{
  border-color:#ddd;
  background:#fafafa;
}

.select-pop-value{
  font-size:.8rem;
  font-weight:600;
  color:#111;
}

.select-pop-trigger i{
  font-size:.6rem;
  color:#777;
}

.select-pop-panel{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;
  background:#fff;
  border:1px solid #eee;
  border-radius:14px;
  box-shadow:0 18px 40px rgba(0,0,0,.12);
  padding:8px;
  z-index: 50;
}

.select-pop-item{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:0;
  background:transparent;
  text-align:left;
  border-radius:10px;
  cursor:pointer;
  font-size:.95rem;
  color:#111;
}

/* “radio” visuel */
.select-pop-item::before{
  content:"";
  width:16px;
  height:16px;
  border-radius:999px;
  border:1px solid #111;
  display:inline-block;
  flex:0 0 16px;
  box-sizing:border-box;
}

.select-pop-item.active::before{
  border-width:5px;
}

.select-pop-item:hover{
  background:#faf7f3;
}

/* mobile: panneau prend plus de place */
@media (max-width: 768px){
  .select-pop-panel{
    left:auto;
    right:0;
    min-width: 240px;
  }
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {

  .order-mobile-first {
    order: -1 !important;
  }

  .shop-product-fillter {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sort-by-product-area {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .sort-by-cover {
    width: 100%;
  }

  .sort-by-product-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background-color: #f7f8f9;
    border: 1px solid #cce7d0;
    border-radius: 20px;
  }

  .sort-by-dropdown-wrap {
    flex-grow: 1;
    text-align: right;
  }

  .sort-by-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 10;
  }
}




/* 1) La vraie cause : margin-bottom dans .card-product */
.listing-grid .card-product{
  margin-bottom: 0 !important;
}

/* 2) Ajuster l’espace entre colonnes/lignes (comme home) */
.listing-grid.row.g-3{
  --bs-gutter-y: 1rem;   /* vertical */
  --bs-gutter-x: .25rem; /* horizontal */
}

/* 3) (Optionnel) si ton thème rajoute du padding aux colonnes */
.listing-grid.row.g-3 > [class*="col-"]{
  padding-left: .2rem;
  padding-right: .2rem;
}


.listing-grid-wrap{ position:relative; }
.listing-loading-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(1px);
  z-index: 5;
}

.listing-pagination{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:6px;
  margin:30px 0;
}

.page-btn{
  min-width:36px;
  height:36px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  font-size:.85rem;
  font-weight:500;
  cursor:pointer;
  transition:all .2s ease;
}

.page-btn:hover{
  background:#111;
  color:#fff;
  border-color:#111;
}

.page-btn.active{
  background:#111;
  color:#fff;
  border-color:#111;
  font-weight:600;
}

.page-btn.nav-btn{
  font-size:1.2rem;
  padding-bottom:2px;
}

.page-btn{
  border:none;
  background:transparent;
}
.page-btn:hover{
  background:#f5f5f5;
}
.page-btn.active{
  background:#111;
  color:#fff;
}

