:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #3b82f6;
  --card-background: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
  background: linear-gradient(135deg, #f7f8fa 0%, #eaf1fb 100%);
}

.container {
  display: block;
  padding: 1rem;
  position: relative;
  margin-top: 60px;
}

.header {
  padding: 5rem 1rem 2rem;
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url(../Images/ACS\ ALL.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  text-align: center;
  color: #fdf005;
}

.header-content h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.header-content p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  line-height: 1.4;
}

.search-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.search-container input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 30px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  color: #007bff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-container input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.sidebar {
  position: fixed;
  left: -100%;
  top: 60px;
  width: 85%;
  max-width: 300px;
  height: calc(100vh - 60px);
  background: rgba(0, 114, 188, 0.96);
  z-index: 1000;
  padding: 1.5rem;
  transition: left 0.3s ease;
  overflow-y: auto;
  border-right: 2px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  border-radius: 22px;
  margin-bottom: 2rem;
  z-index: 1;
}

.sidebar.active {
  left: 0;
}

.filter-toggle {
  display: none;
  height: 40px;
  padding: 0 20px;
  border-radius: 20px;
  background: #007bff;
  color: white;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  gap: 8px;
  margin: 1rem 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.filter-toggle:hover {
  background: #0056b3;
}

.filter-toggle i {
  font-size: 1.25rem;
}

/* Main content area - needs position relative for absolute loader positioning */
.content {
  position: relative;
  min-height: 400px;
}

@media (max-width: 767px) {
  .filter-toggle {
    display: flex;
    width: 100%;
    margin-bottom: 1rem;
  }

  .content {
    width: 100%;
  }
}

.close-sidebar {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

.filter-header {
  margin-bottom: 2rem;
}

.filter-label {
  font-size: 40px;
  color: #333;
  font-weight: 800;
  margin-bottom: 2rem;
  text-transform: uppercase;
  padding-left: 0;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 1.5rem;
  padding-left: 0;
}

.category-link {
  display: block;
  padding: 0.5rem 0;
  color: #333;
  text-decoration: none;
  font-size: 24px;
  transition: color 0.3s ease;
  font-weight: 500;
  padding-left: 0;
}

.category-link:hover {
  color: #007bff;
}

.category-link.active {
  color: #007bff;
  font-weight: bold;
}

.category-divider {
  height: 1px;
  background-color: #e5e5e5;
  margin: 0.5rem 0;
}

.main-category {
  font-weight: 600;
  font-size: 28px;
  color: #222;
  margin-bottom: 1.5rem;
  display: block;
}

.category-item:first-child .main-category {
  font-size: 28px;
  color: #222;
  margin-bottom: 2rem;
}

.sub-category {
  padding-left: 1rem;
  font-size: 16px;
  color: #666;
  margin-bottom: 0.5rem;
  display: block;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.checkbox-container {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 30px;
  user-select: none;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-btn {
  position: relative;
  cursor: pointer;
}

.size-btn input {
  display: none;
}

.size-btn span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.size-btn input:checked + span {
  background-color: #003366;
  color: #fdf005;
  border-color: white;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem;
  justify-items: center;
  position: relative; /* Needed for absolute positioned loader overlay */
}

.product-container {
  width: 300px;
  height: 400px;
  border-radius: 16px;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-container:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  transform: translateY(-4px) scale(1.02);
}

.product-container.hidden {
  display: none;
}

.product-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1.5fr 1fr 1.5fr 1fr;
  background: rgba(0, 114, 188, 0.7);
  color: #fff;
  opacity: 0;
  transition: opacity 0.5s;
}

.items {
  padding-left: 20px;
  letter-spacing: 3px;
}

.head {
  font-size: 24px;
  line-height: 40px;
  transform: translateY(40px);
  transition: all 0.7s;
}

.head hr {
  display: block;
  width: 0;
  border: none;
  border-bottom: solid 2px #fff;
  position: absolute;
  bottom: 0;
  left: 20px;
  transition: all 0.5s;
}

.price {
  font-size: 22px;
  line-height: 10px;
  font-weight: bold;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s;
}

.cart {
  font-size: 20px;
  opacity: 0;
  letter-spacing: 1px;
  transform: translateY(40px);
  transition: all 0.7s;
  color: yellow;
}

.cart i {
  font-size: 22px;
  color: yellow;
}

.cart span {
  margin-left: 10px;
}

.product-container:hover .product-overlay {
  opacity: 1;
  pointer-events: auto;
}

.product-container:hover .head {
  transform: translateY(0px);
}

.product-container:hover .head hr {
  width: 75px;
  transition-delay: 0.4s;
}

.product-container:hover .price {
  transform: translateY(0px);
  transition-delay: 0.3s;
  opacity: 1;
}

.product-container:hover .cart {
  transform: translateY(0px);
  transition-delay: 0.6s;
  opacity: 1;
}

.stock-status {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.in-stock {
  color: #28a745;
}

.pre-order {
  color: #ffc107;
}

.product-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.quantity {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.qty-btn {
  padding: 5px 10px;
  border: none;
  background: none;
  cursor: pointer;
}

.quantity input {
  width: 50px;
  text-align: center;
  border: none;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.add-to-cart {
  flex-grow: 1;
  padding: 8px;
  background: #003366;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-to-cart:hover {
  background: #002347;
}

/* Small devices (≥576px) */
@media (min-width: 576px) {
  .header-content h1 {
    font-size: 2.5rem;
  }

  .header-content p {
    font-size: 1.2rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 768px) {
  .container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 2rem;
  }

  .sidebar {
    position: sticky;
    left: 0;
    top: 80px;
    width: 250px;
    transform: none;
    background: #0072bc;
    height: calc(100vh - 100px);
    border-right: 2px solid var(--border-color);
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    border-radius: 8px;
    padding: 1.5rem;
  }

  .close-sidebar {
    display: none;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .header-content h1 {
    font-size: 3rem;
  }
}

@media (min-width: 992px) {
  .container {
    grid-template-columns: 300px 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .header-content h1 {
    font-size: 3.5rem;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1440px;
    margin: 0 auto;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .header-content h1 {
    font-size: 4rem;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.modal.show {
  display: block !important;
}

.modal-content {
  background-color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
  font-weight: 100;
}

.close {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 55px;
  font-weight: bold;
  color: black;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #333;
}

.product-info {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  align-items: flex-start;
}

.product-info img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.product-details {
  flex: 1;
}

.product-details h3 {
  font-size: 1.25rem;
  font-weight: 100;
  margin: 0 0 10px;
  color: #333;
}

.size-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 10px;
  margin-bottom: 25px;
}

.size-option {
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.size-option.available {
  background-color: #fff;
  border-color: #007bff;
  color: #007bff;
}

.size-option.selected,
.size-option.active {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.size-option.unavailable {
  background-color: #f5f5f5;
  border-color: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}

.quantity-selector {
  margin-bottom: 25px;
}

.quantity-selector label {
  display: block;
  margin-bottom: 10px;
  color: #333;
  font-weight: 500;
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
}

.quantity-controls button {
  width: 36px;
  height: 36px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.quantity-controls button:hover {
  background: #0056b3;
}

.quantity-controls input {
  width: 60px;
  text-align: center;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px;
}

.add-to-cart-btn {
  width: 100%;
  padding: 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.add-to-cart-btn:hover {
  background-color: #0056b3;
  transform: scale(1.04);
}

.add-to-cart-btn:disabled {
  background-color: #e0e0e0;
  cursor: not-allowed;
}

.price-display,
.stock-display {
  font-size: 1rem;
  margin: 5px 0;
}

.price-display {
  color: #007bff;
  font-weight: bold;
  font-size: 1.3rem;
}

.stock-display {
  color: #28a745;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
}

.stock-display.low-stock {
  color: #dc3545;
}

@media (max-width: 576px) {
  .modal-content {
    width: 95%;
    padding: 15px;
  }

  .product-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .product-info img {
    width: 120px;
    height: 120px;
  }

  .quantity-controls {
    padding: 8px;
  }

  .quantity-controls button {
    width: 32px;
    height: 32px;
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal.active .modal-content {
  animation: modalFadeIn 0.3s ease-out forwards;
}

.main-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  transition: color 0.3s ease;
}

.main-category-header:hover {
  color: #007bff;
}

.main-category-header i {
  font-size: 18px;
  transition: transform 0.3s ease;
  transform: rotate(0deg) !important; /* Default: chevron pointing down */
}

.main-category-header.active i {
  transform: rotate(-180deg) !important; /* Active: rotate to point up */
}

.subcategories {
  display: none;
  padding-left: 20px;
  border-left: 2px solid #e0e0e0;
  margin: 10px 0 10px 10px;
}

.subcategories.active {
  display: block;
}

.course-category {
  margin-bottom: 15px;
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
  font-size: 20px;
  color: #333;
  transition: color 0.3s ease;
}

.course-header:hover {
  color: #007bff;
}

.course-header i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.course-header.active i {
  transform: rotate(180deg);
}

.category-item {
  margin-bottom: 1.5rem;
  padding-left: 0;
}

.course-category .course-items {
  margin-left: 0;
  padding-left: 15px;
}

.main-category-header.active,
.course-header.active {
  color: #007bff;
}

.clear-filters {
  display: block;
  width: 100%;
  margin: 1.5rem 0 1rem 0;
  padding: 12px 0;
  background: linear-gradient(90deg, #ffe066 0%, #f9d423 100%);
  color: #333;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: 1.1rem;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.2s, color 0.2s;
}
.clear-filters:hover {
  background: linear-gradient(90deg, #f9d423 0%, #ffe066 100%);
  color: #222;
}

.sidebar .main-category-header,
.sidebar .course-header,
.sidebar .category-link,
.sidebar .subcategories,
.sidebar .course-items label,
.sidebar .course-items label input[type="checkbox"] + span,
.sidebar .course-items label {
  color: #fff !important;
  letter-spacing: 1px;
  font-weight: 400;
}

.sidebar .filter-label {
  color: #fdf005 !important;
}

.clear-filters {
  color: #333 !important;
}

.main-category-header.active {
  color: #fdf005 !important;
  font-weight: 600;
}

.no-results-message {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  width: 100%;
  padding: 2rem;
  text-align: center;
}

.no-results-message i {
  font-size: 4rem;
  color: #0072bc;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.no-results-message h3 {
  font-family: var(--primary-font-family, "Anton", serif);
  color: var(--text-primary, #1e293b);
  margin-bottom: 1rem;
  font-size: 2rem;
  font-weight: 400;
}

.no-results-message p {
  font-family: var(--secondary-font-family, "Smooch Sans", serif);
  color: var(--text-secondary, #64748b);
  font-size: 1.1rem;
  line-height: 1.5;
  max-width: 400px;
}

.no-results-message.enhanced {
  background: var(--card-background, #ffffff);
  border-radius: 12px;
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
  max-width: 500px;
  margin: 2rem auto;
  padding: 3rem 2rem;
}

@media (max-width: 767px) {
  .no-results-message {
    min-height: 300px;
    padding: 1.5rem 1rem;
    justify-content: center;
  }

  .no-results-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .no-results-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }

  .no-results-message p {
    font-size: 1rem;
    max-width: 100%;
    padding: 0 1rem;
  }

  .no-results-message.enhanced {
    max-width: 95%;
    margin: 1rem auto;
    padding: 2rem 1.5rem;
    border-radius: 8px;
  }
}

@media (max-width: 576px) {
  .no-results-message {
    min-height: 250px;
    padding: 1rem 0.5rem;
  }

  .no-results-message i {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
  }

  .no-results-message h3 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
  }

  .no-results-message p {
    font-size: 0.9rem;
    padding: 0 0.5rem;
  }

  .no-results-message.enhanced {
    max-width: 90%;
    margin: 0.5rem auto;
    padding: 1.5rem 1rem;
    border-radius: 6px;
  }
}

/* Pagination Styles */
.pagination-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem;
}

.pagination-info {
  margin-bottom: 1rem;
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 16px;
  background: #0072bc;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
  background: #0056a3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 114, 188, 0.3);
}

.pagination-btn.disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 1rem;
}

.pagination-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #fff;
  color: #0072bc;
  text-decoration: none;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pagination-number:hover {
  background: #0072bc;
  color: white;
  border-color: #0072bc;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 114, 188, 0.3);
}

.pagination-number.active {
  background: #0072bc;
  color: white;
  border-color: #0072bc;
  box-shadow: 0 2px 6px rgba(0, 114, 188, 0.3);
}

.pagination-dots {
  padding: 0 8px;
  color: #999;
  font-weight: 600;
}

/* Mobile Responsive Pagination */
@media (max-width: 768px) {
  .pagination-container {
    margin: 1rem 0;
    padding: 0.75rem;
  }

  .pagination-info {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .pagination {
    gap: 0.25rem;
  }

  .pagination-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .pagination-numbers {
    margin: 0 0.5rem;
    gap: 0.15rem;
  }

  .pagination-number {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .pagination-container {
    margin: 0.75rem 0;
    padding: 0.5rem;
  }

  .pagination-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .pagination-number {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .pagination-dots {
    padding: 0 4px;
    font-size: 0.8rem;
  }
}

/* Lazy Loading Images */
.lazy-load-image {
  filter: blur(5px);
  transition: filter 0.3s ease;
}

.lazy-load-image[src] {
  filter: none;
}

/* Loading spinner for images */
.product-container img {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Performance optimizations */
.product-container {
  will-change: transform;
  contain: layout;
}

.products-grid {
  contain: layout;
}

/* Filter active states */
.main-category-header.active {
  background-color: var(--primary-color);
  color: white;
  border-radius: 4px;
}

.main-category-header.active i {
  color: white;
}

/* Search functionality */
.search-container {
  position: relative;
}

.search-btn:hover {
  background: var(--secondary-color);
}

/* Loading state for filters */
.sidebar.loading {
  opacity: 0.6;
  pointer-events: none;
}

.sidebar.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Search input loading state */
.search-container.loading input {
  background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* AJAX Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-overlay .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.ajax-loading-overlay {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.ajax-loading-overlay .spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ffcb05;
  border-top: 6px solid #004aad;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 4px 15px rgba(0, 74, 173, 0.3);
}

.products-grid {
  transition: opacity 0.3s ease;
}

.pagination-number,
.pagination-btn {
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-number:hover:not(.active),
.pagination-btn:hover:not(.disabled) {
  background-color: var(--primary-color);
  color: white;
}

/* Improved loading animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
