/* Global base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #080010;
    color: #f4ecff;
}

/* Links */
a {
    color: #ffd66b;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

/* Shell layout: full-height grid */
.shell-body,
.page-shell {
    height: 100vh;
}

.page-shell {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

/* Header */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #14001f;
    border-bottom: 1px solid #55336e;
    gap: 1.5rem;
}

/* Hamburger button – hidden on desktop, shown in mobile query */
.mobile-nav-toggle {
    display: none;              /* default: hidden */
    background: none;
    border: 1px solid #ffd66b;
    border-radius: 4px;
    padding: 0.25rem 0.35rem;
    cursor: pointer;
    margin-top: 0.35rem;
}

.mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #ffd66b;
    margin: 3px 0;
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo {
    height: 56px;
    width: auto;
}

.site-title-block {
    display: flex;
    flex-direction: column;
}

.site-title {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
    color: #f9f1ff;
}

.site-subtitle {
    margin: 0.1rem 0 0;
    font-size: 0.9rem;
    color: #f1d287;
}

.site-header-contact {
    font-size: 0.85rem;
    text-align: right;
    color: #e2d0ff;
}

.site-header-contact a {
    display: block;
}

/* Main layout: sidebar + content */
.layout-body {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 0;
}

/* Sidebar nav */
.sidebar-nav {
    background: #190323;
    border-right: 1px solid #55336e;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.nav-heading {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #ffd66b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.nav-help {
    font-size: 0.8rem;
    color: #d9c5ff;
    margin: 0 0 0.35rem;
}

.inventory-select {
    width: 100%;
    padding: 0.35rem;
    border-radius: 4px;
    border: 1px solid #55336e;
    background: #080010;
    color: #f4ecff;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.inventory-go {
    width: 100%;
    padding: 0.35rem 0.4rem;
    border-radius: 4px;
    border: 1px solid #FFD66B; /* Gold border */
    background: #FFD66B; /* Gold background */
    color: #190323;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 0.75rem; /* Add a bit of space below the button */
}

.inventory-go:hover,
.inventory-go:focus {
    filter: brightness(1.05);
}


.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.nav-item a {
    display: block;
    padding: 0.4rem 0.45rem;
    border-radius: 4px;
    background: transparent;
}

.nav-item a:hover,
.nav-item a:focus {
    background: #321146;
}

.nav-section-label {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #55336e;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f1d287;
}

/* Right content panel / iframe */
.content-panel {
    background: #080010;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

.content-frame {
    border: none;
    width: 100%;
    height: 100%;
}

/* Footer */
.site-footer {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    text-align: center;
    background: #120017;
    border-top: 1px solid #55336e;
    color: #ccb6ff;
}

/* Inner content pages (home, webproject, etc.) */
.content-body {
    margin: 0;
    background: #080010;
    color: #f4ecff;
}

.content-inner {
    max-width: 1000px;
    margin: 1.5rem auto;
    padding: 0 1rem 2rem;
}

/* Home page styles */
.home-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.home-logo {
    width: 80px;
    height: auto;
}

.home-title {
    margin: 0;
    font-size: 1.5rem;
}

.home-tagline {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: #f1d287;
}

.home-intro p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Search section */
.search-section {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: #130020;
    border: 1px solid #55336e;
}

.search-section h2 {
    margin-top: 0;
}

.search-hint {
    font-size: 0.9rem;
    color: #d9c5ff;
}

.search-fallback {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

/* Featured slabs */
.featured-section {
    margin-top: 2rem;
}

.featured-heading {
    margin-bottom: 0.75rem;
}

.featured-table {
    width: 100%;
    border-collapse: collapse;
}

.featured-table td {
    padding: 0.5rem 0.35rem;
    vertical-align: middle;
}

.featured-cover {
    max-width: 140px;
    height: auto;
    display: block;
    border-radius: 4px;
    border: 1px solid #55336e;
}

.featured-caption {
    font-size: 0.9rem;
    color: #e8dcff;
}

/* Responsive tweak */
@media (max-width: 800px) {
    .layout-body {
        grid-template-columns: 210px minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .layout-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    .sidebar-nav {
        border-right: none;
        border-bottom: 1px solid #55336e;
    }
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-header-contact {
        text-align: left;
    }
}
@media (max-width: 768px) {
    /* Stack layout vertically on small screens */
    .layout-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    /* Show hamburger button on mobile */
    .mobile-nav-toggle {
        display: inline-block;
    }

    /* Make the sidebar a slide-out panel */
    .sidebar-nav {
        position: fixed;
        top: 60px; /* approx header height; tweak if needed */
        left: 0;
        width: 75%;
        max-width: 320px;
        height: calc(100% - 60px);
        background: #190323;
        border-right: 1px solid #55336e;
        padding: 0.75rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.25s ease-out;
        z-index: 1000;
    }

    /* When nav is open, slide it in */
    body.nav-open .sidebar-nav {
        transform: translateX(0);
    }

    /* Optional: dark overlay behind the menu when open */
    body.nav-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 900;
    }

    /* Ensure content panel takes full width on mobile */
    .content-panel {
        grid-column: 1 / -1;
    }
}

