:root {
  --red: #d9272e;
  --red-dark: #ac151c;
  --red-soft: #fff0f0;
  --red-pale: #fff8f6;
  --ink: #1f2024;
  --muted: #6e7178;
  --line: #e8e5e3;
  --surface: #ffffff;
  --canvas: #f7f6f4;
  --shadow: 0 12px 38px rgba(48, 32, 27, 0.1);
  --header-height: 72px;
  --sidebar-width: 318px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", "Helvetica Neue",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
}

.brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--red);
  box-shadow: 0 5px 12px rgba(217, 39, 46, 0.23);
}

.ear {
  position: absolute;
  z-index: -1;
  top: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #202124;
}

.ear-left {
  left: 1px;
}

.ear-right {
  right: 1px;
}

.panda-face {
  margin-top: -2px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  color: var(--red);
  font-size: 21px;
  letter-spacing: 0.5px;
}

.brand-copy small {
  margin-top: 6px;
  color: #7c7774;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.main-nav {
  height: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.nav-item {
  position: relative;
  min-width: 106px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  color: #65676c;
  background: transparent;
  font-size: 15px;
  cursor: pointer;
}

.nav-item::after {
  position: absolute;
  right: 20px;
  bottom: 0;
  left: 20px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--red);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: 0.2s ease;
}

.nav-item:hover {
  color: var(--red);
  background: linear-gradient(transparent 75%, var(--red-pale));
}

.nav-item.active {
  color: var(--red);
  font-weight: 650;
}

.nav-item.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.round-action,
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #f2f1ef;
  cursor: pointer;
  transition: 0.2s ease;
  color: inherit;
  text-decoration: none;
}

.round-action:hover,
.icon-button:hover {
  color: var(--red);
  background: var(--red-soft);
}

.notification {
  position: relative;
}

.notification > span {
  position: absolute;
  top: 6px;
  right: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--red);
}

.login-button,
.create-listing-button,
.modal-submit {
  border: 0;
  border-radius: 9px;
  color: white;
  background: var(--red);
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(217, 39, 46, 0.16);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.login-button {
  height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  text-decoration: none;
}

.login-button:hover,
.create-listing-button:hover,
.modal-submit:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.auth-slot {
  position: relative;
  min-width: 0;
}

.user-menu {
  position: relative;
}

.user-trigger {
  height: 45px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 8px 3px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.user-trigger:hover,
.user-trigger[aria-expanded="true"] {
  border-color: #eadfdb;
  background: #f7f4f2;
}

.user-trigger img {
  width: 38px;
  height: 38px;
  display: block;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--red-soft);
  box-shadow: 0 0 0 1px #e8dfdc;
}

.user-trigger-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.user-trigger-copy strong {
  max-width: 112px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-trigger-copy small {
  margin-top: 3px;
  color: #8f8a86;
  font-size: 9px;
}

.user-trigger > svg {
  width: 13px;
  height: 13px;
  color: #99938f;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.user-trigger[aria-expanded="true"] > svg {
  transform: rotate(-90deg);
}

.profile-dropdown {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  width: 245px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  box-shadow: 0 16px 40px rgba(48, 32, 27, 0.16);
  animation: dropdown-in 0.18s ease-out;
}

.profile-dropdown[hidden] {
  display: none;
}

@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
}

.profile-summary {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 8px 13px;
  border-bottom: 1px solid var(--line);
}

.profile-summary img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.profile-summary strong,
.profile-summary span {
  display: block;
}

.profile-summary strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.profile-summary span {
  color: #8c8783;
  font-size: 10px;
}

.profile-menu-button {
  width: 100%;
  height: 39px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.profile-menu-button:hover {
  background: #f5f2f0;
}

.profile-menu-button svg {
  width: 17px;
  height: 17px;
}

.profile-menu-button.logout {
  color: var(--red-dark);
}

.page-shell {
  min-height: 100vh;
  padding-top: var(--header-height);
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  padding: 25px 18px 28px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: #c9c7c5 transparent;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sidebar-heading h1 {
  margin: 3px 0 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.4px;
}

.eyebrow,
.content-kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.search-box {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #7c7c81;
  background: #f3f2f1;
  transition: 0.2s ease;
}

.search-box:focus-within {
  border-color: #efb8b8;
  background: white;
  box-shadow: 0 0 0 4px var(--red-soft);
}

.search-box svg {
  width: 18px;
  height: 18px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #88888d;
}

.search-box kbd {
  padding: 3px 6px;
  border: 1px solid #dedbd8;
  border-radius: 5px;
  color: #96928f;
  background: #fff;
  font-family: inherit;
  font-size: 10px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.sidebar-primary {
  display: grid;
  gap: 4px;
}

.side-link,
.category-link,
.location-row {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.side-link {
  min-height: 49px;
  display: grid;
  grid-template-columns: 38px 1fr 18px;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 11px;
  text-align: left;
  font-weight: 600;
}

.side-link:hover,
.side-link.active {
  background: var(--red-soft);
}

.side-link.active {
  color: var(--red-dark);
}

.side-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eeecea;
}

.side-link.active .side-icon {
  color: white;
  background: var(--red);
}

.chevron {
  width: 15px;
  height: 15px;
  color: #a8a5a2;
}

.create-listing-button {
  width: 100%;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 17px;
  border-radius: 10px;
  color: var(--red-dark);
  background: var(--red-soft);
  box-shadow: none;
}

.create-listing-button:hover {
  color: white;
}

.create-listing-button svg {
  width: 18px;
}

.sidebar-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0 0 10px;
  color: #74716e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.location-row {
  display: flex;
  justify-content: space-between;
  padding: 0;
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 600;
}

.location-row span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.location-row span:last-child {
  color: #8a8581;
  font-weight: 400;
}

.location-row svg {
  width: 16px;
  height: 16px;
}

.type-select select {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font-weight: 650;
  cursor: pointer;
  appearance: none;
}

.location-permission-card {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns: 36px 1fr 16px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #efdedb;
  border-radius: 11px;
  color: var(--red-dark);
  background: var(--red-pale);
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.location-permission-card:hover {
  border-color: #e6a9a8;
  background: var(--red-soft);
}

.location-permission-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--red);
}

.location-permission-icon svg {
  width: 17px;
  height: 17px;
}

.location-permission-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.location-permission-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-permission-copy small {
  overflow: hidden;
  color: #89827e;
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-permission-card.is-active .location-permission-icon {
  background: #2f9b58;
}

.location-permission-card.is-denied .location-permission-icon {
  color: #77716d;
  background: #e6e2df;
}

.categories {
  padding-bottom: 9px;
}

.category-link {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  border-radius: 10px;
  text-align: left;
  font-size: 14px;
  font-weight: 550;
}

.category-link:hover,
.category-link.active {
  color: var(--red-dark);
  background: var(--red-soft);
}

.category-emoji {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1efed;
  font-size: 16px;
  filter: saturate(0.8);
}

.category-link.active .category-emoji {
  background: white;
  box-shadow: 0 2px 8px rgba(77, 33, 33, 0.09);
}

.sidebar-footer {
  padding: 10px 3px 0;
  color: #9a9692;
  font-size: 11px;
  line-height: 1.7;
}

.sidebar-footer a {
  color: inherit;
  text-decoration: none;
}

.sidebar-footer a:hover {
  color: var(--red);
}

.sidebar-footer p {
  margin: 2px 0 0;
}

.market-content {
  min-width: 0;
  margin-left: var(--sidebar-width);
  padding: 24px 27px 54px;
}

.welcome-banner {
  position: relative;
  min-height: 156px;
  display: flex;
  align-items: center;
  padding: 30px 38px;
  overflow: hidden;
  border-radius: 18px;
  color: white;
  background:
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.14), transparent 19%),
    linear-gradient(115deg, #941219 0%, #cd2028 52%, #ee5e54 100%);
  box-shadow: 0 15px 35px rgba(155, 27, 31, 0.16);
}

.welcome-banner::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(30deg, transparent 48%, rgba(255, 255, 255, 0.035) 50%, transparent 52%),
    linear-gradient(-30deg, transparent 48%, rgba(255, 255, 255, 0.035) 50%, transparent 52%);
  background-size: 28px 28px;
  content: "";
}

.banner-copy {
  position: relative;
  z-index: 2;
}

.banner-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.banner-copy h2 {
  margin: 13px 0 5px;
  font-size: clamp(23px, 2vw, 31px);
  letter-spacing: 0.5px;
}

.banner-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.banner-art {
  position: absolute;
  top: 0;
  right: 0;
  width: 39%;
  height: 100%;
}

.mini-panda {
  position: absolute;
  right: 80px;
  bottom: -16px;
  width: 130px;
  height: 118px;
  display: grid;
  place-items: center;
  border-radius: 60px 60px 14px 14px;
  color: #252525;
  background: #fffaf4;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 6px;
  box-shadow: inset 0 -15px 25px rgba(120, 33, 33, 0.06);
  transform: rotate(-3deg);
}

.mini-panda::before,
.mini-panda::after {
  position: absolute;
  top: -10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #272727;
  content: "";
}

.mini-panda::before {
  left: 4px;
}

.mini-panda::after {
  right: 4px;
}

.lantern {
  position: absolute;
  top: -8px;
  width: 30px;
  height: 40px;
  border-radius: 9px;
  background: #ffbf77;
  box-shadow: inset 0 0 0 3px rgba(164, 38, 29, 0.25);
}

.lantern::before {
  position: absolute;
  top: -26px;
  left: 14px;
  width: 1px;
  height: 27px;
  background: rgba(255, 255, 255, 0.65);
  content: "";
}

.lantern::after {
  position: absolute;
  right: 8px;
  bottom: -12px;
  left: 8px;
  height: 13px;
  border-right: 2px solid #ffbf77;
  border-left: 2px solid #ffbf77;
  content: "";
}

.lantern-one {
  right: 35px;
  transform: scale(0.9);
}

.lantern-two {
  top: -18px;
  right: 252px;
  transform: scale(0.65);
}

.bamboo {
  position: absolute;
  right: 230px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.1);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 115px;
  font-weight: 900;
  transform: rotate(-8deg);
}

.market-section {
  padding-top: 29px;
}

.content-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.content-kicker {
  margin: 0 0 4px;
}

.content-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.3px;
}

.location-pill {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #686461;
  background: white;
  font-size: 12px;
  cursor: pointer;
}

.location-pill:hover {
  border-color: #efbfc1;
  color: var(--red);
}

.location-pill svg {
  width: 15px;
  height: 15px;
}

.location-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9b4b0;
}

.location-pill.is-active {
  border-color: #b9dec5;
  color: #247b43;
  background: #f2fbf5;
}

.location-pill.is-active .location-status-dot {
  background: #35a85e;
  box-shadow: 0 0 0 3px rgba(53, 168, 94, 0.13);
}

.location-pill.is-requesting .location-status-dot {
  background: var(--red);
  animation: location-pulse 1s infinite;
}

.location-pill.is-denied .location-status-dot {
  background: #9a9591;
}

@keyframes location-pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.72);
  }
}

.sort-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 19px;
}

.quick-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  height: 34px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid #e2dedb;
  border-radius: 999px;
  color: #706d69;
  background: white;
  font-size: 13px;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--red);
  color: var(--red-dark);
  background: var(--red-soft);
  font-weight: 600;
}

.type-select {
  position: relative;
  height: 35px;
  min-width: 156px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 30px 0 11px;
  border: 1px solid #e2dedb;
  border-radius: 9px;
  color: #65615e;
  background: white;
  font-size: 12px;
}

.type-select > span {
  flex: 0 0 auto;
  color: #9a9591;
  font-size: 10px;
}

.type-select select {
  width: 76px;
  font-size: 12px;
}

.type-select .chevron {
  position: absolute;
  top: 10px;
  right: 9px;
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
  pointer-events: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px 14px;
}

.product-card {
  min-width: 0;
  animation: card-in 0.42s both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.product-card-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.product-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  background: #e5e1de;
  aspect-ratio: 1 / 0.88;
  box-shadow: 0 3px 12px rgba(57, 45, 40, 0.07);
}

.product-image-wrap::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 70%, rgba(0, 0, 0, 0.06));
  content: "";
  pointer-events: none;
}

.product-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.product-card-button:hover .product-image {
  transform: scale(1.035);
}

.favorite-button {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #363638;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.13);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: 0.2s ease;
}

.product-image-wrap:hover .favorite-button,
.favorite-button.saved {
  opacity: 1;
  transform: translateY(0);
}

.favorite-button:hover,
.favorite-button.saved {
  color: var(--red);
}

.favorite-button.saved svg {
  fill: currentColor;
}

.free-badge,
.condition-badge {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(29, 29, 31, 0.72);
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(5px);
}

.free-badge {
  color: var(--red-dark);
  background: rgba(255, 255, 255, 0.94);
}

.product-info {
  padding: 10px 2px 0;
}

.price-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.product-price {
  margin: 0;
  color: #171719;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.2px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #918b86;
  font-size: 9px;
}

.verified-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #58a66c;
  content: "";
}

.product-title {
  margin: 4px 0 4px;
  overflow: hidden;
  color: #313136;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  overflow: hidden;
  color: #898681;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-location svg {
  width: 12px;
  height: 12px;
}

.product-distance {
  color: var(--red-dark);
  font-weight: 600;
}

.loading-card {
  pointer-events: none;
}

.loading-card .product-image-wrap,
.loading-line {
  overflow: hidden;
  background: #ebe8e5;
}

.loading-card .product-image-wrap::before,
.loading-line::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.65) 50%,
    transparent 80%
  );
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.25s infinite;
}

.loading-line {
  position: relative;
  height: 13px;
  margin-top: 10px;
  border-radius: 5px;
}

.loading-line.short {
  width: 62%;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.empty-state {
  padding: 75px 20px;
  text-align: center;
}

.empty-state > span {
  display: block;
  margin-bottom: 10px;
  font-size: 46px;
  filter: grayscale(0.7);
}

.empty-state h3 {
  margin: 0 0 7px;
}

.empty-state p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state button {
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--red);
  cursor: pointer;
}

.detail-view {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(390px, 0.92fr);
  background: #111;
  animation: detail-in 0.25s ease-out;
}

.detail-view[hidden] {
  display: none;
}

@keyframes detail-in {
  from {
    opacity: 0;
  }
}

.detail-gallery {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #171717;
}

.gallery-backdrop {
  position: absolute;
  inset: -24px;
  background-position: center;
  background-size: cover;
  filter: blur(28px) brightness(0.36);
  transform: scale(1.08);
}

.detail-gallery > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.detail-close {
  position: absolute;
  z-index: 5;
  top: 22px;
  left: 22px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #1f1f22;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.detail-close:hover {
  color: white;
  background: var(--red);
}

.gallery-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #29292b;
  background: rgba(255, 255, 255, 0.91);
  cursor: pointer;
  transform: translateY(-50%);
}

.gallery-arrow.left {
  left: 20px;
}

.gallery-arrow.right {
  right: 20px;
}

.gallery-arrow.right svg {
  transform: rotate(180deg);
}

.photo-count {
  position: absolute;
  z-index: 5;
  right: 20px;
  bottom: 19px;
  padding: 6px 11px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.58);
  font-size: 11px;
}

.detail-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: white;
}

.detail-scroll {
  height: 100%;
  padding: 31px 29px 115px;
  overflow-y: auto;
}

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

.detail-tag {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 5px;
  color: var(--red-dark);
  background: var(--red-soft);
  font-size: 11px;
  font-weight: 650;
}

.more-button {
  border: 0;
  color: #76716f;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.detail-panel h2 {
  margin: 13px 0 6px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.detail-price {
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 780;
}

.detail-meta {
  margin: 0;
  color: #84807c;
  font-size: 12px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin: 22px 0;
}

.primary-action,
.secondary-action {
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  font-weight: 650;
  cursor: pointer;
}

.primary-action {
  color: white;
  background: var(--red);
}

.primary-action:hover {
  background: var(--red-dark);
}

.secondary-action {
  min-width: 45px;
  padding: 0 12px;
  background: #efedeb;
}

.secondary-action:hover,
.secondary-action.saved {
  color: var(--red-dark);
  background: var(--red-soft);
}

.secondary-action.saved svg {
  fill: currentColor;
}

.seller-card {
  display: grid;
  grid-template-columns: 44px 1fr 18px;
  align-items: center;
  gap: 11px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.seller-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #dc2f35, #90141b);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
  font-weight: 700;
}

.seller-card p {
  margin: 0 0 4px;
  font-size: 13px;
}

.seller-card span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #85817d;
  font-size: 10px;
}

.seller-card i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ca362;
}

.seller-card > svg {
  width: 16px;
  color: #aaa6a2;
}

.detail-section {
  padding: 22px 0 19px;
  border-bottom: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 20px;
  margin: 0;
}

.detail-specs div {
  min-width: 0;
}

.detail-specs dt {
  margin-bottom: 4px;
  color: #8a8682;
  font-size: 10px;
}

.detail-specs dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.description {
  margin: 0;
  color: #46464b;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-line;
}

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

.map-title span {
  color: #999590;
  font-size: 10px;
}

.map-card {
  position: relative;
  height: 120px;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(25deg, transparent 32%, #d8d5ca 33%, #d8d5ca 35%, transparent 36%),
    linear-gradient(-12deg, transparent 55%, #e1ded4 56%, #e1ded4 58%, transparent 59%),
    #e8eddf;
}

.map-water {
  position: absolute;
  top: -30px;
  left: -12px;
  width: 33%;
  height: 180px;
  border-radius: 50%;
  background: #a8d9e8;
  transform: rotate(10deg);
}

.map-road {
  position: absolute;
  width: 130%;
  height: 5px;
  border: 1px solid white;
  background: #d4cfc3;
}

.road-a {
  top: 55px;
  left: -20px;
  transform: rotate(-6deg);
}

.road-b {
  top: 50px;
  left: 45px;
  transform: rotate(64deg);
}

.road-c {
  top: 90px;
  left: 75px;
  transform: rotate(16deg);
}

.map-pin {
  position: absolute;
  top: 50%;
  left: 58%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 8px solid rgba(217, 39, 46, 0.14);
  border-radius: 50%;
  color: var(--red);
  background: white;
  transform: translate(-50%, -50%);
}

.map-pin svg {
  width: 18px;
}

.map-location {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 9px 0 0;
  color: #706c68;
  font-size: 11px;
}

.map-location svg {
  width: 14px;
  color: var(--red);
}

.safety-note {
  display: flex;
  gap: 9px;
  margin-top: 18px;
  padding: 13px;
  border-radius: 10px;
  background: #f7f5f1;
}

.safety-note strong {
  font-size: 12px;
}

.safety-note p {
  margin: 4px 0 0;
  color: #7e7a76;
  font-size: 10px;
}

.sticky-message {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px 29px 23px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
}

.sticky-message button {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--red);
  font-weight: 700;
  cursor: pointer;
}

.modal-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(28, 22, 20, 0.52);
  backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
  display: none;
}

.form-modal {
  position: relative;
  width: min(430px, 100%);
  padding: 34px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 25px 80px rgba(26, 13, 10, 0.27);
  animation: modal-in 0.25s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f0eeec;
  cursor: pointer;
}

.modal-icon {
  margin-bottom: 12px;
  font-size: 35px;
}

.form-modal h2 {
  margin: 0 0 7px;
  font-size: 22px;
}

.form-modal > p {
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 13px;
}

.form-modal form {
  display: grid;
  gap: 15px;
}

.form-modal label > span {
  display: block;
  margin-bottom: 7px;
  color: #4f4d4a;
  font-size: 12px;
  font-weight: 600;
}

.form-modal input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dcd8d5;
  border-radius: 8px;
  outline: 0;
}

.form-modal input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.code-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.code-input button {
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  color: var(--red-dark);
  background: var(--red-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.modal-submit {
  height: 45px;
  margin-top: 4px;
}

.toast {
  position: fixed;
  z-index: 300;
  bottom: 25px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: 9px;
  color: white;
  background: rgba(35, 34, 34, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: 0.24s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast svg {
  width: 16px;
  height: 16px;
  color: #70d889;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 282px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

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

  .welcome-banner {
    padding-left: 29px;
  }

  .banner-art {
    width: 34%;
  }

  .mini-panda {
    right: 30px;
  }

  .lantern-two,
  .bamboo {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 64px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }

  .main-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    height: 62px;
    justify-content: space-around;
    gap: 0;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-item {
    min-width: 88px;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
  }

  .nav-item::after {
    top: 0;
    bottom: auto;
  }

  .round-action {
    display: none;
  }

  .login-button {
    height: 37px;
    padding: 0 13px;
    font-size: 12px;
  }

  .user-trigger-copy,
  .user-trigger > svg {
    display: none;
  }

  .user-trigger {
    width: 42px;
    height: 42px;
    padding: 2px;
  }

  .profile-dropdown {
    position: fixed;
    top: 58px;
    right: 12px;
  }

  .sidebar {
    display: none;
  }

  .market-content {
    margin-left: 0;
    padding: 17px 16px 45px;
  }

  .detail-view {
    grid-template-columns: 1fr;
    overflow-y: auto;
    background: white;
  }

  .detail-gallery {
    min-height: 58vh;
  }

  .detail-panel {
    overflow: visible;
  }

  .detail-scroll {
    height: auto;
    padding-bottom: 105px;
    overflow: visible;
  }

  .sticky-message {
    position: fixed;
  }
}

@media (max-width: 640px) {
  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
  }

  .welcome-banner {
    min-height: 143px;
    padding: 24px 20px;
  }

  .banner-copy {
    max-width: 76%;
  }

  .banner-copy h2 {
    font-size: 21px;
  }

  .banner-copy p {
    max-width: 210px;
    font-size: 12px;
    line-height: 1.5;
  }

  .banner-art {
    width: 34%;
  }

  .mini-panda {
    right: -25px;
    width: 110px;
    height: 105px;
    opacity: 0.92;
  }

  .lantern {
    display: none;
  }

  .content-heading {
    align-items: center;
  }

  .content-heading h2 {
    font-size: 22px;
  }

  .location-pill {
    max-width: 145px;
    padding-right: 8px;
  }

  .location-pill span:first-of-type {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 10px;
  }

  .sort-row {
    display: block;
  }

  .quick-filters {
    margin-bottom: 10px;
  }

  .type-select {
    width: 100%;
  }

  .product-image-wrap {
    border-radius: 10px;
    aspect-ratio: 1 / 0.95;
  }

  .favorite-button {
    opacity: 1;
    transform: none;
  }

  .product-price {
    font-size: 15px;
  }

  .product-title {
    font-size: 13px;
  }

  .detail-gallery {
    min-height: 48vh;
    max-height: 55vh;
  }

  .detail-close {
    top: 14px;
    left: 14px;
    width: 40px;
    height: 40px;
  }

  .gallery-arrow {
    display: none;
  }

  .detail-scroll {
    padding: 23px 19px 100px;
  }

  .detail-panel h2 {
    font-size: 22px;
  }

  .detail-actions {
    grid-template-columns: 1fr 45px 45px;
  }

  .secondary-action {
    min-width: 0;
    padding: 0;
  }

  .secondary-action span {
    display: none;
  }

  .sticky-message {
    padding: 12px 18px 15px;
  }

  .form-modal {
    padding: 30px 22px;
  }
}
