/* Search Bar */
#search-filter.catalogue-search-filter {
  top: 0 !important;
  margin-bottom: 2rem !important;
  padding-top: 2rem;
}

#search-filter {
  position: relative;
  top: -60px;
  margin-bottom: -60px;
  transition: all 0.1s ease;
  z-index: 10;
}

.search-bar {
  position: relative;
  padding: 2.5rem;
  width: 100%;
  background-color: var(--primario);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.1s ease;
  z-index: 10;
}

.search-bar h2 {
  margin-bottom: 1.5rem;
  color: var(--white);
  font-size: 1.75rem;
  font-weight: 700;
}

.search-bar label {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
}

.search-bar .form-select {
  padding: 0.75rem 1rem;
  height: 55px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-bar .btn {
  transition: .1s;
}

.search-bar .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.search-bar button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  width: 100%;
  height: 55px;
  background-color: var(--cuarto);
  color: var(--white);
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: .1s;
}

.search-bar button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.search-bar button i {
  margin-right: .25rem;
}

.search-bar__link {
  margin-top: .5rem;
}

.search-bar__link a {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: .1s;
}

.search-bar__link a:hover {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .search-bar__link {
    margin-top: 1rem;
    text-align: center;
  }
}

/* Catalogue Layout & Mobile Triggers */
.catalogue-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}

.mobile-filter-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  width: 100%;
  background-color: var(--primario);
  color: var(--white);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.mobile-filter-btn:hover {
  background-color: var(--terciario);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.mobile-filter-btn i {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.mobile-filter-btn span {
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-filter-trigger-wrapper {
  display: none;
  margin-bottom: 0;
}

@media (max-width: 992px) {
  .catalogue-layout {
    grid-template-columns: 1fr;
  }

  .mobile-filter-trigger-wrapper {
    display: block;
    margin-bottom: 1rem;
  }
}



/* Sidebar & Filters */
.catalogue-sidebar {
  padding: 1.5rem;
  height: fit-content;
  background: var(--white);
  border-radius: 1rem;
  transition: transform 0.3s ease-in-out;
}

/* Mobile Off-Canvas Sidebar */
.sidebar-overlay {
  position: fixed;
  visibility: hidden;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  z-index: 1040;
  transition: all 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-mobile-header {
  display: none;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.sidebar-header h3 {
  margin: 0;
  color: var(--primario);
}

@media (max-width: 992px) {
  .catalogue-sidebar {
    position: fixed;
    overflow-y: auto;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    min-width: 300px;
    height: 100vh;
    background: var(--white);
    border-radius: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1050;
  }

  .catalogue-sidebar.active {
    transform: translateX(0);
  }

  .catalogue-sidebar .filter-group h3 {
    font-size: 1rem;
  }

  .sidebar-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
  }
}


/* Category Tree */
.category-tree details {
  margin-bottom: 0.5rem;
}

.category-tree summary {
  position: relative;
  padding: 0.5rem 0;
  padding-right: 20px;
  color: var(--primario);
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s;
}


.category-tree summary::after {
  position: absolute;
  content: "+";
  right: 0;
  color: var(--terciario);
  font-weight: 300;
}

.category-tree details[open]>summary::after {
  content: "-";
}

.category-tree summary:hover {
  color: var(--primario);
}

.level-2 {
  padding-left: 1rem;
  border-left: 1px solid #eee;
}

.level-2 summary {
  color: #666;
  font-size: 0.95rem;
}

.level-3 {
  margin: 0;
  padding-left: 1rem;
  list-style: none;
}

.level-3 li {
  margin-bottom: 0.25rem;
}

.level-3 a {
  display: block;
  padding: 2px 0;
  color: #777;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}

.level-3 a:hover {
  color: var(--primario);
  transform: translateX(3px);
}


/* Catalogue Toolbar */
.catalogue-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.catalogue-toolbar span {
  color: var(--text-muted);
  font-size: 0.925rem;
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-box label {
  font-size: 0.9rem;
  color: #555;
}

.sort-box select {
  padding: 0.25rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  color: #333;
  font-size: 0.9rem;
  background-color: #fff;
}


/* Catalogue Grid */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}


/* Product Cards */
.product-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: .5px solid var(--terciario);
  border-radius: 1rem;
  transition: all .1s ease;
}

.product-card:hover {
  border-color: var(--primario);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-card__img {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all .1s ease;
}

.product-card:hover .product-card__img img {
  transform: scale(1.05);
}

.product-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  z-index: 99;
}

.product-card__badge {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: .75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-card__badge--new {
  background-color: var(--primario);
  color: var(--white);
}

.product-card__badge--offer {
  background-color: var(--cuarto);
  color: var(--white);
}

.product-card__badge--featured {
  background: linear-gradient(135deg, #c5a059 0%, #f1d38e 50%, #c5a059 100%);
  color: #212529;
}

.product-card__badge--shipping {
  background: linear-gradient(135deg, #218838 0%, #28a745 100%);
  color: var(--white);
}

.product-card__details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.25rem;
}

.product-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}

.product-card__brand {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card__sku {
  color: var(--text-muted);
  font-family: monospace;
  opacity: 0.8;
}

.product-card__title {
  display: flex;
  flex-direction: column;
  margin-block: .5rem;
  color: var(--primario);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.product-card__title a {
  display: block;
  text-decoration: none;
  transition: color 0.2s;
}

.product-card__title a:nth-child(1) {
  color: var(--text-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card__title a:nth-child(2) {
  color: var(--primario);
  font-size: 1.25rem;
}

.product-card__title a:hover {
  color: var(--terciario);
}

.product-card__price-box {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-top: 1px solid var(--highlight-bg);
}

.product-card__save-amount {
  padding: .25rem .5rem;
  width: fit-content;
  background-color: var(--cuarto);
  color: var(--white);
  font-size: .75rem;
  font-weight: 400;
  border-radius: .5rem;
}

.product-card__price-box--price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-card__price--current {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-color);
}

.product-card__price--old {
  font-size: 0.9rem;
  text-decoration: line-through;
  color: var(--text-muted);
}

.product-card__price-box--iva {
  display: flex;
  align-items: baseline;
}

.product-card__price-box--iva span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.product-card__actions {
  padding: 0 1.25rem 1.25rem 1.25rem;
}

.product-card__btn {
  display: block;
  text-align: center;
  padding: 0.75rem;
  width: 100%;
  background-color: var(--cuarto);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 1rem;
  transition: all 0.1s;
}

.product-card__btn:hover {
  background-color: var(--primario);
}

.product-card__btn i {
  margin-right: .25rem;
}

@media (max-width: 768px) {
  .product-catalogue-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }
}

/* =========================================
   7. Other / Misc
   ========================================= */
/* Active Filters Bar (Breadcrumb style) */
.active-filters-bar {
  padding: 0.5rem 0;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: var(--highlight-bg, #f8f9fa);
  border: 1px solid var(--terciario);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--primario);
  transition: all 0.2s;
}

.filter-pill a {
  color: var(--cuarto);
  font-size: 1rem;
  text-decoration: none;
  line-height: 1;
}

.filter-pill a:hover {
  color: var(--primario);
}

.filter-pill:hover {
  background-color: #fff;
  border-color: var(--primario);
}

.clear-all-link {
  color: var(--cuarto);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed var(--cuarto);
}

.clear-all-link:hover {
  color: var(--primario);
  border-color: var(--primario);
}

/* Index Reset Link */
.reset-link {
  transition: opacity 0.2s;
}

.reset-link:hover {
  opacity: 1 !important;
  text-decoration: underline !important;
}

.btn-search {
  height: 55px;
  background-color: var(--cuarto);
  color: var(--white);
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
}