/* NO3D TOOLS WEBSITE STYLES */
/* Following Figma Design System Rules */

:root {
  /* Colors */
  --color-lello: #dff000;
  --color-deep-charcoal: #1A1A1A;
  --color-stone-gray: #E8E8E8;
  --color-shadow-black: #0D0D0D;
  --color-void-black: #000000;
  --color-paper-white: #FFFFFF;
  --color-lello-light: #dff000;
  --color-dark-gray: #222222;
  --color-medium-gray: #303030;
  --color-error-red: #FF3B30;
  --color-beta-blue: #4A90D9;
  --status-stable-bg: #D4F5D0;
  --status-stable-fg: #1A5C15;

  /* Semantic aliases — NO3D Website Design Language / Authority v1 */
  --surface-page: var(--color-stone-gray);
  --surface-paper: var(--color-paper-white);
  --text-primary: var(--color-dark-gray);
  --text-strong: var(--color-void-black);
  --text-secondary: var(--color-medium-gray);
  --border-default: var(--color-void-black);
  --accent-primary: var(--color-lello);
  --button-primary-bg: var(--color-lello);
  --button-primary-fg: var(--color-medium-gray);
  --button-secondary-bg: var(--color-void-black);
  --button-secondary-fg: var(--color-lello);
  
  /* Typography */
  --font-mono: 'JetBrains Mono', 'Courier New', 'Courier', 'Monaco', 'Consolas', monospace;
  --font-mono-weight: 300; /* Light weight to match Silka Mono Light */
  --font-silka-mono: var(--font-mono);
  --font-visitor: 'Visitor TT1 BRK', 'Visitor', 'Space Mono', monospace;
  --font-druk-wide: 'Druk Wide Cyr', 'Arial Narrow', system-ui, sans-serif;
  --font-druk-text-wide: 'Druk Text Wide Cyr', 'Arial Narrow', system-ui, sans-serif;
  --font-druk: var(--font-druk-text-wide); /* Backward-compatible heading alias */
  --font-doto: 'Doto', 'JetBrains Mono', monospace;
  /* Doto VF: wght 100–900, squared dots (non-rounded static masters) */
  --letter-spacing-druk: 2px;
  --letter-spacing-doto: 2px;
  --letter-spacing-ui: 1px;
  --font-size-doto-body: 11px;
  --font-size-doto-lead: 15px;
  --font-size-ui: 10px;
  --font-size-product-title: 26px;
  --letter-spacing-product-title: -0.6px;
  --font-size-base: 13px;
  --font-size-h1: 37.533px;
  --font-size-h2: 21px;
  --font-size-h3: 16px;
  --font-size-small: 11px;
  --font-size-micro: 9px;
  --line-height-base: 1.35;
  --letter-spacing-wide: 0.15em;
  --letter-spacing-normal: 0.1em;
  --text-body-size: 14px;
  --text-body-line-height: 22px;
  --text-body-letter-spacing: 0.5px;
  --text-body-opacity: 0.95;
  
  /* Spacing */
  --space-unit: 10px;
  --space-micro: calc(var(--space-unit) * 0.2);
  --space-tiny: calc(var(--space-unit) * 0.5);
  --space-small: calc(var(--space-unit) * 1);
  --space-medium: calc(var(--space-unit) * 1.3);
  --space-large: calc(var(--space-unit) * 2.3);
  --space-xlarge: calc(var(--space-unit) * 3);
  
  /* Layout */
  --container-max-width: 1440px;
  --content-max-width: 900px;
  --sidebar-width: 250px;
  --icon-grid-width: 210px;
  --icon-grid-right-spacing: 30px; /* Spacing from right edge of viewport */
  --header-height: 78px;
  --header-logo-home-height: 45px;
  --header-logo-secondary-height: 21px;
  --banner-home-desktop-height: 360px;
  --banner-home-tablet-height: 320px;
  --banner-home-mobile-height: 192px;
  --banner-secondary-desktop-height: 180px;
  --banner-secondary-tablet-height: 160px;
  --banner-secondary-mobile-height: 96px;
  --product-content-width: 970px;
  --product-carousel-width: 522.516px;
  --product-carousel-height: 450px;
  --product-front-matter-width: 353px;
  --product-documentation-width: 680px;
  --footer-height: 70px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* Shadows */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-lello-glow: 0 4px 12px rgba(240, 255, 0, 0.4);

  /* Typography roles (NO3D Website Design Language / Authority v1)
     Druk Wide — display and article titles
     Druk Text Wide — nav categories and structural section titles
     Doto  — default body, product names, descriptions, lead copy
     Visitor — doc headings, badges, buttons, CTAs
     Mono  — code blocks and technical footer hints only */
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-dark-gray);
  background-color: var(--color-stone-gray);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-gif {
  width: 400px;
  height: auto;
  display: block;
}

/* Main Container */
.site-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height - adjusts for mobile browser UI */
  max-width: 100vw;
  margin: 0;
  position: relative;
  width: 100%;
  overflow-x: hidden;
  padding-top: 78px; /* Account for fixed header height */
  padding-bottom: 70px; /* Account for fixed footer height */
  /* Prevent unwanted scrolling when keyboard appears */
  overscroll-behavior: contain;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: var(--space-small); /* Changed from var(--space-medium) */
  padding-right: var(--space-small); /* Changed from var(--space-medium) */
  background-color: transparent;
  border: none; /* Removed border */
  border-top: none;
  border-bottom: none;
  border-bottom-width: 0px;
  border-bottom-color: rgba(0, 0, 0, 0);
  border-bottom-style: none;
  border-image: none;
  box-shadow: none;
  z-index: 200;
  height: 78px;
  gap: 0px;
}

.site-header .header-left {
  display: flex;
  justify-content: flex-start; /* Aligns logo to the left */
  align-items: flex-start;
  gap: var(--space-medium);
}

.hamburger-menu-button {
  display: none; /* Hidden on desktop, shown on mobile */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--color-void-black);
  font-size: var(--space-medium);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 201;
}

.hamburger-menu-button:hover {
  background-color: var(--color-lello);
}

.hamburger-menu-button.active {
  background-color: var(--color-lello);
  color: var(--color-void-black);
}

.hamburger-menu-button i {
  font-size: 18px;
}

.site-header .logo {
  height: 100%;
  width: 558px;
  min-width: 433px;
  max-width: 910px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  padding-top: 0px;
  padding-bottom: 0px;
  padding-left: 0px;
  padding-right: 0px;
  margin-top: 0px;
  margin-bottom: 0px;
  margin-left: 0px;
  margin-right: 0px;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

/* Specific styles for header-logo ID */
#header-logo {
  height: auto;
  width: auto;
  max-height: 45px; /* Limit logo height */
  object-fit: contain; /* Maintain aspect ratio */
  padding-top: 0px;
  padding-bottom: 0px;
  padding-left: 0px; /* Remove explicit padding */
  padding-right: 0px; /* Remove explicit padding */
}

/* Header scale hierarchy: the homepage carries the primary wordmark while
   product and secondary views use the compact site-navigation wordmark. */
.site-header.header-home #header-logo {
  max-height: var(--header-logo-home-height);
  opacity: 0.75;
}

.site-header.header-secondary .header-left > a.logo,
.site-header.header-secondary .header-left > a[style] {
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
}

.site-header.header-secondary #header-logo,
.site-header.header-secondary .header-left img.logo {
  width: auto;
  min-width: 0;
  max-width: none;
  height: var(--header-logo-secondary-height);
  max-height: var(--header-logo-secondary-height);
  opacity: 0.8;
}

.site-header .logo:hover {
  opacity: 0.8;
}

.site-header .header-icons {
  display: flex;
  gap: var(--space-medium);
}

.site-header .header-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: var(--color-deep-charcoal);
  font-size: 18px;
  transition: color var(--transition-fast);
}

.site-header .header-icon:hover {
  color: var(--color-lello);
}

/* Account Dropdown */
.account-dropdown {
  position: relative;
}

.account-dropdown .account-link {
  background: none;
  border: none;
  padding: 0;
}

.account-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: var(--color-stone-gray);
  border: 1px solid var(--color-void-black);
  z-index: 300;
  min-width: 160px;
  flex-direction: column;
}

.account-dropdown-menu.open {
  display: flex;
}

.account-dropdown-item {
  font-family: var(--font-doto);
  font-size: 13px;
  color: var(--color-void-black);
  text-transform: uppercase;
  padding: 10px 16px;
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-stone-gray);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.account-dropdown-item:last-child {
  border-bottom: none;
}

.account-dropdown-item:hover {
  background-color: var(--color-lello);
}

/* Theme Toggle Button */
.theme-toggle-button {
  display: none !important; /* Temporarily hide */
  background: none;
  border: none;
  padding: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: var(--color-deep-charcoal);
  font-size: 18px;
  transition: color var(--transition-fast);
}

.theme-toggle-button:hover {
  color: var(--color-lello);
}

/* Member CTA Button in Header */
.member-cta-button {
  background-color: var(--color-lello);
  color: var(--color-medium-gray);
  border-style: solid;
  border-width: 1px;
  border-color: rgba(0, 0, 0, 1);
  padding: 4px 16px;
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-normal);
  border-radius: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  min-width: fit-content;
}

.member-cta-icon {
  height: 15px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  line-height: 10;
}

.member-cta-text {
  display: inline-block;
  font-size: 15px;
}

.member-cta-button:hover {
  background-color: var(--color-lello-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lello-glow);
}

.member-cta-button:active {
  background-color: #d4e600;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(240, 255, 0, 0.2);
}

.member-welcome-text {
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  letter-spacing: var(--letter-spacing-ui);
  color: var(--color-void-black);
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

/* Mobile Footer CTA (mobile only) */
.mobile-footer-cta {
  display: none; /* Hidden on desktop */
  position: fixed;
  bottom: 70px; /* Above mobile search bar */
  left: 0;
  right: 0;
  width: 100%;
  z-index: 199; /* Below footer, above content */
  padding: 0;
  height: 40px;
  background-color: var(--color-stone-gray);
  border-top: 1px solid var(--color-void-black);
  box-sizing: border-box;
}

.mobile-member-cta-button {
  background-color: var(--color-lello);
  color: var(--color-medium-gray);
  border-style: solid;
  border-width: 1px;
  border-color: rgba(0, 0, 0, 1);
  padding: 8px 12px;
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-normal);
  border-radius: 0;
  height: auto;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  white-space: normal;
  text-decoration: none;
  line-height: 1.2;
  width: 100%;
  box-sizing: border-box;
}

.mobile-member-cta-icon {
  height: 20px;
  width: auto;
  max-width: 20px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.mobile-member-cta-text {
  display: inline-block;
  font-size: 10px;
  line-height: 1.2;
  flex: 1;
  text-align: center;
}

.mobile-member-cta-button:hover {
  background-color: var(--color-lello-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lello-glow);
}

.mobile-member-cta-button:active {
  background-color: #d4e600;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(240, 255, 0, 0.2);
}

/* Show mobile footer CTA on mobile only */


/* Mobile Search Bar */
.mobile-search-bar {
  display: none; /* Hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200; /* Above footer, below modals and footer logo */
  background-color: var(--color-stone-gray);
  border-top: 2px solid var(--color-void-black);
  padding-top: 12px;
  padding-bottom: 12px;
  padding-left: var(--space-medium);
  padding-right: var(--space-medium);
  box-sizing: border-box;
  align-items: center;
  gap: var(--space-small);
  transition: bottom var(--transition-normal);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-search-bar.keyboard-open {
  /* Position will be set dynamically by JavaScript when keyboard is open */
  /* Position managed by JS - styles applied inline */
  position: fixed; /* Base position, JS will override bottom value */
}

.mobile-search-input {
  flex: 1;
  padding: var(--space-small) var(--space-medium);
  font-family: var(--font-doto);
  font-size: 14px;
  border: 2px solid var(--color-void-black);
  background-color: var(--color-paper-white);
  color: var(--color-void-black);
  box-sizing: border-box;
  min-height: 44px; /* iOS touch target minimum */
  text-transform: uppercase;
}

.mobile-search-input:focus {
  outline: 2px solid var(--color-lello);
  outline-offset: -2px;
}

.mobile-search-input::placeholder {
  color: var(--color-medium-gray);
  text-transform: uppercase;
  font-size: 12px;
}

.mobile-search-button {
  background-color: var(--color-lello);
  color: var(--color-void-black);
  border: 2px solid var(--color-void-black);
  padding: var(--space-small) var(--space-medium);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-search-button:hover {
  background-color: var(--color-lello-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lello-glow);
}

.mobile-search-button:active {
  background-color: #d4e600;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(240, 255, 0, 0.2);
}

.mobile-search-button i {
  font-size: 16px;
}

/* Show mobile search bar on mobile only */


/* Cart Icon with Badge */
.cart-icon-wrapper {
  position: relative;
  display: none; /* Hidden until multi-item feature is implemented */
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-icon-image {
  width: 24px;
  height: 24px;
  object-fit: contain;
  cursor: pointer;
  transition: opacity var(--transition-fast), filter var(--transition-fast);
  display: block;
}

.cart-icon-image:hover {
  opacity: 0.8;
  filter: brightness(0.8);
}

.cart-icon-wrapper:hover .cart-icon-image {
  filter: brightness(1.2) saturate(1.5);
}

/* Account icon styling */
.account-icon-image {
  width: 19px;
  height: 19px;
  object-fit: contain;
  cursor: pointer;
  transition: opacity var(--transition-fast), filter var(--transition-fast);
  display: block;
}

.account-icon-image:hover {
  opacity: 0.8;
  filter: brightness(0.8);
}

/* Account link styling */
.account-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

#account-link {
  width: 35px;
  height: 34px;
}

.account-link:hover .account-icon-image {
  filter: brightness(1.2) saturate(1.5);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--color-lello);
  color: var(--color-void-black);
  font-family: var(--font-visitor);
  font-size: var(--font-size-micro);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1px solid var(--color-void-black);
  opacity: 0;
  transform: scale(0);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.cart-badge:not(:empty) {
  opacity: 1;
  transform: scale(1);
}

/* Left Sidebar Navigation */
.sidebar {
  background-color: var(--color-stone-gray);
  padding: var(--space-small);
  overflow-y: auto;
  overflow-x: hidden;
  position: fixed;
  left: 0;
  top: 78px; /* Account for fixed header height (78px) */
  width: var(--sidebar-width);
  height: calc(100vh - 78px); /* Adjust height to account for header (78px) */
  max-height: calc(100vh - 78px); /* Ensure it doesn't exceed viewport */
  z-index: 150;
  transition: transform var(--transition-normal);
  /* Smooth scrolling */
  scroll-behavior: smooth;
  /* Hide scrollbar by default */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

  /* Hide scrollbar for Chrome, Safari and Opera by default */
.sidebar::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 4px;
}

/* Show scrollbar on hover or when scrolling */
.sidebar:hover::-webkit-scrollbar-thumb,
.sidebar.scrolling::-webkit-scrollbar-thumb {
  background-color: var(--color-medium-gray);
}

.sidebar:hover::-webkit-scrollbar-track,
.sidebar.scrolling::-webkit-scrollbar-track {
  background: var(--color-stone-gray);
}

.sidebar:hover::-webkit-scrollbar-thumb:hover,
.sidebar.scrolling::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-deep-charcoal);
}

/* Firefox: hide scrollbar by default, show on hover/scrolling */
.sidebar:hover {
  scrollbar-width: thin;
  scrollbar-color: var(--color-medium-gray) var(--color-stone-gray);
}

.sidebar.scrolling {
  scrollbar-width: thin;
  scrollbar-color: var(--color-medium-gray) var(--color-stone-gray);
}

#sidebar {
  box-shadow: none;
  height: calc(100vh - 78px); /* Match sidebar height */
  max-height: calc(100vh - 78px); /* Ensure it doesn't exceed viewport */
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-backdrop {
  display: none; /* Hidden on desktop, shown on mobile */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 149;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  pointer-events: none; /* Don't interfere with clicks when hidden */
  margin: 0;
  padding: 0;
  width: 0;
  height: 0;
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Allow clicks when active */
  width: 100vw;
  height: 100vh;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Content can grow naturally, scrolling handled by parent .sidebar */
  width: 100%;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-tiny) var(--space-small);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.category-name {
  font-family: var(--font-druk);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-druk);
  text-transform: uppercase;
  color: var(--color-void-black);
  line-height: 11px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.carrot {
  font-size: var(--space-small);
  color: var(--color-void-black);
  transition: transform var(--transition-fast);
  display: inline-block;
  line-height: 1;
  min-width: var(--space-small);
  text-align: center;
}

.carrot.collapsed {
  transform: rotate(0deg);
}

.carrot.expanded {
  transform: rotate(0deg); /* Don't rotate - use different symbols (▶ vs ▼) instead */
}

.category-section {
  display: none;
  flex-direction: column;
  gap: var(--space-tiny);
  margin-left: var(--space-medium);
}

.category-section.expanded {
  display: flex;
}

.category-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-tiny) 0;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-tiny);
}

.product-item {
  padding: 0 var(--space-small);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: 2px;
  background-color: transparent;
  min-height: 18px;
  height: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: 0;
}

.product-item:hover {
  background-color: rgba(240, 255, 0, 0.15);
}

.product-item.active {
  background-color: var(--color-lello);
  color: var(--color-void-black);
  font-weight: 700;
}

.product-name {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 800;
  letter-spacing: var(--letter-spacing-doto);
  text-transform: uppercase;
  color: var(--color-dark-gray);
  line-height: 1.4;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.product-item.active .product-name {
  color: var(--color-void-black);
}

.product-type[data-type="docs"] .product-name {
  text-transform: none;
}

a.sidebar-help-link {
  text-decoration: none;
  color: inherit;
}

/* 3-Tier Sidebar Navigation Styles */
.product-type {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-tiny);
}

.type-header {
  display: flex;
  align-items: center;
  gap: var(--space-tiny);
  padding: var(--space-tiny) var(--space-small);
  cursor: pointer;
  transition: all var(--transition-fast);
  background-color: transparent;
}

.type-header:hover {
  background-color: rgba(240, 255, 0, 0.1);
}

.type-header .category-name {
  font-family: var(--font-druk);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-druk);
  text-transform: uppercase;
  color: var(--color-void-black);
}

.product-type.empty .type-header {
  opacity: 0.35;
  cursor: default;
}

.product-type.empty .type-header:hover {
  background-color: transparent;
}

.product-groups-container {
  display: none;
  flex-direction: column;
  gap: 0;
  margin-left: var(--space-medium);
  padding-left: var(--space-small);
}

.product-type.expanded .product-groups-container {
  display: flex;
}

/* Tools Filter Container (Desktop Only) */
.tools-filter-container {
  display: none; /* Hidden on mobile */
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-small);
  padding: var(--space-tiny) 0;
}

.tools-filter-toggle {
  padding: 4px 8px;
  font-family: var(--font-visitor);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: var(--letter-spacing-normal);
  text-transform: uppercase;
  color: var(--color-dark-gray);
  background-color: transparent;
  border: 1px solid var(--color-dark-gray);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tools-filter-toggle:hover {
  background-color: rgba(240, 255, 0, 0.15);
  border-color: var(--color-lello);
}

.tools-filter-toggle.active {
  background-color: var(--color-lello);
  color: var(--color-void-black);
  border-color: var(--color-lello);
}

/* Show filters on desktop only */
@media (min-width: 769px) {
  .tools-filter-container {
    display: flex;
  }
}

.product-group {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-micro);
}

.group-header {
  display: flex;
  align-items: center;
  gap: var(--space-tiny);
  padding: var(--space-tiny) var(--space-small);
  cursor: pointer;
  transition: all var(--transition-fast);
  background-color: transparent;
}

.group-header:hover {
  background-color: rgba(240, 255, 0, 0.1);
}

.group-header .category-name {
  font-family: var(--font-druk);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-druk);
  text-transform: uppercase;
  color: var(--color-dark-gray);
}

.group-product-list {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin-left: var(--space-medium);
  padding-left: var(--space-small);
  line-height: 12px;
  align-items: stretch;
  width: 100%;
}

.product-group.expanded .group-product-list {
  display: flex;
}

/* Show product list directly in groups container (for tools flat list) */
.product-type.expanded .product-groups-container > .group-product-list {
  display: flex;
  margin-left: 0; /* Remove extra margin since groups-container already has margin */
  padding-left: 0; /* Remove extra padding since groups-container already has padding */
  gap: 2px; /* Ensure consistent gap between items */
}

.coming-soon-message {
  font-family: var(--font-visitor);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--letter-spacing-normal);
  text-transform: lowercase;
  color: var(--color-dark-gray);
  padding: var(--space-medium) var(--space-small);
  margin-left: var(--space-medium);
  text-align: left;
}

/* Center Product Card - JSX Component Structure */
.product-card {
  padding: 0;
  padding-top: 10px;
  padding-left: 30px; /* Space between sidebar and product card */
  margin-top: 0px;
  margin-left: var(--sidebar-width);
  margin-right: 0;
  background-color: var(--color-stone-gray);
  overflow-x: hidden;
  width: calc(100% - var(--sidebar-width) - 30px); /* Account for left padding */
  max-width: none;
  box-sizing: border-box;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Allow flex children to shrink below content size */
  gap: 0px;
}

.product-card-container {
  width: min(100%, var(--product-content-width));
  max-width: var(--product-content-width);
  min-height: 494px;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.product-hero-container {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
}

/* Home Grid Styles */
.home-grid-container {
  display: flex; /* Default to visible */
  width: fit-content;
  height: fit-content;
  flex-direction: column;
  box-sizing: border-box;
  flex: 1;
  align-items: stretch; /* Allow grid to fill width */
  justify-content: flex-start; /* Align to top */
  padding-top: 0px;
  padding-bottom: 100px; /* Extra space to scroll past footer (70px footer + 30px buffer) */
  padding-left: 33px;
  padding-right: 33px;
}

.home-grid-container.hidden {
  display: none;
}

@font-face {
  font-family: 'Visitor';
  src: url('/fonts/visitor.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Visitor TT1 BRK';
  src: url('/fonts/visitor.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Druk Wide Cyr';
  src: url('/fonts/druk-wide-cyr-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Druk Text Wide Cyr';
  src: url('/fonts/druk-text-wide-cyr.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Doto';
  src: url('/fonts/doto.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* NO3D Tools Design Language v1.0.0 — semantic type roles */
.type-display {
  font-family: var(--font-druk-wide);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}

.type-section {
  font-family: var(--font-druk-text-wide);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.type-product-card {
  font-family: var(--font-visitor);
  font-size: 19px;
  line-height: 1;
  text-transform: uppercase;
}

.type-lead {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-lead);
  font-weight: 800;
  line-height: 1.23;
  letter-spacing: var(--letter-spacing-doto);
}

.type-body {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  line-height: 1.5;
}

.type-ui,
.type-button {
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  line-height: 1;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
}

.type-documentation {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.84;
  letter-spacing: -0.11px;
}

.type-lello-title {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-lead);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.type-lello-body {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 800;
  line-height: 1.55;
}

.surface-lello {
  background: var(--color-lello);
  color: var(--color-void-black);
}

.surface-lello .type-body,
.surface-lello .type-lead {
  font-weight: 800;
}

/* ============================================================================
   HOME CTA BANNER
   ============================================================================ */

.home-cta-banner {
  display: block;
  width: min(100%, 1440px);
  /* 904 × 343 at the 1280px reference viewport; caps at the 1440 × 360 source template. */
  height: clamp(256px, 26.796875vw, var(--banner-home-desktop-height));
  margin: var(--space-medium) auto var(--space-small);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  line-height: 0;
}

.home-cta-banner.hidden {
  display: none;
}

.home-cta-backdrop-media,
.home-cta-backdrop-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 1024px) {
  .home-cta-banner {
    height: clamp(224px, 33.3333vw, var(--banner-home-tablet-height));
  }
}

.home-cta-backdrop-poster {
  display: none;
}

/* ============================================================================
   HOME GRID TITLE - NO3D Website Design Language / Authority v1
   ============================================================================ */

.home-grid-title {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 25px;
  padding-bottom: 25px;
  margin: 0 0 var(--space-large) 0;
  flex-shrink: 0;
}

.home-grid-title-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-tiny);
  min-width: 0;
}

.home-grid-title-text {
  font-family: var(--font-druk);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-druk);
  text-transform: uppercase;
  color: var(--color-void-black);
  margin: 0;
  line-height: 1.0;
}

.home-grid-title-sub {
  font-family: var(--font-doto);
  font-size: 12px;
  font-weight: 800;
  color: var(--color-medium-gray);
  margin: 0;
  letter-spacing: var(--letter-spacing-doto);
  line-height: 1.23;
  opacity: var(--text-body-opacity);
}

.home-grid-title-sub a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-grid-title-sub a:hover {
  color: var(--color-void-black);
}

.home-grid-title-count {
  font-family: var(--font-doto);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-doto);
  text-transform: uppercase;
  color: var(--color-medium-gray);
  opacity: var(--text-body-opacity);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .home-cta-backdrop-media {
    display: none;
  }

  .home-cta-backdrop-poster {
    display: block;
  }
}

@media (max-width: 900px) {
  .home-grid-title-text {
    font-size: 16px;
  }
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  row-gap: 33px;
  column-gap: 33px;
  width: fit-content;
  max-width: 100%;
  height: fit-content;
  overflow: visible; /* Allow grid to expand to fit content without scrolling */
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
  box-sizing: border-box;
  margin: 0 auto; /* Center the grid */
}



/* Mobile: 3 columns for home grid - centered with equal spacing on both sides */


.home-grid-item {
  background-color: transparent;
  border: none;
  border-radius: 8px;
  padding: var(--space-medium);
  padding-top: 35px;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  width: 100%;
}

.home-grid-item {
  position: relative;
}

.home-grid-item:hover {
  transform: translateY(-2px);
  background-color: rgba(0, 0, 0, 0.05);
}

/* Release Status Badges */
.release-badge {
  position: absolute;
  bottom: 42px;
  right: 12px;
  font-family: var(--font-visitor);
  font-size: 12px;
  letter-spacing: 0.1em;
  pointer-events: none;
  text-transform: uppercase;
}

.release-badge-beta {
  color: var(--color-beta-blue);
}

.release-badge-alpha {
  color: var(--color-error-red);
}

/* Coming Soon Treatment */
.home-grid-item.coming-soon {
  pointer-events: none;
  cursor: default;
}

.home-grid-item.coming-soon .home-grid-item-thumbnail {
  filter: grayscale(100%);
  opacity: 0.35;
}

.home-grid-item.coming-soon .coming-soon-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-visitor);
  font-size: 14px;
  color: var(--color-paper-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  -webkit-text-stroke: 0.7px var(--color-void-black);
  pointer-events: none;
}

.home-grid-item.coming-soon:hover {
  transform: none;
  background-color: transparent;
}

/* Sidebar release badges */
.sidebar-badge {
  font-family: var(--font-visitor);
  font-size: 8px;
  letter-spacing: 0.05em;
  margin-left: 4px;
  vertical-align: middle;
}

.sidebar-badge-beta {
  color: var(--color-beta-blue);
}

.sidebar-badge-alpha {
  color: var(--color-error-red);
}

.sidebar-badge-soon {
  color: var(--color-medium-gray);
}

.product-item.sidebar-coming-soon {
  opacity: 0.45;
  pointer-events: none;
}

/* Sidebar latest blog post preview */
.sidebar-blog-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  margin: 4px 0;
  text-decoration: none;
  color: var(--color-dark);
  border-top: 1px solid var(--color-medium-gray);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.sidebar-blog-preview:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.sidebar-blog-preview-flag {
  font-family: var(--font-visitor);
  font-size: 11px;
  color: var(--color-dark);
  letter-spacing: var(--letter-spacing-ui);
  opacity: 0.7;
}

.sidebar-blog-preview-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
}

.sidebar-blog-preview-title {
  font-family: var(--font-doto);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: var(--letter-spacing-doto);
}

.sidebar-blog-preview-date {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  opacity: 0.5;
}

.sidebar-blog-preview-excerpt {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.65;
}

.home-grid-item-thumbnail {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 4px;
  background-color: transparent;
}

.home-grid-item-title {
  width: 100%;
  height: 100%;
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  line-height: 1;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-doto);
  text-transform: uppercase;
  color: var(--color-void-black);
  margin: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.home-grid-item-price {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  color: var(--color-dark-gray);
  margin: 0;
  text-align: center;
}

/* Desktop: Responsive grid with evenly spaced square thumbnails */
@media (min-width: 769px) {
  .home-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    row-gap: 40px;
    column-gap: 8px; /* Minimal space between thumbnails */
    padding-left: 0px;
    padding-right: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
    width: 100%;
    height: fit-content;
    overflow: visible; /* Ensure no scroll on desktop - grid expands to fit content */
    justify-items: stretch;
    align-items: stretch;
  }
  
  .home-grid-container {
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 0px;
    padding-bottom: 100px; /* Extra space to scroll past footer (70px footer + 30px buffer) */
    padding-left: 33px;
    padding-right: 33px;
  }
  
  .home-grid-item {
    padding: 0px !important;
    margin: 0px !important;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 6px; /* Space between image and title */
    justify-content: flex-start;
    align-items: center; /* Center the title block within the grid item */
    position: relative;
    border-radius: 0px;
    aspect-ratio: auto; /* Remove aspect ratio from container to allow title expansion */
  }
  
  .home-grid-item-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover; /* Fill the square space */
    display: block;
    height: auto;
  }
  
  .home-grid-item-title {
    width: 100%;
    max-width: 50%; /* Ensure title wraps if it exceeds 50% width */
    height: auto;
    font-size: 13px;
    line-height: 15px;
    letter-spacing: 2.2px;
    margin: 0px;
    text-align: center; /* Center justify the title text */
    font-weight: 700;
  }
}

.product-card-container.hidden {
  display: none !important;
}

.product-close-button {
  background-color: transparent;
  border: none;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: none !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-visitor);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark-gray);
  transition: color var(--transition-fast);
  margin-left: auto;
  flex-shrink: 0;
}

.product-close-button:hover {
  color: var(--color-void-black);
}

/* Left Section Styles */
.product-left-section {
  width: var(--product-carousel-width);
  min-width: var(--product-carousel-width);
  min-height: var(--product-carousel-height);
  height: var(--product-carousel-height);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
  margin: 0;
  padding-right: 0;
}

/* Product description — single scrolling thread from _desc.md */
.product-description-scroll {
  width: 100%;
  overflow: visible;
  flex: 0 0 auto;
}

.product-content {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-small);
}

.product-info {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}

.product-image {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-stone-gray);
  border-radius: 4px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-description,
.product-description-scroll {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  line-height: var(--line-height-base);
  color: var(--color-dark-gray);
  letter-spacing: var(--letter-spacing-normal);
  margin-bottom: var(--space-small);
  max-width: 680px;
  padding-left: 0.25rem;
  padding-right: 1rem;
}

.product-description > *:first-child,
.product-description-scroll > *:first-child {
  margin-top: 0;
}

.product-description > *:last-child,
.product-description-scroll > *:last-child {
  margin-bottom: 0;
}

.product-description h1,
.product-description h2,
.product-description h3,
.product-description h4,
.product-description h5,
.product-description h6,
.product-description-scroll h1,
.product-description-scroll h2,
.product-description-scroll h3,
.product-description-scroll h4,
.product-description-scroll h5,
.product-description-scroll h6 {
  font-family: var(--font-visitor);
  font-weight: 400;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-void-black);
  text-transform: uppercase;
}

.product-description h2,
.product-description-scroll h2 {
  padding-top: 0.5rem;
  padding-bottom: 0;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  border-top: 1px solid var(--color-stone-gray);
}

/* Keep heading/body spacing scoped to content areas to avoid cross-page conflicts. */

.product-description p,
.product-description-scroll p {
  margin-bottom: 1rem;
  color: var(--color-medium-gray);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  letter-spacing: var(--text-body-letter-spacing);
  opacity: var(--text-body-opacity);
  margin-top: 0;
}

.product-description p:last-child,
.product-description-scroll p:last-child {
  margin-bottom: 0;
}

.product-description ul,
.product-description ol,
.product-description-scroll ul,
.product-description-scroll ol {
  padding-left: 1.5rem;
  margin-left: 0;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.product-description li,
.product-description-scroll li {
  margin-bottom: 0.5rem;
  line-height: var(--text-body-line-height);
}

.product-description code,
.product-description-scroll code {
  background: #f5f5f5;
  padding: 0.125rem 0.25rem;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.product-description pre,
.product-description-scroll pre {
  background: transparent;
  padding: 1rem 0;
  border-radius: 0;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.product-description pre code,
.product-description-scroll pre code {
  background: none;
  padding: 0;
}

.product-description img,
.product-description-scroll img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

.product-description strong,
.product-description-scroll strong {
  font-weight: 900;
}

/* Video Wrapper - Responsive 16:9 aspect ratio */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1rem 0;
  background: #000;
  border-radius: 4px;
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Video Embed (YouTube/Vimeo) */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1rem 0;
  border-radius: 4px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 3D Viewer Container (for future use) */
.model-viewer-container {
  width: 100%;
  height: 400px;
  margin: 1rem 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Right Section Styles */
.product-right-section {
  width: min(100%, var(--product-documentation-width));
  max-width: var(--product-documentation-width);
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  margin: 0;
  position: relative;
}

.product-image-carousel {
  width: var(--product-carousel-width);
  height: var(--product-carousel-height);
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--color-stone-gray);
  /* overflow: hidden; - Moved to carousel-viewport to prevent clipping arrows */
  overflow: visible; /* DEBUG: Allow arrows to be visible */
}

.carousel-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  touch-action: pan-y; /* Allow vertical scrolling but prevent horizontal panning (handled by JS) */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
  will-change: transform;
  user-select: none; /* Prevent text selection during swipe */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.carousel-item img,
.carousel-item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  max-width: 600px;
  max-height: 450px;
  display: block;
}

/* Responsive image scaling for 300-700px window width range */
@media (max-width: 700px) {
  .carousel-item img,
  .carousel-item video {
    /* Scale from 600px at 700px down to 300px at 300px */
    max-width: clamp(300px, calc(60vw + 120px), 600px);
    /* Maintain aspect ratio: height scales proportionally (600:450 = 1.333:1) */
    max-height: clamp(225px, calc(45vw + 90px), 450px);
  }
}

@media (max-width: 300px) {
  .carousel-item img,
  .carousel-item video {
    max-width: 300px;
    max-height: 178px;
  }
}

.carousel-item .model-viewer-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-stone-gray);
  color: var(--color-void-black);
  font-size: 0.9rem;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 10;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  min-width: 32px;
  min-height: 32px;
}

.carousel-arrow.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.carousel-arrow:hover {
  background: transparent;
  opacity: 0.7;
}

.carousel-arrow:active {
  background: transparent;
  opacity: 0.5;
}

.carousel-arrow-text {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 300;
  color: var(--color-void-black);
  line-height: 1;
}

.carousel-arrow-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.carousel-arrow-left {
  left: 0.5rem;
}

.carousel-arrow-right {
  right: 0.5rem;
}

/* Carousel arrow image styling */
.carousel-arrow img {
  display: block;
}

.product-image-container:hover .carousel-arrow.visible {
  opacity: 1;
}

.product-details {
  width: 100%;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  justify-content: flex-start;
  text-align: left;
}

.product-front-matter {
  width: var(--product-front-matter-width);
  min-width: var(--product-front-matter-width);
  margin-top: 0;
  margin-left: 0;
  padding-left: 0;
  align-self: flex-start;
}

.product-details-divider-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 10px;
}

.divider-line-thick {
  width: 100%;
  height: 2px;
  background-color: var(--color-void-black);
  display: none; /* Hidden for now, can be restored by changing to 'block' */
}

.divider-line-thin {
  width: 100%;
  height: 0.5px;
  background-color: var(--color-void-black);
  display: none; /* Hidden for now, can be restored by changing to 'block' */
}

.product-header-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-small);
  width: 100%;
}

.product-header {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-small);
  justify-content: flex-start;
}

/* ============================================================================
   PRODUCT META TABLE
   ============================================================================ */

.product-meta-table {
  width: 100%;
  margin-top: 12px;
  font-family: var(--font-visitor);
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.product-meta-table table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

.product-meta-table td {
  padding: 4px 0;
  border: none;
  vertical-align: top;
}

.product-meta-table .meta-label {
  padding-right: 12px;
  color: var(--color-medium-gray);
  white-space: nowrap;
}

.product-meta-table .meta-value {
  color: var(--color-dark-gray);
}

.meta-badge {
  display: inline-block;
  padding: 3px 8px 1px;
  font-family: var(--font-visitor);
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.meta-badge-dark {
  background: var(--color-void-black);
  color: var(--color-stone-gray);
}

.meta-badge-stable {
  background: #d4f5d0;
  color: #1a5c15;
}

.meta-badge-beta {
  background: #fff3cd;
  color: #856404;
}

.meta-badge-alpha {
  background: #f8d7da;
  color: #721c24;
}

.meta-tag-pill {
  display: inline-block;
  border: 1.5px solid #ccc;
  color: #555;
  padding: 3px 8px 1px;
  font-family: var(--font-visitor);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.meta-tag-pill:hover {
  border-color: var(--color-void-black);
}

.meta-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ============================================================================
   CONTRIBUTE BUTTONS
   ============================================================================ */

.product-contribute {
  width: 100%;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contribute-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.contribute-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  padding: 8px 14px 6px;
  border: 1.5px solid var(--color-void-black);
  color: var(--color-void-black);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.contribute-btn:hover {
  background: var(--color-void-black);
  color: var(--color-lello);
}

.contribute-hint {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  color: #999;
  letter-spacing: 0.3px;
}

/* ============================================================================
   PRODUCT CHANGELOG
   ============================================================================ */

.product-changelog {
  width: 100%;
  margin-top: 14px;
  font-family: var(--font-visitor);
  font-size: 13px;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
}

.changelog-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.changelog-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-void-black);
}

.changelog-count {
  display: inline-block;
  background: var(--color-stone-gray);
  color: #555;
  padding: 2px 6px 0;
  font-size: 10px;
  letter-spacing: 0.5px;
  border: 1px solid #ddd;
}

.changelog-body {
  border-left: 2px solid #ddd;
  padding-left: 12px;
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  line-height: 1.6;
  color: #444;
  text-transform: none;
  letter-spacing: 0.2px;
}

.changelog-body h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  margin: 12px 0 4px;
  color: var(--color-void-black);
}

.changelog-body h3:first-child {
  margin-top: 0;
}

.changelog-body ul {
  margin: 2px 0 8px;
  padding-left: 16px;
}

.changelog-body li {
  margin-bottom: 2px;
}

/* ============================================================================
   FEEDBACK MODAL
   ============================================================================ */

.feedback-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.feedback-modal-overlay.active {
  display: flex;
}

.feedback-modal {
  background: var(--color-stone-gray);
  border: 2px solid var(--color-void-black);
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}

.feedback-modal-header {
  background: var(--color-void-black);
  color: var(--color-lello);
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  padding: 12px 16px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feedback-modal-close {
  background: none;
  border: none;
  color: var(--color-lello);
  font-family: var(--font-visitor);
  font-size: 18px;
  cursor: pointer;
}

.feedback-modal-message {
  padding: 16px 20px 12px;
  border-bottom: 1px solid #ccc;
}

.feedback-modal-message-title {
  font-family: var(--font-druk);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: var(--letter-spacing-druk);
  text-transform: uppercase;
  color: var(--color-void-black);
  margin-bottom: 8px;
}

.feedback-modal-message-body {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  line-height: 1.6;
  color: #444;
  letter-spacing: 0.2px;
}

.feedback-modal-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feedback-form-label {
  font-family: var(--font-visitor);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  color: #666;
}

.feedback-form-input,
.feedback-form-textarea,
.feedback-form-input[readonly] {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  padding: 10px 12px;
  border: 1.5px solid #ccc;
  background: #fff;
  color: var(--color-void-black);
  outline: none;
  transition: border-color var(--transition-fast);
  letter-spacing: 0.3px;
}

.feedback-form-input:focus,
.feedback-form-textarea:focus {
  border-color: var(--color-void-black);
}

.feedback-form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.feedback-form-hint {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  color: #999;
  letter-spacing: 0.2px;
}

.feedback-tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.feedback-tag-option {
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  padding: 4px 10px 2px;
  border: 1.5px solid #ccc;
  background: transparent;
  color: #555;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.feedback-tag-option.selected {
  border-color: var(--color-void-black);
  background: var(--color-void-black);
  color: var(--color-lello);
}

.feedback-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.feedback-form-submit {
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  padding: 12px 20px 9px;
  border: 2px solid var(--color-void-black);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex: 1;
  text-align: center;
}

.feedback-form-submit-primary {
  background: var(--color-void-black);
  color: var(--color-lello);
}

.feedback-form-submit-primary:hover {
  background: var(--color-lello);
  color: var(--color-void-black);
}

.feedback-form-submit-secondary {
  background: transparent;
  color: var(--color-void-black);
}

.feedback-form-submit-secondary:hover {
  background: var(--color-void-black);
  color: var(--color-lello);
}

.product-title {
  font-family: var(--font-druk-wide);
  font-size: var(--font-size-product-title);
  font-weight: 500;
  letter-spacing: var(--letter-spacing-product-title);
  text-transform: uppercase;
  color: var(--color-void-black);
  line-height: 1;
  text-align: left;
  margin: 0;
  padding: 0;
  height: fit-content;
}

.product-title h2 {
  font-family: var(--font-druk-wide);
  font-size: var(--font-size-product-title);
  font-weight: 500;
  letter-spacing: var(--letter-spacing-product-title);
  text-transform: uppercase;
  color: var(--color-void-black);
  line-height: 1;
  text-align: right;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.product-price-wrapper {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.product-purchase-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.product-price {
  font-family: var(--font-visitor);
  font-size: 22px;
  font-weight: normal;
  letter-spacing: var(--letter-spacing-normal);
  text-transform: uppercase;
  color: var(--color-void-black);
  line-height: 0.582; /* 58.2% as per design specs */
  text-align: center; /* Center align text */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 2px 0;
  white-space: nowrap;
  height: 100%;
  width: 100%; /* Take 100% width */
}

.product-tags {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  color: var(--color-void-black);
  margin-top: 5px;
  margin-bottom: 0;
  overflow: hidden; /* Ensure tags container doesn't overflow */
}

.tags-label {
  font-weight: 400;
  white-space: nowrap;
}

.tags-list {
  font-weight: 400;
  color: var(--color-void-black);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0; /* Allow flex item to shrink below content size */
}

.download-button,
.library-status {
  background-color: var(--color-lello);
  color: var(--color-medium-gray);
  border: none;
  padding: 7px 56px;
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-normal);
  border-radius: 0;
  width: 100%; /* Take 100% width */
  height: 35.2px; /* Set height to match product title letter height */
  display: flex;
  align-items: center;
  justify-content: center;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  white-space: nowrap;
}

.member-library-panel {
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.library-status {
  cursor: default;
}

.sync-instructions-link {
  align-self: flex-start;
  color: var(--color-medium-gray);
  font-family: var(--font-mono);
  font-size: var(--font-size-small);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-normal);
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
}

.sync-instructions-link:hover {
  color: var(--color-void-black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.download-button:hover {
  background-color: var(--color-lello-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lello-glow);
}

.download-button:active {
  background-color: #d4e600;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(240, 255, 0, 0.2);
}

/* Authoritative product purchase button family */
.buy-now-button,
.catalog-button {
  border: 1px solid var(--border-default);
  padding: 7px 56px;
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-normal);
  border-radius: 0;
  width: 100%;
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  white-space: nowrap;
}

.buy-now-button {
  background-color: var(--button-primary-bg);
  color: var(--button-primary-fg);
}

.catalog-button {
  min-height: 53px;
  background-color: var(--button-secondary-bg);
  color: var(--button-secondary-fg);
}

.buy-now-button:hover {
  background-color: var(--color-lello-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lello-glow);
}

.catalog-button:hover {
  background-color: var(--color-deep-charcoal);
  color: var(--button-secondary-fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.buy-now-button:active {
  background-color: #d4e600;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(240, 255, 0, 0.2);
}

.catalog-button:active {
  background-color: var(--color-dark-gray);
  transform: translateY(0);
  box-shadow: none;
}

.buy-now-button:disabled,
.catalog-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.commerce-account-ready {
  width: 100%;
  border-top: 1px solid var(--color-dark-gray);
  padding-top: 12px;
  text-align: left;
}

.commerce-account-ready h2,
.commerce-account-ready p {
  margin: 0;
}

.commerce-account-ready h2 {
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
}

.commerce-account-ready p {
  margin-top: 5px;
  color: var(--color-medium-gray);
  font-family: var(--font-mono);
  font-size: var(--font-size-small);
  line-height: 1.35;
}

.commerce-account-ready-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin-top: 10px;
}

.commerce-account-ready-primary,
.commerce-account-ready-secondary {
  box-sizing: border-box;
  min-height: 35.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  letter-spacing: var(--letter-spacing-ui);
  text-align: center;
  text-decoration: none;
}

.commerce-account-ready-primary {
  background: var(--color-lello);
  color: var(--color-medium-gray);
}

.commerce-account-ready-secondary {
  border: 1px solid var(--color-dark-gray);
  color: var(--color-medium-gray);
}

.commerce-account-ready-primary:hover,
.commerce-account-ready-secondary:hover {
  color: var(--color-void-black);
  background: var(--color-lello-light);
}

.commerce-account-ready-detail {
  font-size: calc(var(--font-size-small) * 0.9) !important;
}

/* Legacy cart button styles (kept for backward compatibility) */
.add-to-cart-button {
  background-color: var(--color-void-black);
  color: var(--color-lello);
  border: 1px solid var(--color-void-black);
  padding: 7px 20px;
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-ui);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-normal);
  border-radius: 0;
  width: auto;
  min-width: 145px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: antialiased;
  align-self: flex-end;
  margin-right: 10px;
  margin-top: var(--space-small);
  white-space: nowrap;
}

.add-to-cart-button:hover {
  background-color: var(--color-lello);
  color: var(--color-void-black);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lello-glow);
}

.add-to-cart-button:active {
  background-color: #d4e600;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(240, 255, 0, 0.2);
}

/* Right Icon Grid - Hidden */
.icon-grid {
  display: none !important;
}

.icon-item {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: 4px;
  padding: var(--space-micro);
  background-color: transparent;
  border: 1px solid transparent;
  width: 100%;
  aspect-ratio: 1; /* Ensure square aspect ratio */
  max-width: 100%;
  box-sizing: border-box;
}

.icon-item:hover {
  background-color: rgba(240, 255, 0, 0.1);
}

.icon-item.active {
  border-color: var(--color-lello);
  background-color: rgba(240, 255, 0, 0.1);
}

.icon-item img {
  width: 100%;
  height: 100%;
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  aspect-ratio: 1; /* Ensure square aspect ratio */
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100vw;
  padding: var(--space-small) var(--space-medium);
  background-color: var(--color-stone-gray);
  border: none; /* Removed border */
  border-top: none;
  border-bottom: none;
  border-top-width: 0px;
  border-top-color: rgba(0, 0, 0, 0);
  border-top-style: none;
  border-image: none;
  box-shadow: none;
  z-index: 200;
  height: 70px;
  display: flex;
  align-items: center;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 12px; /* 50% larger than 8px */
  color: var(--color-void-black);
  letter-spacing: var(--letter-spacing-normal);
}

#footer-text {
  color: var(--border-dark-input);
}

.footer-text#footer-commit {
  margin-left: var(--space-medium);
}

#footer-commit {
  color: var(--border-dark-secondary);
}

.footer-text#footer-branch {
  margin-left: var(--space-medium);
}

#footer-branch {
  color: var(--border-dark-secondary);
}

/* Ensure commit hash and branch are visible even when footer-text is hidden on mobile */


.footer-download-btn {
  position: fixed;
  bottom: 16px;
  right: 80px;
  z-index: 201;
  display: inline-block;
  background: var(--color-void-black);
  color: var(--color-paper-white);
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-ui);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--color-void-black);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
  white-space: nowrap;
}

.footer-download-btn:hover {
  background: var(--color-paper-white);
  color: var(--color-void-black);
}

.footer-logo {
  position: fixed;
  bottom: 0;
  right: 0;
  height: 68px; /* Increased by 70% from 40px */
  width: auto;
  object-fit: contain;
  z-index: 201; /* Above footer z-index */
  padding: var(--space-small);
  box-sizing: border-box;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .sidebar {
    width: 120px;
  }

  .product-card {
    padding-left: 30px; /* Space between sidebar and product card */
    margin-left: 0px;
    margin-right: 0;
    width: 100%;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  /* Tablet-only styles (769px - 1024px) */
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    top: 78px;
    background-color: var(--color-stone-gray);
  }

  .product-card {
    margin: 0;
    padding: var(--space-small);
    width: 100%;
    height: auto; /* Hug content */
    min-height: 0; /* Remove minimum height constraint */
    box-sizing: border-box;
  }

  .icon-grid {
    display: none !important;
  }
}

/* Mobile styles are now handled in mobile.css for modularity */
/* See mobile.css for all mobile-specific layout adjustments */

/* ============================================================================
   MODAL STYLES - Hidden by default, shown via JavaScript
   ============================================================================ */

/* Search Modal */
.search-modal-backdrop {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.search-modal-backdrop.active {
  display: block;
}

.search-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background-color: var(--color-paper-white);
  border: 2px solid var(--color-void-black);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.search-modal.active {
  display: block;
}

.search-results-container {
  display: none; /* Hidden by default */
}

.search-results-container.active {
  display: block;
}

.search-results-empty {
  display: none; /* Hidden by default, shown when no results */
}

.search-results-empty.active {
  display: block;
}

.search-modal-container {
  background-color: var(--color-paper-white);
  border: 2px solid var(--color-void-black);
  padding: var(--space-medium);
  max-height: 70vh;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.search-modal-header {
  margin-bottom: var(--space-medium);
}

.search-input {
  width: 100%;
  padding: var(--space-small) var(--space-medium);
  font-family: var(--font-doto);
  font-size: 16px;
  border: 2px solid var(--color-void-black);
  background-color: var(--color-paper-white);
  color: var(--color-void-black);
  box-sizing: border-box;
}

.search-input:focus {
  outline: 2px solid var(--color-lello);
  outline-offset: -2px;
}

.search-modal-footer {
  margin-top: var(--space-medium);
  padding-top: var(--space-medium);
  border-top: 1px solid var(--color-void-black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--font-size-small);
  color: var(--color-medium-gray);
}

.search-hint {
  display: flex;
  gap: var(--space-small);
  align-items: center;
}

.search-key {
  background-color: var(--color-stone-gray);
  border: 1px solid var(--color-void-black);
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  border-radius: 2px;
}

/* Search Results */
.search-result-item {
  padding: var(--space-small) var(--space-medium);
  border-bottom: 1px solid var(--color-stone-gray);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  display: flex;
  align-items: center;
}

.search-result-item:hover,
.search-result-item.selected {
  background-color: var(--color-lello);
  color: var(--color-void-black);
}

.search-result-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.search-result-title {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-void-black);
  flex: 1;
}

.search-result-item.selected .search-result-title,
.search-result-item:hover .search-result-title {
  color: var(--color-void-black);
}

.search-result-price {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  color: var(--color-medium-gray);
  margin-left: var(--space-medium);
}

.search-result-item.selected .search-result-price,
.search-result-item:hover .search-result-price {
  color: var(--color-void-black);
}

/* Shopping Cart Modal */
.cart-modal-backdrop {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.cart-modal-backdrop.active {
  display: block;
}

.cart-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  background-color: var(--color-paper-white);
  border: 2px solid var(--color-void-black);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cart-modal.active {
  display: block;
}

/* Checkout Modal */
.checkout-modal-backdrop {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1002;
}

.checkout-modal-backdrop.active {
  display: block;
}

.checkout-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1003;
  background-color: var(--color-paper-white);
  border: 2px solid var(--color-void-black);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.checkout-modal.active {
  display: block;
}

.checkout-loading {
  display: none; /* Hidden by default */
}

.checkout-loading.active {
  display: block;
}

/* Christmas Popup Modal */
.christmas-popup-backdrop {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1004;
}

.christmas-popup-backdrop.active {
  display: block;
}

.christmas-popup-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1005;
  background-color: var(--color-paper-white);
  border: 2px solid var(--color-void-black);
  max-width: 700px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.christmas-popup-modal.active {
  display: block;
}

/* ============================================================================
   LANDING POP-UP MODAL (Welcome Modal)
   ============================================================================ */

.landing-popup-backdrop {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1006;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.landing-popup-backdrop.active {
  display: block;
  opacity: 1;
  visibility: visible;
}

.landing-popup-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 600px;
  z-index: 1007;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-slow), visibility var(--transition-slow), transform var(--transition-slow);
}

.landing-popup-modal.active {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.landing-popup-container {
  background-color: var(--color-paper-white);
  border: 2px solid var(--color-void-black);
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.landing-popup-content {
  display: flex;
  flex-direction: column;
  padding: var(--space-xlarge);
  gap: var(--space-large);
}

.landing-popup-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);
  text-align: center;
}

.landing-popup-title {
  font-family: var(--font-druk);
  font-size: var(--font-size-h1);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-void-black);
  margin: 0;
  letter-spacing: var(--letter-spacing-wide);
  line-height: 28px;
}

.landing-popup-subheader {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-lead);
  font-weight: 800;
  letter-spacing: var(--letter-spacing-doto);
  color: var(--color-deep-charcoal);
  line-height: var(--line-height-base);
  margin: 0;
  text-align: center;
}

.landing-popup-description {
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  color: var(--color-deep-charcoal);
  line-height: var(--line-height-base);
  margin: 0;
  max-width: 100%;
  text-align: left;
}

.landing-popup-benefits {
  display: flex;
  flex-direction: column;
  gap: var(--space-small);
  margin: var(--space-medium) 0;
  text-align: left;
}

.landing-popup-benefit-item {
  display: flex;
  align-items: center;
  gap: var(--space-small);
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  color: var(--color-deep-charcoal);
}

.landing-popup-benefit-icon {
  font-family: var(--font-visitor);
  font-size: var(--font-size-h3);
  font-weight: 400;
  color: var(--color-void-black);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.landing-popup-benefit-text {
  flex: 1;
}

.landing-popup-shopping-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-large);
  margin: var(--space-medium) 0;
  text-align: left;
}

.landing-popup-option-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-small);
}

.landing-popup-option-header {
  font-family: var(--font-druk);
  font-size: var(--font-size-h3);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-void-black);
  margin: 0;
  letter-spacing: var(--letter-spacing-normal);
  line-height: var(--line-height-base);
}

.landing-popup-option-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-tiny);
  line-height: 0px;
}

.landing-popup-option-benefit {
  display: flex;
  align-items: center;
  gap: var(--space-small);
  font-family: var(--font-doto);
  font-size: var(--font-size-doto-body);
  font-weight: 500;
  color: var(--color-deep-charcoal);
  line-height: 0px;
}

.landing-popup-option-price {
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  font-weight: var(--font-mono-weight);
  color: var(--color-deep-charcoal);
  margin: var(--space-small) 0 0 0;
  line-height: var(--line-height-base);
  margin-top: auto;
}

.landing-popup-price-value {
  font-weight: 700;
  font-size: 22px;
}

.landing-popup-price-grey {
  color: var(--color-medium-gray);
}

.landing-popup-price-green {
  color: #22C55E;
}

.landing-popup-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-small);
  margin-top: var(--space-medium);
}

.landing-popup-button {
  padding: var(--space-small) var(--space-large);
  font-family: var(--font-visitor);
  font-size: var(--font-size-ui);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-ui);
  cursor: pointer;
  border: 2px solid var(--color-void-black);
  transition: all var(--transition-normal);
  width: 100%;
  min-height: 48px;
}

.landing-popup-button-primary {
  background-color: var(--color-lello);
  color: var(--color-void-black);
}

.landing-popup-button-primary:hover {
  background-color: var(--color-lello-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lello-glow);
}

.landing-popup-button-primary:active {
  background-color: #d4e600;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(240, 255, 0, 0.2);
}

.landing-popup-button-secondary {
  background-color: var(--color-paper-white);
  color: var(--color-void-black);
}

.landing-popup-button-secondary:hover {
  background-color: var(--color-stone-gray);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.landing-popup-button-secondary:active {
  background-color: var(--color-stone-gray);
  transform: translateY(0);
}

/* Responsive styles for landing pop-up */


/* ============================================================================
   PURCHASE SUCCESS STYLES
   ============================================================================ */

.purchase-success-box, .purchase-processing, .purchase-error {
    background: #f8fff8;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: #333;
}

.purchase-processing {
    background: #f8faff;
    border-color: #2196f3;
}

.purchase-error {
    background: #fff8f8;
    border-color: #f44336;
}

.success-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #2e7d32;
}

.success-header i {
    font-size: 24px;
}

.success-header h3 {
    margin: 0;
    font-family: 'Visitor', monospace;
    font-size: 20px;
}

.purchase-download-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 15px 0 !important;
}

.purchase-download-links li {
    margin-bottom: 10px !important;
}

.download-link-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #2e7d32;
    color: white !important;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}

.download-link-item:hover {
    background: #1b5e20;
    text-decoration: none;
}

.success-footer {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 15px;
    text-align: left;
}

.email-notice strong {
    color: #333;
}

.processing-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 15px auto;
}

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