.hero-section {
  background-color: #f8f9fa;
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 1rem;
}

.hero-content h2 {
  font-size: 2.8em;
  color: #2c3e50;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.2em;
  color: #555;
  margin: 0 auto 20px auto;
}

@media (max-width: 968px) {
  .hero-section {
    padding: 40px 15px;
  }
  .hero-content h2 {
    font-size: 2em;
  }
  .hero-content p {
    font-size: 1em;
  }
}

.product-list-container {
  max-width: 1059px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 20px 24px;
  margin-bottom: 5rem;
}

.product-list-header {
  font-size: 2.5em;
  color: #2c3e50;
  margin-bottom: 1rem;
  font-weight: 600;
}

.controls-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 0;
  flex-wrap: wrap;
  gap: 15px;
}

.sort-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5rem;
}

#current-sort-criteria-text {
  font-weight: 500;
  color: #333;
}

.chevron-down-icon {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 1;
}

.sort-order-btn {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  color: #555;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .sort-order-btn:hover {
    background-color: #f6f6f6;
  }
}

.sort-order-btn .sort-icon {
  width: 1rem;
  height: 1rem;
  fill: #555;
}

@media (max-width: 992px) {
  .product-list-header {
    font-size: 2.2em;
  }
}

@media (max-width: 968px) {
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-container {
    width: 100%;
    margin-right: 0;
  }
  .sort-controls {
    width: 100%;
  }
  .product-list-header {
    font-size: 2em;
  }
}

.product-list-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
}

.product-list-table thead {
  background-color: #e9ecef;
}

.product-list-table th {
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  color: #343a40;
}

.table-product {
  min-width: 280px;
}

.product-list-table td {
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  color: #495057;
  vertical-align: middle;
}

.product-list-table tbody tr:last-child td {
  border-bottom: none;
}

.product-cell-content {
  display: flex;
  align-items: center;
}

.product-table-image {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  margin-right: 15px;
  flex-shrink: 0;
}

.product-table-name {
  font-weight: 700;
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .product-table-name:hover {
    color: #0056b3;
    text-decoration: underline;
  }
}

.product-table-description {
  color: #6c757d;
  line-height: 1.5;
  font-size: 15px;
}

.last-post-cell {
  width: 200px;
  min-width: 180px;
}

.last-post-info {
  display: flex;
  align-items: center;
}

.avatar-placeholder {
  width: 2.5rem;
  height: 2.5rem;
  background-color: #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 0.85em;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.post-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.3;
}

.last-post-name {
  font-size: 0.85em;
  font-weight: 500;
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.last-post-name:hover,
.last-post-name:focus {
  color: #0056b3;
  text-decoration: underline;
}

.post-details a {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
}

.last-post-time {
  font-size: 0.8rem;
  color: #868e96;
}

.product-table-threads,
.product-table-posts {
  min-width: 120px;
  text-align: center;
  font-weight: 500;
  color: #343a40;
}

.skeleton-desc > div,
.skeleton-threads > div,
.skeleton-posts > div {
  background-color: #e0e0e0;
}

.skeleton-row td > div {
  border-radius: 4px;
  height: 20px;
  margin-bottom: 8px;
  opacity: 0.7;
  animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-row td:first-child > div {
  height: 50px;
  display: flex;
  align-items: center;
}
.skeleton-row td:first-child > div::before {
  content: '';
  display: inline-block;
  width: 50px;
  height: 50px;
  background-color: #d0d0d0;
  border-radius: 6px;
  margin-right: 15px;
  flex-shrink: 0;
}
.skeleton-row td:first-child > div > span {
  flex-grow: 1;
  height: 20px;
  background-color: #d0d0d0;
  border-radius: 4px;
}

.skeleton-row td.skeleton-desc > div {
  height: 40px;
}

.skeleton-row td.skeleton-last-post > div {
  height: 35px;
  display: flex;
  align-items: center;
}
.skeleton-row td.skeleton-last-post > div::before {
  content: '';
  display: inline-block;
  width: 35px;
  height: 35px;
  background-color: #d0d0d0;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}
.skeleton-row td.skeleton-last-post > div > span {
  flex-grow: 1;
  height: 20px;
  background-color: #d0d0d0;
  border-radius: 4px;
}

.skeleton-row td.skeleton-threads > div,
.skeleton-row td.skeleton-posts > div {
  width: 40px;
  margin-left: auto;
  margin-right: auto;
}

@keyframes pulse {
  0% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 0.7;
  }
}

@media (max-width: 968px) {
  .sort-order-btn {
    width: 2rem;
    height: 2rem;
  }
  .product-list-table,
  .product-list-table thead,
  .product-list-table th,
  .product-list-table td,
  .product-list-table tr {
    display: block;
  }

  .product-table-body {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .product-list-table {
    box-shadow: none;
  }

  .product-list-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .product-list-table tr {
    flex: 1 1 190px;
    display: block;
    border-radius: 8px;
    padding: 0;
    background-color: #ffffff;
  }

  .product-list-table td {
    border: none;
    position: relative;
    padding: 10px 0;
    text-align: left;
    display: inline-flex;
    align-items: center;
    word-break: break-word;
  }

  .product-list-table td:first-child {
    padding-left: 0;
    text-align: left;
    padding-bottom: 10px;
    font-size: 1.1em;
    display: block;
  }

  .product-list-table td:first-child:before {
    content: '';
    display: none;
  }

  .product-list-table td:last-child {
    border-bottom: none;
  }

  .product-list-table td:before {
    content: attr(data-label);
    width: fit-content;
    padding: 0 10px 0 0;
    box-sizing: border-box;
    white-space: nowrap;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-list-table td[data-label='Description'] {
    align-items: flex-start;
    width: 100%;
    min-height: 50px;
    padding-left: 0;
    padding-block: 0;
  }

  .product-list-table td[data-label='Last Reply:']::before {
    width: 130px;
  }

  .product-list-table .product-table-description:before {
    content: '';
    display: none;
  }

  .product-cell-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .product-table-image {
    margin-bottom: 0.5rem;
    width: 100%;
    height: unset;
    min-height: 280px;
    flex-shrink: 0;
  }

  .last-post-cell {
    width: auto;
    min-width: 100%;
    text-align: left;
    margin-top: 5px;
    display: block;
  }

  .last-post-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
  }

  .avatar-placeholder {
    margin-right: 10px;
    margin-left: 0;
    order: 1;
    font-size: 0.8em;
  }

  .post-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    line-height: 1.3;
    align-items: flex-start;
    order: 2;
  }

  .last-post-name {
    font-size: 0.85em;
  }

  .last-post-time {
    font-size: 0.75em;
  }

  .product-table-threads,
  .product-table-posts {
    display: inline-block;
    width: calc(50% - 15px);
    min-width: auto;
    text-align: left;
    margin-top: 5px;
    font-size: 0.9em;
    box-sizing: border-box;
    border-bottom: none;
    vertical-align: top;
    padding-left: 15px;
  }

  .product-table-threads {
    margin-right: 15px;
  }

  .skeleton-row td:first-child > div {
    flex-direction: column;
    height: 100%;
  }

  .skeleton-row td:first-child > div::before {
    width: 100%;
    height: 300px;
    flex-shrink: 1;
    margin: 0;
  }

  .skeleton-row td:first-child > div > span {
    width: 100%;
    margin-top: 1rem;
  }

  .skeleton-row td.skeleton-last-post > div::before {
    width: 2.5rem;
    height: 2.5rem;
  }
}
