.etsy-listing-link {
  color: #245fbd;
  font-weight: 600;
  text-decoration: none;
}

.etsy-listing-link:hover,
.etsy-listing-link:focus-visible {
  color: #174b9f;
  text-decoration: underline;
}

.etsy-open {
  display: inline-flex;
  align-items: center;
  height: 30px;
  margin-right: 6px;
  color: #245fbd;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.etsy-open:hover,
.etsy-open:focus-visible {
  border-color: #245fbd;
  background: #f2f6ff;
  outline: none;
}

.etsy-listing-page {
  max-width: 1540px;
}

.etsy-listing-page .listing-head {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.listing-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.listing-intro h3 {
  font-size: 25px;
  letter-spacing: -.02em;
}

.listing-intro p {
  margin: 6px 0 0;
  color: #718096;
}

.listing-actions {
  display: flex;
  gap: 9px;
  flex: none;
}

.listing-actions .primary {
  min-width: 164px;
}

.etsy-listing-page .listing-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.etsy-listing-page .listing-metrics .card {
  min-height: 96px;
  padding: 16px 18px;
  border-radius: 12px;
  box-shadow: 0 2px 7px #1c2c4212;
}

.etsy-listing-page .listing-metrics .card h4 {
  color: #68778e;
  font-size: 13px;
  font-weight: 600;
}

.etsy-listing-page .listing-metrics .metric {
  margin-top: 9px;
  font-size: 26px;
}

.etsy-listing-page .listing-tabs {
  margin: 0 0 14px;
}

.etsy-listing-page .listing-tabs button {
  height: 38px;
  padding: 0 13px;
  font-weight: 600;
}

.etsy-listing-page .etsy-tools {
  gap: 9px;
  margin-bottom: 14px;
}

.etsy-listing-page .etsy-tools input {
  width: min(320px, 100%);
}

.etsy-listing-page .etsy-tools select {
  min-width: 178px;
}

.etsy-listing-page .etsy-tools span {
  color: #6d7786;
  font-size: 13px;
}

.etsy-clear {
  height: 38px !important;
  border: 0 !important;
  color: #466eaa;
  font-size: 13px !important;
}

.etsy-table-wrap {
  border-radius: 12px;
  background: #fff;
}

.etsy-table {
  min-width: 900px;
  table-layout: fixed;
}

.etsy-table .etsy-col-image { width: 82px; }
.etsy-table .etsy-col-listing { width: auto; }
.etsy-table .etsy-col-sku { width: 178px; }
.etsy-table .etsy-col-shop { width: 150px; }
.etsy-table .etsy-col-price { width: 110px; }
.etsy-table .etsy-col-actions { width: 174px; }

.etsy-table th {
  height: 50px;
  color: #66758b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  text-align: left;
}

/* Override the shared table defaults so the listing column gets the remaining width. */
.etsy-table th:first-child { width: 82px; }
.etsy-table th:nth-child(2) { width: auto; }
.etsy-table th:nth-child(3) { width: 178px; }
.etsy-table th:nth-child(4) { width: 150px; }
.etsy-table th:nth-child(5) { width: 110px; }
.etsy-table th:nth-child(6) { width: 174px; }

.etsy-table th:first-child,
.etsy-table td:first-child {
  text-align: center;
}

.etsy-table td {
  height: 88px;
  padding: 10px 14px;
  text-align: left;
}

.etsy-table .etsy-thumb {
  width: 42px;
  height: 52px;
  border-radius: 10px;
  font-size: 23px;
}

.etsy-table .listing-title {
  max-width: none;
}

.etsy-title-cell {
  min-width: 0;
}

.etsy-listing-link {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.etsy-title-cell small,
.etsy-shop-code {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #8a96a8;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.etsy-sku {
  display: inline-block;
  max-width: 145px;
  overflow: hidden;
  color: #465468;
  font-family: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-badge {
  display: inline-block;
  max-width: 122px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.etsy-open {
  justify-content: center;
  min-width: 96px;
  margin: 0;
  padding: 0 9px;
  border-color: #b8c9e7;
  border-radius: 7px;
  background: #f7faff;
}

.etsy-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px 3px;
  color: #798596;
  font-size: 13px;
}

.etsy-pagination > div {
  display: flex;
  gap: 5px;
}

.etsy-page {
  display: inline-grid;
  width: 34px;
  height: 34px !important;
  padding: 0 !important;
  place-items: center;
  border: 1px solid #dce4ef !important;
  border-radius: 7px !important;
  color: #53657c;
  background: #fff;
}

.etsy-page.current {
  border-color: #2f73e8 !important;
  color: #1f63d7;
  background: #f7faff;
}

.etsy-page:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.etsy-page-gap {
  display: inline-grid;
  width: 18px;
  place-items: center;
}

.etsy-listing-page .listing-metrics.listing-metrics-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.listing-metric small {
  display: block;
  margin-top: 4px;
  color: #8a96a8;
  font-size: 10px;
  line-height: 1.25;
}

.etsy-thumb-photo {
  overflow: hidden;
  padding: 0;
  background: #eef2f6;
}

.etsy-thumb-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.etsy-image-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: linear-gradient(135deg, #efe2cf, #c89a61);
  color: #fff;
}

.etsy-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.etsy-row-actions .detail-etsy {
  justify-content: center;
  min-width: 62px;
  margin: 0;
}

.etsy-row-actions .etsy-open {
  min-width: 94px;
}

.etsy-detail {
  cursor: pointer;
  color: #466eaa;
}

.etsy-detail:hover,
.etsy-detail:focus-visible {
  border-color: #245fbd;
  background: #f2f6ff;
  outline: none;
}

.etsy-detail-modal {
  width: min(760px, 94vw);
  max-height: min(760px, 88vh);
  overflow: auto;
}

.etsy-detail-dialog header {
  margin-bottom: 18px;
}

.etsy-detail-dialog h3 {
  margin-top: 3px;
}

.etsy-detail-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  background: #f9fbfd;
}

.etsy-detail-image {
  width: 92px;
  height: 116px;
  overflow: hidden;
  flex: none;
}

.etsy-detail-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.etsy-detail-summary h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.etsy-detail-summary p {
  margin: 7px 0 12px;
  color: #758196;
}

.etsy-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0 0;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  overflow: hidden;
}

.etsy-detail-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #e5eaf2;
  border-bottom: 1px solid #e5eaf2;
}

.etsy-detail-grid > div:nth-child(2n) { border-right: 0; }
.etsy-detail-grid > div:nth-last-child(-n + 2) { border-bottom: 0; }

.etsy-detail-grid dt {
  margin-bottom: 5px;
  color: #7d899a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.etsy-detail-grid dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.45;
}

.etsy-detail-grid dd code {
  color: #43546b;
  font-size: 12px;
}

.etsy-detail-dialog menu { margin-bottom: 0; }

@media (max-width: 960px) {
  .etsy-listing-page .listing-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etsy-listing-page .listing-metrics.listing-metrics-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etsy-listing-page .listing-head { align-items: flex-start; }
}

@media (max-width: 640px) {
  .etsy-listing-page .listing-head,
  .etsy-listing-page .etsy-tools,
  .etsy-pagination { align-items: stretch; flex-direction: column; }
  .listing-actions .primary { width: 100%; }
  .etsy-listing-page .etsy-tools input,
  .etsy-listing-page .etsy-tools select { width: 100%; }
  .etsy-listing-page .etsy-tools span { margin-left: 0; }
  .etsy-pagination > div { justify-content: center; }
  .etsy-detail-grid { grid-template-columns: 1fr; }
  .etsy-detail-grid > div { border-right: 0; }
  .etsy-detail-grid > div:nth-last-child(-n + 2) { border-bottom: 1px solid #e5eaf2; }
  .etsy-detail-grid > div:last-child { border-bottom: 0; }
}
