*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clay:    #32E8A2;
  --clay-lt: #8BF0CC;
  --clay-dk: #1FBA8A;
  --sand:    #F7EDD8;
  --sand-dk: #EDD8B0;
  --ink:     #1A1208;
  --ink-lt:  #4A3A20;
  --leaf:    #2D6A4F;
  --leaf-lt: #74C69D;
  --sky:     #1D5F8A;
  --sky-lt:  #74B3D4;
  --gold:    #D4A017;
  --gold-lt: #F0CC66;
  --cream:   #FDFAF4;
  --white:   #FFFFFF;
  --r: 10px;
  --r-lg: 18px;
  font-family: 'DM Sans', sans-serif;
  font-optical-sizing: auto;
}

body { background: var(--cream); color: var(--ink); min-height: 100vh; overflow-x: clip; }

/* NAV */
nav {
  background: var(--ink);
  padding: 0;
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.75rem;
  height: 60px;
}
.nav-links {
  margin-left: auto;
}
.logo {
  font-family: 'DM Sans', sans-serif; font-size: 1.6rem; font-weight: 900;
  color: var(--clay); letter-spacing: -0.5px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo span { color: var(--sand); }
.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
}
.nav-user-area {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 0.35rem;
}
.nav-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 50%;
}
.nav-avatar-link--mobile {
  display: none;
}
.nav-avatar-link:focus-visible,
.nav-avatar-toggle:focus-visible {
  outline: 3px solid rgba(50, 232, 162, 0.24);
  outline-offset: 3px;
}
.nav-avatar-toggle {
  appearance: none;
  border: 1px solid rgba(247, 237, 216, 0.16);
  background: rgba(255, 255, 255, 0.02);
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sand);
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.nav-avatar-toggle:hover,
.nav-avatar-toggle:focus-visible {
  border-color: var(--clay-lt);
  background: rgba(50, 232, 162, 0.08);
  box-shadow: 0 0 0 4px rgba(50, 232, 162, 0.08);
  transform: translateY(-1px);
}
.nav-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--clay) 0%, var(--leaf-lt) 100%);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.nav-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: #24180f;
  border: 1px solid rgba(247, 237, 216, 0.14);
  border-radius: 14px;
  padding: 0.4rem;
  box-shadow: 0 20px 36px rgba(11, 15, 20, 0.28);
  z-index: 20;
}
.nav-user-menu__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  color: var(--sand);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-user-menu__link:hover,
.nav-user-menu__link:focus-visible {
  background: rgba(50, 232, 162, 0.14);
  color: var(--sand);
}
.nav-btn {
  background: none; border: 1.5px solid transparent; color: var(--sand-dk);
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 0.85rem; font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}
.nav-links .nav-btn--mobile-only {
  display: none;
}
.nav-btn:hover { border-color: var(--clay-lt); color: var(--sand); }
.nav-btn.primary {
  background: var(--clay); color: var(--ink); border-color: var(--clay);
}
.nav-btn.primary:hover { background: var(--clay-dk); }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 237, 216, 0.18);
  border-radius: 10px;
  background: transparent;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--sand);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-user {
  color: var(--sand);
  font-size: 0.82rem;
  font-weight: 500;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow-wrap: anywhere;
}
.nav-auth .nav-inner {
  justify-content: center;
}
.nav-auth .logo {
  text-align: center;
}
.nav-tag {
  background: var(--clay); color: white; border-radius: 50%;
  width: 18px; height: 18px; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: -6px; vertical-align: top;
}

.publish-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 120;
  pointer-events: none;
}

.publish-fab__button {
  pointer-events: auto;
  appearance: none;
  border: 0;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  padding: 0;
  background: linear-gradient(135deg, var(--clay) 0%, var(--clay-dk) 100%);
  color: var(--ink);
  font: inherit;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(31, 186, 138, 0.28), 0 2px 0 rgba(255, 255, 255, 0.16) inset;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.publish-fab__button:hover,
.publish-fab__button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(31, 186, 138, 0.34), 0 2px 0 rgba(255, 255, 255, 0.16) inset;
  filter: saturate(1.05);
}

.publish-fab__button:focus-visible {
  outline: 3px solid rgba(50, 232, 162, 0.28);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .publish-fab {
    right: 1rem;
    bottom: 1rem;
  }

  .publish-fab__button {
    width: 52px;
    height: 52px;
    font-size: 1.8rem;
  }
}

/* HERO */
.hero {
  background: var(--ink);
  padding: 4rem 2rem 4.5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; font-size: 28rem; color: rgba(50,232,162,0.06);
  top: -4rem; left: 50%; transform: translateX(-50%);
  pointer-events: none; line-height: 1;
}
.hero-content {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-copy {
  max-width: 620px;
}
.hero h1 {
  font-family: 'DM Sans', sans-serif; font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900; color: var(--sand); line-height: 1.1;
  max-width: 700px; margin: 0 0 1rem;
}
.hero h1 em { color: var(--clay); font-style: italic; }
.hero p {
  color: var(--sand-dk); font-size: 1.05rem; max-width: 480px;
  margin: 0 0 1.75rem; line-height: 1.6;
}
.hero-search-row {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 600px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  box-shadow: 0 22px 42px rgba(11, 15, 20, 0.16);
}
.hero-search {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 56px;
  background: transparent;
  border: none;
  border-radius: 999px 0 0 999px;
  overflow: hidden;
  box-shadow: none;
}
.hero-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 0 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-optical-sizing: auto;
  font-size: 1rem;
  min-width: 0;
  height: 100%;
  outline: none;
}
.hero-search-input::placeholder {
  color: rgba(31, 41, 55, 0.4);
}
.hero-search-button {
  width: 56px;
  height: 56px;
  border: none;
  background: var(--clay);
  color: white;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(50, 232, 162, 0.24);
}
.hero-search-button svg,
.hero-search-button span {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hero-search-button:hover {
  background: var(--clay-dk);
  transform: translateY(-1px);
}
.hero-search-button:focus {
  outline: 3px solid rgba(255,255,255,0.45);
  outline-offset: 2px;
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
}
.hero-image {
  display: block;
  width: min(100%, 560px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 40px rgba(11, 15, 20, 0.2));
}

/* STATS STRIP */
.stats-strip {
  background: var(--clay);
  padding: 1rem 2rem;
  display: flex; gap: 2rem; justify-content: center;
  flex-wrap: wrap;
}
.stat { text-align: center; color: white; }
.stat .num { font-family: 'DM Sans', sans-serif; font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat .lbl { font-size: 0.75rem; opacity: 0.85; margin-top: 2px; }

/* LAYOUT */
.page { max-width: 1140px; margin: 0 auto; padding: 2rem 1.5rem; }
.section-title {
  font-family: 'DM Sans', sans-serif; font-size: 1.6rem; font-weight: 700;
  margin-bottom: 1.25rem; color: var(--ink);
}
.section-title span { color: var(--clay); }

/* SEARCH / FILTERS */
.search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: stretch;
}
.search-field {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid rgba(26, 18, 8, 0.08);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 12px 28px rgba(26, 18, 8, 0.07);
}
.search-field:focus-within {
  border-color: var(--clay);
  box-shadow: 0 0 0 4px rgba(50, 232, 162, 0.08), 0 12px 28px rgba(26, 18, 8, 0.07);
  transform: translateY(-1px);
}
.search-field-icon {
  width: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--clay);
  background: rgba(50, 232, 162, 0.09);
  font-size: 1rem;
  flex-shrink: 0;
  border-right: 1px solid rgba(26, 18, 8, 0.06);
}
.search-input {
  flex: 1 1 240px; min-width: 0;
  background: white; border: 1.5px solid var(--sand-dk);
  border-radius: 8px; padding: 10px 16px;
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem; color: var(--ink);
  outline: none; transition: border 0.2s;
}
.search-input:focus { border-color: var(--clay); }
.search-input--main {
  border: none;
  border-radius: 0;
  padding: 0.95rem 1rem 0.95rem 0.2rem;
  background: transparent;
}
.search-input--main:focus {
  box-shadow: none;
}
.search-field--products {
  gap: 0;
  padding: 0;
  height: 55px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  box-shadow: 0 22px 42px rgba(11, 15, 20, 0.16);
}
.search-input--sidebar {
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 0 1.5rem;
  font-size: 1rem;
  height: 100%;
  box-shadow: none;
}
.search-input--sidebar:focus {
  border-color: transparent;
  box-shadow: none;
}
.search-field-button--sidebar {
  width: 55px;
  height: 100%;
  border: none;
  background: var(--clay);
  color: white;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 999px 999px 0;
  box-shadow: 0 10px 24px rgba(50, 232, 162, 0.24);
  flex-shrink: 0;
  font-size: 1.45rem;
  line-height: 1;
}
.search-field-button--sidebar:hover {
  background: var(--clay-dk);
  transform: translateY(-1px);
}
.search-field-button--sidebar:focus {
  outline: 3px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}
.search-input--select {
  flex: 0 1 220px;
  max-width: 240px;
  min-width: 180px;
  height: 56px;
  border-radius: 999px;
  background: white;
  border: 1px solid rgba(26, 18, 8, 0.08);
  box-shadow: 0 12px 28px rgba(26, 18, 8, 0.07);
  padding-inline: 1rem 2.4rem;
}
.page--products {
  max-width: 1240px;
}
.products-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.products-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.products-filters-button {
  border: 1.5px solid var(--clay);
  background: white;
  color: var(--clay);
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 24px rgba(26, 18, 8, 0.06);
}
.products-filters-button:hover {
  background: var(--clay);
  color: white;
  transform: translateY(-1px);
}
.products-sidebar {
  position: sticky;
  top: 84px;
}
.products-sidebar__card {
  background: white;
  border: 1.5px solid var(--sand-dk);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 34px rgba(26, 18, 8, 0.08);
  padding: 1rem;
}
.products-sidebar__title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 1rem;
}
.products-filter-group {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.products-filter-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-lt);
}
.search-field--sidebar {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
.search-input--sidebar {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
}
.products-filter-reset {
  width: 100%;
  border: 1.5px solid var(--clay);
  background: transparent;
  color: var(--clay);
  border-radius: 999px;
  padding: 0.85rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.products-filter-reset:hover {
  background: var(--clay);
  color: white;
  transform: translateY(-1px);
}
.products-content {
  min-width: 0;
}
.cards-grid--products {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.filter-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.chip {
  background: white; border: 1.5px solid var(--sand-dk);
  color: var(--ink-lt); padding: 5px 14px; border-radius: 20px;
  font-size: 0.82rem; cursor: pointer; transition: all 0.15s;
  font-weight: 500;
}
.chip:hover { border-color: var(--clay); color: var(--clay); }
.chip.active { background: var(--clay); color: white; border-color: var(--clay); }

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  background: white; border-radius: var(--r-lg);
  border: 1.5px solid var(--sand-dk);
  overflow: hidden; transition: all 0.22s; cursor: pointer;
  position: relative;
}
.card:hover { border-color: var(--clay); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(50,232,162,0.12); }
.card-img {
  height: 180px; overflow: hidden; position: relative;
  background: var(--sand);
}
.card-img .emoji-thumb {
  font-size: 6rem; display: flex; align-items: center; justify-content: center;
  height: 100%; position: relative; z-index: 1;
}
.card-img-bg {
  position: absolute; inset: 0; opacity: 0.12;
  background: var(--clay);
}
.card-cat {
  position: absolute; top: 10px; left: 10px;
  background: var(--ink); color: var(--sand);
  font-size: 0.72rem; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}
.card-body { padding: 1rem; }
.card-title {
  font-family: 'DM Sans', sans-serif; font-size: 1.1rem; font-weight: 700;
  margin-bottom: 0.3rem; color: var(--ink);
  overflow-wrap: anywhere;
}
.card-desc { font-size: 0.83rem; color: var(--ink-lt); line-height: 1.45; margin-bottom: 0.75rem; overflow-wrap: anywhere; }
.card-want {
  background: var(--sand); border-radius: 6px; padding: 7px 10px;
  font-size: 0.8rem; color: var(--ink-lt); margin-bottom: 0.75rem;
  overflow-wrap: anywhere;
}
.card-want strong { color: var(--clay); }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.card-user {
  display: flex; align-items: center; gap: 7px; font-size: 0.8rem; color: var(--ink-lt);
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.btn-trueque {
  background: var(--clay); color: white;
  border: none; border-radius: 6px; padding: 6px 14px;
  font-family: 'DM Sans', sans-serif; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.btn-trueque:hover { background: var(--clay-dk); }
.btn-trueque:disabled,
.btn-trueque--active {
  background: var(--sand-dk);
  color: var(--ink-lt);
  cursor: default;
}
.btn-trueque:disabled:hover,
.btn-trueque--active:hover {
  background: var(--sand-dk);
}
.btn-submit--active {
  background: var(--sand-dk);
  color: var(--ink-lt);
  border: 1.5px solid var(--sand-dk);
  cursor: default;
}
.stars { color: var(--gold); font-size: 0.75rem; }

/* TABS */
.tabs { display: flex; gap: 0.35rem; border-bottom: 2px solid var(--sand-dk); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab {
  padding: 10px 20px; font-size: 0.9rem; font-weight: 500;
  color: var(--ink-lt); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.15s; background: none; border-top: none; border-left: none; border-right: none;
  flex: 1 1 160px; min-width: 0; text-align: center;
}
.tab:hover { color: var(--clay); }
.tab.active { color: var(--clay); border-bottom-color: var(--clay); font-weight: 600; }

/* MODAL OVERLAY */
.modal-overlay {
  display: flex; position: fixed; inset: 0;
  background: rgba(26,18,8,0.65); z-index: 200;
  align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}
.modal-overlay.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition-delay: 0s;
}
.modal {
  background: white; border-radius: var(--r-lg);
  max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 1.75rem; position: relative;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
  will-change: transform, opacity;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.filters-modal .modal {
  max-width: 560px;
}
.products-filters-modal {
  width: min(560px, calc(100vw - 2rem));
}
.products-filters-modal .subtitle {
  margin-bottom: 1rem;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--sand); border: none; width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 1rem; font-weight: 700;
  color: var(--ink-lt); display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--sand-dk); }
.modal h2 { font-family: 'DM Sans', sans-serif; font-size: 1.4rem; margin-bottom: 0.5rem; }
.modal .subtitle { color: var(--ink-lt); font-size: 0.88rem; margin-bottom: 1.25rem; }
.products-filters-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.4rem;
}
.products-filter-accept {
  flex: 1 1 0;
  border: 1.5px solid var(--clay);
  background: var(--clay);
  color: white;
  border-radius: 999px;
  padding: 0.85rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.products-filter-accept:hover {
  background: var(--clay-dk);
  transform: translateY(-1px);
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--ink-lt); margin-bottom: 4px;
}
.password-field {
  position: relative;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: var(--cream); border: 1.5px solid var(--sand-dk);
  border-radius: 8px; padding: 9px 14px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: var(--ink);
  outline: none; transition: border 0.2s;
}
.password-field input {
  padding-right: 3rem;
}
.password-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-lt);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(50, 232, 162, 0.12);
  color: var(--ink);
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--clay);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field-hint {
  margin-top: 6px;
  font-size: 0.78rem;
  min-height: 1rem;
  color: var(--ink-lt);
}
.field-hint.checking { color: var(--ink-lt); }
.field-hint.success { color: var(--leaf); }
.field-hint.error { color: #8b2a0a; }
.auth-stepper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.auth-stepper-item {
  border-radius: 999px;
  border: 1px solid var(--sand-dk);
  background: var(--cream);
  color: var(--ink-lt);
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}
.auth-stepper-item.active {
  background: rgba(50, 232, 162, 0.12);
  border-color: rgba(50, 232, 162, 0.45);
  color: var(--ink);
}
.auth-step[hidden] {
  display: none;
}
.auth-step-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.8rem;
}
.auth-step-actions .btn-submit {
  margin-top: 0;
}
.btn-secondary {
  width: 100%; background: var(--sand); color: var(--ink);
  border: 1px solid var(--sand-dk); border-radius: 8px; padding: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover { background: var(--sand-dk); }
.btn-submit {
  width: 100%; background: var(--clay); color: white;
  border: none; border-radius: 8px; padding: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s; margin-top: 0.5rem;
}
.btn-submit:hover { background: var(--clay-dk); }

/* DETAIL MODAL */
.detail-img { font-size: 5rem; text-align: center; padding: 1.5rem; background: var(--sand); border-radius: var(--r); margin-bottom: 1rem; }
.detail-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.badge {
  font-size: 0.75rem; font-weight: 600; padding: 3px 10px;
  border-radius: 20px;
}
.badge-cat { background: var(--ink); color: var(--sand); }
.badge-leaf { background: var(--leaf); color: white; }
.badge-gold { background: var(--gold-lt); color: var(--ink); }
.detail-section { margin-bottom: 1rem; }
.detail-section h4 { font-size: 0.8rem; font-weight: 600; color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.detail-section p { font-size: 0.92rem; line-height: 1.5; }
.want-box { background: var(--sand); border-radius: 8px; padding: 12px 14px; }
.want-box p { font-size: 0.9rem; }
.want-box strong { color: var(--clay); }
.user-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--cream); border-radius: 8px; border: 1px solid var(--sand-dk); min-width: 0; }
.user-info .name { font-weight: 600; font-size: 0.95rem; }
.user-info .rep { font-size: 0.8rem; color: var(--ink-lt); }
.contact-actions { display: flex; gap: 0.5rem; margin-top: 1.25rem; }
.btn-contact-sec { flex: 1; background: var(--sand); color: var(--ink); border: none; border-radius: 8px; padding: 11px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-contact-sec:hover { background: var(--sand-dk); }

/* NOTIF / TOAST */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
  background: var(--ink); color: var(--sand);
  padding: 12px 20px; border-radius: 10px;
  font-size: 0.9rem; font-weight: 500;
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s;
  border-left: 4px solid var(--clay);
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* FAVORITES & MESSAGES panel */
.side-panel {
  position: fixed; right: 0; top: 60px; bottom: 0; width: min(340px, 100vw); max-width: 100vw;
  background: white; border-left: 1.5px solid var(--sand-dk);
  z-index: 150; transform: translateX(100%);
  transition: transform 0.3s; overflow-y: auto;
  padding: 1.25rem;
}
.side-panel.open { transform: translateX(0); }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 1rem; min-width: 0; }
.panel-header h3 { font-family: 'DM Sans', sans-serif; font-size: 1.2rem; }
.panel-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--ink-lt); }
.msg-item { padding: 0.75rem; border-radius: 8px; border: 1px solid var(--sand-dk); margin-bottom: 0.5rem; cursor: pointer; transition: border 0.15s; min-width: 0; }
.msg-item:hover { border-color: var(--clay); }
.msg-item .from { font-weight: 600; font-size: 0.85rem; display: flex; justify-content: space-between; gap: 0.5rem; min-width: 0; overflow-wrap: anywhere; }
.msg-item .from .time { font-weight: 400; color: var(--ink-lt); font-size: 0.78rem; }
.msg-item .preview { font-size: 0.8rem; color: var(--ink-lt); margin-top: 3px; overflow-wrap: anywhere; }
.unread-dot { width: 8px; height: 8px; background: var(--clay); border-radius: 50%; display: inline-block; margin-right: 4px; }

/* FOOTER */
footer {
  background: var(--ink); color: var(--sand-dk);
  padding: 2.5rem 2rem; margin-top: 3rem;
  text-align: center;
}
footer .footer-logo { font-family: 'DM Sans', sans-serif; font-size: 1.3rem; font-weight: 900; color: var(--clay); margin-bottom: 0.5rem; }
footer .footer-logo span { color: var(--sand); }
footer p { font-size: 0.82rem; opacity: 0.7; }

/* AUTH PAGES */
.auth-shell {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.auth-card {
  width: 100%;
  max-width: 540px;
  background: white;
  border: 1.5px solid var(--sand-dk);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: 0 10px 28px rgba(26, 18, 8, 0.08);
}
.auth-card h1 {
  font-family: 'DM Sans', sans-serif;
  font-optical-sizing: auto;
  font-size: 1.8rem;
  margin-bottom: 0.45rem;
}
.auth-card p.auth-subtitle {
  color: var(--ink-lt);
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.auth-alert {
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 0.9rem;
  font-size: 0.86rem;
  display: none;
}
.auth-alert.show { display: block; }
.auth-alert.error { background: #fde9e4; color: #8b2a0a; }
.auth-alert.success { background: #e4f4ec; color: #1b5f44; }
.auth-actions { margin-top: 0.8rem; }
.auth-switch {
  margin-top: 1rem;
}
.avatar-upload {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(247, 237, 216, 0.5), rgba(255, 255, 255, 0.82));
  border: 1px dashed rgba(42, 106, 79, 0.24);
  border-radius: 14px;
}
.avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(42, 106, 79, 0.18);
  background: radial-gradient(circle at top, rgba(50, 232, 162, 0.18), rgba(255, 255, 255, 0.95));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink-lt);
}
.avatar-preview.has-image {
  background: var(--sand);
}
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-preview-placeholder {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.2;
}
.avatar-upload input[type="file"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--sand-dk);
  border-radius: 10px;
  background: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--ink);
}
.avatar-upload input[type="file"]::file-selector-button {
  margin-right: 0.85rem;
  padding: 0.55rem 0.8rem;
  border: none;
  border-radius: 8px;
  background: var(--clay);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
}
.avatar-upload input[type="file"]::file-selector-button:hover {
  background: var(--clay-dk);
}
.auth-switch a {
  color: var(--clay-dk);
  font-weight: 600;
}

/* CHAT PAGE */
.chat-page {
  max-width: 1140px;
  margin: 1.5rem auto;
  padding: 0 1.2rem;
}
.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: 1rem;
  min-height: 68vh;
}
.chat-panel {
  background: white;
  border: 1.5px solid var(--sand-dk);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-width: 0;
}
.chat-panel .head {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--sand-dk);
  font-family: 'DM Sans', sans-serif;
  font-optical-sizing: auto;
  font-size: 1.05rem;
}
.chat-conversation-list {
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.75rem;
}
.chat-conversation {
  border: 1px solid var(--sand-dk);
  border-radius: 9px;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
}
.chat-conversation.active { border-color: var(--clay); background: #fff7f2; }
.chat-conversation .title {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
  overflow-wrap: anywhere;
}
.chat-conversation .preview {
  color: var(--ink-lt);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-messages {
  flex: 1;
  max-height: 60vh;
  overflow-y: auto;
  padding: 1rem;
  background: #fff;
}
.chat-bubble {
  max-width: 80%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  margin-bottom: 0.55rem;
  border: 1px solid var(--sand-dk);
  background: #fffdfa;
  overflow-wrap: anywhere;
}
.chat-bubble.me {
  margin-left: auto;
  background: #fff2eb;
  border-color: #f6c9b7;
}
.chat-bubble .meta {
  font-size: 0.7rem;
  color: var(--ink-lt);
  margin-bottom: 0.2rem;
}
.chat-composer {
  border-top: 1px solid var(--sand-dk);
  padding: 0.75rem;
  display: flex;
  gap: 0.6rem;
}
.chat-composer textarea {
  flex: 1;
  border: 1.5px solid var(--sand-dk);
  border-radius: 8px;
  padding: 0.65rem;
  font-family: 'DM Sans', sans-serif;
  font-optical-sizing: auto;
  min-height: 48px;
  resize: vertical;
}
.chat-empty {
  color: var(--ink-lt);
  font-size: 0.88rem;
  padding: 1rem;
}

/* DASHBOARD PAGES */
.dashboard-page {
  max-width: 1140px;
  margin: 1.5rem auto;
  padding: 0 1.2rem;
}
.dashboard-header {
  margin-bottom: 1rem;
}
.dashboard-header h1 {
  font-family: 'DM Sans', sans-serif;
  font-optical-sizing: auto;
  font-size: 2rem;
  margin-bottom: 0.35rem;
}
.dashboard-header p {
  color: var(--ink-lt);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}
.dashboard-card {
  background: white;
  border: 1.5px solid var(--sand-dk);
  border-radius: var(--r-lg);
  padding: 1rem;
  min-width: 0;
}
.dashboard-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-optical-sizing: auto;
  font-size: 1.2rem;
  margin-bottom: 0.65rem;
}
.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.profile-user-box {
  border: 1px solid var(--sand-dk);
  border-radius: 10px;
  padding: 0.75rem;
  background: #fffdfa;
  min-width: 0;
}
.profile-user-name {
  font-size: 1.05rem;
  font-weight: 700;
}
.profile-user-meta {
  font-size: 0.85rem;
  color: var(--ink-lt);
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}
.profile-actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.metric {
  border: 1px solid var(--sand-dk);
  border-radius: 10px;
  background: #fffdfa;
  text-align: center;
  padding: 0.7rem;
}
.metric .value {
  font-family: 'DM Sans', sans-serif;
  font-optical-sizing: auto;
  font-size: 1.4rem;
  color: var(--clay-dk);
}
.metric .label {
  font-size: 0.75rem;
  color: var(--ink-lt);
}
.products-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.7rem;
}
.product-mini-card {
  border: 1px solid var(--sand-dk);
  border-radius: 10px;
  padding: 0.75rem;
  background: #fff;
  min-width: 0;
}
.product-mini-card .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}
.product-mini-card .title {
  font-weight: 700;
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}
.product-mini-card .desc {
  font-size: 0.82rem;
  color: var(--ink-lt);
  margin-top: 0.45rem;
  overflow-wrap: anywhere;
}
.product-mini-card .meta {
  font-size: 0.78rem;
  color: var(--ink-lt);
  margin-top: 0.4rem;
  overflow-wrap: anywhere;
}

/* OFFERS PAGE */
.offers-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.offers-filters .tab { flex: 0 1 auto; }
.offers-filters .search-input { flex: 1 1 220px; min-width: 0; }
.offers-list {
  display: grid;
  gap: 0.7rem;
}
.offer-card {
  border: 1px solid var(--sand-dk);
  border-radius: 10px;
  padding: 0.8rem;
  background: #fff;
  min-width: 0;
}
.offer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.offer-head h4 {
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  margin: 0;
  overflow-wrap: anywhere;
}
.offer-meta {
  font-size: 0.8rem;
  color: var(--ink-lt);
  margin-top: 0.4rem;
  overflow-wrap: anywhere;
}
.offer-message {
  font-size: 0.85rem;
  margin-top: 0.45rem;
  overflow-wrap: anywhere;
}
.offer-actions {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  nav {
    height: auto;
    padding: 0 0 0.75rem;
    position: sticky;
  }

  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "toggle logo avatar"
      "links links links";
    row-gap: 0;
    padding: 0.9rem 1rem;
    align-items: start;
  }

  .nav-toggle {
    display: inline-flex;
    grid-area: toggle;
    margin-left: 0;
    justify-self: start;
  }

  .logo {
    position: static;
    transform: none;
    grid-area: logo;
    justify-self: center;
  }

  .nav-user-area {
    grid-area: avatar;
    justify-self: end;
  }

  .nav-avatar-toggle--desktop {
    display: none;
  }

  .nav-avatar-link--mobile {
    display: inline-flex;
  }

  .nav-links {
    display: flex;
    grid-area: links;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: calc(100% + 2rem);
    background: var(--ink);
    border-top: 1px solid rgba(247, 237, 216, 0.12);
    border-radius: 0 0 14px 14px;
    margin: -1px -1rem 0;
    padding: 0.75rem 1rem 0.25rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-0.5rem);
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.22s ease, transform 0.22s ease;
  }

  .nav-user-menu {
    display: none;
  }

  .nav-links.open {
    max-height: calc(100vh - 120px);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    padding-bottom: 1rem;
  }

  .nav-links .nav-btn,
  .nav-links .nav-user {
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
  }

  .nav-links .nav-btn {
    padding: 12px 16px;
    font-size: 0.98rem;
    border-radius: 10px;
  }

  .nav-links .nav-btn--mobile-only {
    display: inline-flex;
  }

  .nav-links .nav-user {
    text-align: left;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: 10px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3rem 1.25rem 3.5rem;
  }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .hero-copy {
    max-width: none;
  }
  .hero h1 { font-size: 2rem; }
  .hero p {
    max-width: none;
  }
  .hero-search-row {
    padding: 5px;
  }
  .hero-search {
    max-width: none;
  }
  .hero-search-input {
    padding-left: 1rem;
    font-size: 0.95rem;
  }
  .hero-search-button {
    width: 50px;
    height: 50px;
  }
  .hero-visual {
    min-height: 240px;
  }
  .hero-image {
    width: min(100%, 420px);
  }
  .cards-grid { grid-template-columns: 1fr; }
  .products-layout { grid-template-columns: 1fr; }
  .products-sidebar { position: static; }
  .products-sidebar__card { padding: 0.9rem; }
  .side-panel { width: 100%; max-width: 100vw; }
  .chat-layout { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .summary-metrics { grid-template-columns: 1fr; }
  .tabs .tab { flex: 1 1 calc(50% - 0.2rem); }
  .search-bar > .search-field,
  .search-bar > .search-input--select {
    flex-basis: 100%;
    max-width: none;
  }
  .search-field--sidebar,
  .search-input--sidebar {
    max-width: none;
    width: 100%;
  }
  .search-field {
    border-radius: 18px;
  }
  .search-input--main {
    padding-left: 0.05rem;
  }
  .search-input--select {
    min-width: 0;
    height: 52px;
  }
  .offers-filters .search-input { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .modal,
  .modal-overlay,
  .nav-links,
  .nav-toggle span,
  .side-panel {
    transition: none !important;
  }
}
