:root {
  color-scheme: light;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

body {
  margin: 0;
  background-color: #f7f7f7;
  color: #222;
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem;
  box-sizing: border-box;
  align-items: start;
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .filters-panel {
    order: -1;
    position: static;
    max-height: none;
  }
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.inventory-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
}

.unit-count {
  font-weight: 600;
  font-size: 1rem;
  color: #4b5563;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.card__image-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
}

.card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card h3 {
  font-size: 1.05rem;
  margin: 0.75rem 0 0.25rem 0;
  color: #111827;
}

.card p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
  color: #4b5563;
}

.price-block {
  margin: 0.5rem 0;
  padding: 0.75rem 0.5rem;
  background: #f9fafb;
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.price-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.price-offer {
  font-size: 1.05rem;
  font-weight: 700;
  color: #b91c1c;
}

.price-original {
  font-size: 0.95rem;
  color: #6b7280;
  text-decoration: line-through;
}

.filters-panel {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: fit-content;
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.filters-panel::-webkit-scrollbar {
  width: 6px;
}

.filters-panel::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 999px;
}

.filters-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.filters-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filters-clear {
  border: none;
  background: none;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
}

.filters-clear:hover,
.filters-clear:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  outline: none;
}

.filter-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.filter-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.filter-section summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-section summary::marker {
  display: none;
  content: "";
}

.filter-section[open] summary::after {
  content: "−";
  font-size: 1rem;
}

.filter-section:not([open]) summary::after {
  content: "+";
  font-size: 1rem;
}

.filter-section ul {
  list-style: none;
  padding: 0.75rem 0 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #374151;
}

.filter-option input[type="checkbox"] {
  margin: 0;
  accent-color: #2563eb;
}

.filter-option-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip {
  background: #f3f4f6;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  color: #1f2937;
}

.filter-range {
  padding: 0.75rem 0 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #374151;
}

.filter-range span {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-range label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.04em;
}

.filter-input {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.filter-hint {
  font-size: 0.75rem;
  color: #9ca3af;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem 1.5rem;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  text-align: center;
  color: #6b7280;
  background: #f9fafb;
  font-size: 0.95rem;
}
