﻿/* ============================= 
FILE: wwwroot/css/app.css (Link this once in _Host.cshtml) 
============================= */

/* Theme variables */
:root {
    --nle-bg: #ffffff;
    --nle-card: #ffffff;
    --nle-text: #0b0b0b;
    --nle-subtext: #374151;
    --nle-muted: #6b7280;
    --nle-border: #e5e7eb;
    --nle-accent-a: #2563EB; /* blue-600 */
    --nle-accent-b: #10B981; /* emerald-500 */


    --nle-chip-bg: #f3f4f6;
    --nle-chip-text: #111827;
    --btn-primary-text: #ffffff;
    --btn-ghost-bg: #ffffff;
    --btn-ghost-text: #111827;
    --input-bg: #ffffff;
    --input-text: #111827;
    --radius: 16px;
    --shadow: 0 8px 30px rgba(0,0,0,.06);
}

:root[data-theme="dark"] {
    --nle-bg: #000000;
    --nle-card: #0b0b0b;
    --nle-text: #f5f5f5;
    --nle-subtext: #d1d5db;
    --nle-muted: #9ca3af;
    --nle-border: #1f2937;
    --nle-accent-a: #22d3ee; /* cyan-400 */
    --nle-accent-b: #a3e635; /* lime-400 */


    --nle-chip-bg: #111827;
    --nle-chip-text: #e5e7eb;
    --btn-primary-text: #0b0b0b;
    --btn-ghost-bg: #0b0b0b;
    --btn-ghost-text: #f3f4f6;
    --input-bg: #111827;
    --input-text: #f3f4f6;
    --shadow: 0 8px 30px rgba(0,0,0,.35);
}


/* Base */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--nle-bg);
    color: var(--nle-text);
    font-family: Arial, "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Segoe UI Symbol", Helvetica, sans-serif;
}

.sr-only {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1.1rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid var(--nle-border);
    transition: transform .05s ease, background .2s ease;
    font-weight: 700;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn-primary {
    background: linear-gradient(90deg, var(--nle-accent-a), var(--nle-accent-b));
    color: var(--btn-primary-text);
    border-color: transparent;
}

.btn-ghost {
    background: var(--btn-ghost-bg);
    color: var(--btn-ghost-text);
    border-color: var(--nle-border);
}

.btn-link {
    color: var(--nle-text);
    text-decoration: none;
    font-weight: 700;
}

.btn-link:hover {
    text-decoration: underline;
}

.nle-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}


/* Header / Navigation */
.nle-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--nle-bg);
    border-bottom: 1px solid var(--nle-border);
}

.nle-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: .75rem 1.25rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1rem;
}

.nle-logo img {
    display: block;
    height: 40px;
    width: auto;
    border-radius: 6px;
}


.nle-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.nle-link {
    color: var(--nle-text);
    text-decoration: none;
    font-weight: 700;
    padding: .5rem .6rem;
    border-radius: 10px;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Chips */
.nle-badges {
    margin: 2.25rem 0 0;
}

    .nle-badges ul {
        list-style: none;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        margin: 0;
        padding: 0;
    }

    .nle-badges li {
        font-size: .95rem;
        color: var(--nle-text);
        border: 1px dashed var(--nle-border);
        border-radius: 999px;
        padding: .5rem .85rem;
        background: var(--nle-chip-bg);
    }


/* Cards / Grid */
.nle-about {
    margin: 3rem 0 1rem;
    padding: 1.75rem;
    border: 1px solid var(--nle-border);
    border-radius: var(--radius);
    background: var(--nle-card);
}

    .nle-about h2 {
        margin: 0 0 .5rem;
        font-size: 1.6rem;
    }


.nle-grid {
    margin: 2.25rem 0;
}

    .nle-grid h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(12, 1fr);
}

.card {
    grid-column: span 12;
    background: var(--nle-card);
    border: 1px solid var(--nle-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

    .card h3 {
        margin: .25rem 0 .5rem;
        font-size: 1.15rem;
    }

.nle-features .card {
    min-height: 140px;
}


@media (min-width: 640px) {
    .card {
        grid-column: span 6;
    }
}

@media (min-width: 960px) {
    .card {
        grid-column: span 3;
    }
}


/* Hero */
.nle-hero {
    display: grid;
    grid-template-columns: 1.0fr .0fr;
    gap: 2rem;
    align-items: center;
    padding: 2.5rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0));
    border: 1px solid var(--nle-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.nle-hero-inner {
    padding: .5rem;
}

.nle-eyebrow {
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--nle-muted);
    font-weight: 700;
    margin: 0 0 .25rem;
}

.nle-title {
    font-size: clamp(2rem, 4.8vw, 3.8rem);
    line-height: 1.05;
    margin: .25rem 0 1rem;
}

.nle-gradient {
    background: linear-gradient(90deg, var(--nle-accent-a), var(--nle-accent-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nle-sub {
    font-size: 1.1rem;
    color: var(--nle-subtext);
    max-width: 100ch;
}

.nle-caption {
    color: var(--nle-muted);
    font-size: .95rem;
    margin-top: .75rem;
}

.nle-hero-art {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nle-hero-burst {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(75% 75% at 50% 35%, rgba(37,99,235,.10), rgba(16,185,129,.08) 60%, transparent 70%), linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
    display: grid;
    place-items: center;
    border: 1px solid var(--nle-border);
    position: relative;
}

.nle-orb {
    width: 58%;
    aspect-ratio: 1;
    border-radius: 999px;
    background: radial-gradient(60% 60% at 55% 35%, var(--nle-accent-b), var(--nle-accent-a) 60%, rgba(16,185,129,.15));
    filter: saturate(130%);
    box-shadow: 0 0 60px rgba(37,99,235,.12), 0 0 120px rgba(16,185,129,.12) inset;
}


/* CTA Banner */
.nle-cta-banner {
    margin: 2.5rem 0;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--nle-border);
    background: linear-gradient(180deg, color-mix(in oklab, var(--nle-accent-b) 12%, transparent), color-mix(in oklab, var(--nle-accent-a) 10%, transparent));
    text-align: center;
}

    .nle-cta-banner h2 {
        margin: 0 0 .25rem;
        font-size: 1.8rem;
    }


/* Forms */
.nle-news {
    margin: 2.5rem 0;
    padding: 1.75rem;
    border: 1px solid var(--nle-border);
    border-radius: var(--radius);
    background: var(--nle-card);
    text-align: center;
}

.nle-form {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: .75rem auto 0;
    max-width: 860px;
}

    .nle-form input, .nle-form select {
        flex: 1;
        min-width: 220px;
        padding: .8rem 1rem;
        border-radius: 999px;
        border: 1px solid var(--nle-border);
        background: var(--input-bg);
        color: var(--input-text);
    }

    .nle-form button {
        white-space: nowrap;
    }


/* FAQ */
.nle-faq {
    margin: 2.5rem 0;
}

    .nle-faq details {
        background: var(--nle-card);
        border: 1px solid var(--nle-border);
        border-radius: 12px;
        padding: .9rem 1rem;
        margin-bottom: .75rem;
    }

    .nle-faq summary {
        cursor: pointer;
        font-weight: 700;
    }


/* Theme toggle */
.nle-switch {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    color: var(--nle-text);
}

    .nle-switch input {
        display: none;
    }

.nle-slider {
    width: 46px;
    height: 26px;
    background: var(--nle-border);
    border-radius: 999px;
    position: relative;
    box-shadow: inset 0 0 0 1px var(--nle-border);
}

    .nle-slider::after {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        top: 3px;
        left: 3px;
        background: var(--nle-text);
        transition: left .2s ease;
    }

.nle-switch input:checked + .nle-slider::after {
    left: 23px;
}

.nle-switch-label {
    font-size: .95rem;
    color: var(--nle-muted);
}

/* --- Mobile nav (<=900px): robust hamburger + overlay --- */
@media (max-width: 900px) {
    .nle-header-inner {
        position: relative;
    }

    /* Hide the checkbox but keep it in the DOM (accessible & clickable via label) */
    .nle-nav-toggle {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        border: 0;
        overflow: hidden;
        clip: rect(0 0 0 0); 
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .nle-burger {
        display: block;
        cursor: pointer;
        padding: .25rem;
        border-radius: 10px;
        justify-self: end;
        z-index: 101;
    }

        .nle-burger span {
            display: block;
            width: 22px;
            height: 2px;
            background: var(--nle-text);
            margin: 4px 0;
            transition: transform .2s ease, opacity .2s ease;
            transform-origin: 50% 50%;
        }

    /* Menu starts collapsed */
    .nle-nav {
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--nle-bg);
        border-bottom: 1px solid var(--nle-border);
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        padding: .75rem 1.25rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: max-height .25s ease, opacity .2s ease, transform .2s ease, visibility 0s linear .25s;
        z-index: 100;
    }

    /* When checked: reveal menu */
    #nle-nav-toggle:checked ~ .nle-nav {
        max-height: 60vh;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: max-height .25s ease, opacity .2s ease, transform .2s ease, visibility 0s;
    }

    /* Click-away overlay */
    .nle-overlay {
        display: none;
    }

    #nle-nav-toggle:checked ~ .nle-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: transparent;
        z-index: 90;
    }

    /* Burger → X animation when open */
    #nle-nav-toggle:checked ~ .nle-burger span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    #nle-nav-toggle:checked ~ .nle-burger span:nth-child(2) {
        opacity: 0;
    }

    #nle-nav-toggle:checked ~ .nle-burger span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

/* ===== Desktop menu spacing (make items closer) ===== */
@media (min-width: 901px) {
    /* shrink the space between items */
    .nle-nav {
        gap: .5rem;
    }
    /* was ~1rem */

    /* trim the padding on each link */
    .nle-link {
        padding: .30rem .50rem;
    }
    /* was ~.5rem .6rem */

    /* tighten the header grid spacing a bit too */
    .nle-header-inner {
        gap: .5rem;
    }
    /* optional */
}

/* Cart badge */

/* Success/green tokens */
:root {
    --nle-success: #16a34a;
}
/* green-600 */
[data-theme="dark"] {
    --nle-success: #22c55e;
}
/* green-500 */

/* Cart link + icon */
.nle-cartlink {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

    .nle-cartlink .nle-icon {
        width: 1.1rem;
        height: 1.1rem;
        display: inline-block;
    }

/* Badge */
.nle-badge {
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .45rem; /* comfy for “99+” */
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.nle-badge--green {
    background: var(--nle-success);
}

/* Subtle bump animation */
@keyframes nle-bump {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}

.nle-badge.is-bump {
    animation: nle-bump .28s ease-out;
}

/* Be kind to folks who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    .nle-badge.is-bump {
        animation: none;
    }
}

/* Small button Cart */
.btn-sm {
    padding: .25rem .5rem;
    font-size: .85rem;
}

/* (optional) card badge positioning if you want “New/Bestseller” tags */
.nle-card {
    position: relative;
}

/*no wrap*/
.nowrap {
    white-space: nowrap;
}

/*Product buttons*/
.actions-vert {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .5rem;
}

    .actions-vert .btn {
        width: 100%;
        white-space: nowrap;
    }

@media (min-width: 900px) {
    .actions-vert {
        flex-direction: row; /* horizontal on desktop */
        align-items: center;
    }

        .actions-vert .btn {
            width: auto;
        }
}

/* ===== Cart layout ===== */
.cart-wrap {
    max-width: 1100px;
}

.cart-title {
    margin-bottom: .75rem;
}

.cart-empty {
    border: 1px dashed var(--nle-border, #e5e7eb);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: var(--nle-card, #fff);
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 900px) {
    .cart-grid {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

/* ===== Items table ===== */
.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--nle-card, #fff);
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
}

    .cart-table thead th {
        text-align: left;
        font-weight: 700;
        font-size: .9rem;
        padding: .75rem .9rem;
        background: var(--nle-muted, #f8fafc);
        border-bottom: 1px solid var(--nle-border, #e5e7eb);
    }

    .cart-table tbody td {
        padding: .75rem .9rem;
        border-bottom: 1px solid var(--nle-border, #f0f2f5);
        vertical-align: middle;
    }

    .cart-table tbody tr:last-child td {
        border-bottom: 0;
    }

/* columns */
.th-qty, .td-qty {
    width: 90px;
}

.th-price, .td-price, .th-total, .td-total {
    width: 110px;
    text-align: left;
}

.td-actions {
    width: 60px;
    text-align: left;
}

/* item cell */
.td-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: .75rem;
    align-items: center;
}

.item-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
}

.item-meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.item-title {
    font-weight: 600;
}

.item-sub {
    font-size: .85rem;
    opacity: .75;
    line-height: 1.2;
}

/* qty input */
.td-qty input[type="number"] {
    width: 80px;
    padding: .35rem .5rem;
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 8px;
    background: var(--nle-surface, #fff);
}

/* actions under table */
.cart-actions {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .75rem;
}

/* ===== Summary card ===== */
.cart-summary {
    background: var(--nle-card, #fff);
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 12px;
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

    .cart-summary h2 {
        margin: 0 0 .5rem 0;
        font-size: 1.15rem;
    }

.sum-list {
    margin: .5rem 0 1rem 0;
}

    .sum-list .row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        padding: .35rem 0;
    }

        .sum-list .row.hint dt, .sum-list .row.hint dd {
            opacity: .75;
            font-size: .95rem;
        }

        .sum-list .row.total {
            border-top: 1px solid var(--nle-border, #e5e7eb);
            margin-top: .35rem;
            padding-top: .5rem;
            font-weight: 700;
        }

.checkout-form {
    display: grid;
    gap: .5rem;
}

.promo-input {
    width: 100%;
    padding: .5rem .6rem;
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 8px;
    background: var(--nle-surface, #fff);
}

.btn-lg {
    padding: .7rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
}

.sum-note {
    text-align: center;
    font-size: .85rem;
    opacity: .75;
    margin: 0;
}

/* small ghost button */
.btn-sm {
    padding: .25rem .5rem;
    font-size: .85rem;
}

/* ===== Store grid ===== */
.prod-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 700px) {
    .prod-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1040px) {
    .prod-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Product card ===== */
.prod-card {
    background: var(--nle-card, #fff);
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .prod-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 28px rgba(0,0,0,.08);
        border-color: rgba(0,0,0,.06);
    }

/* Media */
.prod-media {
    position: relative;
    background: var(--nle-muted, #f3f4f6);
}

/*.prod-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;*/ /* keeps consistent card height */
    /*object-fit: cover;
    display: block;
}*/

/* Badge — sits inside the image, never overlaps text */
:root {
    --nle-accent: #2563eb;
    --nle-success: #16a34a;
}

[data-theme="dark"] {
    --nle-accent: #3b82f6;
    --nle-success: #22c55e;
}

.prod-badge {
    position: absolute;
    top: .55rem;
    left: .55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, var(--nle-success), var(--nle-success));
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    white-space: nowrap;
}

/* Body */
.prod-body {
    padding: .8rem .9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.prod-title {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
    font-size: 1.05rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prod-summary {
    margin: 0;
    opacity: .8;
    font-size: .92rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer block */
.prod-footer {
    display: flex;
    align-items: stretch;
    gap: .75rem;
    margin-top: .25rem;
}

.prod-price {
    align-self: flex-start;
    background: var(--nle-muted, #f3f4f6);
    color: var(--nle-ink, #111827);
    padding: .35rem .6rem;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}

/* Actions: vertical stack for clarity and non-wrapping labels */
.prod-actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-left: auto;
    min-width: 9rem;
}

    .prod-actions .btn {
        width: 100%;
        white-space: nowrap;
    }

.nowrap {
    white-space: nowrap;
}

/* Dark mode touches */
[data-theme="dark"] .prod-card {
    border-color: rgba(255,255,255,.08);
}

    [data-theme="dark"] .prod-card:hover {
        border-color: rgba(255,255,255,.18);
    }

[data-theme="dark"] .prod-price {
    background: rgba(255,255,255,.06);
    color: #fff;
}

.prod-card:hover .prod-price {
    background: var(--nle-accent);
    color: #fff;
}



/* Grid: force max two columns */
.prod-grid.two-col {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr; /* phones: 1 col */
}

@media (min-width: 700px) {
    .prod-grid.two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    /* tablets/desktop: 2 cols */
}
/* Remove any old rule that set 3 columns at 1040px */

/* Compact card layout (Option B) */
.prod-card.prod-compact {
    padding: .6rem;
    position: relative;
}

.prod-compact-grid {
    display: grid;
    grid-template-columns: 140px 1fr; /* thumbnail + content */
    gap: .9rem;
    align-items: center;
}

@media (max-width: 699px) {
    .prod-compact-grid {
        grid-template-columns: 1fr;
    }
    /* stack on small screens */
}

/* Contained image stage (no fill) */
.prod-card.prod-compact .prod-media {
    height: 120px;
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    padding: .5rem;
    position: relative;
    background: var(--nle-muted, #f3f4f6);
}

.prod-card.prod-compact .prod-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Badge sits safely on media */
.prod-card.prod-compact .prod-badge {
    top: .4rem;
    left: .4rem;
}

/* Card hover: keep it above neighbors, no “crush” */
.prod-card {
    background: var(--nle-card, #fff);
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 14px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    will-change: transform;
}

    .prod-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 28px rgba(0,0,0,.08);
        border-color: rgba(0,0,0,.06);
        z-index: 2; /* prevents visual overlap on hover */
    }

    /* Center image inside the media stage */
    .prod-card.prod-compact .prod-media {
        position: relative; /* keeps the badge positioned */
        display: flex;
        align-items: center; /* vertical center */
        justify-content: center; /* horizontal center */
        height: 120px;
        padding: .5rem;
        background: var(--nle-muted, #f3f4f6);
        border: 1px solid var(--nle-border, #e5e7eb);
        border-radius: 10px;
        overflow: hidden;
    }

    .prod-card.prod-compact .prod-img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain; /* never crop */
        margin: 0; /* no unexpected offsets */
    }

    /* Badge stays anchored in the corner */
    .prod-card.prod-compact .prod-badge {
        position: absolute;
        top: .4rem;
        left: .4rem;
    }

/* ===== Lightbox ===== */
.nle-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: grid;
    place-items: center;
    z-index: 999;
    padding: 1rem;
}

.nle-lightbox-inner {
    position: relative;
    background: #111; /* dark stage helps images pop */
    border-radius: 12px;
    max-width: min(96vw, 1100px);
    max-height: 90vh;
    padding: .75rem .75rem 2.25rem;
    box-shadow: 0 10px 40px rgba(0,0,0,.35);
}

    .nle-lightbox-inner img {
        display: block;
        max-width: 100%;
        max-height: 80vh;
        height: auto;
        width: auto;
        border-radius: 8px;
        background: #000;
    }

.nle-lightbox-caption {
    position: absolute;
    left: .9rem;
    right: 3rem;
    bottom: .6rem;
    color: #e5e7eb;
    font-size: .9rem;
    opacity: .9;
}

.nle-lightbox-close {
    position: absolute;
    top: .4rem;
    right: .4rem;
    border: 0;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 1rem;
    font-weight: 700;
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
}

    .nle-lightbox-close:hover {
        background: rgba(255,255,255,.22);
    }

/* ===== Zoom icon over product image ===== */
.prod-card .prod-media {
    position: relative;
}

.prod-zoom {
    position: absolute;
    right: .4rem;
    bottom: .4rem;
    border: 0;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.5);
    color: #fff;
    cursor: pointer;
    backdrop-filter: saturate(120%) blur(2px);
}

    .prod-zoom:hover {
        background: rgba(0,0,0,.65);
    }

    .prod-zoom svg {
        width: 18px;
        height: 18px;
    }

/* ===== Product Detail ===== */
.pd-wrap {
    max-width: 1100px;
}

.pd-back {
    display: inline-block;
    margin-bottom: .5rem;
    opacity: .8;
}

.pd-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .pd-grid {
        grid-template-columns: 1.2fr 1fr;
        align-items: start;
    }
}

/* Media */
.pd-media .pd-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 360px;
    padding: .75rem;
    background: var(--nle-muted, #f3f4f6);
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
}

.pd-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.pd-badge {
    position: absolute;
    top: .6rem;
    left: .6rem;
    padding: .28rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    background: var(--nle-success, #16a34a);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    white-space: nowrap;
}

.pd-zoom {
    position: absolute;
    right: .6rem;
    bottom: .6rem;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    color: #fff;
    cursor: pointer;
    backdrop-filter: saturate(120%) blur(2px);
}

    .pd-zoom:hover {
        background: rgba(0,0,0,.7);
    }

    .pd-zoom svg {
        width: 18px;
        height: 18px;
    }

/* Body */
.pd-body {
    background: var(--nle-card, #fff);
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 14px;
    padding: 1rem;
}

.pd-title {
    margin: 0 0 .35rem 0;
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 800;
}

.pd-summary {
    margin: 0 0 .6rem 0;
    opacity: .9;
}

/* Meta list */
.pd-meta {
    margin: .5rem 0 1rem 0;
}

    .pd-meta .row {
        display: flex;
        gap: 1rem;
        padding: .25rem 0;
    }

    .pd-meta dt {
        width: 120px;
        opacity: .7;
    }

    .pd-meta dd {
        margin: 0;
    }

/* Price & actions */
.pd-buy {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.pd-price {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--nle-muted, #f3f4f6);
    padding: .4rem .7rem;
    border-radius: 999px;
}

.pd-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
    align-items: center;
}

.pd-qty {
    width: 110px;
    padding: .45rem .55rem;
    border: 1px solid var(--nle-border, #e5e7eb);
    border-radius: 8px;
    background: var(--nle-surface, #fff);
}

.pd-note {
    margin: .2rem 0 0;
    font-size: .85rem;
    opacity: .75;
}

@media (min-width: 520px) {
    .pd-actions {
        grid-template-columns: 120px 1fr;
        grid-auto-rows: min-content;
    }

        .pd-actions .btn, .pd-actions form {
            width: 100%;
        }

        .pd-actions form {
            grid-column: 2 / 3;
        }
}



/* ===== Theme tokens refresh ===== */
/* Light mode (root/default) */
:root,
:root[data-theme="light"] {
    --nle-card: #ffffff; /* cards/panels */
    --nle-surface: #ffffff; /* inputs/stages */
    --nle-muted: #f8fafc; /* subtle fills (price pill, stage bg) */
    --nle-border: #e5e7eb; /* soft borders */
    --nle-ink: #0f172a; /* text */
}

/* Dark mode (keep your existing values or tune here) */
[data-theme="dark"] {
    --nle-card: #0f172a; /* near-slate */
    --nle-surface: #111827;
    --nle-muted: #1f2937;
    --nle-border: rgba(255,255,255,.12);
    --nle-ink: #f8fafc;
}

/* optional: subtle elevation in light mode */
:root .prod-card,
:root .pd-body,
:root .cart-summary {
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}


/* ===== Inputs: dark-mode readability ===== */
[data-theme="dark"] input,
[data-theme="dark"] .promo-input,
[data-theme="dark"] .td-qty input[type="number"],
[data-theme="dark"] .pd-qty {
    background: var(--nle-surface);
    color: var(--nle-ink);
    border-color: var(--nle-border);
}

/* consistent light-mode too (optional, for symmetry) */
:root input,
:root .promo-input,
:root .td-qty input[type="number"],
:root .pd-qty {
    background: var(--nle-surface);
    color: var(--nle-ink);
    border-color: var(--nle-border);
}

/* Focus ring for both themes */
input:focus,
.promo-input:focus,
.td-qty input[type="number"]:focus,
.pd-qty:focus {
    outline: none;
    border-color: var(--nle-accent, #2563eb);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nle-accent, #2563eb) 20%, transparent);
}

/* Placeholder contrast in dark mode */
[data-theme="dark"] ::placeholder {
    color: rgba(248, 250, 252, .55); /* based on --nle-ink */
}

/* Make the small qty box clearer */
.td-qty input[type="number"],
.pd-qty {
    background: var(--nle-surface);
    color: var(--nle-ink);
    border: 1px solid var(--nle-border);
    border-radius: 8px;
    padding: .35rem .5rem;
}

/* Optional: larger caret and better tap targets */
input, .pd-qty {
    caret-color: var(--nle-accent, #2563eb);
}


.nle-switch .nle-switch-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--nle-ink);
}

[data-theme="dark"] .nle-switch .nle-switch-icon {
    color: var(--nle-ink);
}

/* Optional: give icons a little breathing room */
.nle-switch .nle-switch-icon:first-child {
    margin-right: .25rem;
}

.nle-switch .nle-switch-icon:last-child {
    margin-left: .25rem;
}


/*Contact Page*/
.contact-form {
    display: grid;
    gap: .75rem;
}

    .contact-form label {
        font-weight: 700;
        margin-bottom: .25rem;
        display: inline-block;
    }

    .contact-form input, .contact-form textarea {
        width: 100%;
        padding: .55rem .6rem;
        border: 1px solid var(--nle-border);
        border-radius: 8px;
        background: var(--nle-surface);
        color: var(--nle-ink);
    }

        .contact-form input:focus, .contact-form textarea:focus {
            outline: none;
            border-color: var(--nle-accent);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--nle-accent) 20%, transparent);
        }

    .contact-form .grid2 {
        display: grid;
        gap: .75rem;
        grid-template-columns: 1fr;
    }

@media (min-width: 640px) {
    .contact-form .grid2 {
        grid-template-columns: 1fr 1fr;
    }
}

.nle-muted-text {
    opacity: .65;
    font-weight: 400;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

/* alerts */
.nle-alert {
    padding: .65rem .8rem;
    border-radius: 10px;
    border: 1px solid;
}

.nle-alert-warn {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.nle-alert-ok {
    background: #ecfdf5;
    border-color: #34d399;
    color: #065f46;
}

/* dark-mode inputs still readable */
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
    background: var(--nle-surface);
    color: var(--nle-ink);
    border-color: var(--nle-border);
}

/*Styling for the admin toolbar and status pills*/

/* Admin toolbar */
.adm-toolbar {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin: .5rem 0 1rem;
    flex-wrap: wrap;
}

.adm-search {
    flex: 1 1 340px;
    min-width: 240px;
    padding: .5rem .6rem;
    border: 1px solid var(--nle-border);
    border-radius: 8px;
    background: var(--nle-surface);
    color: var(--nle-ink);
}

    .adm-search:focus {
        outline: none;
        border-color: var(--nle-accent);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--nle-accent) 20%, transparent);
    }

.adm-select {
    padding: .5rem .6rem;
    border: 1px solid var(--nle-border);
    border-radius: 8px;
    background: var(--nle-surface);
    color: var(--nle-ink);
}

/* Status pills */
.status-pill {
    display: inline-block;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .8rem;
    white-space: nowrap;
}

    .status-pill.ok {
        background: #ecfdf5;
        color: #065f46;
        border: 1px solid #34d399;
    }

    .status-pill.warn {
        background: #fff7ed;
        color: #9a3412;
        border: 1px solid #fdba74;
    }

[data-theme="dark"] .status-pill.ok {
    background: rgba(16,185,129,.12);
    color: #34d399;
    border-color: rgba(52,211,153,.5);
}

[data-theme="dark"] .status-pill.warn {
    background: rgba(251,146,60,.12);
    color: #fdba74;
    border-color: rgba(253,186,116,.45);
}

.status-meta {
    font-size: .78rem;
    opacity: .7;
    margin-top: .2rem;
}

/* Optional: compact admin table rows */
.adm-table tbody td {
    vertical-align: top;
}


/* ===== Broadcast layout ===== */
.br-wrap {
    max-width: 1200px;
}

.br-sub {
    opacity: .75;
    margin-top: .2rem;
}

.br-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
    .br-grid {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

/* editor */
.br-editor {
    background: var(--nle-card);
    border: 1px solid var(--nle-border);
    border-radius: 12px;
    padding: 1rem;
}

.frm-row {
    display: grid;
    gap: .5rem;
    margin-bottom: .8rem;
}

.grid2 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid2 {
        grid-template-columns: 1fr 1fr;
        gap: .6rem;
    }
}

.frm-row label {
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.frm-row .count {
    font-size: .8rem;
    opacity: .65;
    font-weight: 400;
}

.frm-row input, .frm-row textarea, .test-email {
    width: 100%;
    padding: .55rem .6rem;
    border: 1px solid var(--nle-border);
    border-radius: 8px;
    background: var(--nle-surface);
    color: var(--nle-ink);
}

.frm-row textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

    .frm-row input:focus, .frm-row textarea:focus, .test-email:focus {
        outline: none;
        border-color: var(--nle-accent);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--nle-accent) 20%, transparent);
    }

/* switches */
.switch {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    cursor: pointer;
}

    .switch input {
        width: 1.1rem;
        height: 1.1rem;
    }

    .switch.small input {
        width: 1rem;
        height: 1rem;
    }

.switches {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.frm-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

    .frm-actions .left {
        display: flex;
        gap: 1rem;
        align-items: center;
        flex-wrap: wrap;
    }

    .frm-actions .right {
        display: flex;
        gap: .5rem;
        align-items: center;
        flex-wrap: wrap;
    }

.confirm {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

/* side */
.br-side .card {
    background: var(--nle-card);
    border: 1px solid var(--nle-border);
    border-radius: 12px;
    padding: 1rem;
}

    .br-side .card + .card {
        margin-top: 1rem;
    }

.br-side h2 {
    margin: 0 0 .5rem;
    font-size: 1.05rem;
}

/* preview “email” */
.mail-stage {
    border: 1px solid var(--nle-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

[data-theme="dark"] .mail-stage {
    background: #111827;
}

.mail-head {
    padding: .6rem .7rem;
    border-bottom: 1px solid var(--nle-border);
    font-size: .9rem;
}

    .mail-head .muted {
        opacity: .75;
    }

.mail-body {
    padding: .8rem .9rem;
    line-height: 1.5;
}

    .mail-body :where(h1,h2,h3) {
        margin: .4rem 0 .3rem;
    }

    .mail-body :where(p,ul,ol) {
        margin: .4rem 0;
    }

/* alerts (reuse your scheme) */
.nle-alert {
    padding: .65rem .8rem;
    border-radius: 10px;
    border: 1px solid;
}

.nle-alert-warn {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.nle-alert-ok {
    background: #ecfdf5;
    border-color: #34d399;
    color: #065f46;
}

[data-theme="dark"] .nle-alert-warn {
    background: rgba(251,146,60,.12);
    border-color: rgba(253,186,116,.45);
    color: #fdba74;
}

[data-theme="dark"] .nle-alert-ok {
    background: rgba(16,185,129,.12);
    border-color: rgba(52,211,153,.5);
    color: #34d399;
}

.pager {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin: .75rem 0;
}


/* ===== Admin Home ===== */
.admin-home .muted {
    opacity: .75;
    margin-top: .2rem;
}

.admin-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .admin-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.admin-card {
    background: var(--nle-card);
    border: 1px solid var(--nle-border);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    cursor: pointer;
    transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}

    .admin-card:hover {
        transform: translateY(-1px);
        border-color: color-mix(in srgb, var(--nle-accent) 35%, var(--nle-border));
        box-shadow: 0 6px 18px rgba(0,0,0,.06);
    }

    .admin-card .icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--nle-muted);
        color: var(--nle-ink);
    }

        .admin-card .icon svg {
            width: 22px;
            height: 22px;
        }

    .admin-card h2 {
        margin: .25rem 0 0;
        font-size: 1.15rem;
    }

    .admin-card p {
        margin: 0;
        opacity: .85;
    }

    .admin-card .meta {
        display: flex;
        gap: .4rem;
        flex-wrap: wrap;
        margin-top: auto;
    }

    .admin-card .pill {
        display: inline-block;
        padding: .2rem .5rem;
        border-radius: 999px;
        border: 1px solid var(--nle-border);
        font-size: .8rem;
        opacity: .9;
        background: var(--nle-surface);
    }

    .admin-card .btn {
        margin-top: .5rem;
        align-self: flex-start;
    }


/* Base image hygiene */
#nle-hero-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Full-bleed hero on small screens */
@media (max-width: 640px) {
    /* Pull the figure out to the screen edges by negating container padding */
    .nle-hero .hero-art {
        margin-left: -1rem; /* match your container's left padding */
        margin-right: -1rem; /* match your container's right padding */
    }

    /* Optionally bump spacing below the image */
    .nle-hero .hero-art {
        margin-bottom: 0.75rem;
    }
}

/* Keep it neat on larger screens */
@media (min-width: 641px) {
    .nle-hero .hero-art {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Admin page action bar (right-aligned buttons) */
.admin-topbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .25rem 0 .75rem;
}

    .admin-topbar .push-right {
        margin-left: auto;
    }


/* ===== CART: Mobile stacked cards ===== */
@media (max-width: 560px) {
    .cart-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

        .cart-table thead {
            display: none;
        }
    /* hide big table header */
    .cart-headers-mobile {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: .25rem;
        margin: .4rem 0 .6rem;
        font-size: .85rem;
        opacity: .75;
    }

    .cart-table tbody {
        display: block;
    }

    .cart-table tr {
        display: block;
        background: var(--nle-card);
        border: 1px solid var(--nle-border);
        border-radius: 12px;
        padding: .6rem .7rem;
        margin-bottom: .75rem;
    }

    .cart-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        width: 100%;
        padding: .35rem 0;
        border: 0;
    }
        /* Inline labels per field */
        .cart-table td::before {
            content: attr(data-label);
            font-weight: 700;
            opacity: .7;
            min-width: 7rem; /* label column width */
            flex: 0 0 auto;
        }

    /* Product cell: thumb + meta */
    .cart-table .td-item {
        align-items: flex-start;
    }

        .cart-table .td-item::before {
            /* Hide the 'Item' label here to avoid redundancy; header legend already shows it */
            content: "";
            min-width: 0;
            width: 0;
            margin: 0;
            padding: 0;
        }

    .cart-table .item-thumb {
        width: 64px;
        height: auto;
        border-radius: 8px;
        border: 1px solid var(--nle-border);
        background: var(--nle-surface);
        margin-right: .5rem;
        flex: 0 0 auto;
    }

    .cart-table .item-meta {
        flex: 1 1 auto;
        min-width: 0;
    }

    .cart-table .item-title {
        font-weight: 700;
    }

    .cart-table .item-sub {
        font-size: .85rem;
        opacity: .75;
    }

    /* Qty input & buttons */
    .cart-table .td-qty input[type="number"] {
        max-width: 96px;
        padding: .4rem .5rem;
        border: 1px solid var(--nle-border);
        border-radius: 8px;
        background: var(--nle-surface);
        color: var(--nle-ink);
    }

    .cart-table .td-actions {
        justify-content: flex-end;
    }

    /* Tighten actions under table */
    .cart-actions {
        margin-top: .5rem;
        display: flex;
        gap: .5rem;
        flex-wrap: wrap;
    }
}

/* Keep desktop/tablet view unchanged */
@media (min-width: 561px) {
    .cart-headers-mobile {
        display: none;
    }
}


