*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #F2F0EC;
  --text: #000000;
  --card: #F8F8F8;
  --badge: #E2E0DB;
  --btn-primary: #000000;
  --muted: #787878;
  --brand: #FFC300;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* ── Preloader ───────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  background-color: #FFC300;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  transition: opacity 0.5s ease;
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preloader-logo {
  position: absolute;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #000;
  will-change: transform;
  transform-origin: left center;
}

.preloader-headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 12vw, 10rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: #000;
  text-align: center;
  letter-spacing: -0.01em;
}

.preloader-counter {
  position: absolute;
  bottom: 36px;
  right: 48px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #000;
}

.preloader-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background-color: rgba(0,0,0,0.15);
}

.preloader-bar {
  height: 100%;
  width: 0%;
  background-color: #000;
  transition: width 0.05s linear;
}

/* ── Header ─────────────────────────────────── */
.header-wrap {
  position: sticky;
  top: 15px;
  z-index: 100;
  padding: 0 15px;
  margin-bottom: 15px;
}

header {
  background-color: #fff;
  padding: 0 15px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  max-width: 560px;
  margin: 0 auto;
}

.logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.btn-primary {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: var(--btn-primary);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ── Main content ────────────────────────────── */
main {
  padding: 24px 40px;
  max-width: 1400px;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 0.4s ease;
}

main.visible {
  opacity: 1;
}


/* ── Billboard Grid ──────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Billboard Card ──────────────────────────── */
.card {
  position: relative;
  background-color: #F8F8F8;
  overflow: hidden;
  cursor: pointer;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.card:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand);
}

/* ── Card Checkbox (quote page) ──────────────── */
.card-checkbox {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  cursor: pointer;
}

.card-check {
  display: none;
}

.card-check-mark {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--badge);
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}

.card-check:checked + .card-check-mark {
  background: var(--text);
  border-color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.card:has(.card-check:checked) {
  box-shadow: 0 0 0 2px var(--text);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(90deg, #E8E6E1 25%, #F0EEE9 50%, #E8E6E1 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.card-image.loaded {
  opacity: 1;
  background: none;
  animation: none;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


.card-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.availability {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.availability-label {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.availability-date {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background-color: var(--badge);
  color: var(--text);
  padding: 5px 8px;
  border-radius: 8px;
}

.availability-date--later {
  background-color: #D4D2CD;
  color: var(--muted);
}

.card-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 4px;
}

.card-tagline {
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.card-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 16px;
}

.card-specs {
  list-style: disc;
  padding-left: 18px;
  margin-bottom: 0;
}

.card-specs li {
  font-family: 'Barlow', sans-serif;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 4px;
}


/* ── Modal ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.75);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal {
  background-color: #F8F8F8;
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative;
  max-height: 90vh;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--badge);
  background: var(--bg);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  z-index: 10;
  line-height: 1;
}

.modal-close:hover {
  background-color: var(--badge);
}

.modal-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--brand);
}

.modal-close svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.modal-btn-maps svg,
.modal-btn-mockup svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke-width: 2;
}

.modal-image-wrap {
  overflow: hidden;
  position: relative;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-map {
  width: 100%;
  height: 100%;
  border: 0;
  display: none;
}

.modal-info {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 6px;
}

.modal-tagline {
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 24px;
}

.modal-specs {
  margin-bottom: auto;
  padding-bottom: 32px;
}

.modal-specs li {
  font-size: 1rem;
  margin-bottom: 6px;
}

.modal-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-btn-maps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--badge);
  padding: 16px;
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.modal-btn-maps:hover {
  border-color: var(--muted);
  color: var(--text);
}

.modal-btn-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--text);
  border: 1px solid var(--text);
  padding: 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.modal-btn-select:hover {
  background: #333;
  border-color: #333;
}

.modal-btn-select.selected {
  background: transparent;
  color: var(--text);
  border-color: var(--brand);
  outline: none;
}

.modal-btn-select.selected:hover {
  border-color: var(--brand);
  color: var(--muted);
}

.modal-btn-select:focus {
  outline: none;
}

.modal-btn-select svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke-width: 2;
}


@media (max-width: 480px) {
  #preloader {
    padding: 20px;
  }

  .preloader-counter {
    right: 24px;
    bottom: 28px;
  }
}

@media (max-width: 768px) {
  .modal {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-info {
    padding: 24px 20px;
  }

  .modal-image-wrap {
    aspect-ratio: 16 / 9;
    height: auto;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Select All ──────────────────────────────── */
.select-all-mobile-wrap {
  display: none;
}

.btn-select-all {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-select-all:hover {
  color: var(--text);
}

/* ── Review Overlay ──────────────────────────── */
.review-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.75);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.review-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.review-overlay.active .review-modal {
  transform: scale(1);
}

.review-modal {
  background-color: #F8F8F8;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.review-modal-header {
  padding: 40px 36px 0;
  flex-shrink: 0;
}

.review-modal-body {
  padding: 0 36px;
  overflow-y: auto;
  flex: 1;
}

.review-modal-footer {
  padding: 0 36px 36px;
  flex-shrink: 0;
}

.review-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  margin-top: 16px;
  margin-bottom: 16px;
  color: var(--text);
}

.review-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.review-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--badge);
}

.review-item:last-child {
  border-bottom: none;
}

.review-item-image {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background-color: var(--badge);
}

.review-item-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.review-item-name {
  font-family: 'Barlow', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-item-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--muted);
}

.review-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

.review-item-remove:hover {
  color: var(--text);
}

.review-item-remove svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.review-total {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
  text-align: right;
  padding: 16px 0;
  border-top: 2px solid var(--text);
  margin-top: 16px;
  margin-bottom: 16px;
}

.review-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-secondary {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--badge);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--text);
}

/* ── Map loading state ───────────────────────── */
.modal-map-spinner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: #F8F8F8;
}

.modal-map-spinner.active {
  display: flex;
}

.modal-map-spinner::after {
  content: '';
  width: 28px;
  height: 28px;
  border: 3px solid var(--badge);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Toast Messages ──────────────────────────── */
.toast-message {
  position: fixed;
  top: 30px;
  right: 15px;
  transform: translateY(-12px);
  background-color: var(--text);
  color: #fff;
  font-family: 'Barlow', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 700;
  white-space: nowrap;
  max-width: calc(100% - 30px);
}

.toast-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-message svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* ── Success Message ─────────────────────────── */
.success-message {
  position: fixed;
  top: 30px;
  right: 15px;
  transform: translateY(-12px);
  background-color: var(--text);
  color: #fff;
  font-family: 'Barlow', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 700;
  white-space: nowrap;
  max-width: calc(100% - 30px);
}

.success-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.success-message svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* ── Scroll to top ───────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-top svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

/* ── Ref banner ──────────────────────────────── */
.ref-banner {
  text-align: center;
  font-family: 'Barlow', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 12px;
}

.ref-banner-mobile {
  display: none;
  font-family: 'Barlow', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Footer ──────────────────────────────────── */
footer {
  padding: 24px 10px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

footer p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

footer p + p {
  margin-top: 10px;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-sep {
  color: var(--badge);
  margin: 0 8px;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1024px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-wrap {
    padding: 0 16px;
    top: 16px;
  }

  header {
    max-width: 100%;
    padding: 0 16px;
    border-radius: 12px;
    height: 64px;
  }

  .logo {
    font-size: 1.2rem;
  }

  .header-actions {
    gap: 12px;
  }

  .btn-primary {
    font-size: 0.75rem;
    padding: 8px 10px;
  }

  .btn-select-all {
    font-size: 0.7rem;
  }

  main {
    padding: 16px 16px;
  }

  .listings-grid {
    grid-template-columns: 1fr;
  }

  .card-name {
    font-size: 1.6rem;
  }

  .card-checkbox {
    top: 8px;
    right: 8px;
  }

  .toast-message,
  .success-message {
    top: auto;
    bottom: 24px;
    right: 16px;
    left: 16px;
    max-width: unset;
    white-space: normal;
    border-radius: 12px;
    transform: translateY(12px);
  }

  .toast-message.visible,
  .success-message.visible {
    transform: translateY(0);
  }

  .scroll-top {
    right: 16px;
    bottom: 24px;
  }
}

@media (max-width: 480px) {
  .select-all-nav {
    display: none;
  }

  .select-all-mobile-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 0;
  }

  .ref-banner {
    display: none;
  }

  .ref-banner-mobile {
    display: inline;
  }

  footer {
    font-size: 0.6rem;
    letter-spacing: 0.02em;
    padding-left: 6px;
    padding-right: 6px;
  }

  footer p {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
}
