/* Mobile-First Responsive Heating Calculator with Better Spacing */
:root {
  --primary-color: #d73f15;
  --secondary-color: #f7941d;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --border-color: #e5e7eb;
  --border-radius: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

.heating-calculator {
  max-width: 100%;
  margin: 10px auto 0 auto;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

/* Header - Improved Spacing */
.calculator-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 32px 20px;
  background: #36445a;
  border-radius: var(--border-radius);
  color: white;
  box-shadow: var(--shadow-md);
  margin-top: 20px;
}

.calculator-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: white;
}

.calculator-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 10px 12px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: white;
}

.calculator-header p {
  font-size: 16px;
  margin: 0;
  opacity: 0.9;
  line-height: 1.4;
  color: white;
}

/* UK Standard Info - Better Spacing */
.uk-standard-info {
  background: linear-gradient(135deg, #36445a 0%, #64748e 100%);
  color: white;
  padding: 24px 20px;
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  margin-top: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.uk-standard-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.uk-standard-content {
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.95;
}

.delta-highlight {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin: 0 2px;
}

/* Calculator Container - Generous Padding */
.calculator-container {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 0;
  margin-bottom: 24px;
}

/* Unified Calculator Container - Single Grey Box */
.unified-calculator-container {

  padding: 0;
  margin-bottom: 24px;
  position: relative;
}



/* Calculator Form Section within Unified Container */
.calculator-form-section {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 20px;
  margin-top: 24px;
}

/* UK Standard Info within Unified Container */
.unified-calculator-container .uk-standard-info {
  background: linear-gradient(135deg, #36445a 0%, #64748e 100%);
  color: white;
  padding: 0;
  border-radius: var(--border-radius);
  margin-bottom: 0;
  margin-top: 0;
  text-align: center;
  box-shadow: var(--shadow-md);
}

/* Input Grid - Better Spacing */
.input-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.input-group {
  position: relative;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.input-group select {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
}

.input-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(215, 63, 21, 0.1);
}

/* Unit Toggle - Better Spacing */
.unit-toggle-section {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px;

  border-radius: var(--border-radius);
}

legend {
  border: 0 none;
}

.unit-toggle-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 22px;
  border: 0 none;
}

.unit-toggle {
  display: inline-flex;
  background: #e5e7eb;
  border-radius: 25px;
  padding: 4px;
  width: 100%;
  max-width: 320px;
}

.unit-toggle input[type="radio"] {
  display: none;
}

.unit-toggle label {
  flex: 1;
  padding: 12px 20px;
  border-radius: 21px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  text-align: center;
  font-size: 15px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  margin: 0;
}

.unit-toggle input[type="radio"]:checked+label {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* Calculator Mode Fields */
.advanced-field {
  display: none;
}

body.advanced-mode .advanced-field {
  display: block;
}

body.simple-mode .advanced-field {
  display: none;
}

/* Field Help Text */
.field-help {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dimensions Section */
.dimensions-section {
  margin-bottom: 24px;
}

.dimensions-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.dimensions-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dimension-input label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 50px 14px 16px;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(215, 63, 21, 0.1);
}

.input-unit {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
  font-size: 15px;
}

/* Calculate Button - Improved Spacing */
.calculate-section {
  text-align: center;
  padding: 24px 0 0 0;
  border-top: 2px solid var(--border-color);
}

.calculate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  max-width: 320px;
  min-height: 56px;
  position: relative;
  overflow: hidden;
}

.calculate-btn:hover:not(.loading) {
  background: #c12e0a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.calculate-btn.loading {
  background: #b8391a;
  cursor: not-allowed;
  transform: none;
}

.calculate-btn.loading .btn-text {
  opacity: 0.7;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

.calculate-btn.loading .loading-spinner {
  display: block;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Loading Animation for Button */
.calculate-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.calculate-btn.loading::before {
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* Products Loading States */
.products-loading-container {
  display: none;
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  margin: 20px 0;
  border: 2px solid var(--border-color);
}

.products-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

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

.products-loading-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.products-loading-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Skeleton Loading for Products */
.product-skeleton {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--border-radius);
  margin-bottom: 16px;
}

.skeleton-title {
  height: 20px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
  width: 80%;
}

.skeleton-text {
  height: 14px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 75%;
}

.skeleton-price {
  height: 24px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin: 16px 0;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}

.skeleton-button {
  height: 44px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--border-radius);
  width: 100%;
}

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

  100% {
    background-position: -200% 0;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.8;
  }
}

/* Infinite Scroll Loading Indicator */
.infinite-scroll-loading {
  display: none;
  text-align: center;
  padding: 24px 20px;
  margin: 16px 0;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
}

.infinite-scroll-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-direction: column;
}

.infinite-scroll-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.infinite-scroll-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.infinite-scroll-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Loading States for Category Carousel */
.categories-loading {
  display: none;
  padding: 20px;
  text-align: center;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.categories-loading-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

.categories-loading-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Enhanced Error States */
.loading-error {
  text-align: center;
  padding: 32px 20px;
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: var(--border-radius);
  margin: 20px 0;
}

.error-icon {
  font-size: 48px;
  color: #ef4444;
  margin-bottom: 16px;
}

.error-title {
  font-size: 18px;
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 8px;
}

.error-message {
  font-size: 14px;
  color: #7f1d1d;
  margin-bottom: 16px;
  line-height: 1.5;
}

.error-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.error-retry-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Loading Progress Bar */
.loading-progress {
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}

.loading-progress-bar {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% {
    width: 0%;
    transform: translateX(-100%);
  }

  50% {
    width: 100%;
    transform: translateX(0%);
  }

  100% {
    width: 100%;
    transform: translateX(100%);
  }
}

/* Success Animation */
@keyframes success-bounce {

  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  40%,
  43% {
    transform: translate3d(0, -8px, 0);
  }

  70% {
    transform: translate3d(0, -4px, 0);
  }

  90% {
    transform: translate3d(0, -2px, 0);
  }
}

.calculate-btn.success {
  background: var(--success-color);
  animation: success-bounce 0.6s ease;
}

.calculate-btn.success .btn-text::after {
  content: ' ✓';
  color: white;
}

/* Responsive Loading Improvements */
@media (min-width: 768px) {
  .products-loading-container {
    padding: 40px 24px;
  }

  .infinite-scroll-content {
    flex-direction: row;
  }

  .infinite-scroll-text {
    font-size: 16px;
  }

  .infinite-scroll-subtitle {
    font-size: 14px;
  }

  .products-loading-spinner {
    width: 48px;
    height: 48px;
    border-width: 5px;
  }
}

@media (min-width: 1024px) {
  .products-loading-container {
    padding: 48px 32px;
  }
}

/* Results Section - Better Spacing */
.results-container {
  margin-top: 28px;
  padding: 28px 20px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border: 2px solid var(--success-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  animation: slideInUp 0.5s ease;
  display: none;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-header {
  text-align: center;
  margin-bottom: 24px;
}

.results-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.results-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--success-color);
  color: white;
  padding: 10px 16px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.result-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.result-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.result-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.result-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
  display: block;
}

.result-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.result-delta-indicator {
  font-size: 12px;
  color: var(--success-color);
  font-weight: 600;
  margin-top: 6px;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 8px;
  border-radius: 10px;
  display: inline-block;
}

/* Products Section */
.products-section {
  margin-top: 32px;
  padding: 28px 0 0 0;
  border-top: 2px solid var(--border-color);
}

.products-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 0 16px;
}

.products-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.products-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.compliance-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-color);
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
}

/* Products Controls - Better Spacing */
.products-controls {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 20px 16px;
  margin-bottom: 24px;
  border: 2px solid var(--border-color);
}

/* Categories Section */
.categories-section {
  margin-bottom: 20px;
}

.categories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

.categories-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.categories-navigation {
  display: flex;
  gap: 6px;
}

.categories-nav-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.categories-nav-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(215, 63, 21, 0.05);
}

.categories-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.categories-carousel-container {
  overflow: hidden;
  border-radius: var(--border-radius);
}

.categories-carousel {
  display: flex;
  gap: 12px;
  transition: transform 0.3s ease;
  padding: 4px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.categories-carousel:active {
  cursor: grabbing;
}

.categories-carousel.dragging {
  transition: none;
}

.category-item {
  min-width: 120px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.category-item:hover::before {
  background: rgba(215, 63, 21, 0.6);
}

.category-item.active::before {
  background: rgba(215, 63, 21, 0.5);
}

.category-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.category-item.active {
  border-color: var(--primary-color);
  background-blend-mode: overlay;
}

.category-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
  line-height: 1.2;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.category-count {
  font-size: 11px;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 10px;
  display: inline-block;
  min-width: 20px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.category-item.active .category-count {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
}

/* Filters Bar - Improved Layout */
.filters-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 16px;
}

.filters-left,
.filters-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.results-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.results-count {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.results-requirement {
  font-size: 14px;
  color: var(--text-secondary);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-select {
  padding: 8px 12px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  min-width: 150px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Simple Filters - Touch Friendly */
.simple-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.simple-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  padding: 6px 8px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  min-height: 40px;
  white-space: nowrap;
}

.simple-filter-checkbox:hover {
  background: rgba(215, 63, 21, 0.05);
}

.simple-filter-checkbox input[type="checkbox"] {
  display: none;
}

.simple-filter-checkbox .checkbox-custom {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.simple-filter-checkbox input[type="checkbox"]:checked+.checkbox-custom {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.simple-filter-checkbox input[type="checkbox"]:checked+.checkbox-custom::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: bold;
}

.simple-filter-checkbox:hover .checkbox-custom {
  border-color: var(--primary-color);
}

/* Products Grid - Better Spacing */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.product-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-image {
  width: 100%;
  height: 360px;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: 16px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.stock-status {
  display: inline-block;
  padding: 4px 10px;
  background: var(--success-color);
  color: white;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.stock-status.out-of-stock {
  background: #ef4444;
  color: white;
}

.stock-status.in-stock {
  background: var(--success-color);
  color: white;
}

.stock-status.supplier-discussion {
  background: #f59e0b;
  color: white;
}

.stock-status.pre-order {
  background: #3b82f6;
  color: white;
}

.stock-status.limited-stock {
  background: #eab308;
  color: white;
}

.stock-status.default {
  background: #6b7280;
  color: white;
}

.match-section {
  margin-bottom: 16px;
}

.match-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.match-percentage {
  font-size: 20px;
  font-weight: 700;
}

.match-percentage.excellent {
  color: var(--success-color);
}

.match-percentage.good {
  color: var(--warning-color);
}

.match-percentage.fair {
  color: #6b7280;
}

.match-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.best-match-badge {
  background: var(--success-color);
  color: white;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.product-specs {
  margin-bottom: 16px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--text-secondary);
}

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

.spec-value.highlight {
  color: var(--primary-color);
  font-weight: 700;
}

.product-pricing {
  margin-bottom: 16px;
  text-align: center;
}

.regular-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.sale-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.original-price {
  font-size: 16px;
  color: var(--text-secondary);
  text-decoration: line-through;
  margin-right: 8px;
}

.product-actions {
  text-align: center;
}

.product-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-btn:hover {
  background: #c12e0a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #ffffff;
}

/* FAQ Section - Better Spacing */
.faqs-section {
  margin-top: 32px;
  padding: 28px 20px;

  border-radius: var(--border-radius);
}

.faqs-header {
  text-align: center;
  margin-bottom: 24px;
}

.faqs-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.faqs-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

.faqs-container {
  max-width: 100%;
}

.faq-item {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.active {
  border-color: var(--primary-color);
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  line-height: 1.4;
  min-height: 56px;
}

.faq-icon {
  font-size: 18px;
  color: var(--primary-color);
  transition: var(--transition);
  margin-left: 12px;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-content {
  padding: 0 20px 20px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 15px;
}

/* Tablet Landscape (768px+) */
@media (min-width: 768px) {
  .heating-calculator {
    padding: 20px;
    margin-top: 10px;
  }

  .unified-calculator-container {
    padding: 0;
    border-radius: 16px;
  }

  .calculator-form-section {
    padding: 32px 24px;
    margin-top: 28px;
  }

  .calculator-header {
    padding: 36px 24px;
    margin-bottom: 28px;

  }

  .calculator-header h1 {
    font-size: 32px;
  }

  .calculator-header p {
    font-size: 18px;
  }

  .calculator-container {
    padding: 32px 24px;
    margin-bottom: 28px;
  }

  .input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
  }

  .dimensions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .filters-bar {
    flex-direction: row;
    justify-content: space-between;
    padding: 20px;
  }

  .simple-filters {
    justify-content: flex-end;
  }

  .category-item {
    min-width: 140px;
    padding: 20px 16px;
    min-height: 120px;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .heating-calculator {

    padding: 24px;
  }

  .unified-calculator-container {
    padding: 0;
    border-radius: 20px;
  }

  .calculator-form-section {
    padding: 36px 32px;
    margin-top: 32px;
  }

  .calculator-header {
    padding: 40px 32px;
    margin-bottom: 32px;
  }

  .calculator-header h1 {
    font-size: 40px;
  }

  .calculator-header p {
    font-size: 20px;
  }

  .calculator-container {
    padding: 36px 32px;
    margin-bottom: 32px;
  }

  .input-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 32px;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .category-item {
    min-width: 160px;
    min-height: 140px;
    padding: 24px 20px;
  }

  .category-name {
    font-size: 14px;
  }

  .category-count {
    font-size: 12px;
  }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .input-grid {
    gap: 32px;
  }

  .products-grid {
    gap: 32px;
  }
}

/* Touch Improvements */
@media (hover: none) {

  .calculate-btn:hover,
  .product-btn:hover,
  .categories-nav-btn:hover,
  .simple-filter-checkbox:hover {
    transform: none;
  }

  .categories-nav-btn {
    width: 40px;
    height: 40px;
  }

  .simple-filter-checkbox {
    padding: 10px 12px;
    min-height: 48px;
  }

  .faq-question {
    min-height: 60px;
    padding: 20px;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-secondary: #000000;
  }
}