/* offers.css — Yandex Realty-style compact apartment listings */

/* ─── Section base ─── */
.section {
  padding: 28px;
  margin-bottom: 24px;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  margin-bottom: 16px;
  line-height: 1.15;
letter-spacing:0.03em;
}

/* ─── Skeleton loading ─── */
.skeleton-card,
.skeleton-offer {
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  position: relative;
  overflow: hidden;
}

.skeleton-card { min-height: 98px; }

.skeleton-offer { min-height: 100px; }

.skeleton-card::before,
.skeleton-offer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
  transform: translateX(-100%);
  animation: skeletonShimmer 1.2s infinite;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .12);
}

.skeleton-line.w40 { width: 40%; }

.skeleton-line.w60 { width: 60%; }

.skeleton-line.w80 { width: 80%; }

.skeleton-pad { padding: 14px; display: grid; gap: 10px; }

/* ─── Fatal state ─── */
.fatal-state {
  margin: 14px 0 20px;
  padding: 20px;
  border: 1px solid #ececf1;
  border-radius: var(--c-radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 18, 24, .06);
}

.fatal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  margin-bottom: 8px;
letter-spacing:0.03em;
}

.fatal-desc {
  color: #5f5f69;
  line-height: 1.6;
  margin-bottom: 14px;
}

.fatal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fatal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #dedee6;
  color: #2b2b2f;
  text-decoration: none;
}

.fatal-btn.primary {
  background: #e30613;
  border-color: #e30613;
  color: #fff;
}

/* ─── Filter chips ─── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.chip {
  background: #fff;
  border: 1px solid var(--c-line);
  color: #2b2b2f;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
  font-size: 13px;
}

.chip:hover {
  border-color: rgba(227, 6, 19, .45);
}

.chip.active {
  background: rgba(227, 6, 19, .12);
  border-color: rgba(227, 6, 19, .55);
  color: #2b2b2f;
}

/* ─── Offers grid: compact rows (Yandex Realty style) ─── */
.offers {
  display: grid;
  gap: 0;
}

.offer {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 140px 130px;
  gap: 20px 24px;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid #f0f0f3;
  transition: background .15s ease;
  text-decoration: none;
  color: inherit;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}

.offer:first-child {
  border-top: 1px solid #f0f0f3;
}

.offer:hover {
  background: #fafbfc;
}

.offer.fade-up {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Plan image: compact thumbnail */
.offer-img {
  width: 120px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f5f7;
  flex-shrink: 0;
}

.offer-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Info column */
.offer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.offer-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: #2b2b2f;
  margin: 0;
letter-spacing:0.03em;
}

.offer-meta {
  color: #6b6b74;
  font-size: 13px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.offer-meta span {
  white-space: nowrap;
}

.offer-meta-sep {
  color: #d0d0d8;
  user-select: none;
}

.offer-variants {
  font-size: 12px;
  color: #8a8a93;
  margin-top: 2px;
}

/* Price column */
.offer-price-col {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  white-space: nowrap;
}

.offer-price {
  font-size: 19px;
  color: #2b2b2f;
  font-weight: 800;
  margin: 0;
}

.offer-price-m2 {
  font-size: 12px;
  color: #8a8a93;
}

.offer-actions-col {
  grid-column: 4;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 130px;
}

.offer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: #f4f5f7;
  color: #2b2b2f;
  transition: all .2s;
  width: 100%;
}

.offer-btn--primary {
  background: #e30613;
  color: #fff;
}

.offer-btn--primary:hover {
  background: #cc0511;
}

.offer-btn:not(.offer-btn--primary):hover {
  background: #e5e6ea;
}

.offer-btn--primary[href="#"] {
  opacity: .45;
  pointer-events: none;
}

/* Show more */
.offers-more-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 0 2px;
}

.offers-more-btn {
  background: #fff;
  border: 1px solid var(--c-line);
  color: #2b2b2f;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}

.offers-more-btn:hover {
  border-color: rgba(227, 6, 19, .45);
  background: rgba(227, 6, 19, .08);
}

.offers-more-hint {
  font-size: 12px;
  color: #a8a8b3;
}

/* ─── Stats grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

/* ─── Tech / characteristics grid (Yandex-style) ─── */
.tech-scroll-outer {
  margin: 0 -20px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tech-scroll-outer::-webkit-scrollbar { display: none; }

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 4px 0;
}

.tech-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #f8f9fb;
  border: 1px solid #eeeef2;
  border-radius: 12px;
  transition: border-color .2s;
}

.tech-cell:hover {
  border-color: #d0d0d8;
}

.tech-ico {
  font-size: 20px;
  line-height: 1;
  color: #2b2b2f;
}

.tech-sub {
  font-size: 13px;
  color: #6b6b74;
}

.tech-val {
  font-size: 16px;
  font-weight: 700;
  color: #2b2b2f;
}

/* ─── Description: Read more toggle ─── */
.desc {
  color: #4b4b53;
  line-height: 1.65;
  font-size: 15px;
  position: relative;
}

.desc.collapsed {
  max-height: 120px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.read-more-btn {
  display: block;
  margin-top: 12px;
  background: none;
  border: none;
  padding: 0;
  color: #e30613;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.read-more-btn:hover {
  text-decoration: underline;
}

/* ─── Developer card ─── */
.developer-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: #fff;
}

.dev-logo {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f5f7;
  border-radius: 12px;
  font-weight: 800;
  color: #d0d0d8;
  font-size: 24px;
  overflow: hidden;
}

.dev-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dev-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.dev-meta {
  font-size: 14px;
  color: #6b6b74;
  line-height: 1.5;
}

/* ─── Map ─── */
#complexMap {
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--c-line);
}

/* ─── Responsive: mobile offers ─── */
@media (max-width: 700px) {
  .offer {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 16px;
  }

  .offer-img {
    width: 80px;
    height: 64px;
    border-radius: 8px;
  }

  .offer-price-col {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
  }

  .offer-title {
    font-size: 16px;
  }

  .offer-price {
    font-size: 16px;
  }

  .offer-actions-col {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 4px;
    gap: 8px;
  }
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes skeletonShimmer {
  to { transform: translateX(100%); }
}
