:root {
  --green: #07834f;
  --green-dark: #05663e;
  --green-light: #e9f7ef;
  --ink: #17211c;
  --muted: #6b7770;
  --border: #e8ece9;
  --surface: #ffffff;
  --page: #f7f9f8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--page);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.top-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-main {
  max-width: 1440px;
  margin: auto;
  min-height: 76px;
  padding: 12px 4%;
  display: flex;
  align-items: center;
  gap: 25px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.logo > span:last-child > span {
  color: var(--green);
}

.logo-mark {
  width: 37px;
  height: 37px;
  background: var(--green);
  color: white;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.location-button {
  border: 0;
  background: transparent;
  color: #36443b;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.location-button > i:first-child {
  color: var(--green);
}

.small-chevron {
  font-size: 9px;
  color: #87928b;
}

.search-box {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  background: #f5f7f6;
  border: 1px solid #e6ebe7;
  border-radius: 9px;
  padding-left: 14px;
  overflow: hidden;
}

.search-box > i {
  color: #7c8981;
  font-size: 14px;
}

.search-box input {
  min-width: 50px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  font-size: 12px;
}

.search-box select {
  border: 0;
  border-left: 1px solid #e1e7e2;
  outline: 0;
  background: transparent;
  color: #526057;
  padding: 0 10px;
  height: 100%;
  font-size: 11px;
}

.search-box button {
  height: 100%;
  border: 0;
  background: var(--green);
  color: white;
  padding: 0 19px;
  font-size: 12px;
  font-weight: 700;
}

.search-box button:hover,
.sell-button:hover {
  background: var(--green-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-button {
  border: 0;
  background: transparent;
  color: #4c5a51;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 17px;
}

.action-label {
  font-size: 9px;
  font-weight: 600;
}

.sell-button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  padding: 12px 17px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-search {
  display: none;
}

.category-nav {
  max-width: 1440px;
  margin: auto;
  padding: 0 4%;
  height: 45px;
  display: flex;
  align-items: center;
  gap: 27px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-link {
  height: 100%;
  flex-shrink: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #68756d;
  font-size: 11px;
  font-weight: 600;
}

.category-link:hover,
.category-link.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

main {
  max-width: 1440px;
  margin: auto;
  padding: 25px 4% 50px;
}

.welcome-strip {
  min-height: 170px;
  border-radius: 13px;
  padding: 28px 36px;
  background: linear-gradient(110deg, #e9f7ef, #f4faf5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.eyebrow {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  margin-bottom: 10px;
}

.welcome-strip h1 {
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -1.2px;
  margin-bottom: 9px;
}

.welcome-strip h1 span {
  color: var(--green);
}

.welcome-strip p:last-child {
  color: #617168;
  font-size: 12px;
}

.welcome-icon {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #d5efdf;
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 42px;
  margin-right: 5%;
}

.quick-categories {
  margin-top: 32px;
}

.section-heading h2,
.listings-heading h2 {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.4px;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 13px;
  margin-top: 16px;
}

.category-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  min-height: 105px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #3d4b42;
  font-size: 11px;
  font-weight: 650;
  transition: .2s;
}

.category-card:hover {
  border-color: #9ed7b6;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px #183c2810;
}

.category-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 17px;
}

.electronics-icon { background: #e8f0ff; color: #3971c8; }
.fashion-icon { background: #fff0f4; color: #d85b84; }
.hostel-icon { background: #fff4e6; color: #c27b28; }
.books-icon { background: #f0ebff; color: #7855c7; }
.food-icon { background: #e8f8e9; color: #3b984b; }
.services-icon { background: #e9f5f5; color: #348c8c; }

.listings-section {
  margin-top: 38px;
}

.listings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.listings-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.sort-area {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #748078;
  font-size: 11px;
}

.sort-area select {
  border: 1px solid var(--border);
  background: white;
  border-radius: 7px;
  padding: 9px;
  color: #35443a;
  outline: 0;
  font-size: 11px;
}

.active-filters {
  display: flex;
  gap: 7px;
  margin-top: 13px;
}

.filter-chip {
  border: 1px solid #b6dfc5;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 650;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-top: 18px;
}

.product-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px #1b332511;
}

.product-image-wrap {
  height: 185px;
  position: relative;
  background: #edf1ee;
  overflow: hidden;
}

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

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

.product-condition {
  position: absolute;
  left: 9px;
  top: 9px;
  background: #ffffffed;
  color: #526158;
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 9px;
  font-weight: 700;
}

.favorite-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #ffffffed;
  color: #59665e;
  font-size: 14px;
}

.favorite-button.saved {
  color: #e34d66;
}

.product-info {
  padding: 12px;
}

.product-price {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: #17231b;
}

.product-title {
  margin-top: 6px;
  color: #48554c;
  font-size: 11px;
  line-height: 1.5;
  min-height: 32px;
  font-weight: 500;
}

.product-location {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: #89938d;
  font-size: 9px;
}

.product-location i {
  color: var(--green);
}

.empty-state {
  padding: 60px 15px;
  text-align: center;
  color: #7b8980;
}

.empty-state > i {
  font-size: 30px;
  margin-bottom: 15px;
}

.empty-state h3 {
  color: var(--ink);
  margin-bottom: 7px;
}

.empty-state p {
  font-size: 12px;
}

.empty-state button {
  margin-top: 17px;
  border: 0;
  border-radius: 7px;
  background: var(--green);
  color: white;
  padding: 10px 17px;
  font-size: 11px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.sell-banner {
  margin-top: 45px;
  background: #14251b;
  color: white;
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.sell-banner .eyebrow {
  color: #7ed6a3;
}

.sell-banner h2 {
  font-size: 21px;
  margin-bottom: 8px;
}

.sell-banner p:not(.eyebrow) {
  color: #c1cec5;
  font-size: 11px;
}

.sell-banner button {
  flex-shrink: 0;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--green-dark);
  padding: 13px 18px;
  font-size: 11px;
  font-weight: 750;
}

.footer {
  padding: 28px 4% 90px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: white;
}

.footer-logo {
  justify-content: center;
  font-size: 19px;
}

.footer > p {
  margin-top: 10px;
  font-size: 11px;
  color: #77837b;
}

.footer .copyright {
  font-size: 10px;
  color: #a0aaa3;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #101b16a8;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal {
  position: relative;
  width: min(100%, 470px);
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 13px;
  padding: 27px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: #f0f3f1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #46534a;
}

.modal h2 {
  font-size: 19px;
  margin: 5px 35px 10px 0;
}

.modal p {
  font-size: 12px;
  line-height: 1.6;
  color: #758078;
}

.modal-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.modal-form label {
  font-size: 11px;
  color: #526057;
  font-weight: 650;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  outline: 0;
  font-size: 12px;
  background: white;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  border-color: var(--green);
}

.primary-button {
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 13px;
  background: var(--green);
  color: white;
  font-size: 12px;
  font-weight: 750;
}

.detail-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 9px;
  margin-bottom: 15px;
}

.detail-price {
  font-size: 22px;
  font-weight: 800;
  margin: 10px 0;
}

.toast {
  position: fixed;
  z-index: 150;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #17251c;
  color: white;
  border-radius: 8px;
  padding: 12px 17px;
  font-size: 11px;
  transition: .25s;
  box-shadow: 0 5px 20px #0002;
}

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

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1000px) {
  .header-main {
    gap: 14px;
  }

  .header-actions {
    gap: 11px;
  }

  .location-button {
    display: none;
  }

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

@media (max-width: 700px) {
  .header-main {
    min-height: 58px;
    padding: 9px 4%;
    justify-content: space-between;
  }

  .logo {
    font-size: 19px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .header-main > .search-box,
  .header-main > .location-button {
    display: none;
  }

  .header-actions {
    gap: 15px;
  }

  .header-actions .icon-button {
    font-size: 17px;
  }

  .action-label {
    display: none;
  }

  .header-actions .sell-button {
    padding: 9px 12px;
  }

  .mobile-search {
    margin: 0 4% 10px;
    height: 41px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f7f9f8;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    color: #77847b;
  }

  .mobile-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 12px;
  }

  .mobile-search button {
    border: 0;
    background: transparent;
    color: var(--green);
  }

  .category-nav {
    height: 40px;
    gap: 22px;
    padding: 0 4%;
  }

  main {
    padding: 16px 4% 35px;
  }

  .welcome-strip {
    min-height: 140px;
    padding: 21px 19px;
  }

  .welcome-strip h1 {
    font-size: 23px;
  }

  .welcome-strip p:last-child {
    max-width: 245px;
    line-height: 1.5;
    font-size: 10px;
  }

  .welcome-icon {
    width: 65px;
    height: 65px;
    font-size: 25px;
    flex-shrink: 0;
    margin: 0;
  }

  .quick-categories {
    margin-top: 25px;
  }

  .category-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
  }

  .category-card {
    min-height: 88px;
    font-size: 10px;
  }

  .category-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .listings-section {
    margin-top: 30px;
  }

  .listings-heading h2 {
    font-size: 15px;
  }

  .listings-heading p {
    max-width: 210px;
    font-size: 10px;
    line-height: 1.5;
  }

  .sort-area {
    gap: 4px;
    font-size: 9px;
  }

  .sort-area select {
    max-width: 110px;
    padding: 8px 5px;
    font-size: 9px;
  }

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

  .product-image-wrap {
    height: 145px;
  }

  .product-info {
    padding: 10px;
  }

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

  .product-title {
    font-size: 10px;
    min-height: 30px;
  }

  .product-location {
    font-size: 8px;
  }

  .sell-banner {
    margin-top: 30px;
    padding: 23px 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .sell-banner h2 {
    font-size: 18px;
  }

  .sell-banner button {
    padding: 11px 15px;
  }

  .footer {
    padding-bottom: 100px;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    height: 65px;
    padding: 5px 5% calc(5px + env(safe-area-inset-bottom));
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .bottom-link {
    border: 0;
    background: transparent;
    color: #87928a;
    min-width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 17px;
  }

  .bottom-link span {
    font-size: 9px;
    font-weight: 600;
  }

  .bottom-link.active {
    color: var(--green);
  }

  .bottom-sell {
    width: 43px;
    height: 43px;
    border: 0;
    border-radius: 13px;
    background: var(--green);
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px #07834f40;
  }

  .modal {
    padding: 23px 19px;
  }
}

@media (max-width: 360px) {
  .header-actions {
    gap: 10px;
  }

  .welcome-icon {
    display: none;
  }

  .product-image-wrap {
    height: 125px;
  }
}

/* InMalete listing photo compression and preview */
.listing-image-upload {
  margin: 4px 0 8px;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}
.listing-image-upload > label {
  display: block;
  color: #0f172a;
  margin-bottom: 6px;
}
.listing-image-upload > label span {
  color: #64748b;
  font-weight: 400;
}
.listing-image-upload p {
  color: #64748b;
  font-size: 12px;
  margin: 0 0 10px;
}
.listing-image-upload input[type="file"] {
  width: 100%;
  font-size: 13px;
}
.image-compression-status {
  color: #047857;
  font-size: 12px;
  margin-top: 9px;
}
.listing-image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.listing-photo-preview {
  position: relative;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  overflow: hidden;
  background: white;
}
.listing-photo-preview img {
  display: block;
  width: 100%;
  height: 76px;
  object-fit: cover;
}
.listing-photo-preview span {
  display: block;
  padding: 4px;
  text-align: center;
  font-size: 10px;
  color: #475569;
}
.listing-photo-preview button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 23px;
  height: 23px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, .82);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

/* Enhanced listing creation and local preview */
.listing-dynamic-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.listing-dynamic-fields[hidden] { display:none; }
.listing-specs-title { grid-column:1/-1; margin:4px 0 0; font-weight:700; color:#0f172a; }
.listing-specs-title span { font-size:12px; color:#64748b; font-weight:400; }
.listing-video-label small { display:block; font-size:12px; color:#64748b; margin-top:5px; }
.listing-video-preview { display:block; width:100%; max-height:220px; border-radius:10px; margin-top:10px; background:#0f172a; }
.listing-preview-modal { max-height:75vh; overflow:auto; }
.listing-preview-photos { display:flex; gap:8px; overflow-x:auto; margin:12px 0; }
.listing-preview-photos img { width:100px; height:100px; object-fit:cover; border-radius:9px; flex:0 0 auto; }
.listing-preview-price { font-size:22px; font-weight:800; color:#047857; margin:8px 0; }
.listing-preview-meta { font-size:13px; color:#64748b; margin:8px 0; }
.listing-preview-note { background:#f1f5f9; padding:10px; border-radius:8px; font-size:12px; color:#475569; margin:12px 0; }
.listing-preview-actions { display:flex; gap:8px; margin-top:14px; }
.listing-preview-actions button { flex:1; }
@media(max-width:520px) { .listing-dynamic-fields { grid-template-columns:1fr; } }


/* InMalete listing-management additions */
.my-listings-list{display:grid;gap:12px;margin-top:18px}.my-listing-row{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #e5e7eb;border-radius:12px}.my-listing-row img{width:64px;height:64px;object-fit:cover;border-radius:8px;background:#f1f5f9}.my-listing-details{display:grid;gap:4px;flex:1;min-width:0}.my-listing-details strong{overflow-wrap:anywhere}.my-listing-details small{color:#64748b}.my-listing-actions{display:flex;flex-wrap:wrap;gap:6px}.my-listing-actions button{border:1px solid #d1d5db;background:#fff;border-radius:8px;padding:7px 9px;font-size:12px;cursor:pointer}.my-listing-actions .danger-text{color:#b91c1c}.detail-extra-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.detail-extra-actions button{min-height:42px;padding:10px 14px;border:1px solid #d1d5db;border-radius:10px;background:#fff;color:#334155;cursor:pointer;font-weight:600}.sort-area select{max-width:150px}
@media(max-width:640px){.my-listing-row{align-items:flex-start;flex-wrap:wrap}.my-listing-actions{width:100%}.sort-area{display:flex;flex-wrap:wrap;gap:6px}.sort-area label{font-size:12px}.sort-area select{max-width:120px}.detail-extra-actions button{flex:1}}

/* Account and seller-profile demo */
.account-note,.demo-warning{font-size:12px;line-height:1.55;color:#718078;margin:10px 0 14px}.demo-warning{font-size:10px;background:#fff8e8;border:1px solid #f2e2bd;padding:9px;border-radius:7px}.auth-switch{text-align:center;font-size:12px;margin-top:14px;color:#647168}.auth-switch button{border:0;background:none;color:var(--green);font-weight:750;padding:0 3px}.profile-top{display:flex;align-items:center;gap:14px;margin:8px 0 15px}.profile-top h2{margin:0 0 4px}.profile-avatar{width:68px;height:68px;flex-shrink:0;border-radius:50%;background:linear-gradient(135deg,#d8f2e2,#9bd8b4);color:#087443;display:grid;place-items:center;font-size:22px;font-weight:800}.profile-area{font-size:11px;color:#718078}.profile-badges{display:flex;gap:8px;flex-wrap:wrap}.profile-badges span{font-size:10px;background:#f1f6f2;color:#53635a;padding:6px 9px;border-radius:20px}.profile-bio{font-size:12px;line-height:1.5;color:#58665d;margin:14px 0}.profile-stats{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #e8eee9;border-radius:9px;padding:12px;margin:12px 0}.profile-stats div{text-align:center;display:flex;flex-direction:column;gap:4px}.profile-stats strong{font-size:18px;color:#15251b}.profile-stats span{font-size:10px;color:#7a867e}.profile-menu{display:grid;gap:7px;margin:14px 0}.profile-menu button{display:flex;align-items:center;gap:10px;text-align:left;border:1px solid #e7ece8;background:#fff;border-radius:8px;padding:12px;color:#34443a;font-size:12px;font-weight:600}.profile-menu button:hover{background:#f5faf6}.profile-menu .danger-action{color:#c44747}

/* Live InMalete messaging */
.inmalete-chat-list{display:flex;flex-direction:column;gap:10px;margin:16px 0}
.inmalete-chat-row{display:flex;flex-direction:column;gap:5px;text-align:left;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:14px;cursor:pointer;color:#0f172a}
.inmalete-chat-row strong{font-size:14px}.inmalete-chat-row span{font-size:13px;color:#059669;font-weight:600}.inmalete-chat-row small{font-size:12px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inmalete-chat-thread{height:min(52vh,420px);overflow:auto;display:flex;flex-direction:column;gap:10px;padding:12px;background:#f8fafc;border-radius:12px;margin:12px 0}
.inmalete-chat-bubble{max-width:82%;align-self:flex-start;background:#fff;border:1px solid #e2e8f0;border-radius:14px 14px 14px 4px;padding:10px 12px;overflow-wrap:anywhere}
.inmalete-chat-bubble.mine{align-self:flex-end;background:#dcfce7;border-color:#bbf7d0;border-radius:14px 14px 4px 14px}
.inmalete-chat-bubble p{margin:0;white-space:pre-wrap}.inmalete-chat-bubble small{display:block;margin-top:5px;font-size:10px;color:#64748b}
.inmalete-chat-send{display:flex;gap:8px;margin-bottom:12px}.inmalete-chat-send input{flex:1;min-width:0;border:1px solid #cbd5e1;border-radius:10px;padding:12px}
.inmalete-chat-send button{flex-shrink:0}

/* Listing form upgrade: responsive two-column field groups and clear draft controls */
.listing-extra-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.listing-form-footer{display:flex;gap:10px;align-items:center}
.listing-form-footer .secondary-button{min-height:44px;padding:0 15px}
.listing-form-footer .primary-button{flex:1}
@media(max-width:520px){.listing-extra-grid{grid-template-columns:1fr}.listing-form-footer{flex-direction:column-reverse;align-items:stretch}.listing-form-footer button{width:100%}}


/* Responsive, stable chat layout */
.modal.chat-modal{width:min(100%,760px);padding:clamp(16px,3vw,28px)}
.modal.chat-modal h2{font-size:clamp(20px,3vw,26px)}
.modal.chat-modal .inmalete-chat-list{max-height:68vh;overflow:auto}
.modal.chat-modal .inmalete-chat-row{padding:16px 18px;gap:7px}
.modal.chat-modal .inmalete-chat-row strong{font-size:16px}
.modal.chat-modal .inmalete-chat-row span{font-size:14px}
.modal.chat-modal .inmalete-chat-row small{font-size:13px}
.modal.chat-modal .inmalete-chat-thread{height:clamp(260px,55vh,520px);min-height:260px}
.modal.chat-modal .inmalete-chat-send{display:flex;align-items:stretch;gap:10px}
.modal.chat-modal .inmalete-chat-send input{flex:1;width:0;min-width:0;height:50px;font-size:16px;line-height:1.4;direction:ltr;text-align:left;unicode-bidi:plaintext;writing-mode:horizontal-tb}
.modal.chat-modal .inmalete-chat-send button{width:auto;min-width:86px;min-height:50px;padding:0 18px}
.modal.chat-modal .chat-empty{margin:auto;text-align:center;color:#64748b}
@media(max-width:600px){
  .modal-backdrop{padding:8px}
  .modal.chat-modal{width:100%;max-height:94dvh;padding:16px;border-radius:14px}
  .modal.chat-modal .inmalete-chat-thread{height:calc(62dvh - 40px);min-height:220px}
  .modal.chat-modal .inmalete-chat-send{gap:7px}
  .modal.chat-modal .inmalete-chat-send input{padding:10px}
  .modal.chat-modal .inmalete-chat-send button{min-width:70px;padding:0 12px}
}

/* Official InMalete logo only: preserves existing header/footer layout */
.inmalete-logo-image{display:block;width:180px;max-width:100%;height:auto;object-fit:contain;flex:0 1 auto;}
@media(max-width:520px){.inmalete-logo-image{width:145px;}}
/* Marketplace controller UI additions */
.market-form{display:grid;gap:12px;margin-top:16px}.market-form label{display:grid;gap:6px;font-size:13px;font-weight:600;color:#475569}.market-form input,.market-form select,.market-form textarea{width:100%;box-sizing:border-box;border:1px solid #dbe2e8;border-radius:9px;padding:11px;background:#fff;font:inherit;color:#0f172a}.market-form textarea{min-height:90px;resize:vertical}.market-form button[type=submit]{border:0;border-radius:9px;background:#059669;color:#fff;padding:12px 16px;font-weight:700;cursor:pointer}.market-form button[type=button]{border:0;background:transparent;color:#047857;cursor:pointer}.product-meta,.product-seller{font-size:12px;color:#64748b;margin-top:5px}.product-badge{position:absolute;left:8px;bottom:8px;background:#dcfce7;color:#166534;border-radius:5px;padding:4px 7px;font-size:10px;font-weight:700}.my-listing-row{display:grid;grid-template-columns:1fr;gap:8px}.my-listing-row div{display:flex;gap:6px;flex-wrap:wrap}.my-listing-row button,.conversation-row{border:1px solid #dbe2e8;background:#fff;border-radius:8px;padding:8px 10px;cursor:pointer}.conversation-row{display:flex;flex-direction:column;width:100%;text-align:left;margin:8px 0;gap:4px}.chat-messages{max-height:300px;overflow:auto;padding:10px;background:#f8fafc;border-radius:8px}.chat-message{padding:8px;background:#fff;border-radius:7px;overflow-wrap:anywhere}.detail-extra-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.detail-extra-actions button{border:1px solid #cbd5e1;border-radius:8px;background:white;padding:9px 12px;cursor:pointer}.seller-listing-card{cursor:pointer}

/* Restored full account profile panel */
.modal:has(.account-profile){width:min(100%,650px);padding:28px 32px;border-radius:24px}.modal:has(.account-profile) #modalTitle{display:none}@media(max-width:520px){.modal:has(.account-profile){padding:22px 18px;border-radius:20px}}\n.account-profile{position:relative;padding:8px 2px 2px}.account-profile-close{position:absolute;right:0;top:0;width:44px;height:44px;border:0;border-radius:50%;background:#f1f5f3;color:#475569;font-size:30px;line-height:1;cursor:pointer}.account-profile-head{display:flex;align-items:center;gap:20px;padding:8px 18px 18px 0}.account-profile-avatar{width:118px;height:118px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#d9f5e8,#a7dfc5);color:#047857;font-size:38px;font-weight:850;flex-shrink:0}.account-profile-ident{min-width:0}.account-kicker{font-size:13px;letter-spacing:.15em;font-weight:800;color:#7b8580;margin:0 0 10px}.account-profile-ident h2{font-size:clamp(22px,4vw,30px);margin:0 0 8px;text-transform:uppercase}.account-location{margin:0;color:#7b8580;font-size:16px}.account-badges{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 20px}.account-badges span{display:inline-flex;align-items:center;gap:7px;border-radius:999px;background:#f0f5f2;color:#59665f;padding:10px 14px;font-size:13px}.account-badges span.verified{background:#e8f8ef;color:#047857}.account-bio{color:#7b8580;line-height:1.6;margin:0 0 22px}.account-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #e5e7eb;border-radius:16px;margin:0 0 22px;overflow:hidden}.account-stats>div{padding:20px 8px;text-align:center}.account-stats strong{display:block;font-size:30px;color:#1b2922}.account-stats span{display:block;color:#7b8580;font-size:13px;margin-top:4px}.account-actions{display:grid;gap:10px}.account-actions button{display:flex;align-items:center;gap:14px;width:100%;min-height:58px;text-align:left;padding:14px 18px;background:#fff;border:1px solid #e5e7eb;border-radius:13px;color:#34443b;font-weight:700;font-size:15px;cursor:pointer}.account-actions button:hover{background:#f8fbf9;border-color:#b9dfcd}.account-actions .account-signout{color:#b45353}.account-note{margin-top:20px;padding:16px;border-radius:12px;background:#fff8e8;border:1px solid #f5e8c9;color:#85806d;line-height:1.55;font-size:14px}@media(max-width:520px){.account-profile-head{gap:13px}.account-profile-avatar{width:82px;height:82px;font-size:28px}.account-profile-ident h2{font-size:20px}.account-kicker{font-size:11px}.account-stats>div{padding:15px 5px}.account-stats strong{font-size:24px}.account-stats span{font-size:11px}.account-actions button{min-height:52px;padding:12px 14px}}


/* Offer center: buyer/seller action workflow */
.modal:has(.offer-center-head){width:min(100%,860px);padding:30px;max-height:92vh}
.offer-center-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:0 35px 18px 0;border-bottom:1px solid #edf0ee;margin-bottom:16px}
.offer-center-head .eyebrow{font-size:10px;letter-spacing:1.4px;font-weight:800;color:#18804f;margin:0 0 7px}
.offer-center-head h2{font-size:25px;margin:0 0 6px;color:#1c2b22;letter-spacing:-.5px}
.offer-center-head p:not(.eyebrow){font-size:12px;color:#78857c;margin:0;line-height:1.5}
.offer-count{background:#edf6f0;color:#1a6d45;border-radius:20px;padding:7px 11px;font-size:11px;font-weight:800;white-space:nowrap}
.offer-list{display:grid;gap:12px}
.offer-card{border:1px solid #e5ebe6;border-radius:14px;padding:15px 16px;background:#fff;transition:border-color .15s,box-shadow .15s}
.offer-card:hover{border-color:#c8dfd0;box-shadow:0 4px 14px #174d2c0a}
.offer-card-top{display:flex;align-items:center;gap:13px;min-width:0}
.offer-card-top>img,.offer-card-placeholder{width:58px;height:58px;border-radius:10px;object-fit:cover;background:#eff5f1;display:grid;place-items:center;color:#24764b;flex-shrink:0}
.offer-card-item{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.offer-card-item strong{font-size:13px;color:#24342a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.offer-card-item span{font-size:10px;color:#89948d}
.offer-card-price{display:flex;flex-direction:column;align-items:flex-end;gap:7px;flex-shrink:0}
.offer-card-price>strong{font-size:17px;color:#176b44;white-space:nowrap}
.offer-status{display:inline-block;font-size:9px;font-weight:800;border-radius:30px;padding:5px 8px;background:#f0f3f1;color:#6f7d73;white-space:nowrap}
.offer-status.status-pending{background:#fff5df;color:#a06a09}.offer-status.status-accepted{background:#e7f7ee;color:#187044}.offer-status.status-countered{background:#edf2ff;color:#4665b5}.offer-status.status-rejected,.offer-status.status-expired{background:#fff0ef;color:#a84a44}.offer-status.status-cancelled{background:#f1f2f3;color:#7a838b}
.offer-response{margin:12px 0 0;padding:10px 12px;border-radius:9px;background:#f7faf8;font-size:11px;line-height:1.5;color:#65736a}.offer-response b{color:#34463a}
.offer-card-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}
.offer-card-actions button{border:1px solid #176b44;border-radius:8px;background:#176b44;color:#fff;padding:8px 11px;font:700 10px Inter,Arial,sans-serif;cursor:pointer}
.offer-card-actions button:hover{background:#105638}
.offer-card-actions button.secondary{background:#fff;color:#476153;border-color:#dbe5de}.offer-card-actions button.secondary:hover{background:#f1f7f3;border-color:#bad7c5}
.offer-empty{text-align:center;padding:40px 15px;color:#7c8980}.offer-empty>i{font-size:30px;color:#2d7d51}.offer-empty h3{font-size:16px;color:#34463a;margin:13px 0 6px}.offer-empty p{font-size:12px;margin:0}
@media(max-width:560px){.modal:has(.offer-center-head){padding:20px 15px}.offer-center-head h2{font-size:20px}.offer-card{padding:12px}.offer-card-top{gap:9px;align-items:flex-start}.offer-card-top>img,.offer-card-placeholder{width:44px;height:44px}.offer-card-price>strong{font-size:13px}.offer-card-item strong{font-size:11px}.offer-card-item span{font-size:9px}.offer-card-actions button{font-size:9px;padding:8px}.offer-center-head{padding-right:22px}}


/* Email verification and password recovery */
.auth-verification{max-width:460px;margin:0 auto;text-align:left}
.auth-verification-icon{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 12px;border-radius:16px;background:#e8f7ef;color:#047857;font-size:24px}
.auth-verification>h2,.auth-verification>p{text-align:center}
.auth-verification>p{color:#64748b;line-height:1.6;font-size:14px}
.market-form input[name="token"]{font-size:22px;letter-spacing:.18em;text-align:center;font-weight:700}
.market-form button:disabled{opacity:.6;cursor:wait}
.market-form button[type="button"]{min-height:38px;padding:8px 10px}


/* Full frontend feature batch */
.search-box input[list]{min-width:0}
.sort-area input[type=number]{width:95px;min-height:36px;border:1px solid #dbe3df;border-radius:9px;padding:7px;font:inherit}
.search-actions{display:flex;gap:8px;margin:10px 0 14px}
.search-actions button,.section-heading button{border:1px solid #d9e5de;background:#fff;border-radius:9px;padding:8px 12px;color:#087b4a;font-weight:650;cursor:pointer}
.saved-search-row,.blocked-seller-list>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;border-bottom:1px solid #e5e7eb}
.saved-search-row button,.blocked-seller-list button{border:1px solid #d7e5dc;border-radius:8px;padding:7px 10px;background:#f5fbf7;color:#087b4a}
.recently-viewed-section{padding:28px 0}
.notification-button{position:relative}
.notification-count{position:absolute;top:-3px;right:2px;min-width:18px;height:18px;border-radius:99px;background:#e11d48;color:white;font-size:11px;font-weight:800;display:grid;place-items:center;padding:0 4px}
.notification-list{display:grid;gap:8px}
.notification-row{display:flex;flex-direction:column;gap:4px;text-align:left;border:1px solid #e5e7eb;background:#fff;border-radius:10px;padding:12px;cursor:pointer}
.notification-row.unread{background:#f0fdf4;border-color:#b7e4c7}
.notification-row span{color:#64748b;font-size:13px}
.notification-row time{font-size:11px;color:#94a3b8}
.account-profile-avatar img,.profile-avatar-preview{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.profile-avatar-preview{width:90px;height:90px;border-radius:50%;display:block;margin:10px 0}
.category-specs{display:grid;gap:10px;padding:12px;border:1px solid #dfe9e3;border-radius:12px;background:#f9fcfa}
.category-specs h3{margin:0;font-size:14px}
.listing-upload-preview{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px}
.listing-upload-thumb{position:relative;border:1px solid #dfe7e2;border-radius:10px;overflow:hidden;background:#f8fafc}
.listing-upload-thumb.cover{border:2px solid #07834f}
.listing-upload-thumb img{width:100%;height:95px;object-fit:cover;display:block}
.listing-upload-thumb>span{display:block;padding:5px;font-size:11px;font-weight:700}
.listing-upload-thumb>div{display:flex;gap:3px;padding:4px}
.listing-upload-thumb button{font-size:10px;padding:4px 6px;border:1px solid #dbe4df;border-radius:5px;background:white}
.listing-upload-thumb button:disabled{opacity:.4}
.listing-video-preview video,.listing-video-player video{max-width:100%;max-height:260px;border-radius:12px}
.listing-video-preview{display:grid;gap:8px}
.listing-video-preview button{border:1px solid #ddd;border-radius:8px;padding:7px}
.listing-form-actions{display:flex;gap:10px;flex-wrap:wrap}
.listing-live-preview{border:1px solid #dce8e1;border-radius:14px;padding:14px;margin-top:12px;background:#f8fcfa}
.listing-live-preview>img{width:100%;max-height:230px;object-fit:cover;border-radius:10px}
.listing-live-preview h3{margin:8px 0}
.listing-live-preview strong{color:#07834f;font-size:22px}
.service-form-fields{padding:12px;border-radius:10px;background:#f3faf6;display:grid;gap:10px}
.service-form-fields[hidden]{display:none}
.service-request-list{display:grid;gap:12px}
.service-request-card{padding:12px;border:1px solid #e2e8f0;border-radius:12px;display:grid;gap:8px}
.service-request-card>div:first-child{display:flex;justify-content:space-between;gap:10px;align-items:center}
.service-request-card p{margin:0}
.service-request-card small{color:#64748b}
.service-request-actions{display:flex;gap:8px;flex-wrap:wrap}
.verification-status-card{padding:16px;border-radius:12px;background:#f0fdf4;border:1px solid #bbf7d0}
@media(max-width:760px){.sort-area{flex-wrap:wrap}.sort-area input[type=number]{width:80px}.search-actions{flex-wrap:wrap}.listing-upload-preview{grid-template-columns:repeat(3,minmax(0,1fr))}}

.legal-page{max-width:850px;margin:36px auto;padding:24px;background:#fff;border:1px solid #e5e9e7;border-radius:16px;line-height:1.7;color:#334155}
.legal-page h1{color:#0f172a;margin:18px 0 8px}.legal-page h2{margin:24px 0 6px;font-size:18px}.legal-page a{color:#087b4a;font-weight:700}

.featured-listing-badge{background:#fef3c7!important;color:#92400e!important}
.product-image-wrap .featured-listing-badge{bottom:32px}


/* Sponsored placements — isolated styles; do not alter marketplace card/layout rules */
.inmalete-sponsored-banner{margin:18px 0 24px;border-radius:16px;overflow:hidden;border:1px solid var(--border-color,#e8e8e8);background:var(--surface,#fff)}
.inmalete-ad-banner-link{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,32%);align-items:stretch;gap:18px;color:inherit;text-decoration:none;min-height:145px}
.inmalete-ad-banner-copy{padding:22px 24px;display:flex;flex-direction:column;justify-content:center;gap:8px}
.inmalete-ad-label,.inmalete-sponsored-label{font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#777}
.inmalete-ad-banner-copy h2{font-size:clamp(18px,2.5vw,25px);margin:0;color:var(--text,#171717)}
.inmalete-ad-banner-copy p{margin:0;color:var(--muted,#666);font-size:14px}
.inmalete-ad-banner-copy .inmalete-ad-cta{font-size:13px;font-weight:700;color:var(--primary,#276749);margin-top:4px}
.inmalete-ad-banner-link img{width:100%;height:100%;min-height:145px;max-height:220px;object-fit:cover}
.inmalete-sponsored-products{margin:22px 0}
.inmalete-sponsored-products .section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.inmalete-sponsored-products .section-heading h2{margin:0}
.inmalete-sponsored-products .product-grid{margin-top:0}
.inmalete-sponsored-card{overflow:hidden;border:1px solid var(--border-color,#e8e8e8);border-radius:12px;background:var(--surface,#fff)}
.inmalete-sponsored-card a{color:inherit;text-decoration:none;display:block;height:100%}
.inmalete-sponsored-card img{width:100%;height:150px;object-fit:cover;display:block}
.inmalete-sponsored-card .inmalete-sponsored-info{padding:12px}
.inmalete-sponsored-card h3{font-size:15px;margin:6px 0}
.inmalete-sponsored-card p{font-size:13px;color:var(--muted,#666);margin:0}
@media(max-width:600px){.inmalete-ad-banner-link{grid-template-columns:1fr;gap:0}.inmalete-ad-banner-copy{padding:16px}.inmalete-ad-banner-link img{max-height:140px;min-height:110px}.inmalete-sponsored-card img{height:115px}.inmalete-sponsored-card .inmalete-sponsored-info{padding:9px}}

/* Notification centre and delivery controls */
.notification-centre-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px;padding-bottom:14px;border-bottom:1px solid #e7eee9}
.notification-centre-head h2{margin:0 0 4px}.notification-centre-head p{margin:0;color:#78867d;font-size:12px}
.notification-offers-link{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;background:#087b4a;color:#fff!important;text-decoration:none;padding:11px 14px;border-radius:10px;font-size:12px;font-weight:800}
.notification-delivery-settings{display:grid;gap:9px;padding:13px;margin:0 0 14px;background:#f7faf8;border:1px solid #e2ece5;border-radius:12px}
.notification-delivery-settings>strong{font-size:12px}
.notification-delivery-settings label{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:650}
.notification-delivery-settings input{accent-color:#087b4a}
.notification-delivery-settings small{margin-left:auto;color:#829087;font-weight:400}
.notification-delivery-note{margin:0;color:#829087;font-size:10px;line-height:1.5}
.notification-list{display:grid;gap:8px;max-height:52vh;overflow:auto}
.notification-row{display:grid;gap:8px;padding:12px;border:1px solid #e7eee9;border-radius:11px;background:#fff}
.notification-row.unread{border-left:3px solid #087b4a;background:#fbfefc}
.notification-open{display:grid;gap:5px;border:0;padding:0;background:transparent;text-align:left;cursor:pointer;color:inherit}
.notification-open strong{font-size:13px}.notification-open span{font-size:12px;color:#69766e;line-height:1.45}
.notification-open time{font-size:10px;color:#98a39c}
.notification-action{justify-self:start;color:#087b4a;font-size:11px;font-weight:750;text-decoration:none}
.notification-empty{padding:18px;text-align:center;color:#87938b;font-size:12px}
@media(max-width:520px){.notification-centre-head{align-items:flex-start;flex-direction:column}.notification-offers-link{width:100%;justify-content:center}.notification-delivery-settings small{font-size:9px}}


/* InMalete Verify */
.verify-flow{display:grid;gap:12px}
.verify-flow>p{line-height:1.55}
.verify-flow .market-form{gap:13px}
.verify-flow label{display:grid;gap:7px;font-weight:600}
.verify-flow input[type=file],.verify-flow select{width:100%;min-height:44px;padding:10px;border:1px solid #d7dce4;border-radius:10px;background:#fff;color:#172033}
.verify-muted{font-size:12px;color:#697586;font-weight:400}
.verify-selfie{display:grid;gap:10px;padding:13px;border:1px solid #e4e8ef;border-radius:12px}
.verify-selfie video{width:100%;max-height:320px;object-fit:cover;border-radius:10px;background:#101827}
.verify-camera-actions{display:flex;gap:8px;flex-wrap:wrap}
.verify-camera-actions button{min-height:44px;padding:9px 14px;border:1px solid #d6dce5;border-radius:9px;background:#fff;color:#172033}
.verify-camera-actions button:disabled{opacity:.5}
.verify-privacy-note{padding:11px;border-radius:10px;background:#f5f7fa;color:#4d596b;font-size:12px;line-height:1.5}
.verify-admin-evidence{margin:12px 0;padding:12px;border:1px solid #e1e6ed;border-radius:10px;background:#f8fafc}
.verify-admin-media{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
.verify-admin-media a{display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid #d4dce7;border-radius:8px;background:#fff;color:#174ea6;text-decoration:none}
@media(max-width:600px){.verify-camera-actions{display:grid;grid-template-columns:1fr 1fr}.verify-admin-media{display:grid}}

.verify-location-box{border:1px solid var(--border-color,#ddd);border-radius:12px;padding:14px;display:grid;gap:8px}.verify-location-box button{width:max-content;max-width:100%}.verify-location-box .verify-muted{margin:0;line-height:1.5}#sellerVerifyPreview img{max-width:120px;max-height:120px;object-fit:cover;border-radius:12px;margin:8px 0}

.verify-student-panel{border:1px solid var(--border-color,#ddd);border-radius:12px;padding:0 14px;margin:14px 0}.verify-student-panel>summary{cursor:pointer;list-style:none;padding:14px 0;display:flex;align-items:center;justify-content:space-between}.verify-student-panel>summary::-webkit-details-marker{display:none}.verify-student-panel>summary:after{content:'+';font-size:1.3rem;font-weight:700}.verify-student-panel[open]>summary:after{content:'−'}.verify-student-panel>summary span{display:grid;gap:4px}.verify-student-panel>summary small{color:var(--muted,#777);font-size:.82rem}.verify-student-fields{display:grid;gap:12px;padding:4px 0 14px}.verify-student-check{display:flex;align-items:center;gap:8px;font-weight:600}.verify-student-check input{width:auto}
