/* ST-Montaj Classifieds frontend UI — clean source release 0.13.0 */

.stc-placeholder,
.stc-submit-form,
.stc-cabinet,
.stc-listings {
  --stc-border: #e5e7eb;
  --stc-border-strong: #d0d5dd;
  --stc-text: #111827;
  --stc-muted: #667085;
  --stc-soft: #f8fafc;
  --stc-chip: #eef2ff;
  --stc-chip-text: #1e3a8a;
  --stc-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}

.stc-placeholder *,
.stc-submit-form *,
.stc-cabinet *,
.stc-listings *,
.stc-single-layout * {
  box-sizing: border-box;
}

.stc-placeholder,
.stc-submit-form,
.stc-cabinet,
.stc-listings {
  padding: 24px;
  border: 1px solid var(--stc-border);
  border-radius: 16px;
  background: #f9fafb;
}

.stc-placeholder strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.stc-placeholder p {
  margin: 0;
}

.stc-notice {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff;
}

.stc-notice--success {
  border-color: #86efac;
  background: #f0fdf4;
}

.stc-notice--error {
  border-color: #fecaca;
  background: #fef2f2;
}

.stc-notice--info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.stc-help {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--stc-muted);
}

.stc-submit-note {
  margin: 18px 0;
  color: #4b5563;
}

.stc-field {
  margin-bottom: 16px;
}

.stc-field label {
  display: block;
  margin-bottom: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.stc-field input,
.stc-field textarea,
.stc-field select {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--stc-border-strong);
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
}

.stc-field textarea {
  min-height: 160px;
}

.stc-field--hp {
  position: absolute;
  left: -9999px;
  height: 1px;
  overflow: hidden;
}

.stc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stc-grid--filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.stc-button,
.stc-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #111827;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.stc-button:hover {
  color: #fff;
  text-decoration: none;
}

.stc-button--secondary,
.stc-button--secondary:visited {
  border-color: #e5e7eb;
  background: #f3f4f6;
  color: #111827;
}

.stc-button--secondary:hover {
  color: #111827;
}

/* Catalog */

.stc-listings {
  width: min(100%, 1120px);
  margin-left: auto;
  margin-right: auto;
}

.stc-listings-head {
  margin-bottom: 18px;
}

.stc-listings-head h2 {
  margin-top: 0;
}

.stc-listing-filters {
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid var(--stc-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.stc-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.stc-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(282px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.stc-listing-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--stc-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--stc-shadow);
}

.stc-listing-card__photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eef2f7;
}

.stc-listing-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stc-listing-card__meta,
.stc-listing-card__title,
.stc-listing-card__excerpt,
.stc-listing-card__params {
  margin-left: 16px;
  margin-right: 16px;
}

.stc-listing-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
  margin-top: 14px;
  margin-bottom: 10px;
}

.stc-listing-card__meta span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--stc-chip);
  color: var(--stc-chip-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.stc-listing-card__title {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.25;
}

.stc-listing-card__title a,
.stc-listing-card__title a:visited {
  color: var(--stc-text);
  text-decoration: none;
}

.stc-listing-card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stc-listing-card__excerpt {
  color: #475467;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.stc-listing-card__params {
  display: grid;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f2f5;
}

.stc-listing-card__params div {
  display: grid;
  grid-template-columns: minmax(88px, 36%) minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
}

.stc-listing-card__params dt,
.stc-single-layout dt {
  color: var(--stc-muted);
  font-size: 13px;
  font-weight: 700;
}

.stc-listing-card__params dd,
.stc-single-layout dd {
  min-width: 0;
  margin: 0;
  color: var(--stc-text);
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: normal;
}

.stc-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.stc-pagination a {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.stc-pagination a.is-active {
  background: #111827;
  color: #fff;
}

/* Single listing */

.stc-single-layout {
  --stc-border: #e5e7eb;
  --stc-muted: #667085;
  --stc-text: #111827;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 28px;
  align-items: start;
  width: 100%;
  margin-top: 24px;
}

.stc-single-main,
.stc-single-sidebar,
.stc-single-layout > section,
.stc-single-layout > aside,
.stc-single-layout > div {
  min-width: 0;
}

.stc-single-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.stc-single-gallery__item {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #e5e7eb;
}

.stc-single-gallery__item.is-primary {
  grid-column: span 3;
}

.stc-single-gallery__image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.stc-single-gallery__item.is-primary .stc-single-gallery__image {
  aspect-ratio: 16 / 9;
}

.stc-single-gallery--empty {
  display: flex;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  color: var(--stc-muted);
  background: #f9fafb;
}

.stc-single-description,
.stc-single-files,
.stc-single-card {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--stc-border);
  border-radius: 16px;
  background: #fff;
}

.stc-single-card h2,
.stc-single-description h2,
.stc-single-files h2 {
  margin-top: 0;
  font-size: 22px;
}

.stc-single-params dl,
.stc-single-contact dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.stc-single-params dl div {
  display: grid;
  grid-template-columns: minmax(118px, 38%) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.stc-single-contact dl div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: start;
}

.stc-single-contact dd {
  line-height: 1.45;
}

.stc-single-contact a[href^="tel:"] {
  white-space: nowrap;
}

.stc-single-contact a[href^="mailto:"] {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.stc-single-files ul {
  margin-bottom: 0;
}

/* Cabinet */

.stc-table-wrap {
  overflow-x: auto;
}

.stc-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.stc-table th,
.stc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--stc-border);
  text-align: left;
  vertical-align: top;
}

.stc-table th {
  background: #f3f4f6;
  font-weight: 700;
}

.stc-attachment-editor {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--stc-border);
  border-radius: 14px;
  background: #fff;
}

.stc-attachment-editor h3 {
  margin-top: 0;
}

.stc-attachment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stc-attachment-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--stc-border);
  border-radius: 12px;
  background: #f9fafb;
}

.stc-attachment-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #e5e7eb;
}

.stc-attachment-thumb--empty {
  min-height: 90px;
}

.stc-attachment-file-list {
  margin-left: 0;
  padding-left: 18px;
}

@media (max-width: 1100px) {
  .stc-grid--filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stc-single-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  }
}

@media (max-width: 900px) {
  .stc-single-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .stc-grid,
  .stc-grid--filters,
  .stc-listing-grid,
  .stc-attachment-grid {
    grid-template-columns: 1fr;
  }
  .stc-listing-card__params div,
  .stc-single-params dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* STC-STAGE-1-22-BEGIN */
/* Catalog, submit form and cabinet visual polish.
   Layout-only CSS. No hiding, no JS, no masking. */

.stc-listings,
.stc-submit-form,
.stc-cabinet {
  --stc-bg: #f8fafc;
  --stc-card: #ffffff;
  --stc-border: #e5e7eb;
  --stc-soft-border: #eef2f6;
  --stc-text: #111827;
  --stc-muted: #667085;
  --stc-primary: #111827;
  --stc-primary-hover: #020617;
  --stc-badge-bg: #eef2ff;
  --stc-badge-text: #1e3a8a;
  --stc-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}

.stc-listings *,
.stc-submit-form *,
.stc-cabinet * {
  box-sizing: border-box;
}

.stc-listings {
  padding: 28px;
  border: 1px solid var(--stc-border);
  border-radius: 18px;
  background: var(--stc-bg);
}

.stc-listings-head {
  margin-bottom: 20px;
}

.stc-listings-head h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.12;
}

.stc-listings-head p {
  margin: 0;
  color: #475467;
}

.stc-listing-filters {
  margin: 0 0 26px;
  padding: 20px;
  border: 1px solid var(--stc-border);
  border-radius: 16px;
  background: var(--stc-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.stc-grid--filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 14px;
  align-items: end;
}

.stc-field {
  margin-bottom: 16px;
}

.stc-grid--filters .stc-field {
  margin-bottom: 0;
}

.stc-field label {
  display: block;
  margin: 0 0 7px;
  color: #344054;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

.stc-field input,
.stc-field textarea,
.stc-field select {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 9px 12px;
  background: #fff;
  color: var(--stc-text);
  font-size: 15px;
  line-height: 1.35;
}

.stc-field textarea {
  min-height: 170px;
  resize: vertical;
}

.stc-help {
  margin: 7px 0 0;
  color: var(--stc-muted);
  font-size: 14px;
  line-height: 1.45;
}

.stc-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.stc-button,
.stc-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--stc-primary);
  border-radius: 10px;
  background: var(--stc-primary);
  color: #fff;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.stc-button:hover {
  background: var(--stc-primary-hover);
  color: #fff;
  text-decoration: none;
}

.stc-button--secondary,
.stc-button--secondary:visited {
  border-color: #e5e7eb;
  background: #f3f4f6;
  color: #111827;
}

.stc-button--secondary:hover {
  background: #e5e7eb;
  color: #111827;
}

.stc-listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.stc-listing-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--stc-border);
  border-radius: 18px;
  background: var(--stc-card);
  box-shadow: var(--stc-shadow);
}

.stc-listing-card__photo {
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #eef2f7;
  aspect-ratio: 16 / 10;
}

.stc-listing-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stc-listing-card__meta,
.stc-listing-card__title,
.stc-listing-card__excerpt,
.stc-listing-card__params {
  margin-left: 18px;
  margin-right: 18px;
}

.stc-listing-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
  margin-top: 16px;
  margin-bottom: 10px;
}

.stc-listing-card__meta span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--stc-badge-bg);
  color: var(--stc-badge-text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.stc-listing-card__title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.22;
}

.stc-listing-card__title a,
.stc-listing-card__title a:visited {
  color: var(--stc-text);
  text-decoration: none;
}

.stc-listing-card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stc-listing-card__excerpt {
  margin-top: 0;
  margin-bottom: 16px;
  color: #475467;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.stc-listing-card__params {
  display: grid;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--stc-soft-border);
}

.stc-listing-card__params div {
  display: grid;
  grid-template-columns: minmax(82px, 34%) minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
}

.stc-listing-card__params dt {
  color: var(--stc-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.stc-listing-card__params dd {
  min-width: 0;
  margin: 0;
  color: var(--stc-text);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Submit form */
.stc-submit-form {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding: 28px;
  border: 1px solid var(--stc-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--stc-shadow);
}

.stc-submit-form .stc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 0;
}

.stc-submit-note {
  margin: 18px 0;
  color: #475467;
  line-height: 1.55;
}

/* Cabinet */
.stc-cabinet {
  padding: 28px;
  border: 1px solid var(--stc-border);
  border-radius: 18px;
  background: var(--stc-bg);
}

.stc-cabinet > h2:first-child,
.stc-cabinet h2 {
  margin-top: 0;
}

.stc-cabinet .stc-placeholder,
.stc-placeholder {
  padding: 24px;
  border: 1px solid var(--stc-border);
  border-radius: 16px;
  background: #fff;
}

.stc-placeholder strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.2;
}

.stc-placeholder p {
  margin: 0;
  color: #475467;
}

/* Tables, future cabinet lists */
.stc-table-wrap {
  overflow-x: auto;
}

.stc-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.stc-table th,
.stc-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--stc-border);
  text-align: left;
  vertical-align: top;
}

.stc-table th {
  background: #f3f4f6;
  color: #344054;
  font-weight: 800;
}

/* Notices */
.stc-notice {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff;
}

.stc-notice--success {
  border-color: #86efac;
  background: #f0fdf4;
}

.stc-notice--error {
  border-color: #fecaca;
  background: #fef2f2;
}

.stc-notice--info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.stc-field--hp {
  position: absolute;
  left: -9999px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .stc-listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stc-grid--filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .stc-listings,
  .stc-submit-form,
  .stc-cabinet {
    padding: 18px;
  }

  .stc-listing-grid,
  .stc-grid--filters,
  .stc-submit-form .stc-grid {
    grid-template-columns: 1fr;
  }

  .stc-grid--filters {
    gap: 12px;
  }

  .stc-grid--filters .stc-field {
    margin-bottom: 0;
  }

  .stc-listing-card__params div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
/* STC-STAGE-1-22-END */
