main {
  padding: 40px 210px;
  display: flex;
  justify-content: center;
}

.peripheralsSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  gap: 24px;
}

.filterSection {
  width: 100%;
  margin-bottom: 24px;
}

.filterContainer {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.filterGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.filterGroup label {
  color: #1F2937;
}

.searchInput {
  padding: 8px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  width: 100%;
}

.filterSelect {
  padding: 8px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  width: 100%;
  background: white;
}

.peripheralsContainer {
  background: white;
  border-radius: 8px;
  width: 100%;
  filter: drop-shadow(#0000001a 0rem 0rem 10px);
  overflow: hidden;
}

.peripheralsHeader {
  display: grid;
  grid-template-columns: 80px 2fr 2fr repeat(3, 1fr) auto;
  gap: 16px;
  padding: 16px;
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;

}

.headerCell {
  color: #1F2937;
  display: flex;
  align-items: center;
  justify-content: start;
}

.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.sortable:hover {
  color: #0047FF;
}

.sort-icon {
  width: 16px;
  height: 16px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sort-icon::before,
.sort-icon::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.sort-icon::before {
  border-bottom: 4px solid #D1D5DB;
  top: 2px;
}

.sort-icon::after {
  border-top: 4px solid #D1D5DB;
  bottom: 2px;
}

.sortable[data-sort-direction="asc"] .sort-icon::before {
  border-bottom-color: #0047FF;
}

.sortable[data-sort-direction="desc"] .sort-icon::after {
  border-top-color: #0047FF;
}

.peripheralRow {
  display: grid;
  grid-template-columns: 80px 2fr 2fr repeat(3, 1fr);
  gap: 16px;
  padding: 16px;
  text-decoration: none;
  color: #1F2937;
  border-bottom: 1px solid #E5E7EB;
  transition: background-color 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.peripheralRow:hover {
  background-color: #F9FAFB;
}

.peripheralRow:last-child {
  border-bottom: none;
}

.cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.peripheralImage {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: #F9FAFB;
  display: flex;
  align-items: center;
  justify-content: center;
}

.peripheralImage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brandInfo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brandImage {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.alternatives-container {
    position: relative;
  }

  .alternatives-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }

  .alternatives-toggle svg path {
    fill: #272727;
  }

  .alternatives-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
    margin-top: 5px;
  }

  .alternatives-dropdown.show {
    display: block;
  }

  .alternatives-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #f0f0f0;
  }

  .alternatives-row:first-child {
    border-top: none;
  }

  .alternatives-image {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    object-fit: contain;
  }

  /* Add these styles to your peripherals.css file */

.peripheralRow {
  display: flex;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid #e5e5e5;
  padding: 12px 8px;
  transition: background-color 0.2s;
  text-decoration: none;
  color: inherit;
}

.peripheralRow:hover {
  background-color: #f9f9f9;
}

.cell {
  flex: 1;
  padding: 0 10px;
  display: flex;
  align-items: center;
}

image-cell {
  max-width: 60px;
}

.peripheralImage {
  width: 60px;
  height: 60px;
  display: flex;
  margin: 0;
  align-items: center;
  justify-content: center;
}

.peripheralImage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.alternatives-cell {
  flex: 0 0 60px;
  justify-content: center;
}

.alternatives-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  padding: 8px;
}

.alternatives-toggle.active {
  transform: rotate(180deg);
}

.alternatives-panel {
  display: none;
  width: 100%;
  background-color: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  padding: 0;
  overflow: hidden;
}

.alternatives-panel.open {
  display: block;
}

.alternatives-list {
  padding: 10px 20px;
  background-color: #fff;
}

.alternative-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  background-color: #fafafa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.alternative-item.current-item {
  border-left: 4px solid #3490dc;
}

.alternative-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-right: 15px;
}

.alternative-details {
  flex: 1;
}

.alternative-details h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 500;
}

.alternative-brand {
  font-size: 12px;
  color: #666;
}

.alternative-link {
  padding: 6px 12px;
  background-color: #3490dc;
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
  transition: background-color 0.2s;
}

.alternative-link:hover {
  background-color: #2779bd;
}

/* Desktop menor */
@media (max-width: 1400px) {
  main {
    padding: 40px 160px;
  }
}

/* Tablets grandes */
@media (max-width: 1200px) {
  main {
    padding: 32px 120px;
  }

  .peripheralsHeader,
  .peripheralRow {
    grid-template-columns: 80px 2fr 2fr repeat(2, 1fr);
  }

  .headerCell:last-child,
  .cell:last-child {
    display: none;
  }
}

/* Tablets */
@media (max-width: 900px) {
  main {
    padding: 24px 80px;
  }

  .peripheralsHeader,
  .peripheralRow {
    grid-template-columns: 80px 2fr 2fr 1fr;
  }

  .headerCell:nth-last-child(2),
  .cell:nth-last-child(2) {
    display: none;
  }
}

/* Tablets pequenos */
@media (max-width: 768px) {
  main {
    padding: 24px 40px;
  }

  .peripheralsHeader,
  .peripheralRow {
    grid-template-columns: 80px 2fr 2fr;
  }

  .headerCell:nth-last-child(3),
  .cell:nth-last-child(3) {
    display: none;
  }
}

/* Mobile */
@media (max-width: 480px) {
  main {
    padding: 16px 20px;
  }

  .peripheralsHeader,
  .peripheralRow {
    grid-template-columns: 80px 1fr;
    gap: 8px;
  }

  .headerCell:nth-child(3),
  .cell:nth-child(3) {
    display: none;
  }
} 

/* Dark mode */
@media (prefers-color-scheme: dark) {
 .name-cell a {
  color: #2779bd;
 }

  .peripheralsHeader,
  .peripheralRow {
    background: #181818;
    border-color: #282828;
  }

  .headerCell,
  .peripheralRow {
    color: #F9FAFB;
  }

  .peripheralImage {
    background: #282828;
  }

  .peripheralRow:hover {
    background: #282828;
  }

  .alternatives-toggle svg path {
    fill: #ededed;
  }

  .alternatives-panel {
    background: #212121;
    border-color: #282828;
  }
  
  .alternative-item {
    background-color: #242424;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  
  .alternative-item.current-item {
    border-left: 4px solid #4e79ff;
  }
  
  .alternative-details h4 {
    color: #f0f0f0;
  }
  
  .alternative-brand {
    color: #a0a0a0;
  }
  
  .alternative-link {
    background-color: #4e79ff;
  }
  
  .alternative-link:hover {
    background-color: #3a66e0;
  }

  .alternatives-list {
    background-color: #181818;
  }
}


