/* HERO */
.catalog-hero {
    padding: 40px 16px;
    text-align: center;
    background: #f1f5f9;
  }
  
  .catalog-hero h1 {
    font-size: 2em;
    font-weight: 800;
  }

  .hero-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
  }
  
  .view-toggle-btn {
    position: absolute;
    right: 2em;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
  }
  
  /* LAYOUT */
  .catalog-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 16px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    justify-content: center;
  }
  
  /* FILTERS */
  .filters {
    background: #000;
    color: #fff;
    padding: 20px;
    border-radius: 6px;
  }
  
  .filters h4 {
    margin-bottom: 0.7em;
    font-size: 0.9em;
  }

  .filters p {
    margin-bottom: 0.7em;
    font-size: 0.7em;
    background-color: #ebf4ff;
    border-radius: 0.5em;
    padding: 5px;
    font-weight: bold;
    color: #146edb;
  }
  
  .filters label {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .filter-btn {
    display: block;
    margin-top: 16px;
    width: 100%;
    padding: 10px;
    background: #0284c7;
    color: #fff;
    border: none;
    border-radius: 0.5em;
  }
  .apply-btn {
    display: none;
  }
  
  /* PRODUCTS */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
  }
  
  .product-card {
    position: relative;
    overflow: hidden;
    transition: none;
    padding: 1em 2em;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  /* Gradient overlay */
  .product-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0%;
    background: linear-gradient(
      to top,
      rgba(236, 72, 153, 0.35), /* pink */
      rgba(236, 72, 153, 0.15),
      transparent
    );
    transition: height 0.35s ease;
    z-index: 0;
  }
  
  .product-card:hover::after {
    height: 60%;
  }
  
  /* Ensure content stays above gradient */
  .product-card > * {
    position: relative;
    z-index: 1;
  }
  
  
  .product-card-title {
    font-size: 0.9em;
    text-align: left;
    min-height: 2em;
  }

  .product-card-subtitle {
    font-size: 0.8em;
    font-weight: normal;
    text-align: left;
    min-height: 1em;
  }
  
  .price {
    margin: 12px 0;
    font-weight: 700;
    text-align: left;
    color: #0284c7;
  }
  
  .add-to-cart {
    margin-top: auto; /* PUSHES BUTTON TO BOTTOM */
    display: block;
    padding: 10px;
    background: #0284c7;
    color: #fff;
    text-decoration: none;
    border-radius: 0.5em;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
  }

  .cart-slot {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .cart-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  
  .cart-control {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 0.6em;
    padding: 4px 6px;
    background: #fff;
  }
  
  .cart-control.hidden,
  .cart-action.hidden {
    display: none;
  }
  
  .qty-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
  .qty-icon {
    width: 14px;
    height: 14px;
  }
  
  .qty-input {
    width: 36px;
    text-align: center;
    font-size: 0.9em;
    border: none;
    outline: none;
  }
  
  /* PAGINATION */
  .pagination {
    margin-top: 40px;
    text-align: center;
  }
  
  .pagination a,
  .pagination span {
    margin: 0 4px;
    padding: 6px 10px;
    border-radius: 4px;
  }
  
  .pagination a {
    background: #e5e7eb;
    text-decoration: none;
  }
  
  .pagination .current {
    background: #0284c7;
    color: #fff;
  }
  
  
  /* FILTER SIDEBAR REFINEMENT */
.filters {
  background: #fff;
  color: #111;
  border-radius: 8px;
}

/* SECTION */
.filter-section {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-child {
  border-bottom: none;
}

/* TITLES */
.filter-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ITEMS */
.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
  margin-bottom: 8px;
  cursor: pointer;
}

.filter-item span {
  margin-left: 6px;
}

.filter-expand {
  font-weight: 700;
  color: #94a3b8;
}

.filter-count {
  color: #94a3b8;
  font-size: 12px;
}

/* PRICE */
.price-slider {
  width: 100%;
  margin: 8px 0 12px;
}

.price-inputs {
  display: flex;
  gap: 8px;
}

.price-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-input-group label {
  font-size: 0.75rem;
  color: #64748b;
}

.price-inputs input {
  width: 100%;
  padding: 6px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.price-help {
  font-size: 11px;
  color: #64748b;
  margin: 6px 0 12px;
}

.price-filter-button-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 1em;
}
.price-section {
  color: #000;
  background: #ebf4ff;
  width: fit-content;
  margin: 0;
  padding: 5px 10px;
}

.product-link {
  display: block;
  text-decoration: none;
  align-self: center;
}

.product-title-link {
  text-decoration: none;
  color: inherit;
}

.product-title-link:hover .product-card-title {
  text-decoration: underline;
}

.product-link img {
  transition: transform 0.25s ease;
}

.product-link:hover img {
  transform: scale(1.02);
}


/* Ensure button stays clickable */
.product-card .add-to-cart {
  position: relative;
  z-index: 2;
}

.product-image {
  height: 180px;
  object-fit: contain;
  margin-bottom: 12px;
  flex-shrink: 0;
  opacity: 1;
}

.product-image.placeholder-image {
  opacity: 0.3;
}
.mobile-filter-btn {
  display: none;
}
.mobile-filter-actions {
  display: none;
}

/* ===== Dual Price Slider ===== */

.price-slider-wrapper {
  position: relative;
  height: 24px;
  margin-top: 1.5rem;
}

.price-slider-wrapper input[type="range"] {
  position: absolute;
  width: 100%;
  pointer-events: none;
  appearance: none;
  height: 4px;
  background: transparent;
}

.price-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #094db3;
  border-radius: 50%;
  cursor: pointer;
}

.price-slider-wrapper input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  background: #094db3;
  border-radius: 50%;
  cursor: pointer;
}

/* Base track */
.slider-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  width: 100%;
  background: #e5e7eb;
  border-radius: 4px;
}

/* Active range */
.slider-range {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: #094db3;
  border-radius: 4px;
}

.toast {
  position: fixed;
  top: 5em;
  right: 1em;
  background: #111;
  color: #fff;
  padding: 12px 16px;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: #16a34a;
}

.toast.info {
  background: #2563eb;
}

.card-info {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.cart-text {
  display: none;
  background-color: #0284c7;
  color: #fff;
  text-align: center;
  padding: 0.75em 1em;
  border-radius: 0.5em;
  width: 100%;
  cursor: pointer;
  font-weight: 600;
}

.cart-text:hover {
  background-color: #0369a1;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
}

.product-table th,
.product-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.product-table th a {
  text-decoration: none;
  color: #0284c7;
  font-weight: 700;
}

.product-table-wrapper {
  overflow-x: auto;
}
.table-cart-column-header {
  text-align: left;
}
.grid-icon {
  width: 1.8em;
}
.list-icon {
  width: 1.8em;
}






@media (max-width: 768px) {
  .cart-icon {
    display: none;
  }
  .cart-text {
    display: block;
  }
}


















/* RESPONSIVE */
@media (max-width: 1025px) {
  .catalog-page {
    grid-template-columns: 1fr;
  }
  .catalog-hero h1 {
    font-size: 1.8em;
  }
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e1e1e1;
    border-radius: 1em;
    transition: none;
    padding: 0.5em;
  }
  .product-card:hover {
    transform: none;
    box-shadow: none
  }
  .product-image {
    width: 100%;
  }
  .card-info {
    flex-direction: column;
  }


  .filters {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 1000;
    transition: bottom 0.3s ease;
    overflow-y: auto;
  }

  .product-card-title {
    font-size: 0.8em;
  }
  .product-card-subtitle {
    display: none;
  }
  .price {
    color: #000;
    font-size: 1.2em;
  }
  .cart-icon {
    display: none;
  }
  .cart-text {
    display: inline;
  }
  /* When active */
  .filters.active {
    bottom: 0;
  }

  /* Bottom action bar */
  .mobile-filter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 10px;
    z-index: 1001;
  }

  .mobile-filter-btn {
    display: block;
    width: 100%;
    padding: 12px;
    font-weight: 700;
    background: #0284c7;
    color: #fff;
    border: none;
    border-radius: 6px;
  }

  /* Hidden initially */
  .mobile-filter-actions {
    display: none;
    gap: 8px;
  }

  .mobile-filter-actions button {
    width: 100%;
    padding: 12px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
  }
  .cancel-btn {
    background: #e5e7eb;
  }
  .apply-btn {
    display: block;
    background: #0284c7;
    color: #fff;
  }
  .filter-btn {
    display: none;
  }
  /* Active state */
  .mobile-filter-bar.active .mobile-filter-btn {
    display: none;
  }

  .mobile-filter-bar.active .mobile-filter-actions {
    display: flex;
  }
  .product-table th {
    text-align: center;
  }
  .product-table tr {
    font-size: 1em;
  }
  .grid-icon {
    width: 1.8em;
  }
  .list-icon {
    width: 1.8em;
  }
}

@media (max-width: 750px) {
  .catalog-hero h1 {
    font-size: 1.5em;
  }
  .product-table tr {
    font-size: 1em;
  }
  .view-toggle-btn {
    font-size: 1em;
  }
  .qty-icon {
    width: 12px;
    height: 12px;
  }
  .grid-icon {
    width: 1.5em;
  }
  .list-icon {
    width: 1.5em;
  }
}

@media (max-width: 500px) {
  .catalog-hero h1 {
    font-size: 1em;
  }
  .product-table tr {
    font-size: 0.8em;
  }
  .view-toggle-btn {
    font-size: 0.8em;
  }
  .qty-icon {
    width: 12px;
    height: 12px;
  }
  .grid-icon {
    width: 1.2em;
  }
  .list-icon {
    width: 1.2em;
  }
}

@media (max-width: 389px) {
  .catalog-hero h1 {
    font-size: 0.8em;
  }
  .product-table tr {
    font-size: 0.6em;
  }
  .view-toggle-btn {
    font-size: 0.6em;
  }
  .qty-icon {
    width: 10px;
    height: 10px;
  }
  .grid-icon {
    width: 0.8em;
  }
  .list-icon {
    width: 0.8em;
  }
}

