:root {
    --bg: #F6F4FB;
    --dot: #D6CEE9;
    --surface: #FFFFFF;
    --ink: #181426;
    --ink-sub: #4B4463;
    --ink-muted: #7C7496;
    --purple: #7C4DFF;
    --purple-dark: #5B2FE0;
    --purple-soft: #EDE9FE;
    --purple-lilac: #D8C7FF;
    --purple-card: #C4B5FD;
    --purple-court: #381D74;
    --accent: #7C4DFF;
    --accent-soft: #EDE9FE;
    --green: #16A34A;
    --green-soft: #DCFCE7;
    --mint: #DCFCE7;
    --sky: #DBEAFE;
    --cream: #FEF3C7;
    --border: 2px solid #181426;
    --border-thin: 1.5px solid #181426;
    --shadow: 4px 4px 0 #181426;
    --shadow-sm: 3px 3px 0 #181426;
    --shadow-xs: 2px 2px 0 #181426;
    --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg);
    background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
    background-size: 22px 22px;
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== Neo-Brutalist Core Primitives ========== */
.nb-card {
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.nb-card-hover:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #181426;
}

.nb-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 9999px;
    border: var(--border-thin);
    box-shadow: var(--shadow-xs);
    font-weight: 800;
    font-size: 13px;
    padding: 7px 16px;
    background: var(--surface);
    color: var(--ink);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    white-space: nowrap;
}

.nb-pill:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #181426;
}

.nb-pill:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #181426;
}

.nb-pill-purple {
    background: var(--purple);
    color: #FFFFFF;
}

.nb-pill-dark {
    background: var(--ink);
    color: #FFFFFF;
}

.nb-pill-lilac {
    background: var(--purple-soft);
    color: var(--purple-dark);
}

/* ========== Sticky Header ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(246, 244, 251, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--ink);
}

.header-inner {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: var(--border);
    box-shadow: var(--shadow-xs);
    object-fit: cover;
    background: #FFFFFF;
}

.brand span {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav a {
    padding: 7px 14px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-sub);
    border: 1.5px solid transparent;
    transition: all 0.14s ease;
}

.nav a:hover {
    color: var(--ink);
    background: var(--purple-soft);
}

.nav a.active {
    color: var(--ink);
    background: var(--purple-lilac);
    border-color: var(--ink);
    box-shadow: 2px 2px 0 #181426;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 240px;
    height: 40px;
    padding: 0 14px;
    border-radius: 9999px;
    background: var(--surface);
    border: var(--border);
    box-shadow: var(--shadow-xs);
}

.search-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-muted); }

.kbd-chip {
    font-size: 11px;
    font-weight: 800;
    color: var(--ink-muted);
    padding: 1px 6px;
    border-radius: 5px;
    border: 1px solid #D5CDE8;
    background: var(--bg);
    flex-shrink: 0;
}

.btn-ai {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--purple);
    color: #FFFFFF;
    border: var(--border);
    box-shadow: var(--shadow-xs);
    font-size: 13px;
    font-weight: 800;
    transition: transform 0.12s, box-shadow 0.12s;
}

.btn-ai:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #181426; }
.btn-ai:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #181426; }

/* ========== Section Headers (TTSensei Eyebrow Pattern) ========== */
.section { padding: 40px 0 8px; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.eyebrow {
    font-size: 12px;
    font-weight: 800;
    color: var(--purple);
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.section-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--ink);
    line-height: 1.2;
}

.section-sub {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-sub);
}

/* ========== 3-Column Equipment Catalog Cards (Exact TTSensei Proportions) ========== */
.catalog-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.square-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.eq-block {
    background: var(--surface);
    border: var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.eq-block:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #181426;
}

.eq-square {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #FFFFFF;
    border-bottom: 1.5px solid #EAE6F5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: hidden;
}

.eq-square img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.eq-block:hover .eq-square img { transform: scale(1.04); }

.eq-ittf-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--purple);
    color: #FFFFFF;
    border: 1.5px solid var(--ink);
}

.eq-caption {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.eq-brand {
    font-size: 11px;
    font-weight: 900;
    color: var(--purple);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.eq-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--ink);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eq-tags-foot {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.eq-outline-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1.5px solid var(--ink);
    background: var(--bg);
    color: var(--ink);
}

.eq-skeleton {
    aspect-ratio: 4 / 3;
    background: linear-gradient(90deg, #EFEBF8 25%, #F8F6FC 50%, #EFEBF8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== Breadcrumb & Page Head ========== */
.page-head {
    padding: 26px 0 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--purple);
    margin-bottom: 8px;
}

.breadcrumb span { color: var(--ink-muted); }

.page-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.page-sub {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-sub);
}

.panel {
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ========== Dark Charcoal-Violet Footer ========== */
.footer {
    margin-top: 64px;
    background: var(--ink);
    color: #E4DFF2;
    border-top: 2px solid var(--ink);
    padding: 44px 0 32px;
    font-size: 13px;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-brand-bio {
    max-width: 340px;
}

.footer-brand-bio strong {
    font-size: 18px;
    color: #FFFFFF;
}

.footer-brand-bio p {
    margin-top: 8px;
    color: #A89EC4;
    line-height: 1.65;
}

.footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-links a {
    padding: 7px 14px;
    border-radius: 9999px;
    background: #FFFFFF;
    color: var(--ink);
    font-weight: 800;
    font-size: 12.5px;
    border: 1.5px solid var(--ink);
    box-shadow: 3px 3px 0 var(--purple);
    transition: transform 0.12s;
}

.footer-links a:hover { transform: translate(-1px, -1px); }

.footer-bottom {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    color: #8F84AD;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

/* ========== Right AI Drawer ========== */
.drawer-mask {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(24, 20, 38, 0.42);
    display: none;
    justify-content: flex-end;
}

.drawer-mask.open { display: flex; }

.drawer {
    width: 430px;
    max-width: 100%;
    height: 100%;
    background: var(--bg);
    border-left: 2px solid var(--ink);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 0 rgba(24, 20, 38, 0.25);
}

.drawer-head {
    height: 64px;
    padding: 0 20px;
    background: var(--surface);
    border-bottom: 2px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    max-width: 88%;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.6;
    background: var(--surface);
    border: var(--border-thin);
    box-shadow: var(--shadow-xs);
    white-space: pre-wrap;
    word-break: break-word;
}

.msg.user {
    align-self: flex-end;
    background: var(--purple);
    color: #FFFFFF;
}

.drawer-foot {
    padding: 14px 16px;
    background: var(--surface);
    border-top: 2px solid var(--ink);
    display: flex;
    gap: 8px;
}

.drawer-foot input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: var(--border-thin);
    background: var(--bg);
    font-size: 13.5px;
    font-weight: 600;
    outline: none;
}

.drawer-foot input:focus { background: var(--surface); border-color: var(--purple); }

.drawer-foot button {
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--purple);
    color: #FFFFFF;
    border: var(--border-thin);
    box-shadow: var(--shadow-xs);
    font-size: 13.5px;
    font-weight: 800;
}

@media (max-width: 960px) {
    .catalog-grid-3, .square-grid { grid-template-columns: repeat(2, 1fr); }
    .search-box { display: none; }
}

@media (max-width: 620px) {
    .catalog-grid-3, .square-grid { grid-template-columns: 1fr; }
}
