/* ==========================================================================
   ARCHITAPE GLOBAL STYLESHEET
   Consolidated CSS for all Main Templates (Home, Products, Inspirations, Tools, Knowledge)
   ========================================================================== */
@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);
}

/* ==================================================== */
/* Source: home.xml */
/* ==================================================== */

/* Premium Hover Effects for Home Cards */
.s_card {
  transition:
    transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  border: none !important;
  overflow: hidden;
}

.s_card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.s_card .o_card_img_wrapper img {
  transition: transform 0.5s ease;
}

.s_card:hover .o_card_img_wrapper img {
  transform: scale(1.05);
}

.s_card .btn-outline-primary {
  transition: all 0.2s ease;
}

.s_card:hover .btn-outline-primary {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .o_background_video.o_full_screen_height {
    /* 16:9 Aspect Ratio based on screen width to prevent cropping */
    min-height: 56.25vw !important;
    height: 56.25vw !important;
  }

  /* Also reduce the text cover section if it's too tall */
  .s_cover.o_full_screen_height {
    min-height: 60vh !important;
    height: auto !important;
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }
}

/* ==================================================== */
/* 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.1rem;
  /* Smaller font */
  font-weight: 400;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.category-count {
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 200;
}

.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: 1rem;
  /* Smaller font */
  font-weight: 400;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.subcategory-card p {
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 200;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.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;
}

/* ==================================================== */
/* Source: inspirations.xml */
/* ==================================================== */

.range-box {
  display: inline-block;
  padding: 2px 10px;
  background: #f8f9fa;
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
  box-shadow: 0 2px 4px rgba(85, 154, 179, 0.1);
  transition: all 0.2s ease;
}

.range-box:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.a002m-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0;
  background-color: var(--background-light);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--text-dark);
}

.section-range-list {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: -10px;
}

.professional-guide {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 2px solid var(--border-color);
}

.professional-guide h2 {
  text-align: center;
  margin-bottom: 40px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.guide-item h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.guide-item p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-medium);
}

.a002m-back-nav {
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.a002m-back-button {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 0.938rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
  font-family: "Inter", sans-serif;
  padding: 0;
}

.a002m-back-button:hover {
  color: var(--primary-color);
}

.inspirations-content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 60px 40px;
}

.inspirations-header {
  text-align: center;
  margin-bottom: 60px;
}

.inspirations-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.inspirations-header p {
  font-size: 1.1rem;
  color: var(--text-medium);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.inspirations-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 50px;
  margin-bottom: 30px;
  color: var(--text-dark);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  display: inline-block;
}

.inspirations-section-title:first-of-type {
  margin-top: 0;
}

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

.inspiration-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px var(--shadow-color);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  opacity: 0;
  /* Start hidden for animation */
  animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

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

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

/* Staggered Animation Delays */
.inspiration-card:nth-child(1) {
  animation-delay: 0.1s;
}

.inspiration-card:nth-child(2) {
  animation-delay: 0.2s;
}

.inspiration-card:nth-child(3) {
  animation-delay: 0.3s;
}

.inspiration-card:nth-child(4) {
  animation-delay: 0.4s;
}

.inspiration-card:nth-child(5) {
  animation-delay: 0.5s;
}

.inspiration-card:nth-child(6) {
  animation-delay: 0.6s;
}

.inspiration-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.inspiration-image {
  width: 100%;
  padding-top: 66.66%;
  /* 3:2 Aspect Ratio */
  position: relative;
  overflow: hidden;
  background-color: var(--border-color);
}

.inspiration-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.inspiration-card:hover .inspiration-image img {
  transform: scale(1.05);
}

.inspiration-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.inspiration-card-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-dark);
  line-height: 1.4;
}

.inspiration-card-content p {
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.inspiration-card-link {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  transition: all 0.3s ease;
  text-align: center;
  align-self: flex-start;
}

.inspiration-card-link:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateX(3px);
}

@media (max-width: 1024px) {
  .inspirations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .inspirations-header h1 {
    font-size: 2rem;
  }

  .inspirations-content {
    padding: 40px 30px;
  }
}

@media (max-width: 768px) {
  .inspirations-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .inspirations-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
  }

  .inspirations-section-title {
    font-size: 1.5rem;
  }

  .inspirations-content {
    padding: 30px 20px;
  }

  .a002m-back-nav {
    padding: 15px 20px;
  }
}

/* ==================================================== */
/* Source: tools.xml */
/* ==================================================== */

body {
  font-family: "Inter", sans-serif;
  color: var(--text-main);
}

.tool-card {
  background: white;
  border: 1px solid var(--border-base);
  padding: 2.5rem;
  transition: all 0.3s ease;
}

.tool-card:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-base);
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.5rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus {
  border-color: var(--brand-blue);
}

.result-box {
  background: var(--bg-light);
  padding: 1.5rem;
  border-left: 4px solid var(--text-main);
  margin-top: 2rem;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.result-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.status-pass {
  color: #059669;
}

.status-warn {
  color: #d97706;
}

.status-fail {
  color: #dc2626;
}

.visual-strip {
  height: 12px;
  background: #e2e8f0;
  position: relative;
  margin: 2rem 0;
  display: flex;
}

.illuminated-segment {
  background: var(--brand-blue);
  height: 100%;
  border-right: 1px solid white;
}

.dark-gap {
  background: #cbd5e1;
  height: 100%;
}

@media print {
  .print\:hidden {
    display: none !important;
  }

  body {
    background: white !important;
  }

  .tool-card {
    border: 1px solid #eee !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 2rem;
  }

  .kh-header {
    margin-bottom: 2rem;
  }

  input,
  select {
    border: none !important;
    appearance: none !important;
    padding: 0 !important;
    font-weight: bold !important;
  }

  label {
    color: #666 !important;
  }

  .input-field {
    background: transparent !important;
  }

  h1,
  h2,
  h3 {
    color: black !important;
  }
}

/* ==================================================== */
/* Source: knowledge.xml */
/* ==================================================== */

.kh-glossary-page {
  font-family: "Roboto", sans-serif;
  background: #ffffff;
  color: var(--text-main);
  scroll-behavior: smooth;
  line-height: 1.8;
}

/* 
                   Strict Academic Layout
                   Max width of 800px ensures lines don't get too long (optimal ~65 characters per line).
                   This prevents eye strain when reading dense technical text.
                */
.kh-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 60px 40px 120px 40px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
}

@media (max-width: 1024px) {
  .kh-container {
    grid-template-columns: 1fr;
    padding: 40px 24px;
  }
}

/* Sidebar Navigation */
.kh-sidebar {
  position: sticky;
  top: 100px;
  height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 20px;
  border-right: 1px solid var(--border-light);
}

@media (max-width: 1024px) {
  .kh-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 40px;
    margin-bottom: 40px;
  }
}

/* Typographic Hierarchy */
.kh-hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -2px;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 2rem;
  border-bottom: 8px solid var(--text-main);
  padding-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .kh-hero-title {
    font-size: 5rem;
  }
}

.kh-hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 4rem;
}

/* The Index */
.kh-index {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kh-index-link {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.kh-index-link:hover {
  color: var(--text-main);
  border-color: var(--text-main);
  background: #f8fafc;
}

/* Section &amp; Term Architecture */
.kh-section {
  margin-bottom: 100px;
}

.kh-section-header {
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -1px;
  color: var(--border-light);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.kh-section-header::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: var(--border-light);
}

.kh-term {
  margin-bottom: 60px;
}

.kh-term-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.kh-term-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--brand-blue);
  margin-bottom: 1.5rem;
}

/* Core Description - Massive Readability */
.kh-term-desc {
  font-size: 1.25rem;
  /* Massive 20px base text */
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 2rem;
}

/* Sub-bullet text blocks */
.kh-sub-block {
  padding-left: 24px;
  border-left: 2px solid var(--border-light);
  margin-top: 2rem;
}

.kh-sub-title {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.kh-sub-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.kh-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 40px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Mobile Quick Nav */
@media (max-width: 1024px) {
  .kh-mobile-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    overflow-x: auto;
    padding: 12px;
    gap: 12px;
    margin: -40px -24px 40px -24px;
    -webkit-overflow-scrolling: touch;
  }

  .kh-mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .kh-mobile-nav-link {
    white-space: nowrap;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
  }
}

@media (min-width: 1025px) {
  .kh-mobile-nav {
    display: none;
  }
}

/* Internal Linking */
.kh-internal-link:hover {
  color: var(--text-main);
}

/* Utility: Back to Top */
#kh-back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--text-main);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

#kh-back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#kh-back-to-top:hover {
  background: var(--brand-blue);
}

/* Utility: Copy Link */
.kh-copy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 12px;
  color: var(--border-light);
  cursor: pointer;
  vertical-align: middle;
  transition: color 0.2s;
  position: relative;
}

.kh-copy-link:hover {
  color: var(--brand-blue);
}

.kh-copy-link svg {
  width: 14px;
  height: 14px;
}

.kh-copy-success::after {
  content: "Link Copied";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-main);
  color: white;
  font-size: 10px;
  padding: 4px 8px;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
