/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.5; /* Reduced from 1.6 for tighter spacing */
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1a202c;
  background-color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #3182ce;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Gallery scrollbar styling */
.gallery-thumbnails-container {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
}

.gallery-thumbnails-container::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbnails-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.gallery-thumbnails-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.gallery-thumbnails-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* Navigation */
.nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3182ce;
  text-decoration: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #3182ce;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo:hover {
  background: #2c5282;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 1.5rem;
  height: 2px;
  background: #1a202c;
  margin: 2px 0;
  transition: 0.3s;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #4a5568;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.nav-link:hover {
  color: #3182ce;
  background: #ebf8ff;
  text-decoration: none;
}

.nav-link--disabled {
  color: #a0aec0;
  cursor: not-allowed;
}

.nav-link--disabled:hover {
  background: none;
  color: #a0aec0;
}

.nav-soon {
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .nav-menu--active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-link {
    display: block;
    padding: 0.75rem 1rem;
  }
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem 0; /* Reduced from 3rem - about half */
  text-align: center;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-logo {
  width: 6rem;
  height: 6rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 2rem;
}

.hero-title {
  font-size: 2rem; /* Reduced from 3rem for compactness */
  margin-bottom: 0.5rem; /* Reduced from 1rem */
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-description {
  font-size: 0.9rem; /* Slightly smaller */
  margin-bottom: 1.5rem; /* Consistent spacing before button */
  opacity: 0.9;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons with accessibility improvements */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px; /* Global accessibility requirement - 44px touch targets */
}

.btn--primary {
  background: #3182ce;
  color: white;
}

.btn--primary:hover {
  background: #2c5282;
  text-decoration: none;
}

.btn--secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.btn--secondary:hover {
  background: #cbd5e0;
  text-decoration: none;
}

.btn--accent {
  background: #ed8936;
  color: white;
}

.btn--accent:hover {
  background: #dd6b20;
  text-decoration: none;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 1rem; /* Reduced from 2rem for tighter layout */
}

.grid--cols-1 {
  grid-template-columns: 1fr;
}

.grid--cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid--cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Cards */
.card {
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-image {
  width: 100%;
  aspect-ratio: 1/1; /* Square images */
  object-fit: cover;
  object-position: center; /* Center crop for fallback images */
}


.card-content {
  padding: 1rem; /* Reduced from 1.5rem for compactness */
}

.card-title {
  font-size: 1.1rem; /* Reduced from 1.25rem */
  font-weight: 600;
  margin-bottom: 0.375rem; /* Reduced from 0.5rem */
  line-height: 1.2;
}

.card-description {
  font-size: 0.8rem; /* Added smaller font size */
  color: #718096;
  margin-bottom: 0.75rem; /* Reduced from 1rem */
  line-height: 1.3; /* Tighter line height */
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: #edf2f7;
  color: #4a5568;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge--primary {
  background: #ebf8ff;
  color: #3182ce;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.section-description {
  color: #718096;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer {
  background: #f7fafc;
  border-top: 1px solid #e2e8f0;
  padding: 2rem 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  color: #718096;
  font-size: 0.875rem;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social-link {
  color: #718096;
  transition: color 0.2s;
}

.footer-social-link:hover {
  color: #3182ce;
  text-decoration: none;
}

/* Print specific styles */
.print-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #4a5568;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn--active {
  background: #3182ce;
  color: white;
  border-color: #3182ce;
  text-decoration: none;
}

/* Print detail page */
.print-detail-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 0;
}

.print-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 3rem 0;
}

.print-detail-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.print-detail-sidebar {
  position: sticky;
  top: 5rem;
  height: fit-content;
}

.support-cta {
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
  color: white;
  padding: 1.7rem; /* Reduced by 15% from 2rem */
  border-radius: 0.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* Mobile support CTA adjustments */
@media (max-width: 480px) {
  .support-cta {
    padding: 1.45rem; /* Additional 15% reduction for mobile */
  }
}

/* Tighter spacing for print detail pages on all devices */
.print-detail-content .card {
  margin-bottom: 1rem; /* Reduced spacing between sections */
}

.print-detail-content .card > div[style*="padding: 2rem"] {
  padding: 1.5rem !important; /* Reduced padding on desktop */
}

/* Tighter general text spacing */
.print-detail-content p,
.print-detail-content div[style*="line-height: 1.6"] {
  line-height: 1.45 !important; /* 10% tighter line spacing */
}

.print-detail-content h2 {
  margin-bottom: 1rem !important; /* Reduced from default margins */
}

/* BOM table */
.bom-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.85rem; /* Smaller base font for tables */
}

.bom-table th,
.bom-table td {
  padding: 0.5rem 0.75rem; /* Reduced padding for tighter look */
  border: 1px solid #e2e8f0;
  text-align: left;
  line-height: 1.3; /* Tighter line height */
}

.bom-table th {
  background: #f7fafc;
  font-weight: 600;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .bom-table {
    font-size: 0.75rem; /* Even smaller on mobile */
  }
  
  .bom-table th,
  .bom-table td {
    padding: 0.4rem 0.5rem; /* Tighter mobile padding */
  }
}

.bom-disclosure {
  background: #f7fafc;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #718096;
}

/* Print settings grid */
.print-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.print-setting {
  background: #f7fafc;
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

/* Changelog */
.changelog-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.changelog-version {
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

.changelog-date {
  color: #718096;
  font-size: 0.875rem;
}

/* Assembly steps with tighter spacing */
.assembly-steps {
  display: flex;
  flex-direction: column;
  gap: 1.6rem; /* 20% tighter spacing from 2rem */
}

.assembly-step {
  display: flex;
  gap: 0.8rem; /* 20% tighter spacing from 1rem */
}

.assembly-step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: #3182ce;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.assembly-step-content h3 {
  margin-bottom: 0.5rem;
}

/* Assembly Instructions heading icon - using data attribute targeting */
.card h2[data-heading="Assembly Instructions"]::before,
.print-detail-content h2[data-heading="Assembly Instructions"]::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 0.75rem;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='%233182ce' stroke='%233182ce' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'%3E%3C/path%3E%3C/svg%3E") no-repeat;
  background-size: contain;
  vertical-align: middle;
}

/* Responsive design */
@media (max-width: 1024px) {
  .print-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .print-detail-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .grid--cols-2,
  .grid--cols-3,
  .grid--cols-4,
  .grid--cols-5 {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
  }
}

/* Tablet responsive grid */
@media (min-width: 481px) and (max-width: 1024px) {
  .grid--cols-4,
  .grid--cols-5 {
    grid-template-columns: repeat(3, 1fr); /* 2-3 columns on tablet */
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .print-settings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container,
  .nav-container,
  .hero-container,
  .footer-container {
    padding: 0 0.75rem;
  }
  
  .hero {
    padding: 0.875rem 0; /* Reduced by 40-50% from 1.5rem for tighter mobile hero */
  }
  
  .section {
    padding: 2rem 0; /* Reduced for tighter mobile layout */
  }
  
  /* Fix hero description spacing and text overflow on mobile */
  .hero-description {
    margin-bottom: 1.25rem; /* 16-20px margin before "Explore 3D Prints" button */
    word-wrap: break-word; /* Prevent text overflow */
    overflow-wrap: break-word; /* Safe wrapping */
    hyphens: auto; /* Enable hyphenation for better wrapping */
    padding: 0 0.5rem; /* Inner padding for safety margins */
  }
  
  /* Ensure main hero button has proper margin and doesn't overflow */
  .hero .btn {
    margin-top: 0.25rem; /* Additional small margin for visual separation */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Make grid cards stack properly on mobile */
  .grid--cols-2 {
    grid-template-columns: 1fr; /* Single column on very small screens */
  }
  
  /* Fix card content overflow and increase density */
  .card-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 0.85rem !important; /* Reduced by 15% from 1rem */
  }
  
  /* Increase card density - shrink description font and tighten line height */
  .card-description {
    font-size: 0.7rem !important; /* Reduced by 0.1rem from 0.8rem */
    line-height: 1.17 !important; /* Reduced by 10% from 1.3 */
  }
}

/* Print Detail Hero Styles */
.print-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-main-image {
  width: 100%;
  aspect-ratio: 1.2/1; /* More square - slightly wider than tall */
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-main-image:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Print Detail Hero Mobile Responsive */
@media (max-width: 768px) {
  .print-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .print-hero-grid > div:first-child {
    order: 2; /* Move text below image on mobile */
  }
  
  .print-hero-grid > div:last-child {
    order: 1; /* Move image above text on mobile */
  }
  
  .hero-main-image {
    aspect-ratio: 1.2/1; /* Less square on tablet */
  }
  
  /* Reduce section spacing on tablet */
  .section {
    padding-top: 1rem; /* Reduced from 1.5rem */
  }
}

@media (max-width: 480px) {
  .print-hero-grid {
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .hero-main-image {
    aspect-ratio: 4/3; /* Back to 4:3 as requested */
    max-height: 200px;
    width: 100%;
    max-width: calc(100vw - 2rem); /* Ensure it fits within screen margins */
    border-radius: 0.375rem; /* Reduced corner radius on mobile from 0.75rem */
  }
  
  /* Reduce hero top padding by 20-25% on mobile */
  .print-detail-hero {
    padding: 3rem 0 !important; /* Reduced by 25% from 4rem */
  }
  
  /* Fix print hero grid container overflow */
  .print-hero-grid {
    max-width: 100%;
    overflow: hidden;
  }
  
  .print-hero-grid > div:last-child {
    max-width: calc(100vw - 2rem); /* Constrain the image container */
    overflow: hidden;
  }
  
  /* Tighter spacing for print detail cards on mobile */
  .print-detail-content .card {
    margin-bottom: 0.75rem; /* Reduced spacing between cards */
  }
  
  .print-detail-content .card > div[style*="padding: 2rem"] {
    padding: 1rem !important; /* Much tighter padding on mobile */
  }
  
  /* Fix mobile text overflow and spacing */
  .container {
    overflow-x: hidden;
  }
  
  .card {
    overflow-x: hidden;
  }
  
  .print-detail-content {
    overflow-x: hidden;
  }
  
  /* Ensure gallery doesn't overflow */
  .gallery-thumbnails-container {
    padding-bottom: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix category filter clipping and spacing - CRITICAL 360px fix */
  .print-category-filter {
    padding: 0.625rem 0; /* 8-10px top/bottom padding for entire row */
    margin-bottom: 1.25rem; /* Reduced gap by ~30% before "All Designs" heading */
    display: inline-flex !important; /* Force inline-flex for proper vertical centering */
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    min-height: auto; /* Remove any conflicting min-height */
  }
  
  .print-category-filter .container {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem; /* Ensure side padding */
    width: 100%;
  }
  
  .filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 0.875rem; /* 8-10px vertical, 12-14px horizontal */
    line-height: 1.25; /* 1.2-1.3 range */
    min-height: 2.75rem; /* 44px min-height for accessibility */
    font-size: 0.875rem;
    border-radius: 1.5rem; /* Ensure proper pill shape */
    white-space: nowrap; /* Prevent text wrapping inside pills */
    text-align: center;
    vertical-align: middle;
    /* Remove any overflow hidden that could cause clipping */
    overflow: visible;
  }
  
  /* Reduce spacing above All Designs heading specifically */
  .section[style*="padding-top: 0.5rem"] {
    padding-top: 0.5rem !important; /* Keep the inline style */
  }
  
  /* Override general section padding only for other sections */
  .section:not([style]) {
    padding-top: 1rem !important;
  }
  
  /* Fix download cards layout */
  #downloads div[style*="justify-content: space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    justify-content: flex-start !important;
  }
  
  #downloads .btn {
    width: 100%;
    justify-content: center;
    align-self: stretch;
  }
  
  /* Hero text sizing */
  .print-detail-hero h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }
  
  .print-detail-hero p {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
  }
  
  /* CRITICAL: Print detail hero buttons - enforce equal-width, side-by-side layout */
  .print-detail-hero div[style*="display: flex"] {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    width: 100%;
  }
  
  .print-detail-hero .btn {
    flex: 1 1 0 !important; /* Equal width distribution as required */
    min-width: 0 !important; /* Allow shrinking */
    min-height: 44px !important; /* Accessibility touch target requirement */
    padding: 0.625rem 0.5rem !important; /* Tight padding for 360px viewport */
    font-size: 0.8rem !important; /* Smaller text to fit */
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important; /* Prevent text wrapping */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* Ensure icon spacing in hero buttons is tighter for mobile */
  .print-detail-hero .btn svg {
    margin-right: 0.25rem !important;
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
  }
  
  /* Tighten vertical spacing in ordered lists by 20% */
  .card div[style*="line-height: 1.6"] ol > li {
    margin-bottom: 0.6rem !important; /* Reduced by 20% from 0.75rem */
  }
  
  /* CRITICAL: Changelog mobile compactness - reduce padding override */
  @media (max-width: 480px) {
    .changelog-item {
      padding: 0.75rem !important; /* Reduced from 1rem for mobile */
      margin-bottom: 0.75rem !important; /* Tighten gaps between entries */
    }
  }
  
  .changelog-header {
    margin-bottom: 0.375rem !important; /* Tighten internal spacing */
  }
  
  /* CRITICAL: Filter accessibility - confirm 44px touch targets */
  .filter-btn {
    min-height: 44px !important; /* Accessibility requirement - 44px minimum */
    padding: 0.625rem 0.875rem !important; /* Ensure adequate touch area */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Description List Formatting - Target actual markdown content container */
.card div[style*="line-height: 1.6"] ol,
.card div[style*="line-height: 1.6"] ul {
  padding-left: 0;
  margin-left: 0;
}

.card div[style*="line-height: 1.6"] ol {
  counter-reset: item;
  padding-left: 0;
}

.card div[style*="line-height: 1.6"] ol > li {
  display: block;
  margin-bottom: 0.75rem;
  padding-left: 1.75rem; /* Indent numbers to align with paragraph text */
  position: relative;
  counter-increment: item;
}

.card div[style*="line-height: 1.6"] ol > li:before {
  content: counter(item) ".";
  position: absolute;
  left: 0.5rem; /* Position number with some left margin */
  top: 0;
  font-weight: 600;
  color: #374151;
}

.card div[style*="line-height: 1.6"] ol > li > ul {
  margin-top: 0.375rem; /* Reduced gap between number and bullets */
  margin-bottom: 0.5rem;
  padding-left: 1rem; /* Indent bullets further than the numbered text */
  margin-left: 0;
}

.card div[style*="line-height: 1.6"] ol > li > ul > li {
  display: list-item;
  list-style-type: disc;
  margin-bottom: 0.125rem; /* Tighter spacing between bullets */
  padding-left: 0;
  position: static;
  counter-increment: none;
  line-height: 1.5; /* Better line spacing */
}

.card div[style*="line-height: 1.6"] ol > li > ul > li:before {
  display: none;
}

/* Spacing between numbered sections */
.card div[style*="line-height: 1.6"] ol > li:last-child {
  margin-bottom: 0;
}

.card div[style*="line-height: 1.6"] ol > li + li {
  margin-top: 1rem; /* Reduced gap between numbered sections */
}

/* Assembly Instructions icon - target via text content (fallback approach) */
.print-detail-content h2:nth-of-type(2)::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 0.75rem;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='%233182ce' stroke='%233182ce' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}

/* Tighten Assembly Instructions list spacing */
@media (max-width: 480px) {
  .print-detail-content h2 + * ol > li {
    margin-bottom: 0.5rem; /* Reduced by 20% from 0.625rem */
  }
  
  .print-detail-content h2 + * ol > li > ul > li {
    margin-bottom: 0.1rem; /* Tighter nested bullet spacing */
  }
}