/* ==========================================================================
   Listing pages — redesign approved 30 Sep 2026
   (/designs/{language}, /templates/{category}[/{language}], /for/{country},
   /new-designs)

   The designs are the page: a quiet head, chip rails, a filter bar that
   sticks under the header, and the designs at their real shapes. Same
   tokens and card language as the template and home pages. Classes are
   prefixed lp-; resets use :where() so they never outrank a component rule.
   ========================================================================== */
.lp-page {
  --lp-brand: #2563eb;
  --lp-brand-hover: #1d4ed8;
  --lp-brand-soft: #eef3ff;
  --lp-ink: #0f172a;
  --lp-ink-2: #334155;
  --lp-muted: #64748b;
  --lp-faint: #94a3b8;
  --lp-line: #e5e8ee;
  --lp-line-soft: #eef0f4;
  --lp-soft: #f7f8fa;
  --lp-gold: #b45309;
  --lp-heart: #e11d48;
  background: #fff;
}
:where(.lp) :where(h1, h2, h3, p) { margin: 0; }
:where(.lp) a { color: inherit; text-decoration: none; }
:where(.lp) :focus-visible { outline: 2px solid var(--lp-brand); outline-offset: 2px; border-radius: 6px; }
.lp { color: var(--lp-ink); padding-bottom: 72px; }

/* ---------- page head ---------- */
.lp-crumbs { display: flex; align-items: center; gap: 6px; padding-top: 14px; font-size: 13px; color: var(--lp-muted); white-space: nowrap; overflow: hidden; }
.lp-crumbs a:hover { color: var(--lp-ink); }
.lp-crumbs svg { color: #c3c9d3; flex-shrink: 0; }
.lp-crumbs [aria-current] { color: var(--lp-ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.lp-head { padding: 14px 0 18px; }
.lp-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 30px; line-height: 1.2; letter-spacing: -.022em; font-weight: 800; color: var(--lp-ink); }
.lp-count { padding: 3px 11px; border-radius: 999px; background: var(--lp-brand-soft); color: var(--lp-brand); font-size: 13px; font-weight: 800; letter-spacing: 0; white-space: nowrap; }
.lp-head p { max-width: 780px; margin-top: 8px; color: var(--lp-muted); font-size: 14.5px; }

/* chip rails */
.lp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lp-chips + .lp-chips { margin-top: 10px; }
.lp-chips__label { margin-right: 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lp-faint); }
.lp-chips a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--lp-line); background: #fff; font-size: 13.5px; font-weight: 700; color: var(--lp-ink-2); white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.lp-chips a:hover { border-color: var(--lp-ink-2); color: var(--lp-ink); }
.lp-chips a em { font-style: normal; font-weight: 600; color: var(--lp-muted); }
.lp-chips a small { font-size: 12px; font-weight: 700; color: var(--lp-faint); }
.lp-chips a.is-on { background: var(--lp-ink); border-color: var(--lp-ink); color: #fff; }
.lp-chips a.is-on em, .lp-chips a.is-on small { color: rgba(255, 255, 255, .72); }

/* ---------- filter bar: sticks right under the site header ---------- */
.lp-bar { position: sticky; top: var(--lp-header-h, 64px); z-index: 40; margin-top: 18px; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--lp-line-soft); border-bottom: 1px solid var(--lp-line-soft); }
.lp-bar__in { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.lp-seg { display: inline-flex; padding: 3px; border-radius: 12px; border: 1px solid var(--lp-line); background: var(--lp-soft); }
.lp-seg a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--lp-muted); white-space: nowrap; }
.lp-seg a:hover { color: var(--lp-ink); }
.lp-seg a.is-on { background: #fff; color: var(--lp-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.lp-dd > summary { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--lp-line); background: #fff; font-size: 13px; font-weight: 700; color: var(--lp-ink-2); cursor: pointer; white-space: nowrap; }
.lp-dd > summary span { color: var(--lp-muted); font-weight: 600; }
.lp-dd > summary:hover { border-color: #cdd3dc; }
.lp-dd.is-set > summary { border-color: var(--lp-brand); background: var(--lp-brand-soft); color: var(--lp-brand); }
.lp-dd.is-set > summary span { color: var(--lp-brand); }
.lp-dd__list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 190px; max-height: 320px; overflow-y: auto; padding: 6px; background: #fff; border: 1px solid var(--lp-line); border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .3); }
.lp-dd__list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--lp-ink-2); white-space: nowrap; }
.lp-dd__list a:hover { background: var(--lp-soft); color: var(--lp-ink); }
.lp-dd__list a.is-on { color: var(--lp-brand); }
.lp-dd__list a.is-on::after { content: "✓"; font-weight: 800; }
.lp-clear { font-size: 13px; font-weight: 700; color: var(--lp-brand); white-space: nowrap; }
.lp-clear:hover { text-decoration: underline; }
.lp-bar__count { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--lp-muted); white-space: nowrap; }

/* ---------- results: every design at its own shape ---------- */
.lp-results { padding-top: 22px; }
.lp-masonry { columns: 5 190px; column-gap: 18px; }
/* With the script: reading order, each design into the shortest column. */
.lp-masonry.is-js { columns: auto; display: flex; align-items: flex-start; gap: 18px; }
.lp-masonry.is-js .lp-col { flex: 1 1 0; min-width: 0; }
.lp-card { position: relative; break-inside: avoid; margin: 0 0 22px; }
.lp-card__media { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--lp-soft); box-shadow: 0 0 0 1px rgba(15, 23, 42, .06); }
.lp-card__media img { display: block; width: 100%; height: auto; transition: transform .35s ease; }
.lp-card:hover .lp-card__media img { transform: scale(1.035); }
.lp-card__ph { display: grid; place-items: center; padding: 16px; text-align: center; color: var(--lp-faint); font-size: 13px; font-weight: 700; }
.lp-card__pro { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--lp-gold); font-size: 11.5px; font-weight: 800; box-shadow: 0 1px 4px rgba(15, 23, 42, .18); }
.lp-card__fav { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; background: rgba(255, 255, 255, .96); box-shadow: 0 2px 8px rgba(15, 23, 42, .18); opacity: 0; transform: translateY(-3px); transition: opacity .15s, transform .15s, color .15s; }
.lp-card:hover .lp-card__fav, .lp-card__fav:focus-visible, .lp-card__fav.active { opacity: 1; transform: none; }
.lp-card__fav.active { color: var(--lp-heart); }
@media (hover: none) { .lp-card__fav { opacity: 1; transform: none; } }
.lp-card__meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13.5px; }
.lp-card__title { flex: 1; min-width: 0; font-weight: 700; color: var(--lp-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-card__title:hover { color: var(--lp-brand); }
.lp-card__sub { color: var(--lp-muted); font-size: 12.5px; white-space: nowrap; }

/* show more + page links */
.lp-pager { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 10px; }
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 12px; border: 1px solid var(--lp-line); background: #fff; font-size: 14px; font-weight: 700; color: var(--lp-ink); white-space: nowrap; transition: border-color .15s, background .15s; }
.lp-btn:hover { border-color: #cdd3dc; background: var(--lp-soft); }
.lp-btn small { font-weight: 600; color: var(--lp-muted); }
.lp-btn.is-busy { opacity: .6; pointer-events: none; }
.lp-btn--primary { border-color: transparent; background: var(--lp-brand); color: #fff; }
.lp-btn--primary:hover { background: var(--lp-brand-hover); border-color: transparent; }
.lp-pages { display: flex; align-items: center; gap: 6px; }
.lp-pages a { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--lp-line); font-size: 13px; font-weight: 700; color: var(--lp-ink-2); }
.lp-pages a:hover { border-color: #cdd3dc; }
.lp-pages a.is-on { background: var(--lp-ink); border-color: var(--lp-ink); color: #fff; }
.lp-pages__gap { color: var(--lp-faint); }

/* empty state */
.lp-empty { margin-top: 28px; padding: 56px 16px 48px; border: 1px dashed #d8dde5; border-radius: 20px; background: var(--lp-soft); text-align: center; }
.lp-empty__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--lp-brand); box-shadow: 0 4px 14px rgba(15, 23, 42, .08); }
.lp-empty h2 { font-size: 20px; font-weight: 800; color: var(--lp-ink); }
.lp-empty p { max-width: 480px; margin: 6px auto 0; color: var(--lp-muted); font-size: 14.5px; }
.lp-empty__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

/* ---------- FAQ + related ---------- */
.lp-sec { margin-top: 56px; }
/* Page text (Admin → SEO): one readable column under the designs */
.lp-text { max-width: 860px; }
.lp-text > h2, .lp-text__body h2 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; color: var(--lp-ink); margin: 0 0 12px; }
.lp-text__body h2:not(:first-child) { margin-top: 26px; }
.lp-text__body h3 { font-size: 17px; font-weight: 700; color: var(--lp-ink); margin: 18px 0 8px; }
.lp-text__body p, .lp-text__body li { font-size: 15px; line-height: 1.7; color: var(--lp-ink-2); }
.lp-text__body p + p, .lp-text__body ul + p { margin-top: 12px; }
.lp-text__body ul { margin: 10px 0 0 20px; list-style: disc; }
.lp-text__body a { color: var(--lp-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lp-faq { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; }
.lp-faq__side h2, .lp-related h2 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; color: var(--lp-ink); }
.lp-faq details { border-bottom: 1px solid var(--lp-line); }
.lp-faq details:first-child { border-top: 1px solid var(--lp-line); }
.lp-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 2px; font-weight: 700; font-size: 15px; color: var(--lp-ink); cursor: pointer; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary:hover { color: var(--lp-brand); }
.lp-faq summary svg { flex-shrink: 0; color: var(--lp-muted); transition: transform .2s; }
.lp-faq details[open] summary svg { transform: rotate(180deg); }
.lp-faq details p { max-width: 760px; padding: 0 2px 16px; color: var(--lp-ink-2); font-size: 14.5px; }
.lp-related h2 { font-size: 18px; }
.lp-related__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lp-related__chips a { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--lp-line); font-size: 13.5px; font-weight: 700; color: var(--lp-ink-2); transition: border-color .15s, color .15s, background .15s; }
.lp-related__chips a:hover { border-color: var(--lp-brand); color: var(--lp-brand); background: var(--lp-brand-soft); }

/* ---------- search page ---------- */
.lp-clearq { display: grid; place-items: center; width: 30px; height: 30px; margin-right: 6px; border-radius: 50%; color: var(--lp-muted); flex-shrink: 0; }
.lp-clearq:hover { background: #e8ebf0; color: var(--lp-ink); }
.lp-card__title mark { padding: 0 1px; border-radius: 3px; background: #fef08a; color: inherit; }
.lp-sec__hd { margin-bottom: 16px; }
.lp-sec__hd h2 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; color: var(--lp-ink); }
.lp-sec__hd p { margin-top: 4px; color: var(--lp-muted); font-size: 14.5px; }
.lp-related__chips a svg { margin-right: 6px; color: var(--lp-faint); }
.lp-related__chips a:hover svg { color: var(--lp-brand); }
.lp-prompt { margin-top: 24px; padding: 48px 24px 44px; border-radius: 24px; text-align: center; border: 1px solid var(--lp-line-soft); background: radial-gradient(520px 260px at 50% 0%, #eef3ff, transparent 70%), var(--lp-soft); }
.lp-prompt__ic { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: #fff; color: var(--lp-brand); box-shadow: 0 6px 18px -8px rgba(37, 99, 235, .45); }
.lp-prompt h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--lp-ink); overflow-wrap: anywhere; }
.lp-prompt p { max-width: 540px; margin: 8px auto 0; color: var(--lp-muted); font-size: 15px; }
.lp-prompt__cta { margin-top: 18px; }
.lp-prompt .lp-related__chips { justify-content: center; margin-top: 18px; }
.lp-bigsearch.omni-search { display: flex; align-items: center; gap: 10px; max-width: 560px; height: 56px; margin: 22px auto 0; padding: 0 7px 0 18px; border: 1px solid var(--lp-line); border-radius: 16px; background: #fff; box-shadow: 0 12px 30px -16px rgba(15, 23, 42, .35); color: var(--lp-faint); text-align: left; }
.lp-bigsearch.omni-search:focus-within { border-color: var(--lp-brand); box-shadow: 0 12px 30px -16px rgba(15, 23, 42, .35), 0 0 0 4px rgba(37, 99, 235, .12); }
.lp-bigsearch__icon { display: flex; }
.lp-bigsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--lp-ink); }
.lp-bigsearch .lp-btn { height: 42px; border-radius: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .lp-faq { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 767px) {
  .lp { padding-bottom: 40px; }
  .lp-crumbs { padding-top: 10px; }
  .lp-head { padding: 10px 0 14px; }
  .lp-head h1 { font-size: 23px; }
  .lp-head p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
  .lp-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
  .lp-chips::-webkit-scrollbar { display: none; }
  .lp-chips a { flex-shrink: 0; height: 34px; padding: 0 13px; }
  .lp-bar { margin-top: 14px; }
  .lp-bar__in { min-height: 54px; overflow-x: auto; margin: 0 -12px; padding: 0 12px; scrollbar-width: none; }
  .lp-bar__in::-webkit-scrollbar { display: none; }
  .lp-bar__count { display: none; }
  /* the bar scrolls sideways, so its menus open as a sheet above the bottom menu */
  .lp-dd__list { position: fixed; left: 12px; right: 12px; top: auto; bottom: 74px; min-width: 0; }
  .lp-results { padding-top: 16px; }
  .lp-masonry { columns: 2; column-gap: 12px; }
  .lp-masonry.is-js { gap: 12px; }
  .lp-card { margin-bottom: 16px; }
  .lp-card__fav { width: 32px; height: 32px; }
  .lp-sec { margin-top: 40px; }
  .lp-faq__side h2 { font-size: 19px; }
  .lp-prompt { padding: 32px 16px; }
  .lp-prompt h2 { font-size: 21px; }
  .lp-bigsearch.omni-search { height: 50px; }
  .lp-bigsearch .lp-btn { width: 42px; padding: 0; }
  .lp-bigsearch .lp-btn span { display: none; }
  .lp-sec__hd h2 { font-size: 19px; }
}
