@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700,800,900');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 13.5px;
    line-height: 1.6;
    color: #c4c3ca;
    background-color: #1f2029;
    overflow-x: hidden;
    min-height: 100vh;
}

body:not(.login-page) {
    background: linear-gradient(135deg, #1f2029 0%, #0f172a 100%);
}

a {
    cursor: pointer;
    transition: all 200ms linear;
    color: #c4c3ca;
    text-decoration: none;
}

a:hover {
    color: #ffeba7;
    text-decoration: none;
}

.link {
    color: #c4c3ca;
}

.link:hover {
    color: #ffeba7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Admin Ultra-Wide Layout */
body.admin-page {
    overflow-x: hidden;
    /* For ultra-wide (fx 7680×2160): use more width, but keep it manageable */
    --eg-admin-content-max-width: 2000px;
    --eg-admin-content-vw: 96vw;
    --eg-admin-content-pad: 2rem;
}

@media (min-width: 1800px) {
    body.admin-page {
        --eg-admin-content-max-width: 2800px;
        --eg-admin-content-pad: 2.2rem;
    }
}

@media (min-width: 2600px) {
    body.admin-page {
        --eg-admin-content-max-width: 3600px;
        --eg-admin-content-pad: 2.4rem;
    }
}

@media (min-width: 3400px) {
    body.admin-page {
        --eg-admin-content-max-width: 4200px;
        --eg-admin-content-pad: 2.6rem;
    }
}

@media (min-width: 4200px) {
    body.admin-page {
        --eg-admin-content-max-width: 4600px;
        --eg-admin-content-pad: 2.8rem;
    }
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #1f2029 0%, #0f172a 100%);
}

.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-right: 1px solid rgba(255, 235, 167, 0.1);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 235, 167, 0.1);
    margin-bottom: 0.5rem;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffeba7;
}

.sidebar-header a {
    color: #ffeba7;
    text-decoration: none;
}

.sidebar-nav {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: #c4c3ca;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 235, 167, 0.1);
    margin: 0 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    color: #ffeba7;
    opacity: 0.7;
}

.nav-item span {
    flex: 1;
}

.nav-item:hover {
    background: rgba(255, 235, 167, 0.15);
    color: #ffeba7;
    border-color: rgba(255, 235, 167, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(255, 235, 167, 0.2);
}

.nav-item:hover i {
    opacity: 1;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(255, 235, 167, 0.2) 0%, rgba(255, 235, 167, 0.1) 100%);
    color: #ffeba7;
    border-color: #ffeba7;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 235, 167, 0.25);
}

.nav-item.active i {
    opacity: 1;
    color: #ffeba7;
}

.nav-item-logout {
    margin-top: auto;
    border-top: 1px solid rgba(255, 235, 167, 0.1);
    padding-top: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.nav-item-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.nav-item-logout i {
    color: #fca5a5;
}

.nav-item-logout:hover i {
    color: #ef4444;
}

.nav-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

.admin-main {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    width: calc(100% - 280px);
}

.admin-topbar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 235, 167, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.admin-topbar-content {
    width: 100%;
    max-width: min(var(--eg-admin-content-max-width), var(--eg-admin-content-vw));
    margin: 0 auto;
    padding: 0 var(--eg-admin-content-pad);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffeba7;
    margin: 0;
}

.user-info {
    color: #c4c3ca;
    font-size: 0.9rem;
}

.admin-content-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* Ultra-Wide Container for Admin */
.admin-page .admin-content-wrapper {
    width: 100%;
    max-width: min(var(--eg-admin-content-max-width), var(--eg-admin-content-vw));
    margin: 0 auto;
    padding: 2rem var(--eg-admin-content-pad) 2.5rem;
}

@media (min-width: 1400px) {
    .admin-page .admin-content-wrapper {
        padding: 2.2rem var(--eg-admin-content-pad) 3rem;
    }
}

/* Ultra-Wide Tables */
.admin-page .table-wrapper {
    overflow-x: auto;
    max-width: 100%;
    margin: 1.5rem 0;
}

.admin-page .table {
    width: 100%;
    min-width: 1600px; /* Minimum width for ultra-wide */
    font-size: 0.9rem;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-page .table th,
.admin-page .table td {
    padding: 0.875rem 1.25rem;
    white-space: nowrap;
    text-align: left;
}

.admin-page .table th {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffeba7;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 235, 167, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-page .table td {
    border-bottom: 1px solid rgba(255, 235, 167, 0.05);
}

.admin-page .table tr:hover {
    background: rgba(255, 235, 167, 0.05);
}

/* Ultra-Wide Forms */
.admin-page .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Admin: responsive card grids (integrationer/tests) */
.admin-page .admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    gap: 14px;
    align-items: start;
}

/* On ultra-wide, keep content near the sidebar (less mouse travel) */
@media (min-width: 2400px) {
    .admin-topbar-content,
    .admin-page .admin-content-wrapper {
        margin-left: 0;
        margin-right: auto;
    }
}

/* Admin: small screens (sidebar becomes top nav) */
@media (max-width: 980px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        left: auto;
        top: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 235, 167, 0.1);
        box-shadow: 0 2px 10px rgba(0,0,0,0.25);
        overflow: visible;
    }

    .sidebar-header {
        padding: 1.15rem 1.25rem 0.75rem;
        margin-bottom: 0;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.75rem 0.75rem 1rem;
        gap: 0.6rem;
    }

    .nav-item {
        flex: 0 0 auto;
        white-space: nowrap;
        margin: 0;
        padding: 0.8rem 1rem;
    }

    .nav-item:hover {
        transform: none;
    }

    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    .admin-topbar {
        position: relative;
        top: auto;
    }

    .admin-topbar-content {
        padding: 0 1rem;
    }

    .admin-page .admin-content-wrapper {
        padding: 1.25rem 1rem 2rem;
    }
}

/* Admin: Varegrupper (kategorier) */
.admin-page .eg-span-full { grid-column: 1 / -1; }
.admin-page .eg-checkline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.admin-page .eg-checkline input[type="checkbox"] { width: auto; }
.admin-page #egCatDescription { min-height: 120px; resize: vertical; }

.admin-page #egCategoriesTable.table {
    min-width: 0;
    table-layout: fixed;
}
.admin-page #egCategoriesTable.table th:nth-child(1) { width: 170px; } /* code */
.admin-page #egCategoriesTable.table th:nth-child(2) { width: 240px; } /* name */
.admin-page #egCategoriesTable.table th:nth-child(4),
.admin-page #egCategoriesTable.table th:nth-child(5),
.admin-page #egCategoriesTable.table th:nth-child(6) { width: 90px; } /* flags */
.admin-page #egCategoriesTable.table th:nth-child(7) { width: 220px; } /* tool */
.admin-page #egCategoriesTable.table th:nth-child(8) { width: 120px; } /* sort */
.admin-page #egCategoriesTable.table th:nth-child(9) { width: 220px; } /* actions */

.admin-page #egCategoriesTable.table th,
.admin-page #egCategoriesTable.table td {
    white-space: normal;
    vertical-align: top;
}
.admin-page #egCategoriesTable .eg-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ... rest of CSS identical to source file ... */

/* --- Cards + buttons (missing in this trimmed stylesheet) --- */
.card {
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 235, 167, 0.12);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
}

.card-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffeba7;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Button with a small inline video (used on Shop for customers) */
.eg-btn-with-video {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.eg-btn-video-wrap {
    display: inline-flex;
    align-items: center;
}

.eg-btn-video {
    display: block;
    width: 0;
    height: 0;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.55);
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
    pointer-events: none;
}

/* Small inline image next to CTA buttons (same styling as inline video) */
.eg-btn-img {
    display: block;
    width: 0;
    height: 0;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.55);
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
    pointer-events: none;
}

.eg-btn-img-door-sign {
    object-fit: contain;
    background: rgba(2, 6, 23, 0.82);
}

/* Rotating inline preview image (used for EAR-1084 at Øre ringe CTA) */
.eg-btn-img-rotating {
    object-fit: contain;
    animation: egCtaImgYaw3d 3.6s ease-in-out infinite;
    transform-origin: 50% 50%;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform, filter;
}

@keyframes egCtaImgYaw3d {
    0% {
        transform: perspective(680px) rotateY(-30deg) rotateX(4deg) scale(0.98);
        filter: brightness(0.9) saturate(0.95);
    }
    50% {
        transform: perspective(680px) rotateY(30deg) rotateX(4deg) scale(0.98);
        filter: brightness(1.06) saturate(1.05);
    }
    100% {
        transform: perspective(680px) rotateY(-30deg) rotateX(4deg) scale(0.98);
        filter: brightness(0.9) saturate(0.95);
    }
}

@media (prefers-reduced-motion: reduce) {
    .eg-btn-img-rotating {
        animation: none;
    }
}

/* Shop CTA bar: stack "Åbn ..." buttons vertically */
.eg-shop-cta-bar {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.eg-shop-cta-bar > .button,
.eg-shop-cta-bar > .eg-btn-with-video {
    width: min(520px, 100%);
}

/* CTA buttons wrapped in tooltip containers (fx Streamers) */
.eg-shop-cta-bar > .eg-tooltip-wrap {
    width: min(520px, 100%);
}
.eg-shop-cta-bar > .eg-tooltip-wrap > .button {
    width: 100%;
}

.eg-shop-cta-bar .eg-btn-with-video {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

.eg-shop-cta-bar .eg-btn-with-video .button {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

.eg-shop-cta-bar .eg-btn-video-wrap {
    flex: 0 0 auto;
}

/* Tool links under Scripts/test should be stacked and 3D */
.tool-button-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
}

.tool-button-stack .button {
    width: min(420px, 100%);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.82rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.2px;
    color: #e5e7eb;
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.03) 100%);
    box-shadow:
        0 6px 0 rgba(2, 6, 23, 0.85),
        0 14px 20px rgba(0,0,0,0.45);
    transform: translateY(0);
    transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
    user-select: none;
}

.button:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow:
        0 8px 0 rgba(2, 6, 23, 0.85),
        0 17px 24px rgba(0,0,0,0.55);
}

.button:active {
    transform: translateY(4px);
    box-shadow:
        0 3px 0 rgba(2, 6, 23, 0.85),
        0 10px 14px rgba(0,0,0,0.45);
}

.button:focus-visible {
    outline: 2px solid #ffeba7;
    outline-offset: 3px;
}

.button-small {
    padding: 0.38rem 0.58rem;
    font-size: 0.66rem;
    border-radius: 0.75rem;
    box-shadow:
        0 4px 0 rgba(2, 6, 23, 0.85),
        0 11px 16px rgba(0,0,0,0.45);
}

.button-primary {
    color: #0b1120;
    border-color: rgba(255, 235, 167, 0.75);
    background: linear-gradient(180deg, #ffeba7 0%, #fbbf24 100%);
    box-shadow:
        0 6px 0 rgba(120, 73, 0, 0.55),
        0 14px 20px rgba(0,0,0,0.45);
}

.button-primary:hover {
    box-shadow:
        0 8px 0 rgba(120, 73, 0, 0.55),
        0 17px 24px rgba(0,0,0,0.55);
}

.button-primary:active {
    box-shadow:
        0 3px 0 rgba(120, 73, 0, 0.55),
        0 10px 14px rgba(0,0,0,0.45);
}

.button-secondary {
    border-color: rgba(148, 163, 184, 0.34);
}

.button-danger {
    border-color: rgba(239, 68, 68, 0.55);
    background: linear-gradient(180deg, rgba(239,68,68,0.30) 0%, rgba(239,68,68,0.18) 100%);
}

/* Simple spacing helpers used in index.html */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* Muted helper */
.muted {
    color: rgba(196, 195, 202, 0.85);
    font-size: 0.92rem;
}

/* Basic form layout helpers (used across admin + tools) */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-group {
    flex: 1;
    min-width: 220px;
}

/* Responsive form grid (public pages + profile) */
.eg-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.eg-field {
    min-width: 0;
}

.eg-span-full {
    grid-column: 1 / -1;
}

.eg-checkline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.eg-checkline input[type="checkbox"] { width: auto; }

.eg-suggest-list {
    margin-top: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.40);
    border-radius: 12px;
    overflow: hidden;
}

.eg-suggest-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: transparent;
    color: rgba(229, 231, 235, 0.96);
    cursor: pointer;
}
.eg-suggest-item:first-child { border-top: 0; }
.eg-suggest-item:hover { background: rgba(255, 235, 167, 0.07); }

/* Simple tables on public pages */
.table-wrapper {
    overflow-x: auto;
    max-width: 100%;
    margin: 1rem 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 235, 167, 0.10);
    background: rgba(2, 6, 23, 0.25);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.92rem;
}

.table th,
.table td {
    padding: 0.75rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 235, 167, 0.06);
    white-space: nowrap;
}

.table th {
    background: rgba(2, 6, 23, 0.55);
    color: #ffeba7;
    font-weight: 800;
}

.table tr:hover td {
    background: rgba(255, 235, 167, 0.05);
}

label {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
    font-weight: 650;
    color: #ffeba7;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(2, 6, 23, 0.55);
    color: #e5e7eb;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: rgba(196, 195, 202, 0.6);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(255, 235, 167, 0.65);
    box-shadow: 0 0 0 3px rgba(255, 235, 167, 0.14);
}

code {
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 0.1rem 0.35rem;
    border-radius: 0.5rem;
    color: #e5e7eb;
}

/* -------------------------------------------
   Site frontpage / public pages
   ------------------------------------------- */
:root {
    --eg-site-sidebar-width: 280px;
    --eg-site-drawer-width: min(360px, 88vw);
    /* Ensure header toggle stays clickable above overlay */
    --eg-site-header-z: 1300;
    --eg-site-overlay-z: 1100;
    --eg-site-drawer-z: 1200;
}

body.site-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-left: 0; /* mobile-first: no sidebar padding */
}

/* Sticky footer: keep footer at bottom on short pages */
body.site-page > main {
    flex: 1 0 auto;
}

body.site-page > footer.site-footer {
    margin-top: auto;
}

.site-header {
    /* mobile-first: top header */
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: auto;
    z-index: var(--eg-site-header-z);
    background: rgba(2, 6, 23, 0.78);
    border-right: none;
    border-bottom: 1px solid rgba(255, 235, 167, 0.10);
    backdrop-filter: blur(10px);
    overflow-y: visible;
}

.site-header .container {
    /* mobile/tablet: keep normal page padding */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #0b1120;
    background: linear-gradient(180deg, #ffeba7 0%, #fbbf24 100%);
    box-shadow:
        0 10px 0 rgba(120, 73, 0, 0.55),
        0 18px 26px rgba(0,0,0,0.45);
}

.brand-title {
    font-weight: 900;
    color: #ffeba7;
    line-height: 1.0;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: rgba(196, 195, 202, 0.9);
    margin-top: 2px;
}

.site-nav {
    /* mobile/tablet: full-screen menu panel (shows more items at once) */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: var(--eg-site-drawer-z);
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 10px;
    padding: 16px 16px 18px;
    background: rgba(2, 6, 23, 0.94);
    border-right: none;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 160ms ease, transform 180ms ease;
}

.site-header .site-nav .button {
    justify-content: center;
    min-height: 44px; /* touch target */
    width: 100%;
}

.site-nav [data-eg-admin-only="1"] {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 235, 167, 0.08);
    grid-column: 1 / -1;
}

.site-header .button {
    width: auto;
}

.site-sidebar-section-title {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 900;
    color: rgba(255, 235, 167, 0.92);
    margin-top: 10px;
    margin-bottom: -2px;
}

.site-login-panel {
    margin-top: 4px;
    padding: 9px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    background: rgba(2, 6, 23, 0.38);
    box-shadow: 0 14px 26px rgba(0,0,0,0.35);
    grid-column: 1 / -1;
}

.site-login-panel label {
    margin-top: 0.35rem;
    margin-bottom: 0.25rem;
}
.site-login-panel label:first-of-type { margin-top: 0; }

/* Drawer open state */
body.eg-nav-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Backdrop/overlay (injected by JS) */
#egNavOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    z-index: var(--eg-site-overlay-z);
}
body.eg-nav-open #egNavOverlay {
    opacity: 1;
    pointer-events: auto;
}

/* Scroll lock (applied by JS) */
body.eg-scroll-lock {
    overflow: hidden;
}

/* Hamburger toggle (injected by JS) */
.eg-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(2, 6, 23, 0.35);
    color: #e5e7eb;
    cursor: pointer;
    user-select: none;
}
.eg-nav-toggle:focus-visible {
    outline: 2px solid #ffeba7;
    outline-offset: 3px;
}
.eg-nav-toggle-lines {
    width: 18px;
    height: 14px;
    position: relative;
}
.eg-nav-toggle-lines::before,
.eg-nav-toggle-lines::after,
.eg-nav-toggle-lines span {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 999px;
    background: rgba(229, 231, 235, 0.92);
}
.eg-nav-toggle-lines::before { top: 0; }
.eg-nav-toggle-lines span { top: 6px; }
.eg-nav-toggle-lines::after { bottom: 0; }

/* Desktop (>= 1024): keep existing left sidebar intention */
@media (min-width: 1024px) {
    body.site-page {
        padding-left: var(--eg-site-sidebar-width);
    }

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--eg-site-sidebar-width);
        border-right: 1px solid rgba(255, 235, 167, 0.10);
        border-bottom: none;
        overflow-y: auto;
    }

    .site-header .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .site-header-inner {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
        padding: 16px 14px;
    }

    .site-nav {
        position: static;
        width: auto;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        padding: 0;
        background: transparent;
        border-right: none;
        overflow-y: visible;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 7px;
    }

    .site-header .button {
        width: 100%;
    }

    .eg-nav-toggle {
        display: none;
    }
}

/* On touch widths, do not rely on hover tooltips */
@media (max-width: 1023px) {
    .eg-tooltip {
        display: none !important;
    }
}

/* Mobile/tablet: 2 columns when there is room */
@media (min-width: 520px) and (max-width: 1023px) {
    .site-nav {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile/tablet: reduce height by having one cart button */
@media (max-width: 1023px) {
    #egNavViewCart { display: none !important; }
}

.hero {
    padding: 26px 0 18px;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 980px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
}

.hero h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.12;
    color: #e5e7eb;
    letter-spacing: -0.2px;
}

.hero-lead {
    margin-top: 10px;
    font-size: 1.05rem;
}

.hero-card {
    padding: 1.15rem;
}

.hero-card-title {
    font-weight: 900;
    color: #ffeba7;
    margin-bottom: 10px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 520px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

.link-card {
    display: block;
    padding: 14px 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    background: rgba(2, 6, 23, 0.35);
    box-shadow: 0 14px 26px rgba(0,0,0,0.35);
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 235, 167, 0.25);
    background: rgba(2, 6, 23, 0.42);
}

.link-card-title {
    font-weight: 900;
    color: #ffeba7;
    margin-bottom: 4px;
}

.link-card-desc {
    font-size: 0.92rem;
    color: rgba(196, 195, 202, 0.9);
}

/* Customer product preview images (category.html) */
.eg-product-preview-img {
    width: 2cm;
    height: 2cm;
    object-fit: contain;
    max-width: 2cm;
    max-height: 2cm;
    margin: 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.66);
    background: rgba(2, 6, 23, 0.56);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 4px 10px rgba(0, 0, 0, 0.34);
    filter:
        drop-shadow(0 0 1px rgba(255, 255, 255, 0.78))
        drop-shadow(0 0 3px rgba(255, 255, 255, 0.32));
    display: block;
}

/* Make product cards more compact than category cards */
.eg-products-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    justify-content: start;
}

.eg-products-grid .link-card {
    padding: 12px;
}

/* Max 4 products per row */
@media (min-width: 520px) {
    .eg-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
    .eg-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1180px) {
    .eg-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.eg-products-pager {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.eg-products-pager-top {
    position: sticky;
    top: 10px;
    z-index: 120;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.88);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
}

.eg-products-pager-bottom {
    margin-top: 14px;
}

.eg-products-pager-meta {
    color: rgba(196, 195, 202, 0.95);
    font-size: 0.88rem;
}

.eg-products-pager-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.eg-products-pager-nav .button {
    min-width: 42px;
}

.eg-products-pager-dots {
    color: rgba(196, 195, 202, 0.8);
    font-size: 0.95rem;
    padding: 0 2px;
}

/* SVG bundle compact cards + detail modal (category.html) */
.eg-svg-compact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    overflow: visible;
}

.eg-svg-compact-thumb {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eg-svg-compact-thumb .eg-product-preview-img {
    width: 2cm;
    height: 2cm;
    max-width: 2cm;
    max-height: 2cm;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.eg-svg-compact-card:hover .eg-product-preview-img,
.eg-svg-compact-card:focus-within .eg-product-preview-img,
.eg-svg-compact-thumb:hover .eg-product-preview-img,
.eg-svg-compact-thumb:focus-visible .eg-product-preview-img {
    transform: scale(1.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}

.eg-svg-compact-sku {
    border: 0;
    background: transparent;
    color: #ffeba7;
    font-weight: 900;
    font-size: 0.98rem;
    cursor: pointer;
    padding: 0;
}

.eg-svg-compact-sku:hover,
.eg-svg-compact-sku:focus-visible {
    text-decoration: underline;
}

.eg-svg-compact-price {
    font-size: 0.94rem;
    color: rgba(196, 195, 202, 0.96);
}

body.eg-svg-modal-open {
    overflow: hidden;
}

.eg-svg-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 14px;
}

.eg-svg-modal-overlay.is-open {
    display: flex;
}

.eg-svg-modal-panel {
    width: min(860px, 96vw);
    max-height: min(88vh, 920px);
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    padding: 14px;
}

.eg-svg-modal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.eg-svg-modal-title {
    color: #ffeba7;
    font-weight: 900;
    font-size: 1.05rem;
}

.eg-svg-modal-close {
    white-space: nowrap;
}

.eg-svg-modal-body {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 14px;
}

@media (max-width: 760px) {
    .eg-svg-modal-body {
        grid-template-columns: 1fr;
    }
}

.eg-svg-modal-left {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.eg-svg-modal-image-link {
    display: inline-flex;
    border-radius: 14px;
}

.eg-svg-modal-image {
    width: min(240px, 44vw);
    height: auto;
    max-height: 42vh;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(2, 6, 23, 0.55);
    display: block;
}

.eg-svg-modal-sku {
    color: #ffeba7;
    font-weight: 800;
}

.eg-svg-modal-price {
    color: #e5e7eb;
    font-size: 1.04rem;
    margin-top: 4px;
}

.eg-svg-modal-meta {
    color: rgba(196, 195, 202, 0.95);
    margin-top: 8px;
}

.eg-svg-modal-text {
    color: rgba(196, 195, 202, 0.95);
    margin-top: 8px;
    white-space: pre-wrap;
}

.eg-svg-modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
}

.eg-svg-modal-qty {
    width: 84px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.62);
    color: #e5e7eb;
    padding: 7px 9px;
}

.site-footer {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 235, 167, 0.10);
    background: rgba(2, 6, 23, 0.55);
}

.site-footer .muted {
    font-size: 0.84rem;
    line-height: 1.55;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    padding: 16px 0 20px;
}

@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer-title {
    font-weight: 900;
    color: #ffeba7;
    margin-bottom: 6px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

@media (max-width: 860px) {
    .footer-links { align-items: flex-start; }
}

.footer-links a {
    color: rgba(196, 195, 202, 0.95);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.02);
    width: fit-content;
    font-size: 0.88rem;
}

.footer-links a:hover {
    color: #ffeba7;
    border-color: rgba(255, 235, 167, 0.22);
    background: rgba(255, 235, 167, 0.08);
}

/* -------------------------------------------
   Terms accordion (button-like sections)
   ------------------------------------------- */
.terms-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

details.terms-section {
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.30);
    overflow: hidden;
}

details.terms-section summary {
    list-style: none;
}

details.terms-section summary::-webkit-details-marker {
    display: none;
}

.terms-summary {
    width: 100%;
    justify-content: space-between;
}

.terms-summary::after {
    content: '▾';
    font-weight: 900;
    opacity: 0.8;
}

details.terms-section[open] .terms-summary::after {
    content: '▴';
}

.terms-content {
    padding: 10px 14px 14px;
    color: rgba(196, 195, 202, 0.92);
    font-size: 0.98rem;
    line-height: 1.7;
}

.terms-content h3 {
    margin: 8px 0 6px;
    color: #ffeba7;
}

.terms-content ul {
    margin: 8px 0 0 18px;
}

/* -------------------------------------------
   Tooltips (hover cards)
   ------------------------------------------- */
.eg-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
}

.eg-tooltip {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    z-index: 2000;
    width: min(820px, calc(100vw - 48px));
    max-height: min(70vh, 520px);
    overflow: auto;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 235, 167, 0.22);
    background: rgba(2, 6, 23, 0.96);
    color: rgba(229, 231, 235, 0.95);
    box-shadow: 0 18px 50px rgba(0,0,0,0.55);
    white-space: pre-line; /* keep \n line breaks from textContent */
    font-size: 0.95rem;
    line-height: 1.6;
}

.eg-tooltip::before {
    content: '';
    position: absolute;
    left: 18px;
    top: -8px;
    width: 14px;
    height: 14px;
    background: rgba(2, 6, 23, 0.96);
    border-left: 1px solid rgba(255, 235, 167, 0.22);
    border-top: 1px solid rgba(255, 235, 167, 0.22);
    transform: rotate(45deg);
}

.eg-tooltip-wrap:hover .eg-tooltip,
.eg-tooltip-wrap:focus-within .eg-tooltip {
    display: block;
}