:root {
    --border-opacity: 0.2;
    --text-color: #b0b0b0;
    --text-color-hover: #d4d4d4;
    --border-style: 1px solid rgba(255, 255, 255, 0.1);
    --sidebar-width: 250px;
}

@media (max-width: 960px) {
    :root {
        --border-opacity: 0.4;
        --text-color: #c0c0c0;
        --border-style: 1.5px solid rgba(255,255,255,0.3);
        --sidebar-width: 1fr;
    }
}

html {
    font-size: 16px;
}

ul {
    list-style: none;
}
a {
    text-decoration: none;
    color: inherit;
}

body {
    background-color: #0b0b0b;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 60%);
    background-size: 20px 20px;
    background-position:
        0 0,
        0 10px,
        10px -10px,
        -10px 0,
        center;

    color: var(--text-color);
    font-size: 1rem;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle at center,
            transparent 0%,
            rgba(0, 0, 0, 0.7) 70%,
            rgba(0, 0, 0, 0.9) 100%);
}

h1 {
    font-size: 2rem;
}

.horizontal-faded-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, white 30%, white 70%, transparent);
}

.container {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar main";        
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: 60px 1fr;
    height: 100vh;
    overflow: hidden;
}

.header {
    grid-area: header;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 60px;
    box-sizing: border-box;
    border-bottom: var(--border-style);
}

#page-title {
    transition: all 0.3s;
}
#page-title:hover {
    color: var(--text-color-hover);
    cursor: pointer;
}

.sidebar {
    grid-area: sidebar;
    width: var(--sidebar-width);
    flex-shrink: 0;
    box-sizing: border-box;
    border-right: var(--border-style);
    overflow-y: auto;
}

.sidebar-menu-item {
    display: flex;
    width: 100%;
    height: 40px;
    font-size: 1.5rem;
    font-weight: 500;
    padding-right: 15px;
    box-sizing: border-box;
    align-items: center;
    justify-content: right;
    transition: all 0.3s;
}

.sidebar-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color-hover);

}

.main-content {
    grid-area: main;
    overflow-y: auto;
}

.menu-toggle {
    position: absolute;
    left: 1rem;
    display: none;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    z-index: 10;
    transition: color 0.2s;
}
.menu-toggle:hover {
    color: #fff;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 960px) {
    .container {
        grid-template-areas:
            "header"
            "main";
        grid-template-columns: 1fr;
        grid-template-rows: 60px 1fr;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        border-right: none;
        background: rgba(11, 11, 11, 0.97);
        z-index: 9999;
        overflow-y: auto;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
        pointer-events: none;
    }

    .sidebar.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }

    .sidebar-menu-item {
        height: 48px;
        font-size: 1.25rem;
        justify-content: center;
        padding-right: 0;
    }

    .header {
        flex-wrap: wrap;
        height: auto;
        min-height: 60px;
        padding: 0.4rem 0.5rem;
    }

    #page-title {
        font-size: 1.4rem;
        order: 1;
        flex: 1;
        text-align: center;
    }

    .menu-toggle {
        display: block;
        order: 0;
        position: static;
    }

    .header-btn {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
}



.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    min-width: 300px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content input {
    padding: 0.5rem;
}

/* Item grid */
.item-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

/* Item card */
.item-card {
    display: block;
    position: relative;
    background: #1a1a1a;
    border: var(--border-style);
    cursor: pointer;
    transition: border-color 0.2s;
    color: inherit;
}
.item-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
}
.item-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111;
}
.item-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.item-card-info {
    padding: 0.75rem 1rem;
}
.item-card-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 500;
}
.item-price {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color-hover);
}

/* Sold badge */
.sold-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Image placeholder */
.img-placeholder {
    width: 100%;
    height: 100%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Item detail view */
.item-detail {
    padding: 2rem;
    max-width: 800px;
    position: relative;
}
.item-detail h2 {
    margin-top: 0;
}
.item-detail-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}
.item-detail-images img {
    max-width: 100%;
    display: block;
}
.item-description {
    line-height: 1.6;
    color: var(--text-color-hover);
}

/* Admin panel */
.admin-panel {
    padding: 2rem;
    max-width: 800px;
}
.admin-panel h2 {
    margin-top: 0;
}
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #1a1a1a;
    border: var(--border-style);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.form-group label {
    font-size: 0.85rem;
    color: var(--text-color-hover);
}
.form-group input,
.form-group textarea,
.form-group select {
    background: #0b0b0b;
    border: var(--border-style);
    color: inherit;
    padding: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
}
.form-group textarea {
    resize: vertical;
}
.form-error {
    color: #e05;
    font-size: 0.9rem;
    margin: 0;
}
.admin-form button {
    align-self: flex-start;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: var(--border-style);
    color: inherit;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.admin-form button:hover {
    background: rgba(255, 255, 255, 0.1);
}
.admin-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: var(--border-style);
}
.admin-item-title {
    flex: 1;
}
.admin-item-actions {
    display: flex;
    gap: 0.5rem;
}
.admin-item-actions button {
    padding: 0.25rem 0.75rem;
    background: transparent;
    border: var(--border-style);
    color: inherit;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}
.admin-item-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Utility states */
.loading, .empty, .error {
    padding: 2rem;
    color: var(--text-color-hover);
    font-size: 1rem;
}

/* ─── v2 additions ─── */

/* Unavailable badge */
.unavailable-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Status badge in detail view */
.status-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.status-badge.available { color: var(--text-color-hover); border-color: rgba(255,255,255,0.1); }
.status-badge.sold { color: #fff; background: rgba(0,0,0,0.5); }
.status-badge.unavailable { color: #666; }
.status-badge.clickable { cursor: pointer; transition: background 0.2s; }
.status-badge.clickable:hover { background: rgba(255,255,255,0.1); }

/* Gallery drop zone */
.gallery-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    padding: 2rem;
    margin: 1.5rem;
    text-align: center;
    color: var(--text-color-hover);
    font-size: 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.gallery-drop-zone.drag-over {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

/* Image detail drop zone state */
.item-detail-images.drag-over {
    outline: 2px dashed rgba(255, 255, 255, 0.3);
    outline-offset: 4px;
}

/* Image wrap in detail view */
.image-wrap {
    position: relative;
    margin-bottom: 0.5rem;
}

/* Image controls (admin) */
.image-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    color: var(--text-color-hover);
}

.cover-btn, .delete-btn {
    padding: 0.2rem 0.5rem;
    background: transparent;
    border: var(--border-style);
    color: inherit;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s;
}
.cover-btn:hover, .delete-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
.delete-btn { color: #a44; }
.delete-btn:hover { color: #e55; }

.cover-label {
    color: var(--text-color-hover);
    font-size: 0.75rem;
}

/* Image caption */
.img-caption {
    font-size: 0.85rem;
    color: var(--text-color-hover);
    padding: 0.25rem 0;
    margin: 0;
}

/* Sort order */
.img-sort-order {
    display: inline-block;
    min-width: 1.5em;
    text-align: center;
    padding: 0 0.25rem;
}

/* Built date */
.item-built-at {
    font-size: 0.85rem;
    color: var(--text-color-hover);
    margin: 0.25rem 0;
}

/* Tag chips */
.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    align-items: center;
}
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color-hover);
}
.tag-remove {
    cursor: pointer;
    color: #a44;
    font-size: 0.85rem;
    margin-left: 0.15rem;
}
.tag-remove:hover { color: #e55; }

.tag-add-btn {
    padding: 0.15rem 0.5rem;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--text-color-hover);
    cursor: pointer;
    font-size: 0.75rem;
    transition: border-color 0.2s;
}
.tag-add-btn:hover { border-color: rgba(255, 255, 255, 0.3); }

.tag-select {
    background: #0b0b0b;
    border: var(--border-style);
    color: inherit;
    padding: 0.25rem;
    font-size: 0.8rem;
}

/* Tag editor view */
.tag-editor {
    padding: 2rem;
    max-width: 600px;
}
.tag-editor h2 { margin-top: 0; }
.tag-editor-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: var(--border-style);
}
.tag-editor-name {
    flex: 1;
    font-size: 1rem;
}
.tag-category-toggle {
    font-size: 0.8rem;
    color: var(--text-color-hover);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}
.tag-category-toggle input { cursor: pointer; }

/* Sidebar admin extras */
.sidebar-add-category {
    cursor: pointer;
    color: var(--text-color-hover);
    font-size: 1rem;
}
.sidebar-add-category:hover { color: #fff; }

.sidebar-tags-link { font-size: 1rem; }

.new-category-input {
    outline: none;
    min-width: 50px;
    padding: 0 4px;
}

.sidebar-logout-btn {
    background: transparent;
    border: none;
    color: var(--text-color-hover);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
}
.sidebar-logout-btn:hover { color: #fff; }

/* contentEditable focus state */
[contenteditable="true"] {
    outline: 1px solid rgba(255, 255, 255, 0.2);
    outline-offset: 2px;
}

/* Drag-over generic */
.drag-over {
    border-color: rgba(255, 255, 255, 0.4);
}

/* Built-at date picker */
.built-at-input {
    background: #0b0b0b;
    border: var(--border-style);
    color: inherit;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    font-family: inherit;
    color-scheme: dark;
}

/* Header admin controls */
.header-admin-controls {
    position: absolute;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.header-btn {
    background: transparent;
    border: var(--border-style);
    color: var(--text-color-hover);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    transition: color 0.2s, border-color 0.2s;
}
.header-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.status-badge.available { color: #0f0; border-color: #0f0; }

/* ─── Lightbox ─── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
}
.lightbox-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90vw;
    height: 70vh;
    touch-action: pan-y;
}
.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 1rem;
}
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
.lightbox-caption {
    position: relative;
    z-index: 1;
    color: #aaa;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
    min-height: 1.2em;
}
.lightbox-counter {
    position: relative;
    z-index: 1;
    color: #666;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.lightbox-strip {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    max-width: 90vw;
    padding: 0.25rem 0;
}
.lightbox-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.lightbox-thumb.active { opacity: 1; border: 1px solid #fff; }
.lightbox-thumb:hover { opacity: 0.8; }

@media (max-width: 960px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 0.5rem;
    }
    .lightbox-main {
        width: 95vw;
        height: 60vh;
    }
    .lightbox-thumb {
        width: 45px;
        height: 34px;
    }
}

/* Detail view images as thumbnail grid */
.item-detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.item-detail-images .image-wrap {
    position: relative;
}
.item-detail-images .image-wrap > img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}
.item-detail-images .image-wrap > img:hover {
    opacity: 0.8;
}

/* Image reorder drag states */
.image-wrap[draggable="true"] { cursor: grab; }
.image-wrap.dragging { opacity: 0.3; }
.image-wrap.drag-target {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Delete mode */
.header-btn.delete-active {
    color: #e55;
    border-color: #e55;
}
.delete-item-btn {
    margin-bottom: 1rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}

/* Arrange mode */
.header-btn.arrange-active { color: #0af; border-color: #0af; }
.arrange-mode .image-wrap { cursor: grab; }
.arrange-mode .image-wrap.dragging { opacity: 0.3; }
.arrange-mode .image-wrap.drag-target { outline: 2px solid rgba(0, 170, 255, 0.6); outline-offset: 2px; }

/* Fix thumbnail shimmer on large images */
.item-detail-images .image-wrap > img {
    image-rendering: auto;
    will-change: opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}
.item-card-image img {
    image-rendering: auto;
    will-change: opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Featured landing page */
.featured-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}
.featured-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
    text-decoration: none;
    max-width: 700px;
    width: 100%;
}
.featured-info {
    text-align: center;
    margin-bottom: 1.5rem;
}
.featured-title {
    font-size: 2rem;
    margin: 0 0 0.5rem;
    color: #ddd;
}
.featured-desc {
    color: var(--text-color-hover);
    line-height: 1.6;
    margin: 0 0 0.5rem;
}
.featured-date {
    color: var(--text-color-hover);
    font-size: 0.85rem;
    margin: 0;
}
.featured-img-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}
.featured-img {
    max-width: 100%;
    max-height: 50vh;
    object-fit: contain;
    display: block;
}
.featured-placeholder {
    width: 100%;
    height: 50vh;
    background: #111;
}
.featured-browse {
    padding: 1.5rem 2rem;
    text-align: center;
}
.featured-browse-link {
    color: var(--text-color-hover);
    font-size: 0.9rem;
    transition: color 0.2s;
}
.featured-browse-link:hover {
    color: #fff;
}

@media (max-width: 960px) {
    .featured-item { padding: 1rem; }
    .featured-img { max-height: 45vh; }
    .featured-title { font-size: 1.5rem; }
}

/* Brighter item title */
.item-detail h2 {
    color: #f0f0f0;
}

/* Even out spacing around title */
.item-detail h2 {
    margin-bottom: 0.75rem;
}
.status-badge {
    margin-bottom: 0.75rem;
}

/* Price light blue */
.item-detail .item-price {
    color: #6cb8e6;
    font-size: 1.1rem;
}

/* Available badge on cards */
.available-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    color: #0f0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border: 1px solid #0f0;
}

/* Brighter card titles */
.item-card-info h3 {
    color: #e8e8e8;
}
/* Price on cards - light blue */
.item-card .item-price {
    color: #6cb8e6;
}
.item-price-zero {
    color: #666 !important;
}

/* ─── Analytics View ─── */
.analytics-panel {
    padding: 2rem;
    max-width: 800px;
}
.analytics-panel h3 {
    margin: 1.5rem 0 0.75rem;
    color: #ddd;
    font-size: 1rem;
}
.analytics-period-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.analytics-period-selector .header-btn.active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}
.analytics-summary {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.analytics-card {
    background: #1a1a1a;
    border: var(--border-style);
    padding: 1.25rem 1.5rem;
    min-width: 140px;
}
.analytics-card-value {
    font-size: 2rem;
    color: #f0f0f0;
    font-weight: 600;
}
.analytics-card-label {
    font-size: 0.8rem;
    color: var(--text-color-hover);
    margin-top: 0.25rem;
}
.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.analytics-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: var(--border-style);
    color: var(--text-color-hover);
    font-weight: 500;
}
.analytics-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
}
.analytics-list {
    padding-left: 1.25rem;
    font-size: 0.9rem;
    color: #ccc;
}
.analytics-list li {
    padding: 0.25rem 0;
    list-style: decimal;
}
.analytics-list a {
    color: #6cb8e6;
    transition: color 0.2s;
}
.analytics-list a:hover {
    color: #fff;
}
@media (max-width: 960px) {
    .analytics-summary { flex-direction: column; gap: 0.75rem; }
    .analytics-card { min-width: auto; }
}

/* Mobile header fix - must be after base .header-admin-controls */
@media (max-width: 960px) {
    .header {
        flex-wrap: wrap;
        height: auto;
        min-height: 60px;
        padding: 0.4rem 0.5rem;
    }
    .menu-toggle {
        order: 0;
        position: static;
    }
    #page-title {
        order: 1;
        flex: 1;
        text-align: center;
        font-size: 1.4rem;
    }
    .header-admin-controls {
        order: 2;
        position: static;
        right: auto;
        gap: 0.3rem;
    }
}

/* ─── Preload Progress Bar ─── */
.preload-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.3s ease, opacity 0.4s ease;
    z-index: 10;
    pointer-events: none;
}
.preload-progress.fade-out {
    opacity: 0;
}

/* Featured badge (admin only) */
.featured-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    line-height: 1;
    color: #f5c542;
    border: 1px solid #f5c542;
    background: rgba(0, 0, 0, 0.75);
}
.item-card-image .featured-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}
.item-detail .featured-badge {
    margin-bottom: 0.75rem;
    margin-left: 0.5rem;
}
