/* Local-data blocks from the StructureHub bundle (includes/local-blocks.php).
   Used on city hubs (location-template.php) and the rent-to-own / financing
   city pages (city-intent.php). Colours come from css/style.css :root. */

.shl-section { padding: 3rem 0; border-top: 1px solid var(--slate-200); background: var(--white); }
.shl-section h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 700; color: var(--slate-800); margin: 0 0 .4rem; line-height: 1.25; }
.shl-section .section-intro { color: var(--slate-500); font-size: .95rem; max-width: 680px; margin: 0 0 1.5rem; line-height: 1.6; }

/* Available now */
.shl-available { background: var(--slate-50); }
.shl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1000px) { .shl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .shl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px)  { .shl-grid { grid-template-columns: 1fr; } }
.shl-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--slate-200); border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow .2s, transform .2s; }
a.shl-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
/* Fixed 4:3 photo box: every card image is the same size whatever the photo's shape. */
.shl-card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--slate-100); flex: 0 0 auto; }
.shl-card .shl-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
/* Sideways uploads (data/photo-rotate.json). A 90¡Æ turn makes the photo 3:4, so it is
   scaled by 4/3 to keep filling the 4:3 box. */
.shl-card-img.turn-90 img  { transform: rotate(90deg) scale(1.334); }
.shl-card-img.turn-180 img { transform: rotate(180deg); }
.shl-card-img.turn-270 img { transform: rotate(270deg) scale(1.334); }
.shl-flag { position: absolute; top: .6rem; left: .6rem; background: #b91c1c; color: var(--white); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .25rem .6rem; border-radius: var(--radius-full); }
.shl-card.is-sold .shl-card-img img { filter: grayscale(.6); opacity: .8; }
.shl-card-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .25rem; flex: 1 1 auto; }
.shl-card-body h3 { font-size: 1rem; font-weight: 700; color: var(--slate-800); margin: 0; line-height: 1.3; }
.shl-meta { font-size: .85rem; color: var(--slate-500); margin: 0; }
.shl-price { font-size: 1.15rem; font-weight: 800; color: var(--blue); margin: .25rem 0 0; }
.shl-price span { font-size: .8rem; font-weight: 500; color: var(--slate-500); }
.shl-monthly { font-size: .85rem; color: var(--green-dark); font-weight: 600; margin: 0; }
.shl-more { margin: 1.25rem 0 0; }
.shl-more a, .shl-backlinks a { color: var(--blue-600); font-weight: 600; }

/* Delivery + shed rules */
.shl-facts { background: var(--slate-50); }
.shl-panels { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 760px; margin: 0 auto; }
.shl-panels.has-2 { grid-template-columns: 1fr 1fr; max-width: none; }
@media (max-width: 860px) { .shl-panels.has-2 { grid-template-columns: 1fr; } }
.shl-panel { display: flex; flex-direction: column; gap: 1.1rem; border: 1px solid var(--slate-200); border-radius: 16px; padding: 1.6rem; background: var(--white); box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12); }
.shl-panel-head { display: flex; align-items: center; gap: .9rem; }
.shl-panel-head h2 { font-size: 1.3rem; margin: 0; }
.shl-panel-ico { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--blue-50); color: var(--blue); }
.shl-rules .shl-panel-ico { background: var(--emerald-50); color: var(--emerald-600); }
.shl-panel-ico .shl-ico { width: 24px; height: 24px; }
.shl-eyebrow { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-500); margin-bottom: .1rem; }
.shl-ico { flex: 0 0 auto; }

.shl-stat { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 12px; background: linear-gradient(135deg, var(--blue-50), var(--white)); border: 1px solid var(--blue-100); }
.shl-stat-num { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--blue); letter-spacing: -.02em; }
.shl-stat-label { font-size: .95rem; font-weight: 600; color: var(--slate-700); line-height: 1.35; }
.shl-stat-label small { font-weight: 500; color: var(--slate-500); font-size: .8rem; }

.shl-facts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.shl-facts-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--slate-700); line-height: 1.5; font-size: .95rem; }
.shl-facts-list li > .shl-ico { color: var(--slate-400); margin-top: .15rem; }
.shl-facts-list strong { color: var(--slate-800); }
.shl-hours { display: grid; grid-template-columns: max-content 1fr; gap: .15rem 1rem; margin: 0; font-size: .9rem; }
.shl-hours dt { font-weight: 600; color: var(--slate-800); }
.shl-hours dd { margin: 0; }

.shl-status { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid; line-height: 1.5; }
.shl-status .shl-ico { margin-top: .1rem; }
.shl-status strong { display: block; font-size: 1.05rem; }
.shl-status.is-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.shl-status.is-warn strong { color: #78350f; }
.shl-status.is-ok { background: var(--emerald-50); border-color: var(--emerald-200); color: #065f46; }
.shl-status.is-ok strong { color: #064e3b; }
.shl-rules-note { margin: 0; color: var(--slate-700); line-height: 1.55; }

.shl-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; }
.shl-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.15rem; border-radius: var(--radius-full); font-weight: 700; font-size: .92rem; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.shl-btn .shl-ico { width: 18px; height: 18px; }
.shl-btn-primary { background: var(--blue); color: var(--white); border: 1px solid var(--blue); }
.shl-btn-primary:hover { background: var(--blue-light); border-color: var(--blue-light); color: var(--white); }
.shl-btn-ghost { background: var(--white); color: var(--slate-800); border: 1px solid var(--slate-300); }
.shl-btn-ghost:hover { border-color: var(--blue-300); background: var(--blue-50); color: var(--blue); }
.shl-source { margin: 0; font-size: .8rem; color: var(--slate-500); }
.shl-source a { color: var(--blue-600); font-weight: 600; }

/* Recently sold */
.shl-sold { text-align: center; }
.shl-sold .section-intro { margin-left: auto; margin-right: auto; }
.shl-sold .section-intro strong { color: var(--slate-800); }
.shl-sold-list { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; max-width: 1000px; text-align: left; }
.shl-sold-item { flex: 0 1 300px; display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border: 1px solid var(--slate-200); border-radius: 12px; background: var(--white); }
@media (max-width: 600px) { .shl-sold-item { flex-basis: 100%; } }
.shl-sold-ico { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--emerald-50); color: var(--emerald-600); }
.shl-sold-ico .shl-ico { width: 18px; height: 18px; }
.shl-sold-text { display: flex; flex-direction: column; min-width: 0; }
.shl-sold-text strong { font-size: .95rem; color: var(--slate-800); line-height: 1.3; }
.shl-sold-text small { font-size: .82rem; color: var(--slate-500); margin-top: .1rem; }

/* Also serving + links */
.shl-also-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-top: 1rem; }
@media (max-width: 760px) { .shl-also-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shl-also-grid a { display: flex; justify-content: space-between; gap: .5rem; padding: .7rem .9rem; border: 1px solid var(--slate-200); border-radius: 10px; color: var(--slate-800); font-weight: 600; text-decoration: none; font-size: .92rem; }
.shl-also-grid a:hover { border-color: var(--blue-300); background: var(--blue-50); }
.shl-also-grid a span { color: var(--slate-500); font-weight: 500; }
.shl-intents { padding: 1.5rem 0; background: var(--blue-50); }
.shl-intent-links, .shl-backlinks .container { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.shl-intent-links a { display: inline-block; padding: .65rem 1.2rem; border-radius: var(--radius-full); background: var(--blue); color: var(--white); font-weight: 700; text-decoration: none; }
.shl-intent-links a:hover { background: var(--blue-light); }
.shl-backlinks { padding: 1.5rem 0; }
.shl-copy .container { max-width: 820px; color: var(--slate-700); line-height: 1.7; }

/* One building's page (city-intent.php with ?item=): gallery + specs. */
.shl-item-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.shl-item-main, .shl-item-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--slate-100); border-radius: 12px; }
.shl-item-main img, .shl-item-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.shl-item-main.turn-90 img, .shl-item-thumb.turn-90 img   { transform: rotate(90deg) scale(1.334); }
.shl-item-main.turn-180 img, .shl-item-thumb.turn-180 img { transform: rotate(180deg); }
.shl-item-main.turn-270 img, .shl-item-thumb.turn-270 img { transform: rotate(270deg) scale(1.334); }
.shl-item-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; margin-top: .6rem; }
.shl-item-thumb { padding: 0; border: 2px solid transparent; border-radius: 8px; cursor: pointer; }
.shl-item-thumb.is-active { border-color: var(--blue); }
.shl-item-info h2 { margin: .35rem 0 1rem; }
.shl-item-specs { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0 0 1.25rem; font-size: .95rem; }
.shl-item-specs dt { color: var(--slate-500); font-weight: 600; }
.shl-item-specs dd { margin: 0; color: var(--slate-800); }
@media (max-width: 860px) { .shl-item-grid { grid-template-columns: 1fr; gap: 1.25rem; } }
