@import url('card-styles.css');

:root {
  /* Colors */
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent-neon: #39ff14;
  --accent-neon-dim: rgba(57, 255, 20, 0.1);
  --accent-neon-glow: 0 0 10px rgba(57, 255, 20, 0.5);
  --border-color: #333;
  --error-color: #ff3333;

  /* Spacing */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Typography */
  --font-main: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
}

/* Layout */
.container {
  max-width: 1400px;
  /* Increased max-width for better sidebar fit */
  margin: 0 auto;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Base state: Hidden */
#configurator-container {
  display: none;
}

/* Active state: Visible */
#configurator-container.active {
  display: flex;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@media (min-width: 769px) {

  #configurator-container.active {
    display: grid;
    grid-template-columns: 1fr 360px;
    /* Slightly wider sidebar */
    gap: 40px;
    padding: 10px var(--spacing-xl) var(--spacing-xl);
    /* Reduced top padding */
    align-items: start;
  }

  .sidebar {
    display: block !important;
    position: sticky;
    top: 10px;
    /* Closer to top */
    height: fit-content;
    z-index: 100;
  }

  .wizard-content {
    min-width: 0;
    /* Prevent grid blowout */
  }

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

/* Hero Section */
.hero {
  /* No grid column span needed if outside grid, but if inside: */
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--spacing-xl);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
}

.btn-start {
  background-color: transparent;
  color: var(--accent-neon);
  border: 1px solid var(--accent-neon);
  padding: 12px 32px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--accent-neon-dim);
}

.btn-start:hover {
  background-color: var(--accent-neon);
  color: #000;
  box-shadow: var(--accent-neon-glow);
}

/* Wizard Steps */
.wizard-step {
  display: none;
  /* Hidden by default */
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.wizard-step.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.step-indicator {
  margin-bottom: var(--spacing-lg);
  font-size: 0.9rem;
  color: var(--accent-neon);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Form Elements */
.form-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

input[type="number"],
select {
  width: 100%;
  padding: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  font-size: 1rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-neon);
  box-shadow: 0 0 0 2px var(--accent-neon-dim);
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(550px, 1fr));
  gap: 25px;
  /* Increased from 12px */
}

.option-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--spacing-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.option-card.selected {
  border-color: var(--accent-neon);
  background: linear-gradient(145deg, rgba(57, 255, 20, 0.05), rgba(57, 255, 20, 0.15));
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
}

.option-card:hover {
  border-color: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.option-icon {
  font-size: 24px;
  margin-bottom: var(--spacing-sm);
  display: block;
}

/* Navigation Buttons */
.step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--spacing-xl);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 10px 24px;
  cursor: pointer;
  border-radius: 6px;
}

.btn-primary {
  background: var(--accent-neon);
  color: #000;
  border: none;
  padding: 10px 24px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 0 10px var(--accent-neon-dim);
  transition: all 0.3s ease;
}

.btn-primary:disabled,
.btn-primary[disabled] {
  background: #333;
  color: #777;
  border-color: #444;
  cursor: not-allowed;
  box-shadow: none;
}

/* Sidebar (Hidden by default, shown on desktop) */
.sidebar {
  display: none;
}

/* Sticky Summary */
.summary-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--spacing-lg);
  height: fit-content;
  /* Sticky is handled by .sidebar on desktop */
}

.summary-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--spacing-sm);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
  font-size: 0.95rem;
}

.summary-item span:first-child {
  color: var(--text-secondary);
}

.price-total {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-neon);
  text-align: right;
}

.summary-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

.summary-footer-row .price-total {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  text-align: left;
}

.sidebar-nav {
  margin-top: 10px;
}

.sidebar-nav button {
  padding: 12px;
}

.btn-add-cart {
  width: 100%;
  margin-top: var(--spacing-md);
  padding: 16px;
  font-size: 1.1rem;
}

/* Validation Error */
.error-msg {
  color: var(--error-color);
  font-size: 0.9rem;
  margin-top: var(--spacing-sm);
  display: none;
}

/* Mobile Visibility Utilities */
.mobile-only {
  display: none;
  /* Default hidden */
}

/* Hide redundant in-flow nav buttons since we have sticky bar */
.step-nav.mobile-only {
  display: none !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .mobile-only {
    display: flex;
    /* Show on mobile */
  }

  /* Ensure step nav is nicely spaced on mobile */
  .step-nav.mobile-only {
    margin-top: 20px;
    justify-content: space-between;
    gap: 10px;
  }

  .step-nav.mobile-only button {
    flex: 1;
  }

  :root {
    --spacing-lg: 20px;
    --spacing-xl: 24px;
  }

  h1 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .hero {
    padding: 40px 15px;
  }

  .container {
    padding: var(--spacing-md);
    gap: var(--spacing-md);
  }

  .wizard-step {
    padding: var(--spacing-md);
  }

  .options-grid {
    grid-template-columns: 1fr;
    /* Full width on mobile for richer cards */
    gap: 12px;
  }

  .option-card {
    padding: 16px;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    /* Larger touch target */
  }

  .step-nav {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .step-nav button {
    width: 100%;
  }

  /* Mobile Sidebar (Summary) */
  /* .sidebar is hidden globally by default */

  .sidebar.mobile-active {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: #141414;
    padding: 20px;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  .btn-close-sidebar {
    width: 100%;
    padding: 15px;
    background: #333;
    border: 1px solid #444;
    color: white;
    margin-top: 20px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
  }
}

/* Mobile Sticky Summary Bar */
.mobile-summary-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(15px);
  border-top: 1px solid var(--border-color);
  padding: 15px 20px;
  /* Add safe area support for iOS home indicator */
  padding-bottom: max(15px, env(safe-area-inset-bottom));
  z-index: 1000;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid #333;
  transition: transform 0.3s ease;
}

/* Show when active, regardless of screen size */
#configurator-container.active~.mobile-summary-bar {
  display: flex;
}

/* Adjust body padding when configurator is active */
body:has(#configurator-container.active) {
  padding-bottom: 120px;
  /* Increased buffer for sticky bar */
}

.mobile-price-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.mobile-price-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-neon);
}

.btn-mobile-next {
  background: var(--accent-neon);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Stock Status Dots */
.stock-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  /* Allows clicking through the dot to select product */
  z-index: 10;
}

.stock-dot.available {
  background-color: var(--accent-neon);
  box-shadow: 0 0 8px var(--accent-neon);
}

.stock-dot.low {
  background-color: #ffa500;
  box-shadow: 0 0 8px #ffa500;
}

.stock-dot.out {
  background-color: #ff3333;
  /* Red */
  box-shadow: 0 0 8px #ff3333;
}

/* Out of stock card styling */
.option-card.out-of-stock {
  opacity: 0.5;
  pointer-events: none;
}

.option-card.out-of-stock::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

/* Card image needs position relative for badge positioning */
.card-image {
  position: relative;
}

/* ============================================
   Product Mode Toggle (Taśmy LED / Zestawy LED)
   ============================================ */
.product-mode-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.mode-btn {
  flex: 1;
  padding: 15px 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mode-btn:hover {
  border-color: var(--accent-neon);
  color: var(--text-primary);
  background: rgba(57, 255, 20, 0.05);
}

.mode-btn.active {
  background: var(--accent-neon);
  color: #000;
  border-color: var(--accent-neon);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.mode-btn .mode-icon {
  font-size: 1.2em;
}

/* Sets Card - Add to Cart Button */
.set-card-actions {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-add-to-cart {
  width: 100%;
  padding: 12px 20px;
  background: var(--accent-neon);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-to-cart:hover {
  background: #4aff25;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
  transform: translateY(-2px);
}

.btn-add-to-cart:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Mobile responsive for toggle */
@media (max-width: 768px) {
  .product-mode-toggle {
    flex-direction: column;
  }

  .mode-btn {
    padding: 12px 15px;
    font-size: 0.95rem;
  }
}


/* Footer Styles */
.site-footer {
  background: #141414;
  border-top: 1px solid var(--border-color);
  padding: 60px 0 20px;
  margin-top: 60px;
  color: #ccc;
  font-size: 0.95rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #222;
}

.footer-section h2.footer-logo {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 15px;
  letter-spacing: -0.02em;
}

.footer-section h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background-color: var(--accent-neon);
  box-shadow: 0 0 5px var(--accent-neon);
}

.footer-section p {
  line-height: 1.6;
  margin-bottom: 15px;
  color: #a0a0a0;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.contact-info i {
  color: var(--accent-neon);
  width: 20px;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #222;
  color: #fff;
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.social-link:hover {
  background: var(--accent-neon-dim);
  color: var(--accent-neon);
  border-color: var(--accent-neon);
  transform: translateY(-3px);
  box-shadow: 0 0 10px var(--accent-neon-dim);
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: #a0a0a0;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
}

.footer-section ul li a:hover {
  color: var(--accent-neon);
  padding-left: 5px;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a0a0a0;
}

.features-list i {
  color: var(--accent-neon);
}

.footer-bottom {
  padding-top: 20px;
  font-size: 0.85rem;
  color: #666;
}

.footer-bottom .container {
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  /* Match main container max-width */
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--accent-neon);
}

/* Mobile Responsiveness for Footer */
@media (max-width: 768px) {
  .site-footer {
    padding: 40px 0 100px;
    /* Extra bottom padding for sticky bar space */
    text-align: center;
  }

  .footer-section h3 {
    display: inline-block;
  }

  .footer-section h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .contact-info p {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .footer-section ul li a:hover {
    padding-left: 0;
    /* Disable hover movement on mobile */
  }

  .features-list li {
    justify-content: center;
  }

  .footer-bottom .container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

/* Image Zoom Modal */
.image-modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 2000;
  /* Sit on top */
  padding-top: 50px;
  /* Location of the box */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.9);
  /* Black w/ opacity */
  backdrop-filter: blur(5px);
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  animation-name: zoom;
  animation-duration: 0.3s;
}

@keyframes zoom {
  from {
    transform: scale(0)
  }

  to {
    transform: scale(1)
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--accent-neon);
  text-decoration: none;
  cursor: pointer;
}

@media only screen and (max-width: 700px) {
  .modal-content {
    width: 95%;
  }

  .close-modal {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }
}

/* Desktop Sticky Nav (User Request) */
.desktop-sticky-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--accent-neon);
  padding: 20px;
  z-index: 999;
  display: none;
  /* Controlled by JS */
  justify-content: flex-end;
  /* Right aligned */
  align-items: center;
  gap: 30px;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.8);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.desktop-sticky-nav.visible {
  transform: translateY(0);
}

.desktop-price-preview {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--accent-neon);
}

@media (max-width: 768px) {
  .desktop-sticky-nav {
    display: none !important;
    /* Hide on mobile, use mobile bar */
  }
}

@media (min-width: 769px) {
  .desktop-sticky-nav {
    display: flex;
    /* Initially flex, but visibility toggled by .visible class or display style */
  }
}

/* Loading Spinner */
.loading-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  width: 100%;
  gap: 15px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(57, 255, 20, 0.1);
  border-left-color: var(--accent-neon);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

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

  to {
    transform: rotate(360deg);
  }
}

/* Configurator Steps Refactor Styles */

/* Ensure the grid columns don't get too narrow */
.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
}

@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: 1fr !important;
  }

  /* On mobile, we might want to show details always */
  .category-details {
    display: block !important;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .category-tile {
    height: auto !important;
    min-height: 180px;
  }

  /* Hide the "Hover" indicator on mobile since it's always visible */
  .category-hover-indicator {
    display: none !important;
  }
}

.category-tile:hover .category-hover-indicator span:last-child {
  transform: translateX(5px);
  transition: transform 0.3s ease;
}

/* Filter UI for Step 1 */
.filter-wrapper {
  max-width: 1000px;
}

.filter-group h3 {
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-neon);
  padding-left: 10px;
}

.filter-btn {
  display: flex;
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(20, 20, 20, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
  text-align: left;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.filter-btn.selected {
  background: rgba(57, 255, 20, 0.1);
  border-color: var(--accent-neon);
  color: var(--text-primary);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.15);
}

.filter-btn .filter-icon {
  font-size: 1.5rem;
  margin-right: 12px;
  filter: grayscale(1);
  transition: filter 0.2s;
}

.filter-btn.selected .filter-icon {
  filter: grayscale(0);
}

/* Mobile Optimizations for Filters */
@media (max-width: 768px) {

  /* Filter Buttons Grid */
  /* Filter Buttons Grid */
  /* .filter-group .option-card removed (empty) */

  /* Target the container of filter buttons if possible, or float them */
  /* Since structure is div > button, we can make the buttons smaller */
  .filter-btn {
    width: calc(50% - 8px);
    /* 2 columns with small gap */
    min-width: unset;
    padding: 10px;
    font-size: 0.9rem;
    flex-direction: column;
    /* Stack icon and text for compactness */
    text-align: center;
    justify-content: center;
    align-items: center;
    height: 100%;
  }

  .filter-btn .filter-icon {
    margin-right: 0;
    margin-bottom: 5px;
    font-size: 1.2rem;
  }

  .filter-btn>div {
    text-align: center !important;
  }
}

/* NEW FILTER UI STYLES (Refactored) */
.filter-wrapper {
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  /* Wider cards */
  gap: 20px;
}

.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  min-height: 110px;
}

.filter-card:hover {
  border-color: var(--accent-neon);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  background: linear-gradient(145deg, var(--bg-card) 0%, #1a1a1a 100%);
}

.filter-card.disabled {
  opacity: 0.3;
  pointer-events: none;
  /* Prevent clicks */
  filter: grayscale(1);
  background: #0f0f0f;
  border-style: dashed;
}

.filter-icon-large {
  font-size: 2.2em;
  min-width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  color: var(--accent-neon);
}

.filter-content {
  flex: 1;
}

.filter-label {
  font-size: 1.15em;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.filter-desc {
  font-size: 0.9em;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-text-back {
  background: none;
  border: none;
  color: var(--accent-neon);
  font-size: 1em;
  cursor: pointer;
  padding: 10px 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-text-back:hover {
  opacity: 0.8;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

@media (max-width: 768px) {
  .filter-options-grid {
    grid-template-columns: 1fr;
  }

  .filter-card {
    padding: 20px;
    min-height: auto;
  }

  .filter-icon-large {
    font-size: 1.8em;
    min-width: 50px;
    height: 50px;
  }
}

/* Quick Filters Bar */
.quick-filters-bar {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.filter-row-label {
  font-size: 0.9em;
  font-weight: 600;
  color: #888;
  min-width: 80px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.filter-pill.active {
  background: var(--accent-neon);
  color: #000;
  border-color: var(--accent-neon);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.search-container {
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1em;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--accent-neon);
}