/* Product Grid Styles - Bootstrap 4 Compatible */

/* Section Styling */
.product-grid-section {
  background-color: #ffffff;
}

/* Gradient Title */
.gradient-title {
  background: linear-gradient(135deg, #0093dd 0%, #00c3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Product Card Container */
.product-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.product-card .card {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #f3f3f3;
}

/* Filter Sidebar */
.filter-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1050;
  display: flex;
  flex-direction: column;
}

.filter-sidebar.active {
  right: 0;
}

.filter-sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.filter-sidebar-header {
  flex-shrink: 0;
  padding: 2rem 1.5rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  position: relative;
}

.filter-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

.filter-sidebar-header .close-filter {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-sidebar-header .close-filter:hover {
  color: #000;
}

.filter-sidebar-body {
  flex: 1;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.filter-sidebar-footer {
  flex-shrink: 0;
  padding: 1.5rem;
  border-top: 1px solid #e9ecef;
  background: white;
}

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

.filter-label {
  font-weight: 500;
  font-size: 0.875rem;
  display: block;
  color: #1a1a1a;
}

.filter-value {
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: 400;
}

.custom-range {
  cursor: pointer;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #e9ecef;
  outline: none;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-control-label {
  font-size: 0.875rem;
  color: #495057;
  user-select: none;
}

/* Dual Range Slider */
.dual-range-slider {
  position: relative;
  height: 8px;
  background: #e9ecef;
  border-radius: 5px;
}

.dual-range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  height: 8px;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.dual-range-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: all;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dual-range-slider input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dual-range-slider .range-max {
  background: linear-gradient(to right, #e9ecef 0%, #e9ecef 100%);
}

.filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  display: none;
}

.filter-overlay.active {
  display: block;
}

/* Image Container */
.product-image-container {
  width: 100%;
  padding-top: 75%; /* 4:3 Aspect Ratio */
  background-color: #f8f9fa;
  overflow: hidden;
}

.product-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.product-img-main {
  opacity: 1;
  z-index: 1;
}

.product-img-hover {
  opacity: 0;
  z-index: 2;
}

.product-card:hover .product-img-main {
  opacity: 0;
}

.product-card:hover .product-img-hover {
  opacity: 1;
}

/* Product Title */
.product-title {
  color: #333;
  transition: color 0.3s ease;
}

/* Color Palette */
.color-palette {
  display: flex;
  margin-left: -0.25rem;
}

.color-circle {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  margin-left: -0.5rem;
  display: inline-block;
  position: relative;
}

.color-circle:first-child {
  margin-left: 0;
  z-index: 5;
}

.color-circle:nth-child(2) {
  z-index: 4;
}

.color-circle:nth-child(3) {
  z-index: 3;
}

.color-circle:nth-child(4) {
  z-index: 2;
}

.color-circle:nth-child(5) {
  z-index: 1;
}

/* Product Specs */
.product-specs {
  font-size: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.spec-item-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #6c757d;
  font-size: 0.75rem;
}

.spec-item i {
  color: #6c757d;
  font-size: 0.875rem;
}

.spec-item .font-weight-semibold {
  font-weight: 600;
  color: #333;
  font-size: 0.875rem;
}

/* Font Awesome Icon Adjustments (if using FA) */
.fas {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
  .gradient-title {
    font-size: 2rem;
  }
  
  .product-specs {
    font-size: 0.8rem;
  }
  
  .spec-item i {
    font-size: 0.9rem;
  }

  .filter-sidebar {
    width: 100%;
    right: -100%;
  }
}

/* Pagination Controls */
#paginationControls {
  margin-top: 2rem;
}

#paginationControls .btn {
  min-width: 120px;
}

#pendingProductsMessage {
  font-size: 0.95rem;
  color: #6c757d;
}

/* Number inputs in filters */
.filter-group input[type="number"] {
  font-size: 0.875rem;
}

.filter-group .small {
  font-size: 0.75rem;
  display: block;
  margin-bottom: 0.25rem;
}