/* GiantMouse Haus — Dark theme inspired by premium knife aesthetics */

:root {
    --bg: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222;
    --text: #e8e8e8;
    --text-muted: #999;
    --accent: #d4a853;
    --accent-hover: #e8bf6a;
    --border: #333;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.logo:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Main */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    width: 100%;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Categories */
.categories h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: block;
    color: var(--text);
    transition: background 0.2s, border-color 0.2s;
}

.category-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--text);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.category-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.count {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--accent);
}

/* Category Header */
.category-header {
    margin-bottom: 2rem;
}

.category-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-header p {
    color: var(--text-muted);
}

/* Knife Grid */
.knife-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.knife-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: block;
    color: var(--text);
    transition: background 0.2s, border-color 0.2s;
}

.knife-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.knife-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.knife-card-header h3 {
    font-size: 1.1rem;
}

.knife-card-specs {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.knife-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.limited {
    background: rgba(212, 168, 83, 0.15);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.badge-sm {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
}

.badge-sm.limited {
    background: rgba(212, 168, 83, 0.15);
    color: var(--accent);
}

/* Knife Image — Detail Page */
.knife-image {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.knife-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

/* Knife Card Image — Category Grid */
.knife-card-image {
    margin: -1.25rem -1.25rem 1rem -1.25rem;
    background: #111;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fill the whole tile width; the photo is cropped to the frame, not letterboxed. */
    aspect-ratio: 4 / 3;
}

.knife-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Knife Detail */
.knife-detail {
    max-width: 800px;
}

.knife-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.knife-detail-header h1 {
    font-size: 2rem;
}

.knife-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.specs-table h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.specs-table table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.specs-table th {
    width: 160px;
    color: var(--text-muted);
    font-weight: 500;
}

.specs-table td {
    color: var(--text);
}

/* All Knives Table */
.all-knives h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.all-knives .subtitle {
    margin-bottom: 1.5rem;
}

.all-knives-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.all-knives-table th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
}

.all-knives-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.all-knives-table tr:hover td {
    background: var(--bg-card);
}

/* Notes Section */
.notes-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.notes-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.notes-group {
    margin-bottom: 2rem;
}

.notes-group h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.note-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--border);
}

.note-card.recall {
    border-left-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.note-card.issue {
    border-left-color: #f39c12;
    background: rgba(243, 156, 18, 0.05);
}

.note-card.solution {
    border-left-color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

.note-card.tip {
    border-left-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.note-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.note-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.note-source {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--accent);
}

.note-source:hover {
    color: var(--accent-hover);
}

/* Knife card warning indicator */
.knife-card-warnings {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.warning-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 600;
}

.warning-badge.recall {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.warning-badge.has-issues {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

footer .disclaimer {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    main {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .category-grid,
    .knife-grid {
        grid-template-columns: 1fr;
    }

    .all-knives-table {
        font-size: 0.8rem;
    }

    .all-knives-table th:nth-child(n+4),
    .all-knives-table td:nth-child(n+4) {
        display: none;
    }

    .knife-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
