/* ==========================================================================
   PRODUCTS CATALOG & DETAIL STYLES - CLEAN LIGHT THEME
   ========================================================================== */

/* Filter Bar */
.products-filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-pill-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.filter-pill-btn:hover {
  background: #f1f5f9;
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.filter-pill-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: #cbd5e1;
}

.card-badge-wrap {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.product-image-wrap {
  background: #ffffff; border-bottom: 1px solid #f1f5f9;
  height: 260px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.product-card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-img {
  transform: scale(1.04);
}

.quick-view-overlay {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 5;
}

.product-card:hover .quick-view-overlay {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.product-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.product-rating .stars {
  color: #f59e0b;
}

.product-rating .rating-val {
  font-weight: 800;
  color: var(--text-primary);
}

.product-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-title a {
  color: var(--text-primary);
}

.product-title a:hover {
  color: var(--color-primary);
}

.product-tagline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  min-height: 40px;
}

.product-specs-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.spec-pill {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

/* Color Swatches */
.color-swatches-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.swatch-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.swatches-list {
  display: flex;
  gap: 8px;
}

.color-swatch-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.color-swatch-btn:hover, .color-swatch-btn.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--color-primary);
}

/* Pricing */
.product-card-pricing {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.current-price {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-primary);
}

.compare-price {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.vat-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.product-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Range Calculator */
.calc-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  max-width: 960px;
  margin: 0 auto;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.calc-group {
  margin-bottom: 20px;
}

.calc-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.calc-select, .calc-range-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  background: #f8fafc;
  color: var(--text-primary);
}

.calc-results-panel {
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.calc-big-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: #38bdf8;
  line-height: 1;
  margin-bottom: 8px;
}

/* Reviews Grid */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.review-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .calc-grid { grid-template-columns: 1fr; }
  .product-card-actions { grid-template-columns: 1fr; }
  .calc-card { padding: 20px; }
}

/* Product detail page: the gallery/info grid is inline-styled in
   product.html, so the mobile collapse needs !important to win. */
@media (max-width: 900px) {
  #prod-main-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
}
