:root {
    --bg: #06140f;
    --text: #f2faf5;
    --muted: #9ab5a8;
    --accent: #6dcea0;
    --accent-strong: #3faf78;
    --glass-bg: rgba(220, 255, 235, 0.08);
    --glass-bg-strong: rgba(220, 255, 235, 0.14);
    --glass-border: rgba(180, 230, 200, 0.28);
    --glass-highlight: rgba(220, 255, 235, 0.42);
    --glass-shadow: 0 12px 40px rgba(0, 20, 12, 0.40), inset 0 1px 0 rgba(220, 255, 235, 0.22);
    --radius: 22px;
    --font: "Segoe UI", system-ui, -apple-system, sans-serif;
    --touch: 44px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site {
    min-height: 100vh;
    position: relative;
}

/* Fixed full-bleed background behind glass */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--bg);
    background-image: var(--page-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: saturate(1.05);
}

.page-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 500px at 15% 10%, rgba(60, 180, 120, 0.22), transparent 60%),
        radial-gradient(700px 420px at 85% 20%, rgba(40, 140, 110, 0.16), transparent 55%),
        linear-gradient(180deg, rgba(6, 20, 15, 0.35), rgba(6, 20, 15, 0.72));
    pointer-events: none;
}

/* Floating login — no logo/header bar */
.auth-float {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-user {
    color: var(--muted);
    font-size: 0.85rem;
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link {
    color: var(--text);
    font-weight: 650;
    text-decoration: none;
    min-height: var(--touch);
    padding: 0.55rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-link:hover { text-decoration: none; }

.site-main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 4.5rem 1rem 2.5rem;
}

.muted { color: var(--muted); margin: 0; }

/* Responsive grid: 1 / 2 / 3+ */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.15rem;
    }
}

@media (min-width: 960px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.35rem;
    }
    .site-main { padding: 5rem 1.25rem 3rem; }
}

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

/* Shared frosted glass / clear plastic */
.glass-panel {
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.08) 40%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-color: var(--glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-top-color: var(--glass-highlight);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

.glass-btn {
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.28),
        rgba(255, 255, 255, 0.08)
    );
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-top-color: var(--glass-highlight);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: var(--text);
}

.glass-btn:hover {
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.34),
        rgba(255, 255, 255, 0.12)
    );
}

.glass-inset {
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    min-height: 0;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.product-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
    min-height: var(--touch);
}

.product-card-link:hover { text-decoration: none; color: inherit; }

.product-card-image {
    aspect-ratio: 3 / 2;
    background: rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

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

.product-card-body {
    padding: 0.95rem 1rem 1.1rem;
}

.product-card-body h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.25;
}

.card-upload {
    padding: 0.55rem 0.75rem 0.75rem;
}

.upload-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.upload-chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.add-card {
    cursor: pointer;
    min-height: 200px;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font: inherit;
    width: 100%;
    border-style: solid;
}

.add-card:active { transform: scale(0.98); }

.add-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 2rem 1rem;
}

.add-plus {
    font-size: 3rem;
    line-height: 1;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.add-label {
    color: var(--muted);
    font-weight: 650;
}

.admin-toolbar {
    grid-column: 1 / -1;
    padding: 0.85rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.auth-panel, .blank-page {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 2rem auto;
    padding: 1.75rem;
}

.blank-page {
    max-width: 640px;
}

.blank-page h1, .auth-panel h1 {
    margin-top: 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    color: var(--accent);
    margin: 0 0 0.75rem;
    font-weight: 700;
}

.slug-meta {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-form, .create-form {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    margin-top: 1.1rem;
}

.auth-form label, .create-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.check-row {
    flex-direction: row !important;
    align-items: center;
    gap: 0.6rem !important;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.create-form input[type="text"],
.create-form input[type="url"],
.create-form input[type="file"] {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
    font-size: 1rem;
    min-height: var(--touch);
    width: 100%;
}

.auth-form input:focus,
.create-form input:focus {
    outline: 2px solid rgba(122, 162, 255, 0.45);
    border-color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    min-height: var(--touch);
    font-weight: 650;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
}

.btn:hover { text-decoration: none; }

.btn-primary {
    background: linear-gradient(180deg, rgba(122, 162, 255, 0.85), rgba(77, 126, 240, 0.9));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(4, 8, 18, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
}

@media (min-width: 600px) {
    .modal-backdrop {
        align-items: center;
    }
}

.modal {
    width: min(100%, 440px);
    padding: 1.35rem 1.35rem 1.5rem;
    max-height: min(90vh, 640px);
    overflow: auto;
}

.modal h2 { margin: 0 0 0.35rem; }

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
    margin-top: 0.35rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin: 1rem 0 0;
}

.alert-error {
    background: rgba(255, 80, 80, 0.14);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #ffb4b4;
}

.content-block { padding: 2rem; position: relative; z-index: 1; }

#blazor-error-ui {
    background: rgba(27, 16, 48, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    bottom: 0;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.4);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #fff;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.validation-message { color: #ffb4b4; }

/* Prefer less motion / respect reduced transparency fallback */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass-panel, .glass-btn, .upload-chip {
        background: rgba(30, 40, 70, 0.88);
    }
}

@media (prefers-reduced-transparency: reduce) {
    .glass-panel, .glass-btn {
        background: rgba(22, 32, 56, 0.92);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* Standard user: stronger clear-plastic + physical press on hover */
.card-grid.user-mode .product-card.plastic-press {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.38) 0%,
        rgba(255, 255, 255, 0.14) 42%,
        rgba(255, 255, 255, 0.08) 100%
    );
    background-color: rgba(255, 255, 255, 0.14);
    border: 1.5px solid rgba(255, 255, 255, 0.48);
    border-top-color: rgba(255, 255, 255, 0.72);
    box-shadow:
        0 16px 36px rgba(0, 0, 0, 0.38),
        0 2px 0 rgba(255, 255, 255, 0.35) inset,
        0 -6px 14px rgba(0, 0, 0, 0.18) inset;
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.card-grid.user-mode .product-card.plastic-press:hover,
.card-grid.user-mode .product-card.plastic-press:focus-within {
    transform: scale(0.96) translateY(2px);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.35),
        0 10px 22px rgba(0, 0, 0, 0.28) inset,
        0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.card-grid.user-mode .product-card.plastic-press:active {
    transform: scale(0.93) translateY(3px);
}

.card-admin {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem 0.85rem;
}

.card-edit {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.card-edit input[type="text"] {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    font-size: 0.92rem;
    min-height: 40px;
    width: 100%;
}

.auth-switch {
    margin: 1.1rem 0 0;
    font-size: 0.92rem;
}

.turnstile-slot {
    margin: 0.35rem 0 0.15rem;
}

.captcha-row {
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    min-height: var(--touch);
}

/* Shop / cart */
.shop-header {
    max-width: none;
    margin: 0 0 1.25rem;
    padding: 1.25rem 1.35rem;
}

.shop-header h1 { margin: 0.2rem 0 0.5rem; }

.shop-grid .product-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.price {
    font-size: 1.15rem;
    font-weight: 750;
    margin: 0.25rem 0;
    color: #e8f0ff;
}

.product-desc { font-size: 0.9rem; }

.add-form { margin-top: auto; }

.shop-admin-add {
    margin-top: 1.25rem;
    padding: 1.1rem 1.25rem 1.35rem;
}

.shop-admin-add h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.cart-fab {
    position: relative;
    min-width: var(--touch);
    min-height: var(--touch);
    padding: 0.45rem 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.cart-fab:hover { text-decoration: none; }

.cart-icon { font-size: 1.15rem; line-height: 1; }

.cart-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #7aa2ff, #4d7ef0);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.35);
}

.cart-panel {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem;
}

.cart-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-row {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 16px;
    align-items: center;
}

@media (min-width: 700px) {
    .cart-row {
        grid-template-columns: 72px 1.4fr auto auto auto;
    }
}

.cart-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}

.cart-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.qty-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: end;
}

.qty-form input[type="number"] {
    width: 4.5rem;
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(0,0,0,0.22);
    color: var(--text);
    padding: 0.4rem 0.5rem;
}

.cart-line-total { font-weight: 700; }
.cart-total { font-size: 1.15rem; margin: 1rem 0; }

.address-area {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    resize: vertical;
}

.upload-chip.danger {
    border-color: rgba(255, 100, 100, 0.45);
    color: #ffc9c9;
}

.kind-fieldset {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    margin: 0;
}

.kind-fieldset legend {
    padding: 0 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.kind-select {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.kind-select select {
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(0,0,0,0.28);
    color: var(--text);
    padding: 0.45rem 0.6rem;
}

.card-kind-label {
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

a.add-card { text-decoration: none; color: inherit; }
a.add-card:hover { text-decoration: none; color: inherit; }

.option-card {
    align-items: flex-start !important;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    margin-bottom: 0.5rem;
}

.create-panel { max-width: 520px; }

.card-delete { margin-top: 0.35rem; }
.shop-danger-zone h2 { color: #ffc9c9; margin: 0 0 0.5rem; font-size: 1.05rem; }

/* Product slide-out drawer under card */
.shop-card-top {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.1rem 1.15rem;
}

.shop-card-top h2 { margin: 0; }

.product-drawer {
    border-top: 1px solid rgba(255,255,255,0.12);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.product-drawer:not([hidden]) {
    max-height: 2200px;
    display: block;
}

.drawer-inner {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.product-body-text {
    white-space: pre-wrap;
    line-height: 1.55;
    font-size: 1.05rem;
}

.drawer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.doc-list a {
    color: var(--text);
    text-decoration: underline;
}

.body-textarea {
    width: 100%;
    min-height: 240px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(0,0,0,0.22);
    color: var(--text);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    font-size: 1.08rem;
    line-height: 1.55;
    font-family: inherit;
    resize: vertical;
}

/* Gallery popup — cachebust v=20261028g3 */
.gallery-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2000 !important;
    background: transparent !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    display: flex !important;
    align-items: stretch;
    justify-content: center;
    padding: 0.5rem !important;
    cursor: zoom-out;
    overflow: auto !important;
}

.gallery-modal[hidden] { display: none !important; }

.gallery-dialog {
    position: relative !important;
    width: 98vw !important;
    max-width: none !important;
    min-height: 92vh !important;
    max-height: none !important;
    margin: auto;
    overflow: visible !important;
    padding: 3rem 2rem 3rem !important;
    cursor: default;
    box-sizing: border-box;
}

.gallery-close {
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(20, 30, 55, 0.92) !important;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2100 !important;
}

.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)) !important;
    gap: 1.75rem !important;
    margin-top: 1rem !important;
    padding: 1rem;
}

.gallery-item {
    position: relative !important;
    border-radius: 18px;
    overflow: visible !important;
    border: none;
    background: transparent !important;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img {
    width: 100% !important;
    height: auto !important;
    max-height: 70vh !important;
    object-fit: contain !important;
    background: transparent;
    display: block;
    transition: transform 0.25s ease;
    transform-origin: center center;
}

.gallery-item:hover {
    overflow: visible !important;
    z-index: 20 !important;
}

.gallery-item:hover img {
    transform: scale(1.2) !important; /* zoom-in on hover */
    box-shadow: 0 24px 70px rgba(0,0,0,0.65);
    position: relative;
    z-index: 21 !important;
}

.docs-dialog {
    width: min(520px, 96vw) !important;
    min-height: auto !important;
}



.gallery-del {
    position: absolute;
    left: 0.35rem;
    bottom: 0.35rem;
    z-index: 22;
}
.gallery-del-2 { left: auto; right: 0.35rem; }


/* Shop product cards must not trap full-screen gallery */
.shop-product.product-card,
.shop-grid .product-card {
    overflow: visible !important;
}


/* ===== Full-screen gallery portal (body) v=20261028g3 ===== */
body.gallery-open {
    overflow: hidden !important;
}

.gallery-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 5000 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important; /* fully transparent backdrop */
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: auto !important;
    cursor: zoom-out;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.gallery-modal[hidden] {
    display: none !important;
}

.gallery-popup-frame.gallery-dialog,
.gallery-dialog.gallery-popup-frame {
    position: relative !important;
    width: min(92vw, 1400px) !important;
    max-width: 92vw !important;
    min-height: 70vh !important;
    max-height: 92vh !important;
    margin: 2vh auto !important;
    padding: 2.5rem 1.75rem 2rem !important;
    overflow: auto !important;
    cursor: default !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)) !important;
    gap: 1.5rem !important;
}

.gallery-item {
    overflow: visible !important;
    min-height: 40vh;
    background: transparent !important;
    border: none !important;
    border-radius: 16px;
}

.gallery-item img {
    width: 100% !important;
    height: auto !important;
    max-height: 65vh !important;
    object-fit: contain !important;
    transition: transform 0.25s ease;
    transform-origin: center center;
}

.gallery-item:hover {
    z-index: 5 !important;
    overflow: visible !important;
}

.gallery-item:hover img {
    transform: scale(1.2) !important; /* zoom-in on hover */
    z-index: 6 !important;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.gallery-close {
    position: absolute !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
    z-index: 10 !important;
}

#gallery-portal-source,
#home-gallery-portal-source {
    /* host only; modals move to body when opened */
    display: contents;
}


/* ===== Les mer accordion (rullgardin) v=20261028g3 ===== */
.visitor-extra {
    margin-top: 0.65rem;
}

.les-mer {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.18);
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.les-mer:hover,
.les-mer:focus-visible {
    border-color: rgba(122, 162, 255, 0.55);
    outline: none;
}

.les-mer-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.les-mer-label::after {
    content: "▾";
    font-size: 0.85rem;
    opacity: 0.75;
    transition: transform 0.25s ease;
}

.les-mer.is-open .les-mer-label::after {
    transform: rotate(180deg);
}

.les-mer-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.32s ease;
}

.les-mer.is-open .les-mer-body {
    grid-template-rows: 1fr;
}

.les-mer-body-inner {
    overflow: hidden;
    min-height: 0;
    padding: 0 0.95rem;
    opacity: 0;
    transition: opacity 0.22s ease, padding 0.32s ease;
}

.les-mer.is-open .les-mer-body-inner {
    padding: 0.35rem 0.95rem 0.95rem;
    opacity: 1;
}

.les-mer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.45rem 0 0.35rem;
}

.admin-product-panel {
    margin-top: 0.65rem;
    padding: 0.85rem 0.95rem 1rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.admin-product-panel .card-admin {
    margin-top: 0.35rem;
}

.product-bytt-bilde {
    margin-top: 0.35rem;
}

.product-body-text {
    font-size: 1.08rem;
    line-height: 1.6;
}

.visitor-doc-list {
    margin-top: 0.5rem;
}

.doc-download {
    display: inline-block;
    padding: 0.25rem 0;
}

/* Gallery hover: zoom-in; click enlarges further */
.gallery-item img {
    transform: scale(1);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    cursor: zoom-in;
}

.gallery-item:hover img {
    transform: scale(1.2) !important;
    box-shadow: 0 18px 48px rgba(0,0,0,0.55);
}

.gallery-item.is-enlarged {
    z-index: 40 !important;
    overflow: visible !important;
}

.gallery-item.is-enlarged img,
.gallery-item.is-enlarged:hover img {
    transform: scale(1.85) !important;
    max-height: 88vh !important;
    box-shadow: 0 28px 80px rgba(0,0,0,0.7);
    cursor: zoom-out;
    position: relative;
    z-index: 41 !important;
}

.product-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    margin: 0.35rem 0 0.15rem;
}

.product-price-row .price {
    margin: 0;
}

.product-price-row .add-form {
    margin-top: 0;
}

.shop-intro {
    margin: 0.35rem 0 0.75rem;
    font-size: 1.08rem;
    line-height: 1.55;
    color: rgba(232, 240, 255, 0.92);
    white-space: pre-wrap;
}

.shop-intro-edit {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.shop-intro-edit textarea {
    width: 100%;
    min-height: 6.5rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.08);
    color: var(--text);
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    line-height: 1.5;
    font-family: inherit;
    resize: vertical;
}


/* ===== gallery transparent grid v=20261028g4 ===== */
.gallery-dialog,
.gallery-popup-frame,
.gallery-popup-frame.gallery-dialog,
.gallery-dialog.gallery-popup-frame {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.gallery-grid {
    background: transparent !important;
}
.gallery-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Docs overlay keeps a light panel so links stay readable */
.docs-dialog.gallery-dialog,
.gallery-dialog.docs-dialog {
    background: rgba(18, 26, 48, 0.92) !important;
    border: 1px solid rgba(255,255,255,0.28) !important;
    border-radius: 22px !important;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55) !important;
    min-height: auto !important;
    max-height: 90vh !important;
    width: min(520px, 96vw) !important;
}

/* Language switcher */
.lang-switch {
    display: inline-flex !important;
    align-items: center;
    gap: 0.15rem;
    padding: 0.25rem 0.35rem !important;
    min-height: auto !important;
}
.lang-opt {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.45rem;
    border-radius: 999px;
    line-height: 1;
}
.lang-opt:hover {
    color: var(--text);
    text-decoration: none;
    background: rgba(255,255,255,0.12);
}
.lang-opt.active {
    color: #fff;
    background: rgba(255,255,255,0.22);
}

/* ===== gallery click zoom cursor v=20261028g4 ===== */
.gallery-item,
.gallery-item img {
    cursor: zoom-in !important;
}
.gallery-item.is-enlarged,
.gallery-item.is-enlarged img,
.gallery-item.is-enlarged:hover img {
    cursor: zoom-out !important;
}

/* ===== contact-bar + green theme v=20261028g7 ===== */
.contact-bar {
    display: inline-flex !important;
    align-items: center;
    gap: 0.1rem;
    padding: 0.25rem 0.35rem !important;
    min-height: auto !important;
}
.contact-opt {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    white-space: nowrap;
}
.contact-opt:hover {
    color: var(--text);
    text-decoration: none;
    background: rgba(109, 206, 160, 0.18);
}
.contact-opt.is-disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.35);
}
.contact-ico { font-size: 0.85rem; line-height: 1; }
.contact-lbl { line-height: 1; }

@media (max-width: 720px) {
    .contact-lbl { display: none; }
    .auth-float { gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 1rem); }
}

/* Soft green tint on primary glass buttons */
.btn-primary.glass-btn,
button.btn-primary {
    background: linear-gradient(
        165deg,
        rgba(109, 206, 160, 0.38),
        rgba(63, 175, 120, 0.18)
    ) !important;
    border-color: rgba(109, 206, 160, 0.45) !important;
}
.lang-opt.active {
    background: rgba(109, 206, 160, 0.28) !important;
}

/* ===== site chat widget v=20261028g8 ===== */
.contact-opt-btn {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.contact-opt-btn:hover {
    color: var(--text);
    background: rgba(109, 206, 160, 0.18);
}

.site-chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 18, 10, 0.45);
    z-index: 1200;
    backdrop-filter: blur(2px);
}

.site-chat-panel {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: min(420px, calc(100vw - 1.5rem));
    height: min(640px, calc(100vh - 2rem));
    z-index: 1210;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 18px !important;
    background: linear-gradient(
        165deg,
        rgba(20, 48, 34, 0.92),
        rgba(12, 32, 22, 0.88)
    ) !important;
    border: 1px solid rgba(109, 206, 160, 0.35) !important;
    box-shadow: 0 20px 60px rgba(0, 20, 12, 0.55), inset 0 1px 0 rgba(220, 255, 235, 0.18) !important;
}

.site-chat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(109, 206, 160, 0.22);
}
.site-chat-sub { font-size: 0.78rem; margin-top: 0.15rem; }
.site-chat-close {
    padding: 0.35rem 0.55rem !important;
    min-height: auto !important;
    line-height: 1;
}

.site-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.site-chat-bubble {
    max-width: 92%;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
}
.site-chat-bubble.is-bot {
    align-self: flex-start;
    background: rgba(109, 206, 160, 0.14);
    border: 1px solid rgba(109, 206, 160, 0.28);
}
.site-chat-bubble.is-user {
    align-self: flex-end;
    background: rgba(220, 255, 235, 0.12);
    border: 1px solid rgba(220, 255, 235, 0.22);
}
.site-chat-bubble-meta {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}
.site-chat-bubble.is-typing { opacity: 0.75; font-style: italic; }

.site-chat-compose {
    border-top: 1px solid rgba(109, 206, 160, 0.22);
    padding: 0.75rem 1rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.site-chat-file {
    font-size: 0.75rem;
    color: var(--muted);
}
.site-chat-pending { font-size: 0.78rem; }
.site-chat-row {
    display: flex;
    gap: 0.45rem;
    align-items: stretch;
}
.site-chat-input {
    flex: 1;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    color: var(--text);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(109, 206, 160, 0.25);
}
.site-chat-input:focus {
    outline: none;
    border-color: rgba(109, 206, 160, 0.55);
}
.site-chat-send {
    white-space: nowrap;
    padding: 0.55rem 0.85rem !important;
}
.site-chat-hint { font-size: 0.72rem; margin: 0; }
.linkish {
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    padding: 0 0.2rem;
}

@media (max-width: 520px) {
    .site-chat-panel {
        right: 0.5rem;
        bottom: 0.5rem;
        width: calc(100vw - 1rem);
        height: min(78vh, 640px);
    }
}

/* ===== home link top-left + chat UX v=20261028g10 ===== */
.home-float {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    color: var(--text) !important;
    font-weight: 750;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.75rem !important;
    min-height: auto !important;
    border-radius: 999px !important;
}
.home-float:hover {
    color: var(--text) !important;
    background: rgba(109, 206, 160, 0.22) !important;
}
.home-float-label { line-height: 1; }

.site-chat-bubble {
    font-size: 1.02rem !important;
    line-height: 1.55 !important;
}
.site-chat-bubble-text { font-size: 1.02rem; }
.site-chat-input {
    font-size: 1.02rem !important;
}
.site-chat-head strong { font-size: 1.08rem; }

@media (max-width: 720px) {
    .home-float { top: 0.55rem; left: 0.5rem; font-size: 0.85rem; padding: 0.35rem 0.65rem !important; }
}

/* ===== site footer v=20261028g11 ===== */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.site-main {
    flex: 1 0 auto;
}
.site-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    margin: 0 1rem 1rem;
    padding: 0.7rem 1.1rem !important;
    text-align: center;
    border-radius: 14px !important;
    background: linear-gradient(
        165deg,
        rgba(109, 206, 160, 0.14),
        rgba(20, 48, 34, 0.55)
    ) !important;
    border: 1px solid rgba(109, 206, 160, 0.28) !important;
}
.site-footer-text {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.35;
}
@media (max-width: 720px) {
    .site-footer { margin: 0 0.75rem 0.75rem; padding: 0.65rem 0.85rem !important; }
    .site-footer-text { font-size: 0.75rem; }
}
