/* ========================================
   CATALOG PAGE STYLES
   ======================================== */

/* Catalog Section */
.catalog-section{
  padding:clamp(16px,3vw,24px) var(--pad) clamp(56px,7vw,96px);
}

/* Catalog Header - ABOVE filters - closer to breadcrumb */
.catalog-header{
  margin-bottom:12px;
}

.catalog-header h1{
  font-family:'Bai Jamjuree',sans-serif;
  font-size:clamp(32px,4vw,48px);
  font-weight:700;
  color:var(--dark);
  letter-spacing:-.5px;
  margin-bottom:8px;
}

.product-count{
  font-size:15px;
  color:var(--blue);
  margin-bottom:0;
  letter-spacing:-.15px;
}

.catalog-container{
  display:grid;
  grid-template-columns:240px 1fr;
  gap:40px;
  align-items:start;
}

/* === SIDEBAR FILTERS === */
.catalog-sidebar{
  position:sticky;
  top:80px;
}

.filters-head{
  padding:24px;
  background:var(--wb);
  border-radius:12px 12px 0 0;
}

.filters-head h2{
  font-family:'Bai Jamjuree',sans-serif;
  font-size:20px;
  font-weight:700;
  color:var(--dark);
  letter-spacing:-.3px;
}

/* Filter Group - NO border around */
.filter-group{
  background:#fff;
}

.filter-group:last-child{
  border-radius:0 0 12px 12px;
}

.filter-toggle{
  width:100%;
  padding:16px 24px;
  background:transparent;
  border:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
  cursor:pointer;
  transition:background .15s;
  font-family:'Bai Jamjuree',sans-serif;
  font-size:15px;
  font-weight:600;
  color:var(--dark);
  letter-spacing:-.2px;
}

.filter-toggle:hover{
  background:rgba(235,242,250,.5);
}

.filter-toggle .chevron{
  width:12px;
  height:12px;
  stroke:var(--dark);
  fill:none;
  stroke-width:1.5;
  transition:transform .2s;
  flex-shrink:0;
}

.filter-toggle.active .chevron{
  transform:rotate(180deg);
}

.filter-options{
  max-height:0;
  overflow:hidden;
  transition:max-height .3s ease;
  padding:0 24px;
}

.filter-options.active{
  max-height:800px;
  padding:8px 24px 16px;
}

/* Filter Checkbox */
.filter-checkbox{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 0;
  cursor:pointer;
  position:relative;
}

.filter-checkbox input[type="checkbox"]{
  position:absolute;
  opacity:0;
  cursor:pointer;
}

.filter-checkbox .checkmark{
  width:18px;
  height:18px;
  min-width:18px;
  border:2px solid var(--border);
  border-radius:4px;
  background:#fff;
  position:relative;
  transition:all .2s;
}

.filter-checkbox input:checked ~ .checkmark{
  background:var(--gold);
  border-color:var(--gold);
}

.filter-checkbox input:checked ~ .checkmark::after{
  content:'';
  position:absolute;
  left:5px;
  top:2px;
  width:4px;
  height:8px;
  border:solid white;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}

.filter-checkbox .label-text{
  font-size:14px;
  color:var(--dark);
  flex:1;
  letter-spacing:-.15px;
}

.filter-checkbox .count{
  font-size:12px;
  color:var(--blue);
  margin-left:auto;
}

.filter-checkbox:hover .checkmark{
  border-color:var(--gold);
}

/* Mobile Filter Button */
.mobile-filter-btn{
  display:none;
  width:100%;
  padding:14px 20px;
  background:#fff;
  border:1px solid var(--wb);
  border-radius:8px;
  font-family:'Bai Jamjuree',sans-serif;
  font-size:15px;
  font-weight:600;
  color:var(--dark);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-bottom:24px;
  transition:all .2s;
}

.mobile-filter-btn:hover{
  border-color:var(--gold);
  background:var(--wb);
}

.mobile-filter-btn svg{
  flex-shrink:0;
}

/* === MAIN CONTENT === */
.catalog-main{
  min-width:0;
}

.catalog-controls{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:24px;
}

.sort-wrap{
  display:flex;
  align-items:center;
  gap:12px;
}

.sort-wrap label{
  font-size:14px;
  color:var(--blue);
  font-weight:500;
  white-space:nowrap;
}

.sort-select{
  padding:8px 32px 8px 12px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1.5L6 6.5L11 1.5" stroke="%236D7E9B" stroke-width="1.5" stroke-linecap="round" fill="none"/></svg>') no-repeat right 10px center;
  background-size:12px;
  font-family:'Inter',sans-serif;
  font-size:14px;
  color:var(--dark);
  appearance:none;
  cursor:pointer;
  transition:border-color .2s;
  min-width:180px;
}

.sort-select:hover{
  border-color:var(--gold);
}

.sort-select:focus{
  outline:none;
  border-color:var(--gold);
}

/* Active Filters - with blue background */
.active-filters{
  display:none;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  padding:16px 20px;
  background:var(--wb);
  border-radius:8px;
  margin-bottom:28px;
}

.active-filters .filter-label{
  font-size:14px;
  font-weight:600;
  color:var(--dark);
}

.filter-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  flex:1;
}

.filter-tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:6px;
  font-size:13px;
  color:var(--dark);
  font-weight:500;
  letter-spacing:-.1px;
}

.filter-tag button{
  background:none;
  border:none;
  padding:0;
  margin:0;
  cursor:pointer;
  display:flex;
  align-items:center;
  color:var(--blue);
  transition:color .15s;
}

.filter-tag button:hover{
  color:var(--gold);
}

.filter-tag svg{
  width:14px;
  height:14px;
  stroke:currentColor;
  fill:none;
  stroke-width:2;
}

.clear-filters{
  padding:6px 16px;
  background:transparent;
  border:1px solid var(--gold);
  border-radius:6px;
  font-size:13px;
  font-weight:600;
  color:var(--gold);
  cursor:pointer;
  transition:all .2s;
  white-space:nowrap;
  letter-spacing:-.1px;
}

.clear-filters:hover{
  background:var(--gold);
  color:#fff;
}

/* Products Grid */
.products-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
  margin-bottom:40px;
}

/* Catalog Card */
.catalog-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  transition:transform .2s,box-shadow .2s;
  position:relative;
  display:flex;
  flex-direction:column;
}

.catalog-card:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 32px rgba(26,38,59,.12);
}

/* Featured Badge - from product.css with star icon */
.card-badge{
  position:absolute;
  top:12px;
  right:12px;
  padding:6px 12px;
  background:var(--gold);
  color:#fff;
  font-size:10px;
  font-weight:700;
  border-radius:8px;
  text-transform:uppercase;
  letter-spacing:.5px;
  z-index:10;
  display:flex;
  align-items:center;
  gap:4px;
}

.card-badge svg{
  width:11px;
  height:11px;
  flex-shrink:0;
}

.card-cert{
  position:absolute;
  bottom:12px;
  right:12px;
  padding:0;
  background:transparent;
  border:none;
  color:var(--gold);
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
  z-index:10;
  display:flex;
  align-items:center;
  gap:6px;
}

.card-cert svg{
  width:16px;
  height:16px;
  flex-shrink:0;
}

.card-image{
  background:var(--wb);
  height:240px;
  overflow:hidden;
  text-decoration:none;
  position:relative;
  display:block;
}

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

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

.card-body{
  padding:20px;
  display:flex;
  flex-direction:column;
  flex:1;
}

.card-title{
  margin-bottom:8px;
}

.card-title a{
  font-family:'Bai Jamjuree',sans-serif;
  font-size:18px;
  font-weight:600;
  color:var(--dark);
  text-decoration:none;
  letter-spacing:-.2px;
  transition:color .2s;
}

.card-title a:hover{
  color:var(--gold);
}

.card-price{
  font-size:24px;
  font-weight:700;
  color:var(--gold);
  margin-bottom:12px;
  letter-spacing:-.3px;
}

.card-desc{
  font-size:14px;
  line-height:1.6;
  color:var(--blue);
  margin-bottom:16px;
  letter-spacing:-.1px;
}

.card-specs{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:12px 0;
  border-top:1px solid var(--border);
  margin-bottom:16px;
  font-size:13px;
  margin-top:auto;
}

.spec-row{
  display:flex;
  justify-content:space-between;
}

.spec-label{
  color:var(--blue);
}

.spec-value{
  color:var(--dark);
  font-weight:600;
}

.btn-view-details{
  width:100%;
  padding:12px;
  background:transparent;
  color:var(--gold);
  border:1px solid var(--gold);
  border-radius:8px;
  font-size:14px;
  font-weight:600;
  text-align:center;
  text-decoration:none;
  transition:all .2s;
  letter-spacing:-.1px;
  display:block;
}

.btn-view-details:hover{
  background:var(--gold);
  color:#fff;
}

/* Load More */
.load-more-wrap{
  text-align:center;
  padding:20px 0;
}

.btn-load-more{
  padding:14px 32px;
  background:rgba(179,147,94,.8);
  color:#fff;
  border:none;
  border-radius:8px;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:all .2s;
  letter-spacing:-.2px;
}

.btn-load-more:hover{
  background:var(--gold);
  transform:translateY(-2px);
}

/* Empty State */
.empty-state{
  text-align:center;
  padding:80px 20px;
  grid-column:1/-1;
}

.empty-state h3{
  font-family:'Bai Jamjuree',sans-serif;
  font-size:24px;
  font-weight:600;
  color:var(--dark);
  margin-bottom:12px;
}

.empty-state p{
  font-size:16px;
  color:var(--blue);
  margin-bottom:24px;
}

.empty-state button{
  padding:12px 24px;
  background:var(--gold);
  color:#fff;
  border:none;
  border-radius:8px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:background .2s;
}

.empty-state button:hover{
  background:var(--gold-hover);
}

/* === RESPONSIVE === */
@media(max-width:1100px){
  .catalog-container{
    grid-template-columns:220px 1fr;
    gap:32px;
  }
  .products-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:900px){
  .catalog-container{
    grid-template-columns:1fr;
  }
  
  .catalog-sidebar{
    position:static;
    display:none;
    margin-bottom:24px;
  }

  .catalog-sidebar.mobile-open{
    display:block;
  }

  .mobile-filter-btn{
    display:flex;
  }
  
  .products-grid{
    grid-template-columns:repeat(2,1fr);
    gap:20px;
  }
}

@media(max-width:768px){
  .breadcrumb{
    font-size:12px;
    padding:12px var(--pad) 8px;
  }
  
  .catalog-controls{
    flex-direction:column;
    align-items:stretch;
  }
  
  .sort-wrap{
    width:100%;
    justify-content:space-between;
  }
  
  .sort-select{
    flex:1;
    min-width:0;
  }
  
}

@media(max-width:560px){
  .products-grid{
    grid-template-columns:1fr;
  }
  
  .active-filters{
    flex-direction:column;
    align-items:flex-start;
  }
  
  .filter-tags{
    width:100%;
  }
  
  .clear-filters{
    width:100%;
  }
  
}
