/**
 * Glenrowan Estate Masterplan Mobile/Tablet Styles
 * Responsive design for mobile and tablet devices
 */

/* ============================================
   HIDE WORDPRESS HEADER
   ============================================ */
header.site-header,
.site-header,
#masthead,
.elementor-location-header {
  display: none !important;
}

/* ============================================
   BASE LAYOUT
   ============================================ */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: "fustat", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

#masterplan {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* ============================================
   MOBILE HEADER
   ============================================ */
#mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #c45130;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}

#mobile-header .header-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

#mobile-header .back-btn {
  background: transparent !important;
  border: none !important;
  color: #f47d20;
  font-weight: 600;
  padding: 0 !important;
  display: none; /* Hidden by default */
  align-items: center;
  gap: 6px;
  font-size: 16px;
  cursor: pointer;
  font-family: "fustat", sans-serif;
}

#mobile-header .back-btn.visible {
  display: flex;
}

#mobile-header .back-btn:active {
  opacity: 0.7;
}

#mobile-header .back-btn svg {
  width: 10px;
  height: auto;
}

#mobile-header .view-toggle {
  display: flex;
  gap: 10px;
}

#mobile-header button {
  background: #FFF;
  border: 1px solid #FFF !important;
  color: #FFF !important;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "fustat", sans-serif;
  display: flex;
  gap: 10px;
}

#mobile-header button.active {
  background: #FFF !important;
  color: #c44f2f !important;
}

#mobile-header button.active svg path {
    stroke: #c44f2f;
}

#mobile-header button:active {
  transform: scale(0.95);
}

.close-btn {
  background: transparent !important;
  border: none !important;
  font-size: 28px;
  line-height: 1;
  color: #1D1D1D;
  padding: 0 !important;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   MAP CONTAINER - MOBILE
   ============================================ */
#map-container {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: #fff;
  touch-action: none;
  display: block !important;
}

#map-container.hidden {
  display: none !important;
}

#map-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
  touch-action: none;
  transition: none;
}

#map-inner.dragging {
  transition: none;
}

svg {
  display: block !important;
  user-select: none;
  pointer-events: all;
  width: auto !important;
  height: auto !important;
  touch-action: none;
  max-width: none;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ============================================
   SIDEBAR - MOBILE (LIST VIEW)
   ============================================ */
#sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #EEEDE7;
  background-image: url('/wp-content/uploads/2025/10/Background-Shape.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 20px;
  padding-bottom: 20px;
  overflow: hidden; /* Changed from overflow-y: auto to hidden */
  -webkit-overflow-scrolling: touch;
  display: none;
  z-index: 900;
  height: calc(100vh - 60px); /* Explicit height */
}

#sidebar.active {
  display: flex;
  flex-direction: column;
}

#sidebar-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1; /* Take available space */
  overflow-y: auto; /* Add scrolling here */
  -webkit-overflow-scrolling: touch;
  min-height: 0; /* Important for flex scrolling */
}

.sidebar-step {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: none;
}

.sidebar-step.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease-out;
  flex-shrink: 0; /* Don't shrink, but allow natural height */
  min-height: min-content; /* Allow content to define height */
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   LOT FILTER
   ============================================ */
   
   [type=button]:not(:disabled), 
   [type=submit]:not(:disabled), 
   button:not(:disabled) {
    padding: 8px 14px !important;
    }
    
#lot-filter {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  display: none;
  margin-bottom: 20px;
  gap: 8px;
  align-items: center;
}

#lot-filter.show {
  opacity: 1;
  visibility: visible;
  display: flex;
  justify-content: center;
}

#lot-filter p {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  flex-shrink: 0;
  display: none; /* Hide "Show:" text on mobile */
}

.filter-btn {
  padding: 8px 14px !important;
  cursor: pointer;
  font-size: 12px !important;
  background: #FFF;
  border: 1px solid #5F6638 !important;
  color: #1D1D1D;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 0 !important;
  flex-shrink: 0;
  white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
  background: #5F6638 !important;
  color: #FFF !important;
}

/* ============================================
   LOT LIST - TWO COLUMN LAYOUT
   ============================================ */
#lot-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 0;
  padding-bottom: 0;
}

#default-step {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0; /* Don't shrink, allow natural height */
}

.lot-card {
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
  border: 1px solid transparent;
  
  /* Two column layout */
  display: flex;
  flex-direction: row;
  overflow: hidden;
  
  /* No padding around card */
}

.lot-card:active {
  transform: scale(0.98);
}

.lot-card:hover {
  background: #e0dfd5;
}

.lot-card.active {
  background: #e0dfd5;
  border: 1px solid #5F6638;
}

.lot-card-image {
  flex: 0 0 40%;
  min-width: 40%;
  max-width: 40%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  height: 0;
  padding-bottom: 40%;
  background-size: cover;
  background-position: center;
}

.lot-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Right column - Details */
.lot-card-details {
  flex: 1;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

/* Price - First, larger and prominent */
.lot-card-details .price {
  color: #5F6638 !important;
  margin: 0 !important;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 400 !important;
  letter-spacing: 2px;
}

/* Title - Second */
.lot-card-details h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1D1D1D;
  line-height: 1.3;
}

/* Stage - Third */
.lot-card-details .stage {
  margin: 0;
  font-size: 14px;
  color: #1D1D1D;
}

/* House specs for house-and-land */
.lot-card-details .house-specs {
  display: flex;
  gap: 12px;
}

.lot-card-details .house-specs .spec-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #1D1D1D;
  font-weight: 600;
}

/* Legacy lot card styles for backward compatibility */
.lot-land,
.lot-house-and-land {
  cursor: pointer;
  transition: background 0.6s ease;
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
  border: 1px solid transparent;
  margin-bottom: 1em;
  padding: 0;
}

.lot-land:active,
.lot-house-and-land:active {
  transform: scale(0.98);
}

.lot-land:hover,
.lot-house-and-land:hover {
  background: #e0dfd5;
}

.lot-land.active,
.lot-house-and-land.active {
  background: #e0dfd5;
  border: 1px solid #5F6638;
}

.lot-land img,
.lot-house-and-land img {
  width: 100%;
  height: auto;
  margin-bottom: 15px;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lot-land h4,
.lot-house-and-land h4 {
    margin: 0;
    font-size: 26px;
    font-weight: 400;
    color: #1D1D1D;
    text-transform: uppercase;
}

.lot-land p,
.lot-house-and-land p {
  margin: 6px 0;
  font-size: 14px;
  color: #1D1D1D;
  line-height: 1.5;
}

.lot-land p strong,
.lot-house-and-land p strong {
  font-weight: 700;
}

.lot-land .price,
.lot-house-and-land .price {
  font-size: 15px;
  font-weight: 700;
  color: #5F6638;
  margin-top: 12px;
}

/* Lot details layout - halves */
.lot-card .halves,
.lot-land .halves,
.lot-house-and-land .halves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 12px 0;
}

.lot-card .col p,
.lot-land .col p,
.lot-house-and-land .col p {
  margin: 4px 0;
  font-size: 13px;
}

/* Status badge styling */
.lot-card .status-badge,
.lot-land .status-badge,
.lot-house-and-land .status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.lot-card .status-badge.available,
.lot-land .status-badge.available {
  background: #4CAF50;
  color: white;
}

.lot-card .status-badge.reserved,
.lot-land .status-badge.reserved {
  background: #FFC107;
  color: #1D1D1D;
}

/* House details for house-and-land */
.lot-card .house-details,
.lot-house-and-land .house-details {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.lot-card .house-details h5,
.lot-house-and-land .house-details h5 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 700;
}

.lot-card .house-specs,
.lot-house-and-land .house-specs {
  display: flex;
  gap: 15px;
}

.lot-card .house-specs p,
.lot-house-and-land .house-specs p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Stagger animation for lot cards */
.lot-card:nth-child(1),
.lot-land:nth-child(1),
.lot-house-and-land:nth-child(1) { animation-delay: 0.05s; }
.lot-card:nth-child(2),
.lot-land:nth-child(2),
.lot-house-and-land:nth-child(2) { animation-delay: 0.1s; }
.lot-card:nth-child(3),
.lot-land:nth-child(3),
.lot-house-and-land:nth-child(3) { animation-delay: 0.15s; }
.lot-card:nth-child(4),
.lot-land:nth-child(4),
.lot-house-and-land:nth-child(4) { animation-delay: 0.2s; }
.lot-card:nth-child(5),
.lot-land:nth-child(5),
.lot-house-and-land:nth-child(5) { animation-delay: 0.25s; }
.lot-card:nth-child(n+6),
.lot-land:nth-child(n+6),
.lot-house-and-land:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   LOT DETAILS STEP
   ============================================ */
#lot-details-step {
  display: flex;
  flex-direction: column;
}

#lot-details {
  padding: 15px 0 0;
}

#lot-details h3 {
  margin: 0 0 15px 0;
  font-size: 28px;
  color: #1D1D1D;
}

#lot-details h4 {
  margin: 20px 0 15px 0;
  font-size: 18px;
  font-weight: 700;
  color: #5F6638;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#lot-details hr {
  border: 0.5px solid #9F9F58;
  margin: 20px 0;
}

/* Lot Main Image */
#lot-details .lot-main-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Land Information Section */
#lot-details .land-info {
  margin: 20px 0;
}

#lot-details .halves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 0;
}

/* Two Column Layout for Land Info */
#lot-details .land-info .info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

#lot-details .land-info .info-grid .col-left,
#lot-details .land-info .info-grid .col-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#lot-details .land-info .info-grid .col-right {
  align-items: flex-end;
  text-align: right;
}

#lot-details .land-info .info-grid .col-right .btn-enquire {
  margin: 0;
  margin-top: 28px; /* Align with h3 title (stage height + gap) */
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
}

#lot-details .land-info .info-grid .col-right .spec-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
}

#lot-details .land-info .info-grid .col-right .spec-line:first-of-type {
  margin-top: auto;
}

/* Two Column Layout for Package Pricing */
.package-pricing .info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.package-pricing .info-grid .col-left,
.package-pricing .info-grid .col-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.package-pricing .info-grid .col-right {
  align-items: flex-end;
  text-align: right;
}

.package-pricing .info-grid .col-right .btn-enquire {
  margin: 0;
  margin-top: 28px; /* Align with h3 title (stage height + gap) */
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
}

.package-pricing .info-grid .col-right .spec-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.package-pricing .info-grid .col-right .spec-line:first-of-type {
  margin-top: auto;
}

/* Style price label similar to stage */
#lot-details .price-label {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  color: #5F6638;
  margin: 8px 0 4px 0;
  line-height: 1.4;
}

#lot-details .price-amount {
  font-size: 28px;
  font-weight: 100;
  color: #1D1D1D;
  margin: 0;
  line-height: 1.2;
}

#lot-details .col p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.6;
}

#lot-details .price {
  color: #1D1D1D;
  margin: 8px 0;
  display: block;
  font-size: 28px !important;
  font-weight: 100;
}

/* House Image */
#lot-details .house-image {
  width: 100%;
  height: auto;
  margin: 0; /* No margin - banner sits directly underneath */
  display: block;
}

/* Green Banner with House Stats and Builder Logo */
.house-stats-banner {
  background: #5F6638;
  padding: 18px;
  border-radius: 0; /* Flat banner, no rounded corners */
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 15px;
}

.house-stats-banner .stats-left {
  display: flex;
  gap: 25px;
  flex: 1;
  align-items: center;
}

.house-stats-banner .stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #FFF;
  font-size: 16px;
  font-weight: 600;
}

/* White icons in green banner */
.house-stats-banner .stat-item span.beds {
  display: inline-block;
  width: 18px;
  height: 14px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='14.954' height='11.749' viewBox='0 0 14.954 11.749'><path d='M15.6,10.432V6.159a.534.534,0,0,0-.534-.534H4.386a.534.534,0,0,0-.534.534v4.273a1.6,1.6,0,0,0-1.6,1.6v5.341h1.2V16.306H16v1.068h1.2V12.034A1.6,1.6,0,0,0,15.6,10.432Zm-6.409,0H5.187V9.363a.534.534,0,0,1,.534-.534H8.659a.534.534,0,0,1,.534.534Zm1.068-1.068a.534.534,0,0,1,.534-.534h2.937a.534.534,0,0,1,.534.534v1.068H10.261Z' transform='translate(-2.25 -5.625)' fill='%23FFFFFF'/></svg>") no-repeat center;
  background-size: contain;
  vertical-align: middle;
}

.house-stats-banner .stat-item span.baths {
  display: inline-block;
  width: 18px;
  height: 14px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='13.18' height='13.18' viewBox='0 0 13.18 13.18'><path d='M10.136,8.818A1.318,1.318,0,1,1,8.818,7.5a1.318,1.318,0,0,1,1.318,1.318Z' transform='translate(-5.523 -5.523)' fill='%23FFFFFF'/><path d='M14.862,10.249V4.865a1.864,1.864,0,0,0-3.183-1.318l-.824.824a1.121,1.121,0,0,0-.336-.053,1.309,1.309,0,0,0-.712.211l1.819,1.819a1.309,1.309,0,0,0,.211-.712,1.425,1.425,0,0,0-.046-.336l.824-.824a.546.546,0,0,1,.929.389v5.384H9.03a3.36,3.36,0,0,1-.54-.474L7.567,8.753a1.414,1.414,0,0,0-.455-.33A1.483,1.483,0,0,0,4.977,9.755v.494H3v5.272H4.318v.659H14.862v-.659H16.18V10.249Z' transform='translate(-3 -3)' fill='%23FFFFFF'/></svg>") no-repeat center;
  background-size: contain;
  vertical-align: middle;
}

.house-stats-banner .stat-item span.cars {
  display: inline-block;
  width: 20px;
  height: 14px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='17.422' height='11.615' viewBox='0 0 17.422 11.615'><path d='M18.257,11.4a5.617,5.617,0,0,0-1.184-.646c.187-.1.315-.117.315-.516,0-.436,0-.581-.293-.581H16.11L16.1,9.627c-.636-1.389-.721-1.74-1.67-2.212A12.471,12.471,0,0,0,9.836,6.75a12.462,12.462,0,0,0-4.591.665c-.949.472-.926.715-1.67,2.212a.139.139,0,0,1-.015.027H2.575c-.288,0-.29.145-.29.581,0,.4.128.419.315.516a10.346,10.346,0,0,0-1.184.646,7.9,7.9,0,0,0-.29,2.9c0,1.742.145,3.484.145,3.484H1.7c0,.508.075.581.293.581H4.9c.218,0,.29-.073.29-.581h9.292c0,.508.073.581.29.581h2.976c.145,0,.218-.109.218-.581H18.4s.145-1.778.145-3.484A9.346,9.346,0,0,0,18.257,11.4ZM5.091,13.027a18.763,18.763,0,0,1-1.99.111c-.741,0-.767.048-.819-.415a2.619,2.619,0,0,1,.019-.636l.023-.111h.109a5.005,5.005,0,0,1,1.617.246,3.557,3.557,0,0,1,1.092.547.523.523,0,0,1,.195.224Zm8.971,2.613-.16.4H5.771s.014-.022-.181-.406c-.145-.284.036-.465.323-.568A12.077,12.077,0,0,1,9.836,14.3a10.277,10.277,0,0,1,3.938.768c.2.1.448.176.287.575ZM4.734,10.685a3.493,3.493,0,0,1-.352,0c.095-.168.147-.356.24-.552a3.2,3.2,0,0,1,1.214-1.61,10.947,10.947,0,0,1,4-.617,10.917,10.917,0,0,1,4,.617,3.207,3.207,0,0,1,1.214,1.61c.093.2.145.387.242.556-.073,0-.156,0-.355-.007Zm12.621,2.037c-.078.453-.005.417-.783.417a18.762,18.762,0,0,1-1.99-.111.156.156,0,0,1-.05-.258,3.406,3.406,0,0,1,1.092-.547,4.7,4.7,0,0,1,1.637-.243.117.117,0,0,1,.112.109,2.547,2.547,0,0,1-.018.634Z' transform='translate(-1.125 -6.75)' fill='%23FFFFFF'/></svg>") no-repeat center;
  background-size: contain;
  vertical-align: middle;
}

.house-stats-banner .builder-logo {
  flex-shrink: 0;
  max-width: 80px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF;
  padding: 5px 10px;
}

.house-stats-banner .builder-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Package Pricing Section */
.package-pricing {
  margin-bottom: 20px;
}

.package-pricing .price {
  font-size: 18px;
  font-weight: 700;
  color: #f47d20;
  margin: 0 0 10px 0;
}

#lot-list-scrollable {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

/* ============================================
   BUTTONS
   ============================================ */
/* Back buttons are now in header, hide any inline ones */
.btn-back {
  display: none !important;
}

.btn-enquire {
  background: #f47d20;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
  width: 100%;
  font-size: 16px;
}

.btn-enquire:active {
  background: #b34514;
  transform: scale(0.98);
}

/* ============================================
   LINKS
   ============================================ */
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: #1D1D1D;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: opacity 0.3s ease;
  width: 100%;
  justify-content: center;
}

.link:active {
  opacity: 0.7;
}

.link svg {
  flex-shrink: 0;
  stroke: #5F6638;
  transition: stroke 0.3s ease;
}

.link:active svg {
  stroke: #f47d20;
}

/* ============================================
   ZOOM CONTROLS - MOBILE (MATCHING DESKTOP)
   ============================================ */
.zoom-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 500;
}

.zoom-controls.hidden {
  display: none;
}

.zoom-controls button {
  background: #FFF !important;
  color: #1D1D1D !important;
  border: none !important;
  width: 40px !important;
  height: 40px !important;
  font-size: 22px !important;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
  transition: all 0.3s !important;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 !important;
}

#zoom-in {
  border-radius: 4px 4px 0 0 !important;
  border-bottom: 1px solid rgba(0,0,0,0.1) !important;
}

#zoom-out {
  border-radius: 0 0 4px 4px !important;
  border-top: 0 !important;
}

.zoom-controls button:active {
  background: #b34514 !important;
  transform: scale(0.95);
}

/* ============================================
   NORTH POINT - MOBILE
   ============================================ */
.north-point {
  position: fixed;
  bottom: 120px;
  right: 17px;
  z-index: 500;
  width: 48px;
  height: 48px;
}

.north-point.hidden {
  display: none;
}

.north-point img {
  width: 100%;
  height: 100%;
}

/* ============================================
   LOT STYLES ON MAP
   ============================================ */
[data-name^="lot-"] {
  cursor: pointer;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

[data-name^="lot-"]:active {
  fill: #a64226 !important;
}

.active-lot {
  fill: #a64226 !important;
}

/* Sold/Reserved lots - Match desktop styling */
[data-name^="lot-"].lot-disabled {
  fill: #728b8c !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 1;
}

.lot-disabled {
  cursor: not-allowed !important;
}

.lot-unpublished {
  cursor: default !important;
  pointer-events: none !important;
}

/* Force hide specs and lot size for sold/reserved/deposit lots ONLY - ANY ELEMENT TYPE */
g[id^="Lot_"] [data-status="sold"] ~ [id^="Specs"],
g[id^="Lot_"] [data-status="reserved"] ~ [id^="Specs"],
g[id^="Lot_"] [data-status="deposit"] ~ [id^="Specs"],
g[id^="Lot_"] [data-status="sold"] ~ [id*="Spec"],
g[id^="Lot_"] [data-status="reserved"] ~ [id*="Spec"],
g[id^="Lot_"] [data-status="deposit"] ~ [id*="Spec"],
g[id^="Lot_"] [data-status="sold"] ~ [id^="Lot_Size"],
g[id^="Lot_"] [data-status="reserved"] ~ [id^="Lot_Size"],
g[id^="Lot_"] [data-status="deposit"] ~ [id^="Lot_Size"],
g[id^="Lot_"] [data-status="sold"] ~ [id*="Size"],
g[id^="Lot_"] [data-status="reserved"] ~ [id*="Size"],
g[id^="Lot_"] [data-status="deposit"] ~ [id*="Size"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Alternative selector - hide specs within sold lot groups ONLY - ANY ELEMENT */
g[id^="Lot_"]:has([data-status="sold"]) [id^="Specs"],
g[id^="Lot_"]:has([data-status="reserved"]) [id^="Specs"],
g[id^="Lot_"]:has([data-status="deposit"]) [id^="Specs"],
g[id^="Lot_"]:has([data-status="sold"]) [id*="Spec"],
g[id^="Lot_"]:has([data-status="reserved"]) [id*="Spec"],
g[id^="Lot_"]:has([data-status="deposit"]) [id*="Spec"],
g[id^="Lot_"]:has([data-status="sold"]) [id^="Lot_Size"],
g[id^="Lot_"]:has([data-status="reserved"]) [id^="Lot_Size"],
g[id^="Lot_"]:has([data-status="deposit"]) [id^="Lot_Size"],
g[id^="Lot_"]:has([data-status="sold"]) [id*="Size"],
g[id^="Lot_"]:has([data-status="reserved"]) [id*="Size"],
g[id^="Lot_"]:has([data-status="deposit"]) [id*="Size"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Target path elements specifically for sold/reserved/deposit lots ONLY */
g[id^="Lot_"]:has([data-status="sold"]) path[id^="Specs"],
g[id^="Lot_"]:has([data-status="reserved"]) path[id^="Specs"],
g[id^="Lot_"]:has([data-status="deposit"]) path[id^="Specs"],
g[id^="Lot_"]:has([data-status="sold"]) path[id*="Spec"],
g[id^="Lot_"]:has([data-status="reserved"]) path[id*="Spec"],
g[id^="Lot_"]:has([data-status="deposit"]) path[id*="Spec"],
g[id^="Lot_"]:has([data-status="sold"]) path[id^="Lot_Size"],
g[id^="Lot_"]:has([data-status="reserved"]) path[id^="Lot_Size"],
g[id^="Lot_"]:has([data-status="deposit"]) path[id^="Lot_Size"],
g[id^="Lot_"]:has([data-status="sold"]) path[id*="Size"],
g[id^="Lot_"]:has([data-status="reserved"]) path[id*="Size"],
g[id^="Lot_"]:has([data-status="deposit"]) path[id*="Size"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Hide all children too - ONLY for sold/reserved/deposit lots */
g[id^="Lot_"]:has([data-status="sold"]) [id*="Spec"] *,
g[id^="Lot_"]:has([data-status="reserved"]) [id*="Spec"] *,
g[id^="Lot_"]:has([data-status="deposit"]) [id*="Spec"] *,
g[id^="Lot_"]:has([data-status="sold"]) [id*="Size"] *,
g[id^="Lot_"]:has([data-status="reserved"]) [id*="Size"] *,
g[id^="Lot_"]:has([data-status="deposit"]) [id*="Size"] * {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ============================================
   SKELETON LOADING STATE
   ============================================ */
.lot-skeleton {
  background: #fff;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.lot-skeleton.fade-out {
  opacity: 0;
}

.lot-skeleton .skeleton-image {
  width: 100%;
  height: 150px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1s infinite;
  border-radius: 4px;
  margin-bottom: 10px;
}

.lot-skeleton .skeleton-text {
  height: 20px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.lot-skeleton .skeleton-text.short {
  width: 60%;
}

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

/* ============================================
   LOADER
   ============================================ */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #c45130;
  color: #FFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loader.hidden {
  display: none;
}

.loader-logo img {
  width: 200px;
  margin-bottom: 20px;
}

#loader p {
  font-size: 18px;
  margin: 10px 0 20px;
  color: #FFF;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #f47d20;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   ICONS (BEDS, BATHS, CARS)
   ============================================ */
span.beds {
  display: inline-block;
  width: 18px;
  height: 14px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='14.954' height='11.749' viewBox='0 0 14.954 11.749'><path id='Icon_ion-bed-sharp' d='M15.6,10.432V6.159a.534.534,0,0,0-.534-.534H4.386a.534.534,0,0,0-.534.534v4.273a1.6,1.6,0,0,0-1.6,1.6v5.341h1.2V16.306H16v1.068h1.2V12.034A1.6,1.6,0,0,0,15.6,10.432Zm-6.409,0H5.187V9.363a.534.534,0,0,1,.534-.534H8.659a.534.534,0,0,1,.534.534Zm1.068-1.068a.534.534,0,0,1,.534-.534h2.937a.534.534,0,0,1,.534.534v1.068H10.261Z' transform='translate(-2.25 -5.625)' fill='%231d1d1d'/></svg>") no-repeat center;
  background-size: contain;
  vertical-align: middle;
}

span.baths {
  display: inline-block;
  width: 18px;
  height: 14px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' id='Icon_material-sharp-bathtub' data-name='Icon material-sharp-bathtub' width='13.18' height='13.18' viewBox='0 0 13.18 13.18'><path id='Path_16' data-name='Path 16' d='M10.136,8.818A1.318,1.318,0,1,1,8.818,7.5a1.318,1.318,0,0,1,1.318,1.318Z' transform='translate(-5.523 -5.523)' fill='%231d1d1d'/><path id='Path_17' data-name='Path 17' d='M14.862,10.249V4.865a1.864,1.864,0,0,0-3.183-1.318l-.824.824a1.121,1.121,0,0,0-.336-.053,1.309,1.309,0,0,0-.712.211l1.819,1.819a1.309,1.309,0,0,0,.211-.712,1.425,1.425,0,0,0-.046-.336l.824-.824a.546.546,0,0,1,.929.389v5.384H9.03a3.36,3.36,0,0,1-.54-.474L7.567,8.753a1.414,1.414,0,0,0-.455-.33A1.483,1.483,0,0,0,4.977,9.755v.494H3v5.272H4.318v.659H14.862v-.659H16.18V10.249Z' transform='translate(-3 -3)' fill='%231d1d1d'/></svg>") no-repeat center;
  background-size: contain;
  vertical-align: middle;
}

span.cars {
  display: inline-block;
  width: 20px;
  height: 14px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='17.422' height='11.615' viewBox='0 0 17.422 11.615'><path id='Icon_ion-car-sport-sharp' d='M18.257,11.4a5.617,5.617,0,0,0-1.184-.646c.187-.1.315-.117.315-.516,0-.436,0-.581-.293-.581H16.11L16.1,9.627c-.636-1.389-.721-1.74-1.67-2.212A12.471,12.471,0,0,0,9.836,6.75a12.462,12.462,0,0,0-4.591.665c-.949.472-.926.715-1.67,2.212a.139.139,0,0,1-.015.027H2.575c-.288,0-.29.145-.29.581,0,.4.128.419.315.516a10.346,10.346,0,0,0-1.184.646,7.9,7.9,0,0,0-.29,2.9c0,1.742.145,3.484.145,3.484H1.7c0,.508.075.581.293.581H4.9c.218,0,.29-.073.29-.581h9.292c0,.508.073.581.29.581h2.976c.145,0,.218-.109.218-.581H18.4s.145-1.778.145-3.484A9.346,9.346,0,0,0,18.257,11.4ZM5.091,13.027a18.763,18.763,0,0,1-1.99.111c-.741,0-.767.048-.819-.415a2.619,2.619,0,0,1,.019-.636l.023-.111h.109a5.005,5.005,0,0,1,1.617.246,3.557,3.557,0,0,1,1.092.547.523.523,0,0,1,.195.224Zm8.971,2.613-.16.4H5.771s.014-.022-.181-.406c-.145-.284.036-.465.323-.568A12.077,12.077,0,0,1,9.836,14.3a10.277,10.277,0,0,1,3.938.768c.2.1.448.176.287.575ZM4.734,10.685a3.493,3.493,0,0,1-.352,0c.095-.168.147-.356.24-.552a3.2,3.2,0,0,1,1.214-1.61,10.947,10.947,0,0,1,4-.617,10.917,10.917,0,0,1,4,.617,3.207,3.207,0,0,1,1.214,1.61c.093.2.145.387.242.556-.073,0-.156,0-.355-.007Zm12.621,2.037c-.078.453-.005.417-.783.417a18.762,18.762,0,0,1-1.99-.111.156.156,0,0,1-.05-.258,3.406,3.406,0,0,1,1.092-.547,4.7,4.7,0,0,1,1.637-.243.117.117,0,0,1,.112.109,2.547,2.547,0,0,1-.018.634Z' transform='translate(-1.125 -6.75)' fill='%231d1d1d'/></svg>") no-repeat center;
  background-size: contain;
  vertical-align: middle;
}

/* ============================================
   LOT DETAILS - LOT LIST SECTION
   ============================================ */
#lot-details-list-section {
  margin-bottom: 0;
  padding-top: 30px;
  padding-bottom: 0;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
}

#lot-filter-details {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: center;
}

#lot-filter-details p {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  flex-shrink: 0;
}

#lot-filter-details .filter-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 8px 14px !important;
  font-size: 12px !important;
}

#lot-list-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 0;
  padding-bottom: 0;
}

#lot-details-step {
  padding-bottom: 0;
  flex-shrink: 0; /* Don't shrink, allow natural height */
}

#lot-list-details .lot-card {
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
  border: 1px solid transparent;
  
  /* Two column layout */
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

#lot-list-details .lot-card:active {
  transform: scale(0.98);
}

#lot-list-details .lot-card:hover {
  background: #e0dfd5;
}

#lot-list-details .lot-card.active {
  background: #e0dfd5;
  border: 1px solid #5F6638;
}

/* ============================================
   ENQUIRY FORM
   ============================================ */
#enquire-step h3 {
  margin: 0 0 20px 0;
  font-size: 22px;
}

#enquire-lot-info {
  margin-bottom: 20px;
  font-size: 14px;
}

/* ============================================
   LOT DETAILS LAYOUT (Mobile Default - Stacked)
   ============================================ */
.lot-details-hero {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.lot-details-hero .lot-image-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.lot-details-hero .lot-image-section img {
  width: 100%;
  height: auto;
  display: block;
}

.lot-details-hero .lot-image-section .house-stats-banner {
  width: 100%;
  margin-top: 0;
}

.lot-details-hero .lot-info-section {
  width: 100%;
}

/* ============================================
   LOT NUMBER STYLING - ALWAYS VISIBLE
   ============================================ */
[id="Lot_Number"],
[id^="Lot_Number"],
g[id="Lot_Number"] text,
g[id^="Lot_Number"] text,
[id="Lot_Number"] *,
[id^="Lot_Number"] * {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  fill: #FFFFFF !important;
}

g[id^="Lot_"] g[id="Lot_Number"] text,
g[id^="Lot_"] g[id^="Lot_Number"] text,
g[id^="Lot_"] [id="Lot_Number"] tspan,
g[id^="Lot_"] [id^="Lot_Number"] tspan {
  fill: #FFFFFF !important;
}

g[id^="Lot_"][data-status] [id="Lot_Number"],
g[id^="Lot_"][data-status] [id^="Lot_Number"],
g[id^="Lot_"][data-status] [id="Lot_Number"] *,
g[id^="Lot_"][data-status] [id^="Lot_Number"] * {
  fill: #FFFFFF !important;
}

/* ============================================
   TABLET SPECIFIC (768px - 1024px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
  #mobile-header {
    height: 70px;
    padding: 0 30px;
  }

  #mobile-header button {
    padding: 10px 30px;
    font-size: 16px;
  }

  #mobile-header .back-btn {
    font-size: 18px;
  }

  #map-container {
    top: 70px;
  }

  #sidebar {
    top: 70px;
    padding: 30px;
  }

  /* Tablet lot cards - smaller image size (half of previous) */
  .lot-card {
    min-height: auto; /* Let the image dictate height */
  }

  .lot-card-image {
    flex: 0 0 22.5%;
    min-width: 22.5%;
    max-width: 22.5%;
    padding-bottom: 22.5%; /* Creates 1:1 square based on width - half the previous size */
  }

  .lot-card-details {
    padding: 15px 20px;
    gap: 6px;
  }
  
  /* Tablet lot details - two column layout like desktop */
  .lot-details-hero {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .lot-details-hero .lot-image-section {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px;
  }
  
  .lot-details-hero .lot-image-section img.lot-main-image,
  .lot-details-hero .lot-image-section img.house-image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important; /* Standard photo ratio - shorter than wide */
    object-fit: cover !important;
    display: block !important;
  }
  
  .lot-details-hero .lot-image-section .house-stats-banner {
    width: 100%;
    margin-top: 0;
  }
  
  .lot-details-hero .lot-info-section {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
  }
  
  .lot-details-hero .lot-info-section .land-info,
  .lot-details-hero .lot-info-section > div {
    width: 100%;
  }
  
  /* Tablet lot details list */
  #lot-list-details .lot-card-image {
    flex: 0 0 22.5%;
    min-width: 22.5%;
    max-width: 22.5%;
    padding-bottom: 22.5%; /* Creates 1:1 square - half size */
  }

  .lot-card-details .price {
    font-size: 22px !important;
  }

  .lot-card-details h4 {
    font-size: 20px;
  }

  .lot-card-details .stage {
    font-size: 14px;
  }

  .lot-card-details .house-specs {
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .lot-card-details .house-specs .spec-item {
    font-size: 14px;
  }

  .lot-land,
  .lot-house-and-land {
    padding: 20px;
  }

  #lot-list {
    gap: 20px;
  }

  .zoom-controls {
    bottom: 30px;
    right: 30px;
  }

  .zoom-controls button {
    width: 45px !important;
    height: 45px !important;
    font-size: 24px !important;
  }

  .north-point {
    bottom: 130px;
    right: 30px;
    width: 56px;
    height: 56px;
  }

  /* Tablet lot details */
  #lot-list-details .lot-card-image {
    flex: 0 0 22.5%;
    min-width: 22.5%;
    max-width: 22.5%;
    padding-bottom: 22.5%; /* Creates 1:1 square - half size */
  }
  
  .house-stats-banner {
    padding: 20px;
  }

  .house-stats-banner .stats-left {
    gap: 30px;
  }

  .house-stats-banner .stat-item {
    font-size: 16px;
  }

  .house-stats-banner .builder-logo {
    max-width: 100px;
    height: 50px;
    padding: 8px 12px;
  }
}

/* ============================================
   HIDE DESKTOP ELEMENTS ON MOBILE
   ============================================ */
.st5, .st6 {
  fill: none !important;
}
