/* =====================================================================
   Loan product pages — shared layout (2026-09 redesign)
   Template: web_loan_product.html · Content: apps/website/loan_products.py
   Palette: navy #1d407e, deep navy #16305d, yellow #fde362
   All classes are prefixed .lp- so nothing leaks into other pages.
   ===================================================================== */
.lp-page {
  --lp-navy: #1d407e; --lp-navy-deep: #16305d; --lp-yellow: #fde362;
  --lp-ink: #1f2a3d; --lp-muted: #5b6678; --lp-line: #e3e8f1;
  color: var(--lp-ink);
}
.lp-wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ---- Hero ---- */
.lp-hero {
  position: relative; color: #fff;
  padding: clamp(36px, 6vw, 72px) 0 clamp(64px, 9vw, 110px);
  background:
    linear-gradient(100deg, rgba(22,48,93,.95) 0%, rgba(22,48,93,.82) 45%, rgba(22,48,93,.35) 100%),
    var(--lp-hero-lg) center / cover no-repeat, var(--lp-navy-deep);
}
@media (max-width: 1024px) {
  .lp-hero {
    background:
      linear-gradient(180deg, rgba(22,48,93,.88) 0%, rgba(22,48,93,.92) 100%),
      var(--lp-hero-sm) center / cover no-repeat, var(--lp-navy-deep);
  }
}
.lp-hero .lp-wrap > * { max-width: 680px; }
.lp-crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; color: rgba(255,255,255,.75); flex-wrap: wrap; }
.lp-crumbs a { color: #fff; text-decoration: underline; text-decoration-color: rgba(253,227,98,.6); text-underline-offset: 3px; }
.lp-crumbs i { font-size: 11px; }
.lp-hero-tag {
  display: inline-flex; align-items: center; gap: 8px; background: var(--lp-yellow); color: var(--lp-navy-deep);
  font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}
.lp-hero h1 { color: #fff; font-weight: 800; font-size: clamp(28px, 4.6vw, 48px); line-height: 1.12; margin: 0 0 12px; }
.lp-hero p { color: rgba(255,255,255,.88); font-size: clamp(16px, 2vw, 19px); line-height: 1.55; margin: 0 0 22px; }
.lp-facts { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.lp-facts li {
  display: flex; flex-direction: column; padding: 10px 16px; border-radius: 14px; min-width: 140px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(4px);
}
.lp-facts span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lp-yellow); }
.lp-facts strong { font-size: 18px; color: #fff; }
.lp-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- Buttons ---- */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  font-weight: 700; font-size: 15.5px; padding: 12px 20px; border-radius: 12px; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.lp-btn:hover { text-decoration: none; }
.lp-btn-yellow { background: var(--lp-yellow); color: var(--lp-navy-deep); }
.lp-btn-yellow:hover { background: #fff; color: var(--lp-navy-deep); }
.lp-btn-ghost { border: 2px solid rgba(255,255,255,.6); color: #fff; }
.lp-btn-ghost:hover { border-color: var(--lp-yellow); color: var(--lp-yellow); }
.lp-btn-navy { background: var(--lp-navy); color: #fff; }
.lp-btn-navy:hover { background: var(--lp-yellow); color: var(--lp-navy-deep); }
.lp-block { width: 100%; }

/* ---- Body ---- */
.lp-body { background: linear-gradient(to bottom, #fff7cf 0, #ffffff 520px); padding-bottom: clamp(48px, 7vw, 80px); }
.lp-body section { margin-bottom: clamp(28px, 5vw, 48px); }
.lp-kicker {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--lp-navy); background: rgba(253, 227, 98, .6); padding: 3px 10px; border-radius: 6px; margin-bottom: 8px;
}
.lp-head { text-align: center; max-width: 720px; margin: 0 auto 22px; }
.lp-head h2 { color: var(--lp-navy-deep); font-weight: 800; font-size: clamp(22px, 3.2vw, 30px); margin: 0 0 8px; }
.lp-head p { color: var(--lp-muted); margin: 0; font-size: 16px; }

/* Overview: overlaps the hero */
.lp-overview { display: grid; grid-template-columns: 8fr 4fr; gap: 20px; margin-top: clamp(-80px, -6vw, -44px); position: relative; z-index: 2; align-items: start; }
.lp-intro, .lp-summary {
  background: #fff; border-radius: 18px; padding: clamp(22px, 3.5vw, 32px);
  box-shadow: 0 18px 48px rgba(22, 48, 93, .14), 0 2px 6px rgba(22, 48, 93, .05); min-width: 0;
}
.lp-intro h2 { color: var(--lp-navy-deep); font-weight: 800; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; margin: 0 0 14px; text-align: left; }
.lp-intro p { font-size: 16px; line-height: 1.7; margin: 0 0 12px; }
.lp-avail {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: rgba(253,227,98,.35); border-left: 4px solid var(--lp-yellow);
}
.lp-avail i { color: var(--lp-navy); font-size: 20px; line-height: 1.3; }
.lp-avail p { margin: 0; font-weight: 600; color: var(--lp-navy-deep); font-size: 15px; line-height: 1.55; }

.lp-summary { border-top: 5px solid var(--lp-yellow); position: sticky; top: 16px; }
.lp-summary-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px;
  background: linear-gradient(160deg, var(--lp-navy), var(--lp-navy-deep)); color: var(--lp-yellow); font-size: 25px;
}
.lp-summary h3 { color: var(--lp-navy-deep); font-weight: 800; font-size: 19px; margin: 0 0 12px; }
.lp-summary dl { margin: 0 0 16px; }
.lp-summary dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--lp-line); }
.lp-summary dt { color: var(--lp-muted); font-weight: 500; font-size: 14px; }
.lp-summary dd { margin: 0; font-weight: 800; color: var(--lp-navy); font-size: 14.5px; text-align: right; }
.lp-summary-call { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; color: var(--lp-navy); font-weight: 700; font-size: 14.5px; text-decoration: none; }
.lp-summary-call:hover { text-decoration: underline; text-decoration-color: var(--lp-yellow); text-decoration-thickness: 3px; }

/* Requirements */
.lp-req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.lp-req { background: #fff; border: 1px solid var(--lp-line); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 22px rgba(22, 48, 93, .07); }
.lp-req-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--lp-navy); }
.lp-req-head h3 { color: #fff; font-size: 16.5px; font-weight: 700; margin: 0; }
.lp-count { flex: 0 0 auto; min-width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--lp-yellow); color: var(--lp-navy-deep); font-weight: 800; font-size: 13px; padding: 0 8px; }
.lp-req ul { list-style: none; margin: 0; padding: 8px 18px 14px; }
.lp-req li { position: relative; padding: 9px 0 9px 30px; border-bottom: 1px dashed var(--lp-line); font-size: 15px; line-height: 1.45; }
.lp-req li:last-child { border-bottom: 0; }
.lp-req li::before {
  content: "\F26A"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 9px;
  color: var(--lp-navy); font-size: 17px; line-height: 1.2;
}
.lp-req-note { text-align: center; color: var(--lp-muted); font-size: 14.5px; margin: 16px 0 0; }
.lp-req-note i { color: var(--lp-navy); margin-right: 4px; }
.lp-req-note a { color: var(--lp-navy); font-weight: 700; }

/* Reasons */
.lp-reasons { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(20px, 4vw, 44px); align-items: center; }
.lp-reasons-media { border-radius: 18px; overflow: hidden; box-shadow: 0 18px 48px rgba(22, 48, 93, .16); aspect-ratio: 4 / 5; background: #e9eef6; }
.lp-reasons-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-reasons-text h2 { color: var(--lp-navy-deep); font-weight: 800; font-size: clamp(22px, 3.2vw, 30px); margin: 0 0 8px; text-align: left; }
.lp-lead { color: var(--lp-muted); font-size: 16px; line-height: 1.6; margin: 0 0 18px; }
.lp-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lp-feat { display: flex; gap: 12px; background: #f6f8fc; border: 1px solid var(--lp-line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.lp-feat > i { color: var(--lp-navy); font-size: 20px; line-height: 1.3; }
.lp-feat h3 { font-size: 16px; font-weight: 700; color: var(--lp-navy); margin: 0 0 4px; }
.lp-feat p { font-size: 14.5px; line-height: 1.55; margin: 0; }
.lp-feats > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* About + CTA */
.lp-about {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  border-radius: 18px; padding: clamp(22px, 4vw, 38px); color: #fff;
  background: linear-gradient(135deg, var(--lp-navy), var(--lp-navy-deep));
  box-shadow: 0 18px 48px rgba(22, 48, 93, .22);
}
.lp-about h2 { color: var(--lp-yellow); font-weight: 800; font-size: clamp(22px, 3vw, 28px); margin: 0 0 10px; text-align: left; }
.lp-about p { color: rgba(255,255,255,.86); font-size: 15.5px; line-height: 1.65; margin: 0 0 10px; }
.lp-about p:last-child { margin-bottom: 0; }
.lp-about-actions { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }

/* Related */
.lp-related h2, .lp-others h2 { color: var(--lp-navy-deep); font-weight: 800; font-size: clamp(20px, 2.8vw, 24px); margin: 0 0 14px; }
.lp-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lp-rel-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; text-decoration: none;
  background: #fff; border: 1px solid var(--lp-line); box-shadow: 0 6px 18px rgba(22, 48, 93, .07); transition: border-color .2s, transform .2s;
}
.lp-rel-card:hover { border-color: var(--lp-navy); transform: translateY(-2px); text-decoration: none; }
.lp-rel-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--lp-navy); color: var(--lp-yellow); font-size: 20px; }
.lp-rel-text { display: flex; flex-direction: column; min-width: 0; }
.lp-rel-text strong { color: var(--lp-navy-deep); font-size: 15.5px; }
.lp-rel-text small { color: var(--lp-muted); font-size: 13.5px; }
.lp-rel-arrow { margin-left: auto; color: var(--lp-navy); }
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chips a {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: #f6f8fc; border: 1px solid var(--lp-line); color: var(--lp-navy); text-decoration: none; transition: background .2s, color .2s;
}
.lp-chips a:hover { background: var(--lp-navy); color: #fff; text-decoration: none; }

/* ================= Responsive ================= */
@media (max-width: 991.98px) {
  .lp-overview { grid-template-columns: 1fr; }
  .lp-summary { position: static; }
  .lp-reasons { grid-template-columns: 1fr; }
  .lp-reasons-media { aspect-ratio: 16 / 9; }
  .lp-about { grid-template-columns: 1fr; }
  .lp-about-actions { flex-direction: row; flex-wrap: wrap; }
  .lp-about-actions .lp-btn { flex: 1 1 200px; }
}
@media (max-width: 767.98px) {
  .lp-facts li { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .lp-facts strong { font-size: 16px; }
  .lp-hero-actions .lp-btn { flex: 1 1 100%; }
  .lp-feats { grid-template-columns: 1fr; }
  .lp-req-grid { grid-template-columns: 1fr; }
  .lp-intro p { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-rel-card { transition: none; }
  .lp-rel-card:hover { transform: none; }
}

/* =====================================================================
   All loan products page (.ap-*) — shares tokens/buttons with .lp-page
   ===================================================================== */
.ap-top { background: linear-gradient(to bottom, #fde362 0, #fff7cf 100%); padding: clamp(28px, 5vw, 56px) 0 clamp(20px, 3vw, 28px); }
.ap-hero { text-align: center; max-width: 760px; margin: 0 auto 20px; }
.ap-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; background: var(--lp-navy); color: var(--lp-yellow);
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.ap-hero h1 { color: var(--lp-navy); font-weight: 800; line-height: 1.15; margin: 0 0 12px; font-size: clamp(28px, 5vw, 44px); }
.ap-hero h1 span { background: linear-gradient(transparent 62%, rgba(255,255,255,.85) 62%); padding: 0 4px; }
.ap-hero p { color: var(--lp-navy-deep); font-size: clamp(16px, 2.2vw, 18px); margin: 0; }
.ap-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ap-cats a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  background: #fff; color: var(--lp-navy); text-decoration: none; border: 1px solid var(--lp-line); box-shadow: 0 4px 12px rgba(22,48,93,.08);
}
.ap-cats a span { min-width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--lp-navy); color: var(--lp-yellow); font-size: 12px; padding: 0 6px; }
.ap-cats a:hover { background: var(--lp-navy); color: #fff; text-decoration: none; }
.ap-body { padding-top: clamp(20px, 3vw, 32px); padding-bottom: clamp(48px, 7vw, 80px); }
.ap-cat { margin-bottom: clamp(28px, 5vw, 44px); scroll-margin-top: 80px; }
.ap-cat > h2 {
  display: flex; align-items: center; gap: 10px; color: var(--lp-navy-deep); font-weight: 800; font-size: clamp(21px, 3vw, 26px); margin: 0 0 14px;
}
.ap-cat > h2::before { content: ""; width: 6px; height: 26px; border-radius: 3px; background: var(--lp-yellow); box-shadow: inset 0 0 0 1px rgba(29,64,126,.15); }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.ap-card {
  display: flex; flex-direction: column; background: #fff; border-radius: 18px; padding: 20px; min-width: 0;
  border-top: 4px solid var(--lp-navy); box-shadow: 0 12px 34px rgba(22, 48, 93, .10), 0 2px 6px rgba(22, 48, 93, .04);
}
.ap-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ap-icon { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(160deg, var(--lp-navy), var(--lp-navy-deep)); color: var(--lp-yellow); font-size: 21px; }
.ap-card h3 { color: var(--lp-navy-deep); font-weight: 800; font-size: 18px; line-height: 1.25; margin: 0; }
.ap-rate { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.ap-rate > div { background: rgba(253,227,98,.35); border-radius: 12px; padding: 10px 12px; }
.ap-rate span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lp-muted); }
.ap-rate strong { color: var(--lp-navy); font-size: 22px; font-weight: 800; line-height: 1.2; }
.ap-rate .ap-terms { font-size: 15px; }
.ap-sub { font-size: 14.5px; line-height: 1.55; color: var(--lp-ink); margin: 0 0 10px; }
.ap-avail { font-size: 13.5px; color: var(--lp-navy-deep); font-weight: 600; margin: 0 0 10px; }
.ap-avail i { color: var(--lp-navy); }
.ap-reqs { border: 1px solid var(--lp-line); border-radius: 12px; margin-bottom: 14px; background: #f8fafd; }
.ap-reqs summary {
  list-style: none; cursor: pointer; padding: 11px 14px; font-weight: 700; color: var(--lp-navy); display: flex; align-items: center; gap: 8px; position: relative;
}
.ap-reqs summary::-webkit-details-marker { display: none; }
.ap-reqs summary::after { content: "\F282"; font-family: "bootstrap-icons"; margin-left: auto; transition: transform .2s; font-size: 13px; }
.ap-reqs[open] summary::after { transform: rotate(180deg); }
.ap-reqs h4 { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--lp-navy); margin: 6px 14px 4px; }
.ap-reqs ul { margin: 0 14px 10px; padding-left: 18px; }
.ap-reqs li { font-size: 14px; line-height: 1.5; margin-bottom: 3px; }
.ap-reqs li::marker { color: var(--lp-navy); }
.ap-actions { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ap-actions .lp-btn { min-height: 44px; padding: 10px 18px; }
.ap-more { color: var(--lp-navy); font-weight: 700; text-decoration: underline; text-decoration-color: var(--lp-yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.ap-more:hover { color: var(--lp-navy-deep); }
@media (max-width: 767.98px) {
  .ap-cats { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .ap-cats::-webkit-scrollbar { display: none; }
  .ap-cats a { flex: 0 0 auto; }
  .ap-grid { grid-template-columns: 1fr; }
  .ap-actions .lp-btn { flex: 1 1 auto; }
}

/* =====================================================================
   Centered card rows (2026-09): requirements, "more options",
   "other loan products" and the All Products grid centre themselves
   whatever the number of items (1, 2, 5 …). Cards keep a fixed width
   and wrap; a short last row is centred too.
   ===================================================================== */
.lp-req-grid,
.lp-related-grid,
.ap-grid {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 16px;
}
.lp-req-grid > .lp-req    { flex: 0 1 340px; min-width: 0; }
.lp-related-grid          { gap: 12px; }
.lp-related-grid > .lp-rel-card { flex: 0 1 300px; min-width: 0; }
.ap-grid > .ap-card       { flex: 0 1 350px; min-width: 0; align-self: stretch; }

.lp-related h2, .lp-others h2 { text-align: center; }
.lp-chips { justify-content: center; }

@media (max-width: 767.98px) {
  .lp-req-grid > .lp-req,
  .lp-related-grid > .lp-rel-card,
  .ap-grid > .ap-card { flex-basis: 100%; }
}
.ap-cat > h2 { justify-content: center; }
