/* page.css — Thrift Diego: homepage styles for category & location pages */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body { font-family: 'Inter', sans-serif; background-color: #0F3D3E; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 8px, transparent 8px 16px); background-attachment: fixed; color: #1a1a1a; line-height: 1.55; font-size: 15px; }
a { color: #A3006B; }
a:visited { color: #5c005c; }
a:hover { color: #333; }
input:focus, select:focus, button:focus-visible { outline: 2px solid #888; outline-offset: 2px; }

.outer { max-width: 1152px; margin: 0 auto; background: #ffffff; border-left: 1px solid #e8e8e8; border-right: 1px solid #e8e8e8; box-shadow: 0 18px 40px rgba(5, 10, 30, 0.45); }

/* Banner */
.banner { background: #EAF4FA; text-align: center; padding: 22px 10px 8px; border-bottom: 1px solid #e8e8e8; }
@media (max-width: 640px) { .banner h1 img { max-width: 346px !important; } }

.mylist-badge { background: #A3006B; color: #fff; border-radius: 10px; font-size: 10px; padding: 1px 6px; margin-left: 4px; }
/* Lower nav actions */
.lower-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #e8e8e8; }
.lower-nav-btn { display: inline-flex; align-items: center; gap: 6px; background: #ffffff; border: 1px solid #d0d0d0; padding: 9px 18px; font-size: 13.5px; font-weight: 600; color: #333; text-decoration: none; cursor: pointer; font-family: inherit; white-space: nowrap; }
.lower-nav-btn:hover { background: #f5f5f5; }

/* Content */
.content { padding: 12px; }
.toolbar-sticky { background: #ffffff; padding: 8px 0 4px; border-top: 1px solid #e8e8e8; }
.directory-updated { text-align: center; font-size: 11.5px; color: #9AA0AE; margin: 6px 0 0; }
.map-container { isolation: isolate; }
.search-three-col { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 4px; }
#zipInput { flex: 0 0 100px; width: 100px; min-height: 42px; padding: 9px 12px; border: 2px solid #b0b0b0; font-size: 14px; font-family: inherit; }
.search-three-col .cat-select-wrap { flex: 2; min-width: 160px; margin-bottom: 0; }
.search-three-col #searchInput { flex: 2; min-width: 180px; min-height: 42px; padding: 9px 12px; border: 2px solid #b0b0b0; font-size: 14px; font-family: inherit; width: 100%; }

/* Section title */
.section-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; color: #333; background: none; padding: 8px 10px; border-left: 4px solid #A3006B; border-bottom: 1px solid #e8e8e8; margin: 0; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.section-title:hover { background: #fafafa; }
.section-title-arrow { font-size: 11px; color: #888; transition: transform 0.2s; }
.section-title.collapsed .section-title-arrow { transform: rotate(-90deg); }
.listings-list.collapsed { display: none; }

/* Category checkbox dropdown */
.cat-select-wrap { position: relative; margin-bottom: 0; }
.cat-drop-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 42px; padding: 0 12px; border: 2px solid #b0b0b0; background: #fafafa; font-size: 14px; font-family: inherit; font-weight: 500; color: #333; cursor: pointer; text-align: left; gap: 8px; }
.cat-drop-btn:hover { background: #f0f0f0; }
.cat-drop-arrow { font-size: 11px; color: #888; flex-shrink: 0; pointer-events: none; }
.cat-drop-panel { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #d0d0d0; border-top: none; z-index: 200; max-height: 320px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.cat-drop-header { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; border-bottom: 1px solid #e8e8e8; background: #fafafa; }
.cat-drop-toggle { font-size: 11px; font-weight: 700; color: #A3006B; background: none; border: 1px solid #d0d0d0; cursor: pointer; font-family: inherit; padding: 2px 8px; }
.cat-drop-toggle:hover { background: #f0f0f0; }
.cat-drop-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f0f0f0; user-select: none; }
.cat-drop-item:hover { background: #f9f9f9; }
.cat-drop-item input[type=checkbox] { width: 15px; height: 15px; accent-color: #A3006B; cursor: pointer; flex-shrink: 0; margin: 0; }
.cat-drop-color { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-drop-label { flex: 1; }
.cat-drop-count { font-size: 11px; color: #999; font-weight: 500; }

/* Listings */
.listings-list { border-top: 1px solid #e8e8e8; }
.listing-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 44px; padding: 10px 12px; border-bottom: 2px solid #e0e0e0; background: #ffffff; font-size: 13px; cursor: pointer; }
.listing-row:nth-child(even) { background: #fafafa; }
.listing-row:hover { background: #F6FFE0; }
@media (max-width: 640px) { .listing-row { grid-template-columns: 1fr; gap: 3px; padding: 12px; } }
.l-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.l-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.l-cat { color: #A3006B; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-area { color: #888; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-status { font-size: 11px; font-weight: 600; white-space: nowrap; }
.l-status.open { color: #16a34a; }
.l-status.closed { color: #C1121F; }
.l-status.sale { color: #A3006B; }
.fav-btn { background: none; border: 2px solid #bbb; font-size: 19px; line-height: 1; cursor: pointer; padding: 4px 6px; color: #bbb; font-family: inherit; border-radius: 4px; transition: color 0.15s, border-color 0.15s, box-shadow 0.15s; }
.fav-btn:hover { color: #e91e8c; border-color: #e91e8c; box-shadow: 0 0 8px 2px rgba(233,30,140,0.5); }
.fav-btn.saved { color: #e91e8c; border-color: #e91e8c; }
.fav-btn.saved:hover { box-shadow: 0 0 10px 3px rgba(233,30,140,0.65); }
.empty-msg { padding: 24px; text-align: center; color: #888; font-size: 13px; }

/* Skeleton */
.skeleton-row { height: 44px; margin: 2px 0; background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 37%, #f0f0f0 63%); background-size: 400% 100%; animation: skeletonShine 1.4s ease infinite; }
@keyframes skeletonShine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 12px; flex-wrap: wrap; }
.pg-btn { min-width: 32px; min-height: 32px; padding: 4px 8px; border: 1px solid #e0e0e0; background: #fff; color: #555; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pg-btn.active { background: #333; color: #fff; border-color: #333; }
.pg-btn:disabled { opacity: 0.4; cursor: default; }

/* Map */
.map-container { background: #ffffff; border: 1.5px solid #c0c6cc; border-radius: 4px; overflow: hidden; }
#map { width: 100%; }
/* Side-by-side layout */
.main-layout { display: flex; align-items: flex-start; }
.listings-col { flex: 0 0 44%; min-width: 0; overflow: hidden; border-right: 1px solid #e0e0e0; }
.map-col { flex: 0 0 56%; position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.map-col-header { border-left: 1.5px solid #c0c6cc; background: #fff; flex-shrink: 0; }
.mylist-drop-arrow { font-size: 11px; color: #888; margin-left: 6px; display: inline-block; transition: transform 0.2s; }
#myListBtn[aria-expanded="true"] .mylist-drop-arrow { transform: rotate(180deg); }
.mylist-drop-content { background: #fff; border-top: 1px solid #e8e8e8; overflow-y: auto; max-height: 40vh; }
.map-col .map-container { flex: 1; min-height: 0; border: none; border-left: 1.5px solid #c0c6cc; border-radius: 0; }
.map-col #map { height: 100%; width: 100%; }
/* Weekend inline dropdown */
.weekend-toggle { border-bottom: 1px solid #e8e8e8; }
.weekend-drop-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 12px; background: #fffbe6; border: none; border-left: 4px solid #ea580c; font-family: inherit; font-size: 13.5px; font-weight: 600; color: #333; cursor: pointer; text-align: left; }
.weekend-drop-btn:hover { background: #fff8dc; }
.weekend-drop-arrow { font-size: 11px; color: #888; transition: transform 0.2s; }
.weekend-drop-btn[aria-expanded="true"] .weekend-drop-arrow { transform: rotate(180deg); }
.weekend-drop-content { background: #fff; padding: 0; }
.weekend-drop-item { padding: 9px 14px; border-bottom: 1px solid #f0f0f0; font-size: 12.5px; cursor: pointer; }
.weekend-drop-item:hover { background: #f9f9f9; }
.weekend-drop-item.expanded { background: #fffbe6; }
.weekend-drop-item-row { display: flex; flex-direction: column; gap: 2px; }
.weekend-drop-item-name { font-weight: 600; color: #222; }
.weekend-drop-item-meta { color: #666; font-size: 11.5px; }
.weekend-drop-item-detail:not([hidden]) { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e0d5b0; display: flex; flex-direction: column; gap: 6px; cursor: default; }
.weekend-drop-item-addr, .weekend-drop-item-hours { font-size: 11.5px; color: #555; }
.weekend-drop-item-desc { font-size: 11.5px; color: #666; line-height: 1.5; }
.weekend-drop-item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.weekend-drop-action-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; font-size: 11.5px; font-weight: 700; background: #fff; border: 1px solid #d0d0d0; border-radius: 4px; color: #333; text-decoration: none; white-space: nowrap; cursor: pointer; }
.weekend-drop-action-btn:hover { background: #f5f5f5; }
.weekend-drop-footer { display: block; padding: 9px 14px; font-size: 12px; font-weight: 600; color: #ea580c; text-decoration: none; border-top: 1px solid #e8e8e8; background: #fafafa; }
.weekend-drop-footer:hover { background: #f0f0f0; }
.weekend-drop-empty { padding: 14px; font-size: 12.5px; color: #777; }

/* Below-fold content */
.content-below { padding: 0 12px 12px; }
/* SEO copy */
.seo-copy { font-size: 11.5px; color: #333; line-height: 1.6; padding: 10px 0; border-top: 1px solid #d9d9d9; margin-top: 10px; }
.seo-copy a { font-weight: bold; }

/* Browse blocks */
.browse-section { margin-top: 14px; border-top: 1px solid #e8e8e8; padding-top: 14px; }
.browse-section h2 { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; color: #222; margin-bottom: 4px; }
.browse-section p { font-size: 12px; color: #666; line-height: 1.6; margin-bottom: 10px; }
.browse-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.browse-links a { display: inline-block; background: #f5f5f5; border: 1px solid #e0e0e0; color: #444; font-size: 12px; font-weight: 500; padding: 6px 12px; text-decoration: none; white-space: nowrap; }
.browse-links a:hover { background: #e8e8e8; color: #111; }
.browse-area-section { background: #fafafa; border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; padding: 16px 12px; margin-top: 14px; }
.browse-area-section h2 { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; color: #222; margin-bottom: 12px; }
.browse-area-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .browse-area-grid { grid-template-columns: repeat(2, 1fr); } }
.browse-area-group h3 { font-family: 'Space Grotesk', sans-serif; font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }
.browse-area-group a { display: block; font-size: 12px; color: #444; text-decoration: none; padding: 2px 0; font-weight: 500; }
.browse-area-group a:hover { color: #000; }

/* Footer */
.footer { background: #f8f8f8; border-top: 1px solid #e8e8e8; text-align: center; padding: 10px; font-size: 12px; color: #555; font-weight: 600; }

/* Mobile Favorites Bottom Sheet */
.mobile-favs { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: #222; border-top: 1px solid #444; }
.mobile-favs-trigger { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 50px; padding: 8px 16px; background: #222; color: #fff; border: none; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; }
.mobile-favs-icon { font-size: 18px; }
.mobile-favs-chevron { margin-left: auto; font-size: 14px; display: inline-block; transition: transform 0.2s; }
.mobile-favs.open .mobile-favs-chevron { transform: rotate(180deg); }
#mobileFavBadge { background: #fff; color: #A3006B; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: bold; }
.mobile-favs-sheet { background: #fff; border-top: 1px solid #333; max-height: 65vh; overflow-y: auto; }
.mobile-favs-handle { width: 36px; height: 4px; background: #d9d9d9; margin: 10px auto 6px; }
.mobile-favs-content { padding: 4px 12px 16px; }
.mobile-favs-empty { text-align: center; padding: 24px 12px; color: #777; font-size: 13px; line-height: 1.6; }
@media (max-width: 640px) { .mobile-favs.has-favs { display: block; } body.has-favs-bar { padding-bottom: 60px; } }

/* My List panel */
.mylist-panel { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.mylist-panel.open { display: flex; }
.mylist-sheet { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.1); max-width: 420px; width: 92%; max-height: 80vh; overflow-y: auto; padding: 16px; }
.mylist-sheet h2 { font-family: 'Space Grotesk', sans-serif; font-size: 16px; color: #222; margin-bottom: 10px; }
.mylist-close { float: right; background: #f0f0f0; color: #333; border: none; border-radius: 6px; min-height: 32px; padding: 4px 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.mylist-empty { padding: 20px 0; text-align: center; color: #777; }

/* Inline row expansion */
.listing-row.expanded { background: #F6FFE0 !important; border-left: 4px solid #A8E10C; box-shadow: inset 0 0 0 1px #E7F5BE; }
.listing-row.expanded .l-name { color: #26330A; font-weight: 700; }
.row-detail { padding: 12px 16px 14px 16px; background: #fafafa; border-bottom: 1px solid #e8e8e8; border-left: 3px solid #d0d0d0; font-size: 13px; }
.row-detail-desc { color: #444; line-height: 1.6; margin-bottom: 10px; }
.row-detail-field { margin-bottom: 6px; }
.row-detail-label { font-weight: 600; color: #888; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; display: inline; margin-right: 4px; }
.row-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.visit-btn { display: inline-block; background: #222; color: #fff; padding: 7px 16px; font-weight: 600; font-size: 12px; text-decoration: none; }
.collapse-btn { background: none; border: 1px solid #e0e0e0; color: #777; font-size: 12px; padding: 6px 12px; cursor: pointer; font-family: inherit; }
.fav-inline-detail { padding: 12px 16px 14px 16px; background: #fafafa; border-top: 1px solid #e8e8e8; border-left: 3px solid #d0d0d0; font-size: 13px; }
.mylist-row.fl-expanded { background: #f5f5f5 !important; border-left: 3px solid #d0d0d0; }
.preview-banner { background: #ffde00; border: 1px solid #000; text-align: center; padding: 6px 12px; font-size: 12px; font-weight: bold; position: fixed; bottom: 0; right: 0; z-index: 100; }
/* Weekend ticker */
.ticker-wrap { background: #ffde00; border-top: 2px solid #000; overflow: hidden; white-space: nowrap; cursor: pointer; }
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
.ticker-track { display: inline-block; padding: 7px 0; font-size: 13px; font-weight: bold; color: #000; animation: tickerScroll 60s linear infinite; }
@keyframes tickerScroll { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }
@media (max-width: 640px) { .preview-banner { display: none; } }
/* Leaflet popup */
.leaflet-popup-content-wrapper { background: #ffffff; border: 2px solid #17204A; border-radius: 4px; box-shadow: 0 8px 20px rgba(10,18,45,.25); color: #2C3352; }
.leaflet-popup-tip { background: #ffffff; }
.leaflet-popup-content-wrapper a { color: #A3006B; }
.store-label {
  background: rgba(255,255,255,0.82);
  border: none !important;
  box-shadow: none !important;
  padding: 1px 5px !important;
  font-family: 'Inter', sans-serif;
  font-size: 10px !important;
  color: #222;
  white-space: nowrap;
  pointer-events: none;
}
.store-label::before { display: none !important; }
/* Ticker fav button */
.hp-ticker-item-wrap { display: inline-flex; align-items: center; gap: 3px; }
.hp-ticker-fav { background: none; border: none; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 3px; color: #9a7055; font-family: inherit; vertical-align: middle; }
.hp-ticker-fav.saved { color: #e91e8c; }
.hp-ticker-fav:hover { color: #e91e8c; }

/* Newsletter box */
.hp-nl-box { display:flex; align-items:center; justify-content:space-between; gap:20px; background:#eee8de; border:1.5px solid #c8b89a; padding:20px 24px; margin:16px 0 0; }
.hp-nl-left { display:flex; align-items:center; gap:14px; flex:1; min-width:0; }
.hp-nl-heading { font-size:14px; font-weight:700; color:#2d1a0e; margin:0 0 3px; }
.hp-nl-sub { font-size:12px; color:#6b5744; margin:0; }
.hp-nl-form { display:flex; gap:6px; flex-shrink:0; align-items:center; }
.hp-nl-input { width:200px; height:38px; padding:0 12px; background:#fff; border:1.5px solid #c8b89a; border-radius:8px; font:inherit; font-size:13px; color:#2d1a0e; outline:none; }
.hp-nl-input:focus { border-color:#888; }
.hp-nl-input::placeholder { color:#9AA0AE; }
.hp-nl-btn { height:36px; padding:0 16px; background:#58a890; color:#fff; border:2px solid #3d7a66; box-shadow:0 3px 0 #3d7a66; border-radius:7px; font:inherit; font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:0.05em; cursor:pointer; white-space:nowrap; }
.hp-nl-btn:hover { box-shadow:0 1px 0 #3d7a66; transform:translateY(2px); }
.hp-nl-btn:disabled { opacity:0.5; cursor:not-allowed; }
.hp-nl-success { font-size:13.5px; font-weight:600; color:#58a890; margin:0; }
@media (max-width:600px) {
  .hp-nl-box { flex-direction:column; align-items:flex-start; }
  .hp-nl-form { width:100%; }
  .hp-nl-input { flex:1; width:auto; }
}

/* Cat hero (breadcrumb + h1 area) */
.cat-hero { max-width: 760px; margin: 0 auto; padding-top: 12px; text-align: center; }
.cat-h1 { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: clamp(22px, 3.5vw, 32px); font-weight: 700; color: #111; line-height: 1.2; margin: 0 0 16px; letter-spacing: -0.01em; }
.cat-h1--sm { font-size: clamp(18px, 2.8vw, 26px); }
.cat-intro { font-size: 14.5px; line-height: 1.8; color: #555; margin: 0 0 14px; text-align: left; }
.cat-intro:last-of-type { margin-bottom: 0; }
.breadcrumb { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 16px; margin-bottom: 4px; font-size: 11px; opacity: 0.7; }
.breadcrumb-sep { color: #999; }

/* ── Tablet/mobile layout (≤768px) ── */
@media (max-width: 768px) {
  .main-layout { flex-direction: column; }
  .listings-col { flex: none; width: 100%; border-right: none; }
  .map-col { flex: none; width: 100%; position: static; height: auto; overflow: visible; order: -1; display: block; }
  .map-col-header { border-left: none; border-bottom: 1px solid #e8e8e8; }
  .map-col .map-container { height: 350px; border: 1.5px solid #c0c6cc; border-radius: 4px; flex: none; }
  .map-col #map { height: 100%; }
}
/* ── Mobile overrides (≤640px) ── */
@media (max-width: 640px) {
  .listing-row { gap: 5px; padding: 14px 12px; }
  .l-name { font-size: 15px; white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word; overflow-wrap: break-word; }
  .l-cat { font-size: 12px; white-space: normal; overflow: visible; text-overflow: clip; }
  .l-area { font-size: 12px; white-space: normal; overflow: visible; text-overflow: clip; }
  .l-status { font-size: 12px; }
}
