/* =========================================================
   GoGoKG — Warm Light Theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:wght@400;700&display=swap');

/* --- Variables --- */
:root {
  --bg: #f4efe6;
  --bg2: #ffffff;
  --bg3: #ede8df;
  --border: #ccc4b8;
  --border-dark: #aaa098;
  --text: #1c1814;
  --text-muted: #6b6259;
  --text-light: #9a9088;
  --accent: #1a56b0;
  --accent-hover: #1244a0;
  --accent-light: #e8f0fc;
  --price: #b45309;
  --success: #166534;
  --success-bg: #dcfce7;
  --danger: #991b1b;
  --danger-bg: #fee2e2;
  --warning: #92400e;
  --warning-bg: #fef3c7;
  --gold: #d97706;
  --star: #d97706;
  --sold-bg: #e5e7eb;
  --sold-text: #6b7280;

  --radius: 4px;
  --radius-md: 6px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.12);
  --transition: 0.15s ease;
  --font: 'Inter', system-ui, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
  --nav-h: 52px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  font-size: 14px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul {
  list-style: none;
}

/* =========================================================
   TOP BAR (blue header like Craigslist)
   ========================================================= */
.nav-top {
  background: var(--accent);
  color: #fff;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 0;
  border-bottom: 2px solid #1244a0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  margin-right: 20px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.nav-logo span {
  font-weight: 400;
  opacity: 0.85;
}

.nav-sep {
  color: rgba(255, 255, 255, 0.35);
  margin: 0 6px;
  font-size: 0.8rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.88);
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
}

.nav-spacer {
  flex: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-lang-switcher {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: var(--radius);
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  outline: none;
}

.nav-lang-switcher:hover {
  background: rgba(255, 255, 255, 0.25);
}

.nav-lang-switcher option {
  color: var(--text);
  background: #fff;
}

.btn-nav-login {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: var(--radius);
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-nav-login:hover {
  background: rgba(255, 255, 255, 0.25);
  text-decoration: none;
}

.btn-post-nav {
  background: #fff;
  color: var(--accent);
  border: none;
  border-radius: var(--radius);
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-post-nav:hover {
  background: #e8f0fc;
  text-decoration: none;
  color: var(--accent-hover);
}

/* User avatar pill in nav */
.nav-user {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 5px 10px 5px 5px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  transition: background var(--transition);
  position: relative;
  text-decoration: none;
}

.nav-user:hover {
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-username {
  font-size: 0.8rem;
  color: #fff;
  font-weight: 500;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropdown */
.nav-dropdown-wrap {
  position: relative;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
}

.nav-dropdown.open {
  display: block;
}

.nav-dropdown a,
.nav-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  font-size: 0.85rem;
  color: var(--text);
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background var(--transition);
}

.nav-dropdown a:hover,
.nav-dropdown button:hover {
  background: var(--bg3);
  text-decoration: none;
}

.nav-dropdown-divider {
  border-top: 1px solid var(--border);
}

/* "Post Ad" button in nav */
.nav-post-btn {
  background: #fff;
  color: var(--accent);
  border: none;
  border-radius: var(--radius);
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.nav-post-btn:hover {
  background: #e8f0fc;
  text-decoration: none;
  color: var(--accent-hover);
}

/* Sign In button (logged-out state) */
.nav-sign-in {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  border-radius: var(--radius);
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.nav-sign-in:hover {
  background: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  color: #fff;
}

/* Username header inside dropdown */
.nav-dropdown-name {
  padding: 10px 14px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 36px 20px 32px;
  text-align: center;
}

.hero-flag {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--text);
}

.hero h1 .accent {
  color: var(--accent);
}

.hero p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
}

.search-bar {
  display: flex;
  max-width: 580px;
  margin: 0 auto;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: border-color var(--transition);
}

.search-bar:focus-within {
  border-color: var(--accent);
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 14px;
  font-size: 0.92rem;
  background: transparent;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--text-light);
}

.search-bar button {
  background: var(--accent);
  border: none;
  cursor: pointer;
  padding: 0 18px;
  color: #fff;
  font-size: 1rem;
  transition: background var(--transition);
}

.search-bar button:hover {
  background: var(--accent-hover);
}

/* =========================================================
   LAYOUT / CONTAINER
   ========================================================= */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 28px 0;
}

.section+.section {
  border-top: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.section-link {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 500;
}

/* =========================================================
   CATEGORY GRID
   ========================================================= */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.cat-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cat-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
}

.cat-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.cat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cat-item:hover .cat-label {
  color: var(--accent);
}

/* =========================================================
   CATEGORY TEXT BAR (between nav and hero, Craigslist-style)
   ========================================================= */
.cat-text-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  text-align: center;
}

.cat-text-bar::-webkit-scrollbar {
  display: none;
}

.cat-text-bar-label {
  display: none;
}

.cat-text-links {
  display: inline-flex;
  align-items: stretch;
}

.cat-text-link {
  font-size: 0.78rem;
  color: var(--text);
  text-decoration: none;
  padding: 7px 14px;
  display: inline-block;
  white-space: nowrap;
}



.cat-text-link:hover {
  background: var(--bg3);
  text-decoration: underline;
  color: var(--text);
}

.cat-text-link+.cat-text-link::before {
  display: none;
}

/* =========================================================
   ADVERTISEMENT BANNER (homepage)
   Replace .ad-banner inner content with your ad tag.
   ========================================================= */
.ad-banner-wrap {
  width: 100%;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 20px;
}

.ad-banner {
  position: relative;
  width: 100%;
  min-height: 200px;
  background: #f0eee9;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  /* Dashed inner border to signal it's an ad slot */
  outline: 2px dashed var(--border-dark);
  outline-offset: -12px;
}

.ad-label {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}

.ad-placeholder-text {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

.ad-placeholder-text a {
  color: var(--accent);
}

/* When a real ad is placed the placeholder text is hidden */
.ad-banner.has-ad .ad-placeholder-text {
  display: none;
}

/* =========================================================
   LISTING CARDS
   ========================================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text);
}

.card-img-wrap {
  position: relative;
  height: 160px;
  background: var(--bg3);
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.03);
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-light);
}

.card-cat-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.card-sold-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  background: var(--sold-bg);
  color: var(--sold-text);
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-body {
  padding: 11px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.card-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--price);
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stars-display {
  color: var(--star);
  letter-spacing: -1px;
}

.card-meta {
  display: flex;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: auto;
  flex-wrap: wrap;
}

/* =========================================================
   STATS STRIP (homepage)
   ========================================================= */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-item {
  background: #fff;
  padding: 16px;
  text-align: center;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-serif);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =========================================================
   BROWSE PAGE
   ========================================================= */
.browse-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
  padding: 20px 0 60px;
}

@media (max-width: 768px) {
  .browse-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    display: none;
  }

  .filter-sidebar.open {
    display: block;
  }
}

.filter-sidebar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: sticky;
  top: calc(var(--nav-h) + 12px);
}

.filter-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.filter-group {
  margin-bottom: 14px;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  display: block;
}

.filter-select,
.filter-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 9px;
  color: var(--text);
  outline: none;
  font-size: 0.82rem;
  appearance: none;
  transition: border-color var(--transition);
}

.filter-select:focus,
.filter-input:focus {
  border-color: var(--accent);
}

.filter-row {
  display: flex;
  gap: 6px;
}

.filter-row .filter-input {
  width: 50%;
}

.btn-apply {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  padding: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-apply:hover {
  background: var(--accent-hover);
}

.btn-reset {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  margin-top: 6px;
  transition: border-color var(--transition), color var(--transition);
}

.btn-reset:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.browse-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.browse-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1;
}

.browse-count strong {
  color: var(--text);
}

.sort-select {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--text);
  outline: none;
  cursor: pointer;
  appearance: none;
}

.browse-search {
  display: flex;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex: 1;
  min-width: 180px;
  transition: border-color var(--transition);
}

.browse-search:focus-within {
  border-color: var(--accent);
}

.browse-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 7px 11px;
  font-size: 0.82rem;
  color: var(--text);
}

.browse-search input::placeholder {
  color: var(--text-light);
}

.browse-search button {
  background: transparent;
  border: none;
  padding: 7px 11px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.browse-search button:hover {
  color: var(--accent);
}

.filter-toggle {
  display: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 11px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  gap: 5px;
  align-items: center;
}

@media (max-width: 768px) {
  .filter-toggle {
    display: flex;
  }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.empty-state p {
  font-size: 0.85rem;
}

/* =========================================================
   LISTING DETAIL
   ========================================================= */
.listing-page-wrap {
  padding: 20px 0 60px;
}

.listing-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 840px) {
  .listing-layout {
    grid-template-columns: 1fr;
  }
}

.listing-img {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 360px;
  background: var(--bg3);
  margin-bottom: 20px;
}

.listing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--text-light);
}

.listing-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.listing-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--price);
  margin-bottom: 14px;
}

.listing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 9px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tag-sold {
  background: var(--sold-bg);
  color: var(--sold-text);
  border-color: #d1d5db;
  font-weight: 700;
}

.listing-desc-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.listing-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
}

/* Sidebar */
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.contact-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.btn-contact {
  width: 100%;
  border-radius: var(--radius);
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background var(--transition);
  margin-bottom: 8px;
  border: none;
}

.btn-contact-reveal {
  background: var(--accent);
  color: #fff;
}

.btn-contact-reveal:hover {
  background: var(--accent-hover);
}

.contact-info {
  text-align: center;
  padding: 10px;
  background: var(--success-bg);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--success);
  border: 1px solid #bbf7d0;
  word-break: break-all;
}

.posted-at {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

.seller-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.seller-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.seller-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seller-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.seller-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seller-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
}

.seller-name:hover {
  text-decoration: underline;
}

.seller-stats {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-mark-sold {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}

.btn-mark-sold:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.related-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 7px;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition);
}

.related-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  color: var(--text);
}

.related-card img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.related-card-thumb-placeholder {
  width: 48px;
  height: 48px;
  background: var(--bg3);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.related-card-title {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-price {
  font-size: 0.78rem;
  color: var(--price);
  font-weight: 600;
}

/* =========================================================
   REVIEWS
   ========================================================= */
.reviews-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.reviews-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.review-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}

.review-form-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.star-picker {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.star-picker input {
  display: none;
}

.star-picker label {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--border-dark);
  transition: color var(--transition);
}

.star-picker input:checked~label,
.star-picker label:hover,
.star-picker label:hover~label {
  color: var(--star);
}

.review-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-size: 0.85rem;
  color: var(--text);
  resize: vertical;
  min-height: 80px;
  outline: none;
  line-height: 1.5;
  transition: border-color var(--transition);
}

.review-form textarea:focus {
  border-color: var(--accent);
}

.btn-review-submit {
  margin-top: 10px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  padding: 8px 18px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-review-submit:hover {
  background: var(--accent-hover);
}

.login-to-review {
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 18px;
}

.login-to-review a {
  font-weight: 600;
}

.review-item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  display: flex;
  gap: 12px;
}

.review-item:last-child {
  border-bottom: none;
}

.review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-body {
  flex: 1;
}

.review-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.review-author-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.review-rating {
  color: var(--star);
  font-size: 0.8rem;
  letter-spacing: -1px;
}

.review-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.review-comment {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.6;
}

.no-reviews-yet {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 14px 0;
}

.avg-rating-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 18px;
}

.avg-rating-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-serif);
}

.avg-rating-stars {
  color: var(--star);
  font-size: 1.1rem;
  letter-spacing: -1px;
}

.avg-rating-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =========================================================
   POST PAGE
   ========================================================= */
.post-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.post-header {
  margin-bottom: 22px;
}

.post-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-serif);
  margin-bottom: 4px;
}

.post-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.form-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.form-group {
  margin-bottom: 14px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.form-label .required {
  color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 11px;
  color: var(--text);
  outline: none;
  font-size: 0.85rem;
  transition: border-color var(--transition);
  appearance: none;
}

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

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}

.form-error.visible {
  display: block;
}

.input-invalid {
  border-color: var(--danger) !important;
}

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-submit:hover {
  background: var(--accent-hover);
}

.success-banner {
  display: none;
  background: var(--success-bg);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
  margin-bottom: 16px;
}

.success-banner.visible {
  display: block;
}

.success-banner h3 {
  color: var(--success);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.success-banner p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

.auth-card-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: center;
}

.auth-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 22px;
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
  margin-bottom: 14px;
}

.btn-google:hover {
  background: var(--bg3);
  border-color: var(--accent);
}

.btn-google img {
  width: 18px;
  height: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  border: none;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}

.auth-tab.active {
  background: var(--accent);
  color: #fff;
}

.auth-form-section {
  display: none;
}

.auth-form-section.active {
  display: block;
}

.auth-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 18px;
}

.auth-footer a {
  color: var(--accent);
  font-weight: 500;
}

.auth-error {
  background: var(--danger-bg);
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.82rem;
  color: var(--danger);
  margin-bottom: 12px;
  display: none;
}

.auth-error.visible {
  display: block;
}

/* =========================================================
   PROFILE PAGE
   ========================================================= */
.profile-wrap {
  padding: 24px 0 60px;
}

.profile-header-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.profile-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--border);
}

.profile-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-email {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.profile-joined {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-stats-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.profile-stat {
  text-align: center;
}

.profile-stat-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.profile-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.profile-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.profile-edit-btn {
  margin-left: auto;
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-edit-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

.profile-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.edit-profile-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.edit-profile-form.hidden {
  display: none;
}

.listing-status-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-active {
  background: #dcfce7;
  color: #166534;
}

.badge-sold {
  background: var(--sold-bg);
  color: var(--sold-text);
}

/* =========================================================
   BREADCRUMB
   ========================================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 12px 0 8px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--accent);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--border-dark);
}

.page-header {
  padding: 0 0 16px;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.footer-links a:hover {
  color: var(--accent);
}

/* =========================================================
   UTILITY
   ========================================================= */
.notice {
  background: var(--warning-bg);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--warning);
  margin-bottom: 14px;
}

.notice a {
  color: var(--accent);
  font-weight: 600;
}

/* scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-dark);
}

/* =========================================================
   EXPIRED LISTINGS (profile page)
   ========================================================= */
.expired-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.expired-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  opacity: 0.82;
}

.expired-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.expired-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.expired-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* =========================================================
   REVIEWS
   ========================================================= */
.reviews-section {
  scroll-margin-top: 70px;
}

/* Interactive star picker */
.star-picker {
  display: flex;
  flex-direction: row;
  gap: 4px;
  margin-top: 6px;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  color: var(--border-dark);
  padding: 0 2px;
  line-height: 1;
  transition: color 0.1s ease, transform 0.1s ease;
}

.star-btn:hover,
.star-btn:focus {
  color: var(--star);
  transform: scale(1.15);
  outline: none;
}

.star-btn.selected {
  color: var(--star);
}

/* Review form card */
.review-form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.review-form-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

/* Individual review item */
.review-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.review-author {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
}

.review-author:hover {
  text-decoration: underline;
}

.review-stars-static {
  font-size: 0.95rem;
  letter-spacing: -1px;
  line-height: 1;
}

.review-date {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-left: auto;
}

.review-comment {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Reply bubble */
.review-reply {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg3);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.review-reply-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.review-reply-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}