:root { --blue:#2563eb; --muted:#eceff5; --border:#c3d2dc; --text:#333; }

/* Shell */
#qu-main { width: min(100%, 1024px); margin: 0 auto; padding: 12px 0; }

/* Layout */
.qu-main-layout { display:flex; gap:20px; align-items:flex-start; }
.qu-main-sidebar { width:25%; }
.qu-main-content { width:46%; }
.qu-main-aside   { width:25%; }

/* Box */
.qu-main-box { background:#fff; border:1px solid var(--border); border-radius:8px; padding:12px; margin-bottom:20px; }
.qu-main-box-muted { background: #f8f9fa; }
.qu-main-box-flush { padding: 10px 0; }

/* Headings */
.qu-main-heading { font:700 1rem/1.25 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; color:var(--blue); margin:0 0 8px; }

/* Lists */
.qu-main-list { list-style:none; margin:0; padding:0; }
.qu-main-list-stack { display:flex; flex-direction:column; gap:6px; }
.qu-main-list-spacious { gap:10px; }
.qu-main-sidebar .qu-main-list-small { font-size: 12px; }

.qu-main-list-item { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.qu-main-aside .qu-main-list-item { justify-content:flex-start; }
.qu-main-list-item-arrow::before { content:"»"; color:#000; margin-right:6px; }

/* Links & counts */
.qu-main-link { color:var(--blue); text-decoration:none; }
.qu-main-link:hover { text-decoration:underline; }
.qu-main-link-arrow::before { content:"» "; color:#000; }
.qu-main-link-strong { font-weight:700; }
.qu-main-link-highlight { color:#0053a6; }
.qu-main-link-cta { font-weight:700; }

.qu-main-count { margin-left:4px; font-size:.78rem; color:#6b7280; white-space:nowrap; }

/* Category items with icons */
.qu-category-item {
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.qu-category-item:hover {
  background-color: var(--gray-50);
}

.qu-category-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-700) !important;
  text-decoration: none;
}

.qu-category-link:hover {
  color: var(--primary) !important;
}

.qu-category-icon {
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

.qu-category-name {
  flex: 1;
}

.qu-category-count {
  font-size: 0.75rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}


/* Meta / slogans / notes */
.qu-main-meta { margin:10px 0; font-size:.875rem; color:#444; }
.qu-main-slogan { margin:0; line-height:1.3; }
.qu-main-note { margin:6px 0 0; font-size:.8125rem; color:#555; }

.qu-main-cta { text-align:center; margin-top:6px; }
.qu-main-cta-line { margin:0; }
.qu-main-cta-hint { margin:4px 0 0; font-size:.75rem; color:#333; }

/* Listing card (right column) */
.qu-main-listing { background:#f9f9f9; border-radius:8px; padding:12px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.qu-main-listing-img { width:100%; height:200px; object-fit:cover; border-radius:6px; display:block; margin-bottom:10px; }
.qu-main-listing-title { margin:0 0 6px; font:700 .95rem/1.25 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; color:var(--text); }
.qu-main-listing-price { margin:0 0 8px; color:#28a745; font-weight:700; }
.qu-main-listing-view { font-size:.9rem; }

/* Zones */
.qu-main-zones { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px 30px; padding:12px; }
.qu-main-zone { break-inside:avoid; }
.qu-main-zone-title { margin:0 0 6px; padding-bottom:4px; border-bottom:1px solid #eee; font:700 .95rem/1.2 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; }
.qu-main-zone-link { color:var(--blue); text-decoration:none; font-size:.92rem; }
.qu-main-zone-cities { list-style:none; margin:0; padding:0; }
.qu-main-zone-cities li { margin:3px 0; }
.qu-main-zone-city { color:#444; text-decoration:none; font-size:.95rem; }
.qu-main-zone-city:hover { color:var(--blue); text-decoration:underline; }

/* Categories collapsible (mobile-friendly) */
.qu-main-cats details { border:0; }
.qu-main-cats summary { list-style:none; cursor:pointer; font:600 1rem/1.25 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; color:var(--blue); padding:8px 10px; border-radius:6px; background:#f0f4fa; }


/* Desktop: keep categories always expanded and hide summary UI */
@media (min-width: 769px) {
  .qu-main-cats details[open] > .qu-main-cats-body { padding:0; }
  .qu-main-cats summary { display:none; }
  .qu-main-cats details { display:block; }
}

/* Responsive */
@media (max-width: 992px) { .qu-main-zones { grid-template-columns:repeat(3,minmax(0,1fr)); } }

@media (max-width: 768px) {
  .qu-main-layout { flex-direction:column; }
  .qu-main-sidebar, .qu-main-content, .qu-main-aside { width:100%; }

  /* Reorder: content first, then categories, then right aside */
  .qu-main-content { order:1; }
  .qu-main-sidebar { order:2; }
  .qu-main-aside   { order:3; }

  .qu-main-zones { grid-template-columns:repeat(2,minmax(0,1fr)); }

  /* Mobile: categories collapsed by default */
  .qu-main-cats details { border:1px solid var(--border); border-radius:8px; background:#fff; }
}

@media (max-width: 480px) { .qu-main-zones { grid-template-columns:1fr; } }

/* Pinterest-style Masonry Layout */
.qu-staggered-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.qu-masonry-card {
  background: rgba(204, 204, 204, 0.1);
  border: 1px solid rgba(204, 204, 204, 0.3);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  break-inside: avoid;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 120px;
  max-width: calc(33.333% - 6px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.qu-masonry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #c3d2dc;
  background: #ffffff;
}

.qu-staggered-image {
  width: 100%;
  height: 100px;
  overflow: hidden;
  background: #f8f9fa;
  position: relative;
  flex-shrink: 0;
}

.qu-staggered-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.qu-staggered-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.qu-masonry-card:hover .qu-staggered-image img {
  transform: scale(1.05);
}

.qu-staggered-content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.qu-staggered-title {
  margin: 0 0 8px 0;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
}

.qu-staggered-title a {
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qu-staggered-title a:hover {
  color: var(--blue);
}

.qu-staggered-price {
  margin: 0 0 6px 0;
  color: #28a745;
  font-weight: 700;
  font-size: 11px;
}

.qu-staggered-date {
  display: none;
}

.qu-staggered-empty {
  width: 100%;
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-style: italic;
}

/* Responsive adjustments for masonry layout */
@media (max-width: 992px) {
  .qu-staggered-grid {
    gap: 8px;
  }
  
  .qu-masonry-card {
    min-width: 110px;
    max-width: calc(33.333% - 6px);
  }
}

@media (max-width: 768px) {
  .qu-staggered-grid {
    gap: 6px;
  }
  
  .qu-masonry-card {
    min-width: 100px;
    max-width: calc(33.333% - 4px);
  }
  
  .qu-staggered-content {
    padding: 8px;
  }
  
  .qu-staggered-title {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .qu-staggered-grid {
    gap: 4px;
  }
  
  .qu-masonry-card {
    min-width: 90px;
    max-width: calc(33.333% - 3px);
  }
  
  .qu-staggered-content {
    padding: 6px;
  }
  
  .qu-staggered-title {
    font-size: 9px;
  }
  
  .qu-staggered-price {
    font-size: 9px;
  }
}