/* ==========================================================================
   ARCHITAPE GLOBAL STYLESHEET
   Core variables, shared resets, and base typography for all templates.
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

/* Unified Variables */
:root {
  /* Brand Colors */
  --primary-color: #559ab3;
  --primary-dark: #3d7a8f;
  --primary-light: #7bb3c7;
  --primary-lighter: #ffffff;

  --at-accent: #73c5d8;
  --at-accent-light: #e6f7fb;

  --brand-blue: #559ab3;

  /* Text & Greys */
  --text-dark: #1a1a1a;
  --text-main: #0f172a;
  --text-medium: #4a4a4a;
  --text-light: #6b6b6b;
  --text-muted: #475569;

  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --white: #ffffff;

  --at-dark: #1a1a1a;
  --at-gray: #f8f9fa;
  --at-gray-text: #666666;

  --at-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Resets and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  line-height: 1.5;
  background-color: #ffffff;
}

/* Common Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", sans-serif;
  color: var(--text-dark);
  font-weight: 700;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--at-transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Source: product_page.xml */
/* ==================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.tape-listing-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Roboto", sans-serif;
  color: var(--text-dark);
}

.tape-listing-container .description,
.tape-listing-container .features-column li,
.tape-listing-container .application-content p,
.tape-listing-container .compatible-info p,
.tape-listing-container table td {
  line-height: 1.65;
}

.listing-header {
  margin-bottom: 24px;
  text-align: center;
}

.listing-header h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-weight: 400;
}

.listing-header p {
  font-size: 1.125rem;
  color: var(--text-light);
}

.categories-section {
  margin-bottom: 40px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.category-card {
  aspect-ratio: 2 / 1;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: block;
  color: inherit;
}

.category-card.active {
  box-shadow: 0 8px 32px rgba(85, 154, 179, 0.4);
  transform: translateY(-4px);
}

.category-card.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 3px solid var(--primary-color);
  border-radius: 16px;
  z-index: 3;
  pointer-events: none;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(85, 154, 179, 0.3);
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0.35) 100%);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.category-card:hover::before {
  opacity: 0.7;
}

.category-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover !important;
  background-position: center;
  transition: transform 0.3s ease;
}

.category-card:hover .category-bg {
  transform: scale(1.05);
}

.category-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  /* Reduced padding */
  z-index: 2;
  color: white;
}

.category-card h2 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  color: white !important;
}

.category-count {
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 400;
  color: white !important;
}

.category-arrow {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 2;
  transition: all 0.3s ease;
}

.category-card:hover .category-arrow,
.category-card.active .category-arrow {
  background: var(--primary-color);
  transform: rotate(90deg);
}

.subcategories-section {
  display: none;
  /* Hidden by default - revealed by JS */
  margin-bottom: 48px;
  min-height: 300px;
}

.subcategories-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.subcategories-header h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  font-weight: 400;
}

.subcategories-count {
  font-size: 0.875rem;
  color: var(--text-light);
  background: var(--primary-lighter);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 200;
}

.subcategories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subcategory-card {
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: block;
  color: inherit;
  background: #fff;
}

.subcategory-card.active {
  box-shadow: 0 8px 32px rgba(85, 154, 179, 0.4);
  transform: translateY(-4px);
}

.subcategory-card.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 3px solid var(--primary-color);
  border-radius: 16px;
  z-index: 3;
  pointer-events: none;
}

.subcategory-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(85, 154, 179, 0.3);
}

.subcategory-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0.35) 100%);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.subcategory-card:hover::before {
  opacity: 0.7;
}

.subcategory-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

.subcategory-card:hover .subcategory-bg {
  transform: scale(1.05);
}

.subcategory-bg-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: white;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  opacity: 0;
  z-index: 0;
}

.subcategory-card:hover .subcategory-bg-hover {
  opacity: 1;
  transform: scale(1.05);
}

.subcategory-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  /* Reduced padding */
  z-index: 2;
  color: white;
}

.subcategory-card h4 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  color: white !important;
}

.subcategory-card p {
  font-size: 0.95rem;
  opacity: 0.95;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  color: white !important;
}

.subcategory-arrow {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 2;
  transition: all 0.3s ease;
  color: white;
}

.subcategory-card:hover .subcategory-arrow,
.subcategory-card.active .subcategory-arrow {
  background: var(--primary-color);
  transform: rotate(90deg);
}

.sort-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--shadow-color);
}

.sort-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  padding-right: 42px;
  /* Make space for the arrow */
  background: var(--primary-lighter);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-dark);
  transition: all 0.2s;
  position: relative;
}

.sort-button:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.sort-button.active {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color);
}

.sort-arrow {
  position: absolute;
  right: 12px;
  transition: all 0.2s ease;
  color: var(--text-light);
  font-size: 1.25rem;
  opacity: 0.8;
}

.sort-button.active .sort-arrow {
  color: white;
  opacity: 1;
}

.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 25px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-left: -25px;
  margin-right: -25px;
}

.results-count {
  font-size: 1rem;
  color: var(--text-medium);
  font-weight: 200;
}

.clear-filters {
  background: none;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 200;
  transition: all 0.2s;
  white-space: nowrap;
}

.clear-filters:hover {
  background: var(--primary-color);
  color: white;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-lighter);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  font-size: 1.2rem;
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-medium);
  cursor: pointer;
  padding: 4px 8px;
  display: none;
  font-size: 1.4rem;
  line-height: 1;
}

.search-clear:hover {
  color: var(--primary-color);
}

.listing-layout {
  display: block;
  /* Removed grid for sidebar */
  width: 100%;
  max-width: 100%;
  padding: 0;
}

/* Legacy sidebar styles removed or commented out */
/*.filters-sidebar { ... } */

.toggle-filters,
.close-sidebar,
.sidebar-overlay {
  display: none;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}

.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.filter-option label {
  flex: 1;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.filter-count {
  font-size: 0.75rem;
  color: var(--text-light);
  background: var(--primary-lighter);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 400;
}

/* JAZZY COMPARE CHECKBOX */
.compare-checkbox-wrapper {
  margin-top: 8px;
  display: inline-block;
}

.compare-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-medium);
  transition: color 0.2s;
}

.compare-toggle:hover {
  color: var(--primary-color);
}

.compare-checkbox {
  display: none;
  /* Hide default checkbox */
}

.compare-slider {
  position: relative;
  width: 36px;
  height: 20px;
  background-color: #ccc;
  border-radius: 20px;
  transition: 0.4s;
}

.compare-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.compare-checkbox:checked+.compare-slider {
  background-color: var(--primary-color);
}

.compare-checkbox:checked+.compare-slider:before {
  transform: translateX(16px);
}

.compare-label {
  font-weight: 500;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow-color);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-color);
}

.product-image {
  width: 100%;
  height: 220px;
  /* Increased slightly for better visibility */
  background: white;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: block;
  text-decoration: none;
}

.product-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(85, 154, 179, 0);
  transition: background 0.3s ease;
  z-index: 1;
}

.product-image:hover::after {
  background: rgba(85, 154, 179, 0.05);
  /* Lighter hover tint */
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Changed back to contain to ensure full product visibility */
  padding: 0;
  transition: transform 0.3s ease;
  transform: scale(1.35);
  /* Significant zoom to fill the card */
}

.product-image:hover img {
  transform: scale(1.45);
  /* Dramatic zoom on hover */
}

.product-info {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.product-code {
  font-size: 0.8rem;
  color: var(--text-light);
  font-family: "Roboto", sans-serif !important;
  margin-bottom: 16px;
}

.product-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.spec-value {
  color: var(--text-dark);
  font-weight: 400;
  font-size: 0.875rem;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product-action-full {
  grid-column: 1 / -1;
}

.product-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  padding: 6px 16px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  width: 100%;
  box-sizing: border-box;
}

.product-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.product-cta-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 6px 16px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.product-cta-secondary:hover {
  background: var(--primary-lighter);
}

#noResults {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

#noResults h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text-medium);
}

.filter-group h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 15px;
  /* More space for tooltip context */
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.whats-this-link {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--primary-color);
  text-decoration: none;
  background: var(--primary-lighter);
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
}

.whats-this-link:hover {
  background: var(--primary-color);
  color: white;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
  .sort-controls {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .subcategories-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
  }

  .category-card,
  .subcategory-card {
    height: auto;
  }
}

@media (max-width: 768px) {
  .tape-listing-container {
    padding: 20px;
  }

  .listing-header {
    margin-bottom: 30px;
  }

  .listing-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
  }

  .listing-header p {
    font-size: 1rem;
  }

  .categories-section {
    margin-bottom: 30px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .subcategories-section {
    margin-bottom: 32px;
    min-height: auto;
  }

  .subcategories-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .subcategories-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    gap: 16px;
    grid-auto-flow: dense;
  }

  .listing-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .filters-sidebar {
    position: static;
    max-height: none;
    padding: 20px;
    margin-bottom: 20px;
  }

  .sort-controls {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    margin-bottom: 16px;
  }

  .results-info {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 0;
    margin-bottom: 16px;
  }

  .search-box {
    max-width: 100%;
    order: 1;
  }

  .results-count {
    order: 2;
    font-size: 0.95rem;
  }

  .clear-filters {
    order: 3;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-info {
    padding: 0;
  }

  .product-title {
    font-size: 1.125rem;
    line-height: 1.4;
  }

  .product-code {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 14px;
    opacity: 1;
    font-family: "Roboto", sans-serif !important;
  }

  .product-header-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
  }

  .product-specs {
    gap: 8px;
    margin-bottom: 12px;
  }

  .spec-label {
    font-size: 0.7rem;
  }

  .spec-value {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .product-actions {
    gap: 8px;
  }

  .product-cta,
  .product-cta-secondary,
  .add-project-btn {
    font-size: 0.8rem;
    /* Smaller font */
    padding: 4px 8px;
    /* Reduced side padding slightly, vertical compact */
    width: auto !important;
    /* Content width only */
    min-width: 0;
    white-space: nowrap;
    /* Prevent text wrap */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Center text */
    flex: 0 0 auto;
  }

  .category-card,
  .subcategory-card {
    height: auto;
  }

  .category-content,
  .subcategory-content {
    padding: 16px;
  }

  .category-card h2,
  .subcategory-card h4 {
    font-size: 1.15rem;
    line-height: 1.3;
    margin-bottom: 6px;
  }

  .category-count,
  .subcategory-card p {
    font-size: 0.875rem;
  }

  .category-arrow,
  .subcategory-arrow {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    top: 12px;
    right: 12px;
  }

  .filter-option label {
    font-size: 0.9rem;
  }

  .sort-button {
    font-size: 0.9rem;
    padding: 12px 16px;
  }

  .search-input {
    font-size: 1rem;
  }

  .search-input {
    font-size: 1rem;
  }

  .toggle-filters {
    display: block;
    margin-bottom: 16px;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 200;
    cursor: pointer;
  }

  .filters-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10000;
    transition: left 0.3s ease;
    padding: 60px 20px 20px;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
  }

  .filters-sidebar.active {
    left: 0;
  }

  .close-sidebar {
    display: block;
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
  }

  .sidebar-overlay.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
  }
}

@media (max-width: 480px) {
  .tape-listing-container {
    padding: 16px;
  }

  .categories-grid,
  .subcategories-grid {
    gap: 12px;
    grid-auto-rows: auto;
  }

  .category-card,
  .subcategory-card {
    height: auto;
  }

  .listing-header h1 {
    font-size: 1.85rem;
  }

  .product-title {
    font-size: 1.05rem;
  }

  .product-code {
    font-size: 0.8rem;
  }

  .spec-value {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {

  .product-card.list-view-item .product-top-row,
  .product-top-row {
    flex-direction: column !important;
    align-items: center !important;
    /* Center content */
    width: 100% !important;
  }

  .product-card.list-view-item {
    padding: 16px;
  }

  .product-card.list-view-item .product-image {
    width: 100%;
    height: auto;
    max-height: 200px;
    margin-right: 0;
    margin-bottom: 16px;
    text-align: center;
    display: flex;
    justify-content: center;
  }

  .product-card.list-view-item .product-image img {
    max-width: 100%;
    object-fit: contain;
  }

  .product-card.list-view-item .product-info {
    width: 100%;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px;
  }

  .product-card.list-view-item .product-header-group {
    width: 100%;
    min-width: unset;
  }

  .product-card.list-view-item .product-actions {
    width: 100%;
    min-width: unset;
    gap: 8px;
    display: grid;
    grid-template-columns: 1fr;
    /* Stack buttons vertically on mobile */
  }

  .product-card.list-view-item .product-specs {
    margin-top: 16px;
  }
}

/* FILTERS TOP BAR AND GRID */
.filters-top-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 8px;
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-dropdown {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  font-size: 0.95rem;
  color: var(--text-dark);
}

/* Reverted global container changes to fix category layout */

.filter-options-grid {
  display: block;
  width: 100%;
  max-width: none;
  /* Ensure no constraint */
  column-count: 4;
  column-fill: balance;
  column-gap: 20px;
  margin-bottom: 20px;
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
}

/* Responsive Columns */
@media (max-width: 1600px) {
  .filter-options-grid {
    column-count: 4;
  }
}

@media (max-width: 1200px) {
  .filter-options-grid {
    column-count: 3;
  }
}

@media (max-width: 992px) {
  .filter-options-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .filter-options-grid {
    column-count: 1;
  }
}

.filter-group {
  break-inside: avoid;
  display: block;
  /* Changed from inline-block */
  width: 100%;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.filter-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.filter-options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* FILTER CHIPS (BOXES) */
/* Revised Slider Width - Keep Left Padding */
.range-filter-container {
  padding: 10px 2px 20px 10px;
  /* Reduced right padding significantly to fill box */
  width: 100%;
  box-sizing: border-box;
  grid-column: 1 / -1;
  /* Make slider span full width of the grid */
}

.range-slider {
  width: 97%;
  margin: 0 auto;
}

.filter-chip {
  display: flex;
  width: 100%;
  cursor: pointer;
  user-select: none;
  position: relative;
  box-sizing: border-box;
}

.filter-chip input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.chip-label {
  padding: 6px 12px;
  background: #f8f9fa;
  /* Light gray background like image */
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-dark);
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.filter-chip input:checked~.chip-label {
  background: white;
  color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-chip.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.filter-chip.disabled .chip-label {
  opacity: 0.5;
  background: #f1f3f5;
  color: #adb5bd;
}

/* Tooltip CSS */
.filter-tooltip-group {
  position: relative;
  cursor: help;
}

.filter-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #559ab3;
  /* Brand Blue for visibility */
  color: white;
  font-size: 11px;
  font-weight: bold;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  cursor: help;
}

.filter-tooltip-icon:hover {
  background: #3e7285;
  /* Darker shade on hover */
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.filter-tooltip-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  /* Move to bottom to avoid clipping at top of grid */
  left: 0;
  transform: translateY(10px);
  width: 220px;
  padding: 10px 14px;
  background: #222;
  /* Slightly darker for better contrast */
  color: white;
  font-size: 0.75rem;
  font-weight: normal;
  text-transform: none;
  border-radius: 6px;
  text-align: left;
  /* Better for descriptions */
  z-index: 10000;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Crisp text */
  backdrop-filter: none !important;
  /* Force clear background */
}

.filter-tooltip-content::after {
  content: "";
  position: absolute;
  bottom: 100%;
  /* Arrow at top */
  left: 10px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #222 transparent;
}

.filter-tooltip-group:hover .filter-tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateY(5px);
}

/* LIST VIEW */

.products-grid.list-view {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
}

.product-card.list-view-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 16px;
  /* Reduced vertical padding */
  margin-bottom: 0;
  border: 1px solid #eee;
  height: auto;
  min-height: 100px;
  /* Reduced min-height */
  border-radius: 12px;
  transition: all 0.3s ease;
}

.product-top-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
}

.product-card.list-view-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: #e0e0e0;
}

.product-card.list-view-item .product-image {
  width: 160px;
  /* Reduced width */
  height: 100px;
  /* Reduced height */
  flex-shrink: 0;
  margin-bottom: 0;
  margin-right: 16px;
  /* Reduced margin */
}

.product-card.list-view-item .product-image img {
  height: 100%;
  object-fit: contain;
}

.product-card.list-view-item .product-info {
  flex: 1;
  display: flex;
  flex-direction: row;
  /* Horizontal layout for info */
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Reduced gap */
  text-align: left;
}

.product-card.list-view-item .product-header-group {
  flex: 2;
  min-width: 200px;
  /* Reduced min-width */
}

.product-card.list-view-item .product-specs {
  flex: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  /* Reduced gap */
  justify-content: flex-start;
  margin-top: 10px;
  /* Reduced margin */
  padding-top: 10px;
  /* Reduced padding */
  border-top: 1px solid #f0f0f0;
  width: 100%;
}

.product-card.list-view-item .spec-item {
  background: #f5f5f5;
  padding: 2px 6px;
  /* Tighter item padding */
  border-radius: 3px;
}

.product-card.list-view-item .product-actions {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: center;
  min-width: 240px;
  /* Ensure space for 2 cols */
}

/* =========================================
   HERO SECTION STYLES (Dynamic Injection)
   ========================================= */
.hero-wrapper {
  margin-bottom: 40px;
  animation: fadeIn 0.5s ease-out;
}

.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  background: transparent !important;
  /* Removed gradient/white bg */
  padding: 0 20px 40px 20px;
  /* Reduced top padding */
  border-radius: 0;
  box-shadow: none !important;
  /* Removed shadow */
}

.hero-gallery {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #f8f9fa;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 500px;
  border-radius: 12px;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

/* COMPARISON TOOL CSS */
.compare-checkbox-wrapper {
  margin-top: 8px;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #666;
  cursor: pointer;
}

.compare-checkbox-wrapper input {
  margin-right: 6px;
  accent-color: #559ab3;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.compare-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  /* Hidden by default */
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.compare-floating-bar.visible {
  transform: translateX(-50%) translateY(0);
}

.compare-bar-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

#compareCount {
  font-weight: 600;
  color: #333;
}

.compare-actions {
  display: flex;
  gap: 10px;
}

.cta-button.small {
  padding: 6px 16px;
  font-size: 0.85rem;
}

/* Comparison Modal */
.compare-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.compare-modal-overlay.open {
  display: flex;
  opacity: 1;
}

.compare-modal {
  background: #ffffff;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.compare-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compare-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.compare-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

/* Share Modal Styles */
.led-share-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.led-share-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.led-share-modal-header {
  padding: 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.led-share-modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.led-share-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #999;
  line-height: 1;
  padding: 0;
}

.led-share-modal-body {
  padding: 24px;
}

.led-share-btn {
  padding: 6px 16px;
  border: 2px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.led-share-btn:hover {
  background: var(--primary-color);
  color: white;
}

.product-share-btn {
  opacity: 0.7;
  transition: opacity 0.2s;
}

.product-share-btn:hover {
  opacity: 1;
}

.compare-body {
  overflow-y: auto;
  padding: 30px;
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  /* Rigid columns */
}

.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: left;
  border: none;
  vertical-align: middle;
}

.compare-table th {
  background: white;
  /* Pure white background */
  font-weight: 600;
  /* Bolder for clarity */
  color: #2c2c2c;
  /* High contrast dark text */
  width: 160px;
  font-size: 0.8rem;
  /* Slightly larger */
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-bottom: 1px solid #eee;
  /* Sharp horizontal separator */
  border-right: 1px solid #f5f5f5;
  /* Very subtle sidebar boundary */
}

/* Header Row Labels (Top-Left) */
.compare-header-row th {
  background: white;
}

.compare-header-row td {
  background: white;
}

.compare-table td {
  background: white;
  vertical-align: middle;
  transition: background 0.2s ease;
  border-bottom: 1px solid #eee;
  /* Sharp horizontal separator */
  color: #444;
  /* Darker value text */
}

/* Remove Ghost Rails for cleaner horizontal flow */
.compare-table td:last-child {
  border-right: none;
}

.compare-table tr:hover td {
  background: #fafafa;
  /* Very subtle clean hover */
}

.compare-table tr:hover th {
  background: #fafafa;
  color: var(--primary-color);
}

.compare-col {
  background: white !important;
  border-radius: 0;
  /* Remove radius for row integration */
  margin: 0;
}

.compare-table td.compare-col {
  padding: 20px;
}

.compare-product-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.compare-product-img {
  width: 100%;
  max-height: 140px;
  /* Slightly tighter */
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
  transition: transform 0.4s ease;
}

.compare-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.compare-table td:hover .compare-product-img {
  transform: translateY(-5px) scale(1.05);
}

.compare-product-title {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.hero-slide img:hover {
  transform: scale(1.02);
}

.hero-info h1 {
  font-size: 2.5rem;
  font-weight: 400;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.2;
}

.sku {
  display: inline-block;
  font-family: "Courier New", monospace;
  color: #666;
  background: #f0f0f0;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4a4a4a;
  margin-bottom: 32px;
  max-width: 90%;
}

/* Elevated Cards Grid */
.elevated-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.elevated-card {
  background: white;
  border: 1px solid #eee;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.elevated-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: var(--primary-color);
}

.elevated-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-lighter);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  flex-shrink: 0;
}

.elevated-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.elevated-content {
  display: flex;
  flex-direction: column;
}

.elevated-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  font-weight: 200;
  margin-bottom: 2px;
}

.elevated-value {
  font-size: 0.95rem;
  font-weight: 400;
  color: #2c2c2c;
}

/* CTAs */
.hero-btn-group {
  border-top: 1px solid #eee;
  padding-top: 24px;
}

.download-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-button {
  padding: 6px 16px;
  border-radius: 8px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cta-button.primary {
  background: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.cta-button.primary:hover {
  background: var(--primary-dark);
}

.cta-button.secondary {
  background: white;
  color: var(--text-dark);
  border: 2px solid #e0e0e0;
}

.cta-button.secondary:hover {
  border-color: var(--text-dark);
  background: #f8f8f8;
}

.cta-button.outline {
  background: transparent;
  color: var(--text-light);
  border: 2px solid transparent;
}

.cta-button.outline:hover {
  color: var(--primary-color);
  background: var(--primary-lighter);
}

/* Project Builder Widget */
.project-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary-color);
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  font-family: "Roboto", sans-serif;
}

.project-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.project-widget-icon {
  font-size: 1.2rem;
}

.project-widget-text {
  font-weight: 500;
  font-size: 0.95rem;
}

.project-count-badge {
  background: white;
  color: var(--primary-color);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* Project Modal */
.project-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.project-modal.active {
  display: flex;
}

.project-modal-content {
  background: #ffffff;
  width: 90%;
  max-width: 800px;
  /* Increased from 600px */
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.project-modal-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-modal-header h3 {
  margin: 0;
  font-weight: 400;
  color: var(--text-dark);
}

.project-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  border-top: 1px solid #f0f0f0;
  /* Separator from inputs */
}

/* Modal Inputs */
.project-input-section {
  padding: 15px 20px;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.project-input-section h4 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-input-section h4 small {
  font-weight: 400;
  color: #888;
  font-size: 0.8rem;
}

.project-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.project-input-grid .input-group {
  display: flex;
  flex-direction: column;
}

.project-input-grid label {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}

.project-input-grid input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
  outline: none;
}

.project-input-grid input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(85, 154, 179, 0.1);
}

.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.project-item:hover {
  background: white;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: var(--primary-color);
}

.project-item:last-child {
  margin-bottom: 0;
}

.project-item-info {
  flex: 1;
}

.project-item-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.project-item-code {
  font-size: 0.8rem;
  color: var(--text-light);
  font-family: "Roboto", sans-serif;
  letter-spacing: 0.5px;
}

.project-remove-btn {
  color: #ff4d4f;
  background: rgba(255, 77, 79, 0.05);
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.project-remove-btn:hover {
  background: #ff4d4f;
  color: white;
  transform: scale(1.1);
}

.project-item-thumb {
  width: 60px;
  height: 60px;
  margin-right: 15px;
  border-radius: 8px;
  background: white;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.project-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.project-modal-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Add Button on Card */
.add-project-btn {
  cursor: pointer;
  transition: all 0.2s;
}

/* Icon Mode (Default) - Only apply fixed size when NOT a secondary CTA */
.add-project-btn:not(.product-cta-secondary) {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.add-project-btn:not(.product-cta-secondary):hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Full Width Mode overrides */
.add-project-btn.product-cta-secondary {
  width: 100%;
  /* Let product-cta-secondary handle padding/height */
}

/* Active State (Applies to both) */
.add-project-btn.added {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.add-project-btn.added:hover {
  opacity: 0.9;
}

/* Zoom Overlay */
.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.zoom-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.zoom-overlay img {
  max-width: 90%;
  max-height: 90vh;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.zoom-close {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 3rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
}

/* Responsive */
@media (max-width: 992px) {
  .product-hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 24px;
  }

  .hero-gallery {
    min-height: 300px;
  }

  .hero-info h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .download-row {
    flex-direction: column;
  }

  .cta-button {
    width: 100%;
  }
}

/* Skeleton Loading */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton-card {
  border: 1px solid #eee;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  min-height: 150px;
}

.skeleton-image {
  width: 200px;
  height: 120px;
  background: #f0f0f0;
  background-image: linear-gradient(90deg,
      #f0f0f0 25%,
      #f8f8f8 50%,
      #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  flex-shrink: 0;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-line {
  height: 16px;
  background: #f0f0f0;
  background-image: linear-gradient(90deg,
      #f0f0f0 25%,
      #f8f8f8 50%,
      #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-line.short {
  width: 30%;
}

.skeleton-line.medium {
  width: 60%;
}

.skeleton-line.long {
  width: 90%;
}

/* Copy Button */
.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
  color: var(--primary-color);
  transition: transform 0.2s;
  vertical-align: middle;
  opacity: 0.7;
}

.copy-btn:hover {
  transform: scale(1.1);
  opacity: 1;
}

.copy-tooltip {
  position: absolute;
  background: #333;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  transform: translateY(-100%);
  margin-top: -5px;
  white-space: nowrap;
  z-index: 10;
}

.copy-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* --- MERGED LEGACY STYLES --- */
.features-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 60px 20px;
}

.features-section h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  text-align: center;
  color: var(--text-dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.features-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-column li {
  padding: 2px 0 2px 32px;
  position: relative;
  color: var(--text-medium);
  font-size: 1rem;
  line-height: 1.6;
}

.features-column li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.dimensions-image {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  margin-top: 40px;
}

.dimensions-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Legacy Tabs */
.tabs-section {
  padding: 80px 0;
  background: var(--primary-lighter);
}

.tab-navigation {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  padding: 12px 24px;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1rem;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 500;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-pane.active {
  display: block;
}

/* Legacy Compatible/Applications Grid Fallbacks */
.applications-grid,
.compatible-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.application-card,
.compatible-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow-color);
  border: 1px solid #eee;
}

.application-content,
.compatible-content {
  padding: 20px;
}

.application-content h3,
.compatible-content h4 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  color: var(--text-dark);
}

/* Touch Accessibility Improvements */
.close-sidebar,
.compare-close,
.zoom-close,
.led-share-modal-close,
.project-modal-header button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ========================================================================= */
/* PREMIUM GRID VIEW REFINEMENTS                                             */
/* ========================================================================= */

/* Container: Force Multi-Column Layout */
.products-grid.grid-view {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 32px !important;
  padding: 24px 0;
}

/* Card: Lift &amp; Shadow on Hover */
.products-grid.grid-view .product-card {
  height: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  transition:
    transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.4s ease;
  border: 1px solid #f1f5f9;
  background: #ffffff;
}

.products-grid.grid-view .product-top-row {
  flex-direction: column !important;
  width: 100% !important;
  display: flex !important;
}

.products-grid.grid-view .product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-light);
}

/* Selective De-cluttering: Keep key actions, hide technical files */
.products-grid.grid-view .product-specs,
.products-grid.grid-view .product-cta-secondary:not(.add-project-btn):not(.toggle-details-btn),
.products-grid.grid-view .product-share-btn {
  display: none !important;
  /* Hide specs and secondary technical buttons */
}

/* Action Cluster: Vertical Stack */
.products-grid.grid-view .product-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
}

/* Image Polish */
.products-grid.grid-view .product-image {
  width: 100% !important;
  height: 280px !important;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0 !important;
  margin-right: 0 !important;
  /* Remove list-view margin */
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.products-grid.grid-view .product-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.products-grid.grid-view .product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Ensure buttons stand out */
.products-grid.grid-view .product-cta,
.products-grid.grid-view .product-cta-secondary {
  width: 100% !important;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-radius: 8px;
  justify-content: center;
  display: flex !important;
}

/* Typography &amp; Info */
.products-grid.grid-view .product-info {
  padding: 24px !important;
  text-align: center;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  background: #ffffff;
  width: 100% !important;
}

.products-grid.grid-view .product-title {
  font-size: 1.2rem !important;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.products-grid.grid-view .product-code {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* Skeleton Refinement */
.products-grid.grid-view .skeleton-card {
  flex-direction: column !important;
  aspect-ratio: 3/4;
}

.products-grid.grid-view .skeleton-image {
  width: 100%;
  height: 280px;
}

/* Breadcrumbs */
.seo-breadcrumb {
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.seo-breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

.seo-breadcrumb a:hover {
  color: var(--primary-dark);
}

.seo-breadcrumb .separator {
  color: #ccc;
}

.seo-breadcrumb .current {
  color: var(--text-medium);
  font-weight: 500;
}

/* Hide H1 visually but keep it for SEO if requested - 
   Actually, a clean visible H1 is better for SEO and UX */
.main-seo-heading {
  margin-bottom: 12px;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.main-seo-description {
  max-width: 800px;
  margin-bottom: 40px;
  line-height: 1.6;
  color: var(--text-medium);
  font-size: 1.05rem;
}

.category-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-card:hover .category-bg img {
  transform: scale(1.1);
}

/* Range Index Accordion */
.seo-range-index {
  margin: 60px 0 20px;
  border-top: 1px solid #eee;
  padding-top: 40px;
}

.seo-range-index summary {
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-dark);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.seo-range-index summary::-webkit-details-marker {
  display: none;
}

.seo-range-index summary::before {
  content: "⊕";
  font-size: 1.2rem;
  color: var(--primary-color);
}

.seo-range-index[open] summary::before {
  content: "⊖";
}

.seo-range-index .index-content {
  margin-top: 20px;
  background: #fdfdfd;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.seo-index-group h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
  display: inline-block;
}

.seo-index-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.seo-index-group li {
  margin-bottom: 6px;
}

.seo-index-group a {
  font-size: 0.85rem;
  color: var(--text-medium);
  text-decoration: none;
  transition: color 0.2s;
}

.seo-index-group a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Category Card Help */
.category-card[aria-label]::after {
  content: attr(aria-label);
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================================================== */