
/* ============================================
   Product Catalog Pages
   ============================================ */

/* Custom Scrollbar Styling */
.filters-sidebar::-webkit-scrollbar {
  width: 8px;
}

.filters-sidebar::-webkit-scrollbar-track {
  background: var(--color-background);
  border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 10px;
  transition: var(--transition-base);
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
  background: #0a5a0a;
}

/* Firefox scrollbar */
.filters-sidebar {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--color-background);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0a5a0a 100%);
  color: white;
  padding: var(--spacing-xl) 0;
  margin-bottom: var(--spacing-2xl);
  text-align: center;
}

.page-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
}

.page-subtitle {
  font-size: var(--font-size-lg);
  opacity: 0.9;
}

/* Product Page Search Bar */
.product-page-search {
  margin-bottom: var(--spacing-xl);
}

.product-search-form {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.product-search-wrapper {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm) var(--spacing-md);
  gap: var(--spacing-sm);
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.product-search-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 61, 11, 0.1);
}

.product-search-wrapper .search-icon {
  color: var(--color-text-light);
  font-size: var(--font-size-lg);
}

.product-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: var(--spacing-sm);
  outline: none;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
}

.product-search-input::placeholder {
  color: var(--color-text-light);
}

.product-search-btn {
  background: var(--color-primary);
  border: none;
  color: white;
  cursor: pointer;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-base);
  transition: var(--transition-base);
  white-space: nowrap;
}

.product-search-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.product-search-btn:active {
  transform: translateY(0);
}

/* Products Layout */
.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Filters Sidebar */
.filters-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  overflow-x: hidden; /* Prevent horizontal scroll */
  width: 100%; /* Ensure it doesn't exceed grid column */
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--color-border);
}

.filters-header h2 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.clear-filters {
  color: var(--color-error);
  font-size: var(--font-size-sm);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: var(--transition-base);
}

.clear-filters:hover {
  text-decoration: underline;
}

/* Filter Groups */
.filter-group {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
}

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

.filter-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.filter-title.collapsible-filter {
  cursor: pointer;
  user-select: none;
  justify-content: space-between;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  margin-bottom: 0;
}

.filter-title.collapsible-filter:hover {
  background: var(--color-background);
}

.filter-title.collapsible-filter span {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.filter-title .toggle-icon {
  font-size: var(--font-size-sm);
  transition: transform 0.3s ease;
  color: var(--color-text-secondary);
}

.filter-title.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.filter-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  opacity: 1;
  padding-top: var(--spacing-md);
}

.filter-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.filter-title i {
  color: var(--color-primary);
  font-size: var(--font-size-sm);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

/* Brand Search */
.brand-search-container,
.category-search-container {
  position: relative;
  margin-bottom: var(--spacing-sm);
}

.brand-search-input,
.category-search-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  padding-left: calc(var(--spacing-md) + 20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transition: var(--transition-base);
}

.brand-search-input:focus,
.category-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 61, 11, 0.1);
}

.brand-search-icon,
.category-search-icon {
  position: absolute;
  left: var(--spacing-sm);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  pointer-events: none;
}

/* Scrollable Brand/Category Filter Options */
.brand-filter-options,
.category-filter-options {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: var(--spacing-xs);
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--color-background);
}

.brand-filter-options::-webkit-scrollbar,
.category-filter-options::-webkit-scrollbar {
  width: 6px;
}

.brand-filter-options::-webkit-scrollbar-track,
.category-filter-options::-webkit-scrollbar-track {
  background: var(--color-background);
  border-radius: 3px;
}

.brand-filter-options::-webkit-scrollbar-thumb,
.category-filter-options::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

.brand-filter-options::-webkit-scrollbar-thumb:hover,
.category-filter-options::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

/* No Results Message */
.no-results-message {
  text-align: center;
  padding: var(--spacing-lg);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.no-results-message i {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-border);
}

.no-results-message p {
  margin: 0;
}

/* Filter Loading Overlay */
.filter-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-lg);
}

[data-theme="dark"] .filter-loading-overlay {
  background: rgba(26, 43, 26, 0.9);
}

.filter-loading-overlay .loader-spinner {
  text-align: center;
  color: var(--color-primary);
}

.filter-loading-overlay .loader-spinner i {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
}

.filter-loading-overlay .loader-spinner p {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  font-size: var(--font-size-sm);
}

.filter-option:hover {
  background: var(--color-background);
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--color-primary);
}

.filter-option span {
  flex: 1;
}

.rating-option .fa-star {
  color: var(--color-accent);
  font-size: 0.875rem;
}

.checkbox-option {
  font-weight: 500;
}

/* Price Inputs */
.price-inputs {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
  max-width: 100%;
}

.price-input {
  flex: 1;
  min-width: 0; /* Allow flex items to shrink below content size */
  max-width: calc(50% - 8px); /* Prevent overflow */
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  background: var(--color-surface);
  color: var(--color-text);
  box-sizing: border-box;
}

.price-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.price-separator {
  color: var(--color-text-light);
}

.apply-filters {
  margin-top: var(--spacing-lg);
}

/* Products Main Area */
.products-main {
  min-width: 0; /* Fix grid overflow */
  position: relative; /* For loading overlay */
}

/* Toolbar */
.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.toolbar-left {
  flex: 1;
}

.results-count {
  margin: 0;
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
}

.results-count strong {
  color: var(--color-primary);
  font-weight: 600;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.sort-control,
.per-page-control {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.sort-control label,
.per-page-control label {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  font-weight: 500;
}

.sort-select,
.per-page-select {
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: var(--transition-base);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%230B3D0B' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px;
  box-shadow: var(--shadow-sm);
}

.sort-select:hover,
.per-page-select:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 61, 11, 0.1);
  transform: translateY(-1px);
}

.sort-select:focus,
.per-page-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 61, 11, 0.15);
}

.sort-select option,
.per-page-select option {
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0.75rem 1rem;
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--radius-sm);
}

.sort-select option:hover,
.per-page-select option:hover {
  background: var(--color-primary);
  color: white;
}

.sort-select option:checked,
.per-page-select option:checked {
  background: var(--color-primary);
  color: white;
  font-weight: 600;
}

/* Dark mode dropdown options */
[data-theme="dark"] .sort-select option,
[data-theme="dark"] .per-page-select option {
  background: var(--color-surface);
  color: var(--color-text);
}

[data-theme="dark"] .sort-select option:hover,
[data-theme="dark"] .per-page-select option:hover {
  background: var(--color-primary);
  color: white;
}

[data-theme="dark"] .sort-select option:checked,
[data-theme="dark"] .per-page-select option:checked {
  background: var(--color-primary);
  color: white;
}

/* No Products */
.no-products {
  text-align: center;
  padding: var(--spacing-2xl);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.no-products i {
  font-size: 4rem;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-md);
}

.no-products h3 {
  font-size: var(--font-size-2xl);
  color: var(--color-text);
  margin-bottom: var(--spacing-sm);
}

.no-products p {
  color: var(--color-text-light);
}

.no-products a {
  color: var(--color-primary);
  font-weight: 600;
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-2xl);
}

/* ============================================
   Product Detail Page
   ============================================ */

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

.breadcrumb a {
  color: var(--color-text-light);
  text-decoration: none;
  transition: var(--transition-base);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .separator {
  color: var(--color-border);
}

.breadcrumb .current {
  color: var(--color-text);
  font-weight: 500;
}

/* Product Detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

/* Product Images */
.product-images {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.main-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--spacing-md);
  background: white;
}

.main-image img {
  width: 100%;
  height: auto;
  display: block;
}

.main-image .badge {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--spacing-sm);
}

.thumbnail {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: var(--transition-base);
}

.thumbnail:hover {
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.thumbnail.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(11, 61, 11, 0.2);
}

/* Product Info */
.product-header {
  margin-bottom: var(--spacing-lg);
}

.product-brand {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-xs);
}

.product-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.product-rating .stars {
  display: flex;
  gap: 2px;
}

.product-rating .fa-star {
  color: #ddd;
  font-size: var(--font-size-base);
}

.product-rating .fa-star.filled {
  color: var(--color-accent);
}

.rating-value {
  font-weight: 600;
  color: var(--color-text);
}

.review-count {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
}

/* Pricing */
.product-pricing {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--color-background);
  border-radius: var(--radius-lg);
}

.price-box {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.current-price {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: var(--color-primary);
}

.original-price {
  font-size: var(--font-size-xl);
  color: var(--color-text-light);
  text-decoration: line-through;
}

.discount-badge {
  padding: 0.25rem 0.75rem;
  background: var(--color-error);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.deal-timer {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-error);
  font-weight: 600;
}

/* Stock Status */
.stock-status {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.stock-status.in_stock {
  background: rgba(76, 175, 80, 0.1);
  color: var(--color-success);
}

.stock-status.out_of_stock {
  background: rgba(231, 76, 60, 0.1);
  color: var(--color-error);
}

.stock-status.low_stock {
  background: rgba(255, 152, 0, 0.1);
  color: var(--color-warning);
}

/* Product Description */
.product-description {
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
  color: var(--color-text);
}

/* Features */
.product-features {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--color-background);
  border-radius: var(--radius-lg);
}

.product-features h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.product-features h3 i {
  color: var(--color-success);
}

.product-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  color: var(--color-text);
}

.product-features li i {
  color: var(--color-success);
  margin-top: 4px;
}

/* Product Actions */
.product-actions {
  margin-top: var(--spacing-xl);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.btn-buy {
  width: 100%;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--color-primary) 0%, #0a5a0a 100%);
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.affiliate-disclosure {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: rgba(255, 152, 0, 0.1);
  border-left: 3px solid var(--color-warning);
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
  border-radius: var(--radius-md);
}

/* Product Tabs */
.product-tabs {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-2xl);
  overflow: hidden;
}

.tabs-header {
  display: flex;
  border-bottom: 2px solid var(--color-border);
}

.tab-button {
  flex: 1;
  padding: var(--spacing-md) var(--spacing-lg);
  background: transparent;
  border: none;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-light);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.tab-button:hover {
  background: var(--color-background);
}

.tab-button.active {
  color: var(--color-primary);
  background: var(--color-background);
  border-bottom: 3px solid var(--color-primary);
}

.tab-content {
  display: none;
  padding: var(--spacing-xl);
}

.tab-content.active {
  display: block;
}

/* Specifications Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--color-border);
}

.specs-table th,
.specs-table td {
  padding: var(--spacing-md);
  text-align: left;
}

.specs-table th {
  font-weight: 600;
  color: var(--color-text);
  width: 40%;
  background: var(--color-background);
}

.specs-table td {
  color: var(--color-text);
}

/* Pros & Cons */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
}

.pros-section,
.cons-section {
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
}

.pros-section {
  background: rgba(76, 175, 80, 0.05);
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.cons-section {
  background: rgba(231, 76, 60, 0.05);
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.pros-section h3,
.cons-section h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.pros-section h3 {
  color: var(--color-success);
}

.cons-section h3 {
  color: var(--color-error);
}

.pros-section ul,
.cons-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pros-section li,
.cons-section li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
}

.pros-section li i {
  color: var(--color-success);
  margin-top: 4px;
}

.cons-section li i {
  color: var(--color-error);
  margin-top: 4px;
}

/* Related Products */
.related-products {
  margin-top: var(--spacing-2xl);
}

.related-products h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
  display: none;
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  position: relative;
}

.mobile-filter-toggle:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.mobile-filter-toggle i {
  margin-right: var(--spacing-sm);
}

.mobile-filter-toggle .filter-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-accent);
  color: var(--color-text);
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}

/* Close Filters Button (Mobile) */
.close-filters-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: var(--font-size-xl);
  cursor: pointer;
  padding: var(--spacing-xs);
  transition: var(--transition-base);
  border-radius: var(--radius-md);
}

.close-filters-btn:hover {
  background: var(--color-background);
  color: var(--color-primary);
}

.filters-header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* Hide mobile-only elements on desktop */
.filters-overlay {
  display: none;
}

/* Responsive - Product Pages */
@media (max-width: 1024px) {
  /* Show mobile filter toggle button */
  .mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Hide filters by default on tablets and phones */
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 1000;
    background: var(--color-surface);
    box-shadow: none;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding: var(--spacing-lg);
  }
  
  /* Show filters when active */
  .filters-sidebar.active {
    left: 0;
  }
  
  /* Show close button on mobile */
  .close-filters-btn {
    display: block;
  }
  
  /* Overlay for mobile filters */
  .filters-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height */
    min-height: 100vh;
    min-height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }
  
  .filters-overlay.active {
    display: block;
    opacity: 1;
  }

  .products-layout {
    grid-template-columns: 1fr;
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-images {
    position: static;
  }
}

@media (max-width: 768px) {
  .page-header h1 {
    font-size: var(--font-size-2xl);
  }
  
  /* Product Search - Mobile Responsive */
  .product-search-wrapper {
    padding: var(--spacing-xs) var(--spacing-sm);
    gap: var(--spacing-xs);
  }
  
  .product-search-wrapper .search-icon {
    font-size: var(--font-size-base);
    flex-shrink: 0;
  }
  
  .product-search-input {
    padding: var(--spacing-xs);
    font-size: var(--font-size-sm);
    min-width: 0;
  }
  
  .product-search-btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
    flex-shrink: 0;
  }

  .products-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-right {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
  }

  .sort-control,
  .per-page-control {
    width: 100%;
    justify-content: space-between;
  }

  .sort-select,
  .per-page-select {
    flex: 1;
  }

  .product-title {
    font-size: var(--font-size-2xl);
  }

  .current-price {
    font-size: var(--font-size-3xl);
  }

  .pros-cons-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: var(--spacing-lg) 0;
  }
  
  /* Product Search - Extra Small Screens */
  .product-search-btn {
    padding: var(--spacing-xs);
    font-size: 0; /* Hide text */
  }
  
  .product-search-btn::before {
    content: "\f002"; /* Search icon unicode */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: var(--font-size-base);
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-title {
    font-size: var(--font-size-xl);
  }

  .tabs-header {
    flex-direction: column;
  }
}
