/* Catalog layout */
.ff-catalog{
  display:flex;
  gap:18px;
  padding-top:18px;
  padding-bottom:28px;
}

.ff-sidebar{
  flex:0 0 320px;
  background:#f8f8f8;
  border:1px solid #eee;
  border-radius:10px;
  padding:14px;
}

.ff-content{
  flex:1;
}

.ff-filter-btn{
  display:none;
  width:100%;
  background:#cc0000;
  color:#fff;
  border:none;
  border-radius:10px;
  padding:12px 14px;
  font-weight:800;
  letter-spacing:.4px;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.ff-filter-btn svg{width:18px;height:18px}

/* Breadcrumb */
.ff-breadcrumb{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  padding-top:14px;
  font-size:13px;
  color:#666;
}
.ff-breadcrumb a{
  color:#111;
  font-weight:700;
  text-decoration:none;
}
.ff-breadcrumb a:hover{ text-decoration:underline; }
.ff-breadcrumb .sep{ color:#aaa; }
.ff-breadcrumb .current{
  color:#666;
  font-weight:700;
}

/* Topbar (results + sort) */
.ff-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:0px;
}

.ff-content{margin-top:-20px;}
.ff-results-title{
  font-weight:900;
  font-size:18px;
  display:none;
}
.ff-sort{
  display:flex;
  align-items:center;
  gap:10px;
}
.ff-sort label{
  font-size:13px;
  font-weight:800;
  color:#333;
}
.ff-sort select{
  border:1px solid #eee;
  border-radius:10px;
  padding:10px 12px;
  background:#fff;
  font-weight:700;
  cursor:pointer;
  outline:none;
}

/* Products grid */
.ff-products{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.ff-card{
  border:1px solid #eee;
  background:#fff;
  border-radius:10px;
  padding:10px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.ff-card .thumb{
  width:100%;
  aspect-ratio: 1 / 1;
  background:#f2f2f2;
  border-radius:8px;
  overflow:hidden;
}
.ff-card .thumb img{width:100%;height:100%;object-fit:cover;display:block}

.ff-card .vendor{
  margin-top:10px;
  font-size:12px;
  color:#666;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.4px;
}
.ff-card .title{
  margin-top:6px;
  font-size:14px;
  font-weight:700;
  min-height:40px;
  line-height:1.3;
}
.ff-card .row{
  margin-top:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding-top:10px;
}
.ff-card .price{
  font-weight:800;
}
.ff-card .actions{
  font-size:13px;
  color:#333;
  display:flex;
  gap:8px;
  white-space:nowrap;
}
.ff-card .actions a,
.ff-card .actions button{
  background:none;
  border:none;
  padding:0;
  color:#333;
  cursor:pointer;
  font-weight:700;
}
.ff-card .actions a:hover,
.ff-card .actions button:hover{color:#cc0000}

.ff-pagination{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  padding-top:18px;
}
.ff-pagination a{
  border:1px solid #eee;
  padding:8px 12px;
  border-radius:10px;
  background:#fff;
  font-weight:700;
}
.ff-pagination a.active{
  border-color:#cc0000;
  color:#cc0000;
}
.ff-pagination a:hover{background:#fafafa}

/* Filter UI */
.ff-filter-block{margin-bottom:14px}
.ff-filter-title{font-weight:900;margin-bottom:8px}
.ff-filter-pill{ font-size:12px; color:#666; }

/* ===== PRICE FILTER (dual-thumb, single bar) ===== */
.ff-price-filter{ margin-top:0; }

.ff-price-meta{
  display:flex;
  gap:12px;
  padding:6px 10px 0;
}
.ff-price-line{
  display:flex;
  gap:8px;
  align-items:baseline;
  font-size:13px;
  color:#666;
}
.ff-price-line strong{
  color:#111;
  font-weight:900;
}

/* One track + fill + two thumbs on top */
.ff-range{
  position:relative;
  height:34px;
  margin: 10px 10px 0;
}
.ff-range-track{
  position:absolute;
  left:0; right:0;
  top:50%;
  transform:translateY(-50%);
  height:6px;
  border-radius:999px;
  background:#e9e9e9;
}
.ff-range-fill{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  height:6px;
  border-radius:999px;
  background:#ddd;
  left:0%;
  width:100%;
}

/* range inputs overlayed; only thumbs are draggable */
.ff-range-input{
  position:absolute;
  left:0; right:0;
  top:0;
  width:100%;
  height:34px;
  background:transparent;
  -webkit-appearance:none;
  appearance:none;
  margin:0;
  pointer-events:none; /* allow track click-through; thumbs will re-enable */
}
.ff-range-input.on-top{ z-index:4; }
.ff-range-input:not(.on-top){ z-index:3; }

/* Chrome/Safari thumb */
.ff-range-input::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  border:2px solid #ddd;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
  pointer-events:auto; /* draggable */
  cursor:pointer;
}

/* Chrome track hidden (we draw our own) */
.ff-range-input::-webkit-slider-runnable-track{
  height:6px;
  background:transparent;
}

/* Firefox */
.ff-range-input::-moz-range-thumb{
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  border:2px solid #cc0000;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
  pointer-events:auto;
  cursor:pointer;
}
.ff-range-input::-moz-range-track{
  height:6px;
  background:transparent;
}
.ff-range-input::-moz-range-progress{
  background:transparent;
}

/* numeric inputs */
.ff-price-inputs{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
}
.ff-price-inputs input{
  width:100%;
  border:1px solid #eee;
  border-radius:8px;
  padding:10px;
  background:#fff;
  font-weight:700;
  outline:none;
}
.ff-price-inputs span{
  color:#999;
  font-weight:900;
}

/* Mobile */
@media (max-width: 1024px){
  .ff-catalog{display:block}
  .ff-filter-btn{display:flex;margin-top:14px}
  .ff-sidebar{
    display:none;
    margin-top:12px;
  }
  .ff-sidebar.open{display:block}
  .ff-products{grid-template-columns:repeat(2, minmax(0, 1fr));}
}

/* Simple wishlist toast */
.ff-toast{
  position:fixed;
  right:18px;
  bottom:18px;
  background:#111;
  color:#fff;
  padding:10px 12px;
  border-radius:10px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  font-weight:700;
  display:none;
  z-index:999;
}
.ff-toast.show{display:block}

/* WP-like filter blocks */
.ff-attr-filter{
  margin-top: 18px;
  padding: 0;
  background: #f8f8f8;
  border-radius: 5px;
}
.ff-attr-title{
  margin-top: 0;
  font-size: 17px;
  color: #333;
  padding: 10px 10px 0;
  font-weight: 800;
}
.ff-attr-search{
  width: calc(100% - 20px);
  padding: 10px;
  margin: 10px;
  border: 1px solid #eee;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  background:#fff;
}
.ff-attr-list{
  max-height: 180px;
  overflow-y: auto;
  margin: 0 10px 10px;
}
.ff-attr-list.two-col{
  display:flex;
  flex-wrap:wrap;
  gap:0 16px;
}
.ff-attr-list.two-col .ff-attr-item{
  width:calc(50% - 8px);
  border-bottom:1px solid #eee;
}
.ff-attr-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  cursor:pointer;
}
.ff-attr-checkbox{ margin:0; }
.ff-attr-name{ flex:1; font-size:14px; color:#333; }
.ff-attr-count{ font-size:12px; color:#666; }

.ff-clear-wrap{ padding:0 10px 10px; }
.ff-clear-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#fff;
  border:1px solid #666;
  border-radius:3px;
  color:#333;
  padding:5px 10px;
  font-size:15px;
  margin-right:5px;
  margin-bottom:5px;
}
.ff-clear-x{
  border:none;
  background:none;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  padding:0;
  color:#333;
}
.ff-clear-all{
  width:100%;
  padding:10px;
  border:1px solid #eee;
  border-radius:6px;
  background:#fff;
  font-weight:800;
  cursor:pointer;
}
.ff-show-results{
  width:100%;
  padding:10px;
  background:#cc0000;
  color:#fff;
  border:none;
  border-radius:4px;
  cursor:pointer;
  margin-top:10px;
  font-weight:900;
}
@media (min-width: 768px){
  .ff-show-results{ display:none !important; }
}

/* =========================================================
   OVERRIDE: category product cards match home-trending cards
   ========================================================= */

.ff-catalog,
.ff-sidebar,
.ff-content{
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 30px;
}

.ff-content .ff-card .vendor{
  font-weight: 300;
  font-size: 13px;
  color:#333;
  text-transform: none;
  letter-spacing: 0;
}

.ff-content .ff-card .title{
  font-weight: 300;
  font-size: 14px;
  line-height: 1.2;
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ff-content .ff-card .price{
  font-weight: 600;
  font-size: 16px;
}

.ff-content .ff-card .actions{
  font-size: 13px;
}
.ff-content .ff-card .actions a,
.ff-content .ff-card .actions button{
  font-weight: 300;
  color:#111;
}
.ff-content .ff-card .actions a:hover,
.ff-content .ff-card .actions button:hover{
  color:#111;
  text-decoration: underline;
}

@media (max-width: 900px){
  .ff-content .ff-card .row{
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
  }
  .ff-content .ff-card .actions{
    font-size: 12px;
  }
}