/* ===========================================================================
   LISTING.CSS - the main domain landing page.
   Each business gets one row containing five design preview cards.
   Loads on top of base.css.
   =========================================================================== */

.listing-page { background: #fafafa; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.listing-header { background: #fff; border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 60; }
.listing-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; }

.listing-hero { padding-block: var(--sp-8) var(--sp-6); background: #fff; }
.listing-hero h1 { margin-bottom: var(--sp-4); letter-spacing: -0.03em; }
.listing-lead { color: var(--c-muted); max-width: 62ch; font-size: 1.05rem; }

.listing-search { display: flex; gap: var(--sp-2); margin-top: var(--sp-5); max-width: 620px; }
.listing-search input {
  flex: 1; padding: 13px 16px;
  border: 1px solid var(--c-border); border-radius: var(--btn-radius); background: #fff;
}
.listing-search input:focus { outline: none; border-color: var(--c-accent); }

.listing-filters { background: #fff; border-bottom: 1px solid var(--c-border); position: sticky; top: 66px; z-index: 55; }
.filter-scroll {
  display: flex; gap: var(--sp-2); overflow-x: auto; padding-block: var(--sp-3);
  scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--c-border); font-size: .85rem; font-weight: 500; white-space: nowrap;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.chip:hover { background: var(--c-surface); }
.chip.is-active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

.listing-main { padding-block: var(--sp-6) var(--sp-8); }
.result-count { color: var(--c-muted); font-size: .88rem; margin-bottom: var(--sp-5); }

.business-row {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: 14px; padding: var(--sp-5); margin-bottom: var(--sp-5);
}
.business-row-head {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  align-items: flex-start; justify-content: space-between; margin-bottom: var(--sp-4);
}
.business-name { font-size: 1.28rem; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.business-meta { color: var(--c-muted); font-size: .84rem; }
.business-tagline { color: var(--c-muted); font-size: .92rem; margin-top: 2px; }
.row-all-link { font-size: .85rem; font-weight: 600; color: var(--c-accent); white-space: nowrap; }

.badge { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.badge-trending { background: #fef3c7; color: #92400e; }
.badge-featured { background: #dbeafe; color: #1e40af; }

/* --- The five design cards, one row --------------------------------------- */
.design-row { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }

.design-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--c-border); border-radius: 12px; overflow: hidden;
  background: #fff;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.design-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--c-accent); }

/* Wireframe thumbnail drawn purely in CSS, tinted by the design's own tokens */
.design-thumb {
  display: block; position: relative; aspect-ratio: 16 / 10;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border); overflow: hidden;
}
.design-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wire { position: absolute; background: var(--c-muted); opacity: .28; border-radius: 3px; }
.wire-bar  { top: 8px; left: 8px; right: 8px; height: 8px; background: var(--c-primary); opacity: .8; }
.wire-hero { top: 24px; left: 8px; right: 8px; height: 42%; background: var(--c-accent); opacity: .55; border-radius: 4px; }
.wire-line { left: 8px; top: 68%; width: 62%; height: 6px; }
.wire-line.short { top: 78%; width: 40%; }
.wire-grid { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 4px; height: 16%; }
.wire-grid i { flex: 1; background: var(--c-secondary); opacity: .35; border-radius: 3px; }

.design-info { padding: var(--sp-3) var(--sp-4) 0; display: block; }
.design-number { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.design-style { display: block; font-family: var(--font-heading); font-weight: 600; font-size: .95rem; color: #111827; margin-top: 2px; }

.design-cta {
  margin: var(--sp-3) var(--sp-4) var(--sp-4);
  display: block; text-align: center; padding: 9px 14px;
  border-radius: var(--btn-radius); font-size: .82rem; font-weight: 600;
  background: var(--c-accent); color: #fff;
}
.design-card:hover .design-cta { filter: brightness(.92); }

.empty-state { text-align: center; padding: var(--sp-8); color: var(--c-muted); }
.empty-state a { color: var(--c-accent); font-weight: 600; }

.pagination-wrap { margin-top: var(--sp-6); }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--sp-4); }
.pager-btn { padding: 9px 18px; border: 1px solid var(--c-border); border-radius: var(--btn-radius); background: #fff; font-size: .88rem; font-weight: 600; }
.pager-btn.is-disabled { opacity: .4; }
.pager-status { font-size: .85rem; color: var(--c-muted); }

.listing-footer { background: #fff; border-top: 1px solid var(--c-border); padding-block: var(--sp-5); }
.listing-footer p { color: var(--c-muted); font-size: .85rem; }

@media (min-width: 560px) { .design-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .design-row { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .design-row { grid-template-columns: repeat(5, 1fr); } }

/* ==========================================================================
   Error pages (404 / 500 / 503)
   ========================================================================== */
.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 20px;
    background: #0f1220;
    color: #e8ecf7;
}
.error-shell {
    max-width: 560px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}
.error-code {
    font-size: clamp(3.5rem, 14vw, 6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    background: linear-gradient(135deg, #6d8cff, #b46bff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.error-title { font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 700; }
.error-text  { color: #a2abc6; line-height: 1.65; }
.error-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.error-page .btn-outline { border: 1px solid #39406080; color: #e8ecf7; }

/* An author `display` rule beats the UA stylesheet's [hidden] { display:none },
   so guard it globally. Without this, anything toggled via the `hidden`
   attribute (lightbox, modals, toasts) stays visible and blocks the page. */
[hidden] { display: none !important; }

/* ==========================================================================
   Brand navigation in the listing header + multi-column SEO footer
   ========================================================================== */
.listing-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: .88rem; }
.listing-nav a { color: #3c4457; font-weight: 500; transition: color .15s ease; }
.listing-nav a:hover { color: #111827; }
.listing-nav .btn { margin-left: 4px; }

.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-block: 44px;
}
.footer-cols h4 {
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: .65;
}
.footer-brand { font-size: 1.15rem; font-weight: 750; display: block; margin-bottom: 10px; }
.footer-note  { font-size: .85rem; line-height: 1.7; opacity: .78; margin-bottom: 12px; max-width: 46ch; }
.footer-note a { text-decoration: underline; text-underline-offset: 3px; }
.footer-links { display: grid; gap: 9px; font-size: .86rem; }
.footer-links a { opacity: .8; transition: opacity .15s ease; }
.footer-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 20px;
  border-top: 1px solid rgba(128, 128, 128, .22);
  font-size: .84rem;
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* The card grid gets a subtle "opens in a new tab" affordance */
.design-card::after {
  content: "↗";
  position: absolute;
  top: 10px; right: 12px;
  font-size: .8rem;
  opacity: 0;
  transition: opacity .18s ease;
}
.design-card { position: relative; }
.design-card:hover::after { opacity: .55; }

@media (max-width: 1024px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 768px) {
  .footer-cols { grid-template-columns: 1fr; gap: 26px; padding-block: 32px; }
  .listing-nav { gap: 14px; font-size: .8rem; }
  .listing-nav a:not(.btn) { display: none; }
}

/* ==========================================================================
   Category landing pages (/website-design/{slug})
   ========================================================================== */
.lp-crumbs { padding-block: 14px; font-size: .82rem; border-bottom: 1px solid #e6e8ec; }
.lp-crumbs .container { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lp-crumbs a { color: #4a5468; text-decoration: underline; text-underline-offset: 3px; }
.lp-crumbs span[aria-current] { color: #8a93a5; }

.lp-hero { padding-block: 60px 50px; background: linear-gradient(180deg, #f7f9fc, #ffffff); }
.lp-hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.lp-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.1; letter-spacing: -.03em; margin-block: 12px 16px; }
.lp-lead { font-size: 1.05rem; line-height: 1.7; color: #4a5468; max-width: 56ch; }
.lp-meta { font-size: .84rem; color: #78839a; margin-top: 16px; max-width: 52ch; }
.lp-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.lp-hero-art img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 24px 60px rgba(16, 22, 40, .14); }

.lp-section { padding-block: 56px; }
.lp-alt { background: #f7f9fc; }
.lp-section h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: -.02em; margin-bottom: 10px; }
.lp-section-lead { color: #4a5468; max-width: 62ch; margin-bottom: 28px; line-height: 1.7; }
.lp-design-row { margin-top: 8px; }

.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.lp-card {
    background: #fff; border: 1px solid #e6e8ec; border-radius: 12px;
    padding: 18px; display: flex; flex-direction: column; gap: 10px;
}
.lp-card img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; }
.lp-card h3 { font-size: 1rem; }
.lp-card p { font-size: .88rem; color: #4a5468; line-height: 1.6; }

.lp-two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.lp-side-art { width: 100%; height: auto; border-radius: 14px; }
.lp-check { display: grid; gap: 10px; margin-block: 18px; }
.lp-check li { padding-left: 26px; position: relative; color: #3c4457; line-height: 1.6; }
.lp-check li::before {
    content: '✓'; position: absolute; left: 0; top: 0;
    color: #0f9d58; font-weight: 700;
}
.lp-note { font-size: .9rem; color: #5b6478; line-height: 1.7; max-width: 58ch; }

.lp-faq { display: grid; gap: 10px; max-width: 780px; }
.lp-faq details {
    background: #fff; border: 1px solid #e6e8ec; border-radius: 10px; padding: 14px 18px;
}
.lp-faq summary { cursor: pointer; font-weight: 600; font-size: .95rem; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: '+'; float: right; color: #8a93a5; font-weight: 400; }
.lp-faq details[open] summary::after { content: '−'; }
.lp-faq p { margin-top: 10px; color: #4a5468; font-size: .9rem; line-height: 1.7; }

.lp-cta { background: #0d1017; color: #e8ecf7; padding-block: 56px; text-align: center; }
.lp-cta h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); margin-bottom: 12px; }
.lp-cta p { color: #a2abc6; max-width: 58ch; margin: 0 auto; line-height: 1.7; }
.lp-cta .lp-actions { justify-content: center; }
.lp-cta .btn-outline { border: 1px solid #39406080; color: #e8ecf7; }

.lp-related-title { font-size: 1rem; margin-bottom: 14px; }
.lp-related { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-related a {
    font-size: .85rem; padding: 7px 14px; border-radius: 999px;
    border: 1px solid #e6e8ec; background: #fff; color: #3c4457;
}
.lp-related a:hover { border-color: #3d5afe; color: #3d5afe; }

@media (max-width: 900px) {
    .lp-hero-inner, .lp-two-col { grid-template-columns: 1fr; gap: 28px; }
    .lp-hero { padding-block: 36px 32px; }
    .lp-section { padding-block: 38px; }
}

/* Demo ribbon shown on every sample site */
.demo-flag {
    background: #fff4d6;
    border-bottom: 1px solid #f0dfa8;
    color: #6b5310;
    font-size: .78rem;
    text-align: center;
    padding: 7px 16px;
    line-height: 1.5;
}
.demo-flag a { color: #6b5310; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.cat-link { text-decoration: underline; text-underline-offset: 3px; }
.cat-link:hover { color: #3d5afe; }
