/* ════════════════════════════════════════════════════════════════
   DROIX — 404 page styles. Light theme, brand tokens only.
   After colors_and_type.css + page.css.
   ════════════════════════════════════════════════════════════════ */

.e404-page { background: var(--bg-2); min-height: 100vh; }
.e404-wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

.e404-hero { background: linear-gradient(180deg, var(--droix-green-tint) 0%, var(--bg-2) 70%); border-bottom: 1px solid var(--stroke-1); }
.e404-hero-in { max-width: 760px; margin: 0 auto; padding: 64px 28px 56px; text-align: center; }
.e404-glyph { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.e404-glyph .num { font-family: var(--font-ui); font-weight: 700; font-size: 130px; line-height: 0.9; color: var(--fg-2); letter-spacing: -0.04em; }
.e404-glyph .pad { width: 116px; height: 116px; border-radius: 30px; background: var(--droix-green); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-cta); transform: rotate(-6deg); }
.e404-glyph .pad i { width: 64px; height: 64px; color: #1c2400; }
.e404-eyebrow { font-family: var(--font-ui); font-weight: 500; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--droix-green-dark); display: block; margin-bottom: 12px; }
.e404-hero h1 { font-family: var(--font-ui); font-weight: 700; font-size: 42px; line-height: 1.08; color: var(--fg-2); margin: 0; letter-spacing: -0.015em; }
.e404-hero h1 em { font-style: normal; color: var(--droix-purple); }
.e404-hero p { font-family: var(--font-body); font-size: 16.5px; line-height: 1.55; color: var(--fg-4); margin: 16px auto 0; max-width: 520px; text-wrap: pretty; }

.e404-search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--stroke-3); border-radius: var(--radius-lg); padding: 6px 6px 6px 16px; max-width: 540px; margin: 30px auto 0; box-shadow: var(--shadow-sm); }
.e404-search > i { width: 19px; height: 19px; color: var(--fg-4); flex: 0 0 auto; }
.e404-search input { flex: 1; border: 0; outline: 0; background: none; font-family: var(--font-body); font-size: 14.5px; color: var(--fg-1); min-width: 0; }
.e404-search input::placeholder { color: var(--fg-5); }
.e404-search button { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 20px; border-radius: var(--radius-md); border: 0; background: var(--droix-green); color: #1c2400; font-family: var(--font-ui); font-weight: 700; font-size: 14px; cursor: pointer; flex: 0 0 auto; transition: background .15s, color .15s; }
.e404-search button:hover { background: var(--droix-green-dark); color: #fff; }
.e404-search button i { width: 16px; height: 16px; }

.e404-popular { display: flex; align-items: center; gap: 9px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.e404-popular .lbl { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--fg-4); }
.e404-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--radius-pill); border: 1px solid var(--stroke-2); background: #fff; font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--fg-3); cursor: pointer; text-decoration: none; transition: border-color .14s, color .14s, background .14s; }
.e404-chip:hover { border-color: var(--droix-green); background: var(--droix-green-tint); color: var(--droix-green-dark); }
.e404-chip i { width: 15px; height: 15px; color: var(--fg-4); }
.e404-chip:hover i { color: var(--droix-green-dark); }

.e404-ctas { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.e404-btn { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: var(--radius-lg); font-family: var(--font-ui); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.e404-btn i { width: 18px; height: 18px; }
.e404-btn.primary { background: var(--droix-green); color: #1c2400; box-shadow: var(--shadow-cta); }
.e404-btn.primary:hover { background: var(--droix-green-dark); color: #fff; }
.e404-btn.secondary { background: #fff; border-color: var(--stroke-3); color: var(--fg-2); }
.e404-btn.secondary:hover { border-color: var(--fg-4); }

.e404-section { padding: 40px 0; }
.e404-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.e404-link { display: flex; flex-direction: column; padding: 22px; background: #fff; border: 1px solid var(--stroke-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); text-decoration: none; cursor: pointer; transition: box-shadow .18s, transform .18s, border-color .18s; }
.e404-link:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--droix-green); }
.e404-link .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--droix-green-tint); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.e404-link .ic i { width: 22px; height: 22px; color: var(--droix-green-dark); }
.e404-link .t { font-family: var(--font-ui); font-weight: 700; font-size: 15px; color: var(--fg-2); }
.e404-link .s { font-family: var(--font-body); font-size: 13px; line-height: 1.5; color: var(--fg-4); margin: 6px 0 14px; flex: 1; text-wrap: pretty; }
.e404-link .go { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--droix-green-dark); }
.e404-link .go i { width: 14px; height: 14px; }

.e404-sechead { margin-bottom: 22px; text-align: center; }
.e404-sechead .eyebrow { font-family: var(--font-ui); font-weight: 500; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--droix-green-dark); }
.e404-sechead h2 { font-family: var(--font-ui); font-weight: 700; font-size: 26px; color: var(--fg-2); margin: 8px 0 0; }
.e404-sechead .sub { font-family: var(--font-body); font-size: 14.5px; color: var(--fg-4); margin: 8px 0 0; }

.e404-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.e404-pcard { border: 1px solid var(--stroke-2); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-xs); overflow: hidden; transition: box-shadow .18s, transform .18s; }
.e404-pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.e404-pcard .well { height: 160px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; padding: 16px; position: relative; }
.e404-pcard .well img { max-width: 84%; max-height: 84%; object-fit: contain; }
.e404-pcard .flag { position: absolute; top: 10px; left: 10px; height: 22px; padding: 0 9px; border-radius: var(--radius-xs); font-family: var(--font-ui); font-weight: 700; font-size: 10px; letter-spacing: 0.05em; color: #fff; background: var(--droix-green-dark); display: inline-flex; align-items: center; }
.e404-pcard .flag.yellow { background: var(--droix-yellow); color: #5a4b00; }
.e404-pcard .pbody { padding: 14px 16px 16px; }
.e404-pcard .cat { font-family: var(--font-ui); font-weight: 500; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-5); }
.e404-pcard .pname { font-family: var(--font-ui); font-weight: 700; font-size: 14.5px; color: var(--fg-2); margin: 5px 0; min-height: 38px; }
.e404-pcard .pfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.e404-pcard .price { font-family: var(--font-ui); font-weight: 700; font-size: 17px; color: var(--droix-purple); }
.e404-pcard .price .was { font-family: var(--font-body); font-size: 12px; color: var(--fg-5); text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.e404-pcard .atc { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: var(--radius-md); border: 1px solid var(--droix-green); background: var(--droix-green-tint); color: var(--droix-green-dark); font-family: var(--font-ui); font-weight: 700; font-size: 12.5px; cursor: pointer; transition: background .15s, color .15s; }
.e404-pcard .atc:hover { background: var(--droix-green); color: #1c2400; }
.e404-pcard .atc i { width: 14px; height: 14px; }

@media (max-width: 1023px) {
  .e404-wrap { padding: 0 20px; }
  .e404-links { grid-template-columns: repeat(2, 1fr); }
  .e404-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .e404-hero-in { padding: 44px 18px 40px; }
  .e404-glyph .num { font-size: 92px; }
  .e404-glyph .pad { width: 84px; height: 84px; border-radius: 22px; }
  .e404-glyph .pad i { width: 46px; height: 46px; }
  .e404-hero h1 { font-size: 30px; }
  .e404-search { flex-wrap: wrap; }
  .e404-search button { width: 100%; justify-content: center; }
  .e404-links { grid-template-columns: 1fr; }
  .e404-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   DROIX theme port: icons are server-rendered inline <svg> (via
   droix_404_icon()), not Lucide <i> placeholders. Mirror the icon
   sizing rules onto <svg> so they match the design.
   ════════════════════════════════════════════════════════════════ */
.e404-glyph .pad svg { width: 64px; height: 64px; color: #1c2400; }
.e404-search > svg { width: 19px; height: 19px; color: var(--fg-4); flex: 0 0 auto; }
.e404-search button svg { width: 16px; height: 16px; }
.e404-chip svg { width: 15px; height: 15px; color: var(--fg-4); }
.e404-chip:hover svg { color: var(--droix-green-dark); }
.e404-btn svg { width: 18px; height: 18px; }
.e404-link .ic svg { width: 22px; height: 22px; color: var(--droix-green-dark); }
.e404-link .go svg { width: 14px; height: 14px; }
.e404-pcard .atc svg { width: 14px; height: 14px; }

/* The 404 renders in the theme's content+sidebar layout, which left-shifts it.
   Force full-width and drop the (empty) sidebar so the centred .e404-hero-in /
   .e404-wrap actually centre on the page. */
body.error404 #primary.content-area,
body.error404 .content-area { width: 100% !important; max-width: 100% !important; float: none !important; margin: 0 auto !important; }
body.error404 #secondary,
body.error404 .widget-area { display: none !important; }
