/* Hobby Hoard — shared component styles (buttons, search bar, nav, footer).
   Linked BEFORE each page's inline <style>, so page-level overrides win.
   Never redeclare these classes in a page's <style>; extend here and bump ?v=.
   Always var(--red) + color-mix tints — never the raw hex (dark theme remaps --red). */

/* ════ Buttons ════
   Hierarchy:
     primary   = solid red fill, white text   (.btn-action, .btn-primary, .btn, .search-btn — one style, three sizes)
     secondary = red ghost: 8% tint bg, 28% tint border, red text (.btn-share)
     tertiary  = neutral: --border border, --bg-2 fill, --text-2 text (.btn-neutral, .btn-outline) */

/* Icon button (nav theme toggle, hamburger) */
.btn-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-2); transition: background 0.15s, color 0.15s; }
.btn-icon:hover { background: var(--bg-2); color: var(--text); }

/* Primary — solid red */
.btn-action { display: flex; align-items: center; gap: 7px; padding: 9px 16px; border: 1px solid var(--red); border-radius: var(--r-sm); background: var(--red); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s; white-space: nowrap; }
.btn-action:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-primary { padding: 11px 20px; background: var(--red); color: #fff; font-size: 14px; font-weight: 600; border-radius: var(--r-sm); border: none; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: var(--red-dark); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: var(--r-sm); background: var(--red); color: #fff; font-size: 14px; font-weight: 600; border: none; cursor: pointer; font-family: var(--font-sans); transition: background 0.15s; }
.btn:hover { background: var(--red-dark); }
.btn-lg { padding: 13px 30px; font-size: 15px; }
.search-btn { padding: 9px 22px; background: var(--red); color: #fff; font-size: 14px; font-weight: 600; border-radius: var(--r-sm); transition: background 0.15s; white-space: nowrap; }
.search-btn:hover { background: var(--red-dark); }

/* Secondary — red ghost */
.btn-share { display: flex; align-items: center; gap: 7px; padding: 9px 16px; border: 1px solid color-mix(in srgb, var(--red) 28%, transparent); border-radius: var(--r-sm); background: color-mix(in srgb, var(--red) 8%, transparent); color: var(--red); font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s, border-color 0.15s; white-space: nowrap; }
.btn-share:hover { background: color-mix(in srgb, var(--red) 15%, transparent); border-color: color-mix(in srgb, var(--red) 45%, transparent); }

/* Tertiary — neutral */
.btn-neutral { display: flex; align-items: center; gap: 7px; padding: 9px 16px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-2); color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s, border-color 0.15s; white-space: nowrap; }
.btn-neutral:hover { background: var(--bg-3); border-color: var(--text-3); }
/* modifier on .btn */
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-2); }
.btn-outline:hover { background: var(--bg-2); color: var(--text); }
.btn-outline.danger { border-color: var(--red); color: var(--red); }
.btn-outline.danger:hover { background: color-mix(in srgb, var(--red) 9%, transparent); }

/* ════ Search bar (sticky bar on search/product; home hero overrides locally) ════ */
.search-bar-full { display: flex; align-items: center; gap: 10px; padding: 10px 32px; background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: var(--nav-h); z-index: 50; }
.search-input-wrap { flex: 1; display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; transition: border-color 0.15s; }
.search-input-wrap:focus-within { border-color: var(--red); }
.search-input-wrap input { flex: 1; min-width: 0; padding: 9px 8px; border: none; background: transparent; color: var(--text); font-size: 14px; outline: none; font-family: var(--font-sans); }
.search-input-wrap input::placeholder { color: var(--text-3); }
.search-icon, .search-icon-wrap { padding: 0 10px 0 12px; color: var(--text-3); display: flex; align-items: center; flex-shrink: 0; }
.clear-btn { padding: 0 10px; color: var(--text-3); display: flex; align-items: center; cursor: pointer; font-size: 14px; flex-shrink: 0; }

/* ════ Nav ════ */
.nav { position: sticky; top: 0; z-index: 100; height: var(--nav-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 32px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; margin-right: 28px; }
.nav-logo-text { font-weight: 700; font-size: 13px; line-height: 1.2; color: var(--red); letter-spacing: 0.04em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link { padding: 0 12px; height: 100%; display: flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--text-2); transition: color 0.15s; white-space: nowrap; position: relative; }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--red); }
.nav-link.active::after { content: ''; position: absolute; bottom: 0; left: 12px; right: 12px; height: 2px; background: var(--red); border-radius: 2px 2px 0 0; }
.nav-soon { font-size: 9px; font-weight: 700; background: var(--bg-3); color: var(--text-3); border-radius: 100px; padding: 1px 5px; margin-left: 4px; letter-spacing: 0.04em; vertical-align: middle; }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-hamburger { display: none; }
.mobile-menu { position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; background: var(--surface); z-index: 99; display: flex; flex-direction: column; border-top: 1px solid var(--border); overflow-y: auto; }
.mobile-menu-link { padding: 15px 24px; font-size: 15px; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; transition: background 0.15s, color 0.15s; }
.mobile-menu-link:hover { background: var(--bg-2); color: var(--text); }
.mobile-menu-link.active { color: var(--red); }

/* ════ Footer ════ */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 32px 24px; }
.footer-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.footer-col-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 14px; letter-spacing: 0.02em; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: var(--text-2); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { max-width: 1280px; margin: 20px auto 0; display: flex; align-items: center; justify-content: space-between; }
.footer-bottom p { font-size: 12px; color: var(--text-3); }

/* ════ Mobile (≤700px) ════ */
@media (max-width: 700px) {
  .btn-icon { width: 44px; height: 44px; }
  .nav { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer { padding: 32px 16px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .search-bar-full { padding-left: 16px; padding-right: 16px; }
  input, select, textarea { font-size: 16px !important; }
}
