/* ============================================
   CHOWK — forms, auth, listing-detail, post-ad
   ============================================ */

/* ---------- Auth card ---------- */

.auth-wrap {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 110px 24px 40px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 32px 28px;
  background: var(--white);
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.auth-card p.sub {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 22px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--paper);
  outline: none;
}

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

.field-row {
  display: flex;
  gap: 12px;
}
.field-row .field { flex: 1; }

.auth-card .btn { width: 100%; margin-top: 6px; }

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.auth-switch a { color: var(--primary-dk); font-weight: 500; }

/* ---------- Post-ad form ---------- */

.post-ad-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 110px 24px 70px;
}

.post-ad-wrap h1 { font-size: 1.7rem; margin-bottom: 4px; }
.post-ad-wrap p.sub { color: var(--ink-soft); margin: 0 0 28px; }

.form-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px;
  margin-bottom: 20px;
  background: var(--white);
}

.form-section h2 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--primary-dk);
}

.type-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
}

.type-toggle label {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  font-size: 0.9rem;
  cursor: pointer;
}

.type-toggle input { display: none; }

.type-toggle input:checked + span {
  color: var(--primary-dk);
  font-weight: 600;
}

.image-drop {
  display: flex;
  width: 100%;
  min-height: 150px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 30px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  background: var(--paper-alt);
  cursor: pointer;
}

#photos {
  display: none;
}

.image-drop.is-dragging {
  border-color: var(--primary);
  background: var(--paper);
}

#photos {
  display: none;
}

.image-drop.is-dragging {
  border-color: var(--primary);
  background: var(--paper);
}

/* ---------- Listing detail ---------- */

.detail-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 70px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
}

.gallery-thumbs img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--line);
  border: 1px solid var(--line);
  cursor: pointer;
}

.detail-desc {
  margin-top: 26px;
  line-height: 1.7;
  color: var(--ink);
}

.detail-desc h2 { font-size: 1.1rem; margin-bottom: 10px; }

.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px;
  background: var(--white);
  height: fit-content;
}

.side-card .listing-price {
  font-size: 1.6rem;
}

.side-card h1 {
  font-size: 1.25rem;
  margin: 4px 0 6px;
}

.side-card .listing-meta {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.seller-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.seller-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-alt);
  border: 1px solid var(--line);
}

.seller-name { font-weight: 500; font-size: 0.92rem; }
.seller-since { font-size: 0.78rem; color: var(--ink-soft); }

.side-card .btn { width: 100%; margin-bottom: 10px; }

@media (max-width: 800px) {
  .detail-wrap { grid-template-columns: 1fr; }
}
