/* ============================================================
   WYBÓR DOMU – osobna strona (nie wpływa na style-v5.css)
   ============================================================ */

.wd-page { background: var(--white); }

.wd-header {
  border-bottom: 1px solid var(--cream-dark);
  padding: 22px 0;
}
.wd-header-inner { display: flex; align-items: center; justify-content: space-between; }
.wd-logo img { height: 44px; display: block; }
.wd-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .88rem;
  color: var(--green-dark); transition: color var(--transition);
}
.wd-back:hover { color: var(--green-mid); }

.wd-intro { padding: 56px 0 12px; }
.wd-title {
  font-family: 'Outfit', sans-serif; font-weight: 800; text-transform: uppercase;
  letter-spacing: .03em; font-size: clamp(2rem, 4vw, 2.9rem);
  color: var(--green-dark); margin: 10px 0 14px;
}
.wd-sub { max-width: 620px; color: var(--text-mid); line-height: 1.75; }

.wd-tool { padding: 32px 0 96px; }

/* ---- wyszukiwarka po numerze lokalu ---- */
.wd-search-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--cream-dark); border-radius: 999px;
  padding: 12px 20px; max-width: 420px; margin-bottom: 24px;
  color: var(--text-light); transition: border-color var(--transition);
}
.wd-search-row:focus-within { border-color: var(--green-mid); }
.wd-search-input {
  border: none; outline: none; flex: 1; font-family: 'Outfit', sans-serif;
  font-size: .92rem; color: var(--text-dark); background: transparent;
}

/* ---- filtry ---- */
.wd-filters {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 14px 28px; margin-bottom: 30px;
}
.wd-range-row { display: flex; align-items: center; gap: 8px; }
.wd-range-row input[type="number"] {
  width: 90px; border: 1px solid var(--cream-dark); background: var(--white);
  color: var(--text-dark); border-radius: 7px; padding: 7px 8px; font-size: .85rem;
  font-family: 'Outfit', sans-serif;
}
.wd-range-row input[disabled] { background: var(--cream); color: var(--text-light); cursor: not-allowed; }
.wd-range-row span { color: var(--text-light); font-size: .82rem; }
.wd-reset-btn {
  border: 1px solid var(--cream-dark); background: transparent; color: var(--text-light);
  border-radius: 8px; padding: 8px 14px; font-size: .8rem; font-family: 'Outfit', sans-serif;
  cursor: pointer; transition: all var(--transition);
}
.wd-reset-btn:hover { color: var(--text-dark); border-color: var(--text-light); }
.wd-filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-filter-label {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-light); font-weight: 700;
}
.wd-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wd-chip {
  border: 1px solid var(--cream-dark); background: var(--white); color: var(--text-dark);
  border-radius: 999px; padding: 7px 16px; font-size: .8rem; font-family: 'Outfit', sans-serif;
  cursor: pointer; transition: all var(--transition);
}
.wd-chip:hover { border-color: var(--green-mid); }
.wd-chip.active { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.wd-filter-count { margin-left: auto; font-size: .84rem; color: var(--text-light); }

/* ---- mapa inwestycji (bloki domów) ---- */
.wd-map-section { margin-bottom: 56px; }
.wd-map-title {
  font-family: 'Outfit', sans-serif; font-weight: 800; letter-spacing: .03em;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem); color: var(--green-dark); margin: 8px 0 10px;
}
.wd-map-sub { max-width: 640px; color: var(--text-mid); line-height: 1.7; margin-bottom: 22px; font-size: .92rem; }

/* ---- prawdziwy plan osiedla + hotspoty ---- */
.wd-real-map-wrap {
  position: relative; width: 100%; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: var(--white);
}
.wd-real-map-img { width: 100%; height: auto; display: block; }
.wd-hotspots { position: absolute; inset: 0; }
.wd-hotspot {
  position: absolute; border: 2px solid transparent; border-radius: 4px;
  cursor: pointer; transition: transform .15s ease, filter .15s ease, opacity .15s ease, border-color .15s ease;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6%;
}
.wd-hotspot:hover { transform: scale(1.04); border-color: rgba(255,255,255,.9); z-index: 2; }
.wd-hotspot.available { background: rgba(46,158,86,.32); }
.wd-hotspot.reserved   { background: rgba(212,152,15,.38); }
.wd-hotspot.sold        { background: rgba(181,71,63,.4); }
.wd-hotspot.is-dim { opacity: .18; }
.wd-hotspot .code {
  font-family: 'Josefin Sans', sans-serif; font-weight: 700;
  font-size: clamp(.6rem, 1.4vw, .95rem); color: var(--white);
  text-shadow: 0 1px 4px rgba(0,0,0,.55); pointer-events: none;
}
.wd-map-legend { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.wd-map-legend span { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--text-mid); }
.wd-map-legend .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.wd-map-legend .dot.available { background: #2e9e56; }
.wd-map-legend .dot.reserved  { background: #d4980f; }
.wd-map-legend .dot.sold       { background: #b5473f; }

.wd-list-header { margin-bottom: 20px; }

/* ---- siatka kart ---- */
.wd-card-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.wd-card {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--white); box-shadow: 0 3px 14px rgba(20,50,30,.08);
  transition: transform .25s ease, box-shadow .25s ease;
  border: none; text-align: left; font-family: inherit; padding: 0;
}
.wd-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(20,50,30,.16); }
.wd-card-photo { position: relative; height: 168px; overflow: hidden; background: var(--cream); }
.wd-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.wd-card:hover .wd-card-photo img { transform: scale(1.06); }
.wd-card-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(10,20,12,.6) 100%);
}
.wd-card-badge { position: absolute; top: 10px; right: 10px; z-index: 1; min-width: auto; padding: 4px 11px; font-size: .62rem; }
.wd-card-code {
  position: absolute; bottom: 9px; left: 13px; z-index: 1;
  color: var(--white); font-family: 'Josefin Sans', sans-serif;
  font-size: 1.25rem; letter-spacing: .03em;
}
.wd-card-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 3px; }
.wd-card-block { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-light); }
.wd-card-area { font-size: .87rem; color: var(--text-mid); font-weight: 500; }
.wd-card-cta {
  font-size: .76rem; color: var(--green-mid); font-weight: 600; margin-top: 6px;
  display: flex; align-items: center; gap: 4px;
}
.wd-empty { grid-column: 1 / -1; text-align: center; padding: 48px 20px; color: var(--text-light); font-size: .9rem; }

/* ---- modal szczegółów domu ---- */
.wd-overlay {
  display: flex; position: fixed; inset: 0; z-index: 9998;
  background: rgba(10,20,12,.55); align-items: center; justify-content: center;
  padding: 24px; visibility: hidden; pointer-events: none;
}
.wd-overlay.open { visibility: visible; pointer-events: auto; }
.wd-box {
  background: var(--white); border-radius: var(--radius);
  max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto;
  position: relative; box-shadow: 0 20px 80px rgba(0,0,0,.25);
}
.wd-close {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.9); color: var(--text-dark);
  font-size: 1.1rem; cursor: pointer; transition: background var(--transition);
}
.wd-close:hover { background: var(--white); }
.wd-box-photo { position: relative; height: 220px; }
.wd-box-photo img { width: 100%; height: 100%; object-fit: cover; }
.wd-box-status-pill { position: absolute; top: 16px; left: 16px; }
.wd-box-code {
  position: absolute; bottom: 12px; left: 18px;
  color: var(--white); font-family: 'Josefin Sans', sans-serif; font-size: 1.6rem; letter-spacing: .03em;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.wd-box-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 18px; }
.wd-box-block { font-size: .82rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.wd-box-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wd-box-stat {
  background: var(--cream); border-radius: var(--radius); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.wd-box-stat .k { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-light); }
.wd-box-stat .v { font-size: .92rem; font-weight: 700; color: var(--text-dark); }
.wd-box-thumbs { display: flex; gap: 8px; }
.wd-box-thumbs img { width: 100%; height: 62px; object-fit: cover; border-radius: 6px; cursor: pointer; transition: opacity var(--transition); }
.wd-box-thumbs img:hover { opacity: .8; }
.wd-box-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.wd-box-actions .btn { padding: 11px 24px; font-size: .8rem; }

.wd-contact-form { display: flex; flex-direction: column; gap: 10px; }
.wd-contact-form h4 {
  font-family: 'Josefin Sans', sans-serif; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-light); margin: 4px 0 2px;
}
.wd-contact-form input, .wd-contact-form textarea {
  border: 1px solid var(--cream-dark); background: var(--white); color: var(--text-dark);
  border-radius: 8px; padding: 10px 12px; font-size: .88rem; font-family: 'Outfit', sans-serif; resize: vertical;
}
.wd-contact-form button[type="submit"] { align-self: flex-start; margin-top: 2px; }
.wd-form-note { font-size: .74rem; color: var(--text-light); font-style: italic; margin: 0; }

/* ---- toast (potwierdzenie wysłania) ---- */
.wd-toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--green-dark); color: var(--white);
  padding: 11px 20px; border-radius: 9px; font-size: .86rem;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  z-index: 10000;
}
.wd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .wd-card-grid { grid-template-columns: repeat(2, 1fr); }
  .wd-filter-count { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) {
  .wd-card-grid { grid-template-columns: 1fr; }
  .wd-box-stats { grid-template-columns: 1fr 1fr; }
  .wd-box-thumbs img:nth-child(3) { display: none; }
  .wd-map-house { padding: 12px 4px; font-size: .82rem; }
}
