 /* PAGE HEADER */

 .page-header {
   text-align: center;
   padding-top: 160px;
   margin-bottom: 60px;
 }

 .page-header h1 {
   font-size: 48px;
   margin-bottom: 10px;
 }

 .page-header p {
   color: #aaa;
 }

 /* FILTER BAR */

 .filters {
   display: flex;
   justify-content: center;
   gap: 20px;
   flex-wrap: wrap;
   margin-bottom: 50px;
 }

 /* SEARCH TOOLBAR */

 .search-toolbar {
   display: flex;
   gap: 15px;
   flex-wrap: wrap;
   align-items: center;
   justify-content: center;
   margin: 15px 0;
 }

 /* SEARCH INPUT */

 .search-input {
   background: #1a1a1a;
   border: 1px solid #333;
   border-radius: 8px;
   padding: 10px 16px;
   color: #fff;
   width: 260px;
   transition: 0.2s;
 }

 .search-input::placeholder {
   color: #777;
 }

 .search-input:focus {
   border-color: #ff3b3b;
   box-shadow: 0 0 0 2px rgba(255, 59, 59, 0.2);
   outline: none;
 }

 /* DROPDOWN */

 .sort-dropdown {
   background: #1a1a1a;
   border: 1px solid #333;
   /* Slightly lighter border for depth */
   border-radius: 8px;
   padding: 12px 35px 10px 15px;
   /* Extra right padding for custom arrow */
   color: #efefef;
   font-size: 14px;
   font-family: 'Inter', sans-serif;
   /* Clean font */
   outline: none;
   cursor: pointer;
   appearance: none;
   /* Removes default browser arrow */
   -webkit-appearance: none;
   transition: all 0.2s ease-in-out;

   /* Adds a custom small arrow icon */
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org' width='12' height='12' fill='%23777' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
   background-repeat: no-repeat;
   background-position: right 12px center;
 }

 .sort-dropdown:focus {
   border-color: #ff3b3b;
   box-shadow: 0 0 0 2px rgba(255, 59, 59, 0.2);
 }

 /* SORT BUTTON */

 .sort-btn {
  background: linear-gradient(90deg, #ff1f32, #dd244f);
   border: none;
   border-radius: 10px;
   padding: 12px 18px;
   color: white;
   font-weight: 600;
   cursor: pointer;
   transition: .25s;
   box-shadow: 0 6px 14px rgba(255, 60, 60, 0.35);
 }

 .sort-btn:hover {
   transform: translateY(-2px);
   box-shadow: 0 10px 22px rgba(255, 60, 60, 0.5);
 }

 .sort-btn:focus,
 .sort-btn:active {
   outline: none;
   transform: scale(.98);
 }

 /* FORMS */

 .search-form,
 .sort-form {
   display: flex;
   gap: 10px;
   align-items: center;
 }

 /* RESPONSIVE */

 @media(max-width:700px) {

   .search-toolbar {
     flex-direction: column;
   }

   .search-input {
     width: 100%;
   }

 }

 /* PRODUCT GRID */

 .products {
   max-width: 1200px;
   margin: auto;
   padding: 0 20px;
 }

 .product-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
   gap: 30px;
 }

 /* PRODUCT CARD */

 .product-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(2px);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: .25s;
  position: relative;

  /* Layout: keep actions at bottom */
  display: flex;
  flex-direction: column;
  height: 100%;
 }

 .product-card:hover {
   transform: translateY(-2px);
   border-color: rgba(255, 59, 59, 0.5);
 }

 .product-card a {
   color: #fff;
   text-decoration: none;

   /* Allow the link/content to grow and push actions down */
   display: flex;
   flex-direction: column;
   flex: 1;
 }

 .product-card a:hover {
   text-decoration: none;
 }

 /* Keep titles from making cards uneven; clamp to 2 lines */
 .product-title {
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   overflow: hidden;
 }

 /* Make card-actions stay glued to the bottom */
 .card-actions {
   margin-top: auto;
   display: flex;
   justify-content: space-between;
   align-items: center;
   gap: 10px;
   transform: translateY(2px);
 }

 .card-action-icons {
   display: flex;
   align-items: center;
   gap: 10px;
 }

  .btn-view {
    flex: 1;
    background: rgba(255,255,255,0.03);
  backdrop-filter: blur(2px);
   border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 32px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease-in-out;
  }

  .btn-view:hover {  
    background: linear-gradient(90deg,#ff1f32,#dd244f);
    border: 1px solid transparent;
    color: #fff;
  }

  .btn-view:focus {
    outline: none;
  }

  .btn-view:active {
    transform: scale(0.98);
  }

 .card-action-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 36px;
   height: 37px;
   border-radius: 12px;
   background: rgba(255,255,255,0.03);
   backdrop-filter: blur(2px);
   border: 1px solid rgba(255,255,255,0.1);
   color: #ccc;
   transition: background 0.25s ease, transform 0.25s ease;
 }

 .card-action-icon:hover {
   background: rgba(255, 255, 255, 0.15);
   transform: translateY(-1px);
 }

 .product-card img {
   width: 100%;
   border-radius: 10px;
   margin-bottom: 15px;
 }

 .product-title {
   font-size: 18px;
   margin-bottom: 6px;
 }

 .product-price {
   color: #ff3b3b;
   font-weight: 600;
 }

 .tag {
   display: inline-block;
   background: #222;
   padding: 4px 8px;
   border-radius: 6px;
   font-size: 12px;
   margin: 3px;
   color: #aaa;
 }

 /* HOT BADGE */

 .pin-badge {
   position: absolute;
   top: 10px;
   left: 10px;
   background: linear-gradient(90deg, #ff0000, #ff4d12);
   color: white;
   padding: 4px 8px;
   border-radius: 8px;
   font-size: 11px;
   font-weight: 600;
 }

 /* CARD FOOTER */

 .card-actions {
   margin-top: 12px;
   display: flex;
   justify-content: space-between;
   align-items: center;
 }

 .favorite {
   cursor: pointer;
   font-size: 18px;
 }

 .favorite.bi.bi-heart-fill {  
  background: linear-gradient(90deg, #ff1f32, #dd244f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent
}

/* FADE ANIMATION */
#productsWrapper {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #1a1a1a;
  border: 1px solid #222;
  border-radius: 999px;

  color: #ccc;
  text-decoration: none;
  font-weight: 500;

  transition: all 0.25s ease;
}

.page-btn:hover {
  color: #fff;
  border-color: #ff3b3b;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(255, 59, 59, 0.2);
  text-decoration: none;
}

.page-btn.active {
  background: linear-gradient(90deg, #ff1f32, #dd244f);
  color: white;
  border: none;
  box-shadow: 0 0 15px rgba(255, 59, 59, 0.5);
}

.nav-btn {
  font-size: 18px;
}

.dots {
  color: #666;
  padding: 0 6px;
}