/* MTF Portfolio Overview */

.mtf-ov {
    max-width: 1212px !important;
    margin: 0 auto !important;
    padding: 40px 0 80px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Header */
.mtf-ov-header {
    margin-bottom: 40px;
}

.mtf-ov-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    color: #1a1a1a;
    margin: 0 0 12px;
    font-family: 'Playfair Display', Georgia, serif;
}

.mtf-ov-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

/* Filter Bar */
.mtf-ov-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.mtf-ov-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 16px;
    border-right: 1px solid #d1d5db;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.mtf-ov-filter-label i { color: #888; }

.mtf-ov-filter-select {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.mtf-ov-filter-select:hover { border-color: #999; }
.mtf-ov-filter-select:focus { outline: none; border-color: #1a1a1a; }

.mtf-ov-sort {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.mtf-ov-sort select {
    background: transparent;
    border: none;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
}

/* Category Pills */
.mtf-ov-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mtf-ov-categories::-webkit-scrollbar { display: none; }

.mtf-ov-cat-pill {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.mtf-ov-cat-pill:hover { border-color: #999; }

.mtf-ov-cat-pill.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* Grid */
.mtf-ov-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Card */
.mtf-ov-card {
    position: relative;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.4s;
}

.mtf-ov-card:hover {
    border-color: #999;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.mtf-ov-card.hidden { display: none; }

/* Card Image */
.mtf-ov-card-image {
    position: relative;
    height: 320px;
    overflow: hidden;
}

.mtf-ov-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.mtf-ov-card:hover .mtf-ov-card-image img {
    transform: scale(1.05);
}

.mtf-ov-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #fff 0%, transparent 50%);
}

/* Swatch Circle */
.mtf-ov-card-swatch {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #fff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 2;
}

.mtf-ov-card-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Price Capsules - Glass Morphism Top Overlay */
.mtf-ov-card-prices {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}
.mtf-ov-price-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px 6px 9px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.10),
        0 1px 2px rgba(0, 0, 0, 0.05),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);
    transition: box-shadow 0.25s ease;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .mtf-ov-price-item {
        background: rgba(255, 255, 255, 0.78);
        -webkit-backdrop-filter: blur(12px) saturate(160%);
        backdrop-filter: blur(12px) saturate(160%);
    }
}
.mtf-ov-card:hover .mtf-ov-price-item {
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.14),
        0 1px 3px rgba(0, 0, 0, 0.06),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.7);
}
.mtf-ov-price-item svg {
    width: 15px;
    height: 15px;
    color: #444;
    flex-shrink: 0;
}
.mtf-ov-price-num {
    color: #1a1a1a;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.mtf-ov-price-kr {
    color: #6b6b6b;
    font-weight: 500;
    font-size: 11px;
    margin-left: 1px;
}
.mtf-ov-price-prefix {
    align-self: center;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.55), 0 0 6px rgba(0,0,0,0.35);
    padding-right: 2px;
}
.mtf-ov-price-disclaimer {
    flex-basis: 100%;
    margin-top: 2px;
    font-size: 9.5px;
    font-weight: 400;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Card Content */
.mtf-ov-card-content {
    padding: 20px 24px 24px;
}

.mtf-ov-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.mtf-ov-card-header > div {
    min-width: 0;
    overflow: hidden;
}

.mtf-ov-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 2px;
    font-family: 'Playfair Display', Georgia, serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mtf-ov-card-subtitle {
    font-size: 11px;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.mtf-ov-card-code {
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 10px;
    color: #666;
    font-family: 'SF Mono', 'Consolas', monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Tags */
.mtf-ov-card-tags {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    max-height: 28px;
    gap: 6px;
    margin-bottom: 16px;
}

.mtf-ov-card-tag {
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    background: #f3f4f6;
    font-size: 12px;
    color: #555;
}

/* Stats */
.mtf-ov-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px 0 0;
    border-top: 1px solid #e5e7eb;
    overflow: hidden;
}

.mtf-ov-card-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.mtf-ov-card-stat i {
    font-size: 14px;
    color: #999;
}

.mtf-ov-card-stat span {
    font-size: 9px;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.03em;
}

.mtf-ov-stat-border {
    border-left: none;
    border-right: none;
}

/* Empty */
.mtf-ov-empty {
    text-align: center;
    padding: 80px 20px;
    color: #888;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
    .mtf-ov-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .mtf-ov-grid { grid-template-columns: repeat(2, 1fr); }
    .mtf-ov-card-image { height: 260px; }
}

@media (max-width: 600px) {
    .mtf-ov-grid { grid-template-columns: 1fr; }
    .mtf-ov-filters { flex-direction: column; align-items: stretch; }
    .mtf-ov-filter-label { border-right: none; padding-right: 0; padding-bottom: 8px; border-bottom: 1px solid #d1d5db; }
    .mtf-ov-sort { margin-left: 0; }
}

.mtf-ov-color-dd {
    position: relative;
    display: inline-block;
}
.mtf-ov-color-dd__trigger {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
    font-family: inherit;
}
.mtf-ov-color-dd__trigger:hover { border-color: #999; }
.mtf-ov-color-dd__trigger:focus { outline: none; border-color: #1a1a1a; }
.mtf-ov-color-dd__caret {
    font-size: 10px;
    opacity: 0.6;
    margin-left: 2px;
}
.mtf-ov-color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.12);
    flex-shrink: 0;
}
.mtf-ov-color-dot--all {
    background: conic-gradient(from 90deg, #e74c3c, #f39c12, #f1c40f, #2ecc71, #3498db, #9b59b6, #e74c3c);
    border-color: rgba(0,0,0,0.18);
}
.mtf-ov-color-dd__list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    list-style: none;
    padding: 6px;
    margin: 0;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    max-height: 360px;
    overflow-y: auto;
}
.mtf-ov-color-dd__list[hidden] { display: none; }
.mtf-ov-color-dd__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #1a1a1a;
    user-select: none;
}
.mtf-ov-color-dd__option:hover { background: #f5f5f5; }
.mtf-ov-color-dd__option:active { background: #ebebeb; }

/* Top-right color badge — mirrors Fra-prefix on opposite side */
.mtf-ov-card-color-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 4;
}
.mtf-ov-card-prices { right: 48px; }

/* Featured (Anbefalet) — subtle: small inline gold label + card border */
.mtf-ov-card-featured {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    color: #b88a1a;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.mtf-ov-featured-icon { color: #d4a435; font-size: 12px; line-height: 1; }
.mtf-ov-card[data-featured="1"] {
    border-color: rgba(212, 164, 53, 0.55);
}
.mtf-ov-card[data-featured="1"]:hover {
    border-color: #d4a435;
    box-shadow: 0 12px 40px rgba(212, 164, 53, 0.18);
}

/* Add-category + pill (admin only) */
.mtf-ov-cat-add {
    background: #fff !important;
    border: 1px dashed #2d71ff !important;
    color: #2d71ff !important;
    font-weight: 700;
    font-size: 16px !important;
    padding: 4px 14px !important;
}
.mtf-ov-cat-add:hover { background: #f0f5ff !important; border-style: solid !important; }

/* Notes button on card (admin only) */
.mtf-ov-card-notes {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 9px;
    background: rgba(255, 255, 255, 0.94);
    border: none;
    border-radius: 999px;
    color: #444;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    z-index: 4;
    transition: background-color 0.15s, transform 0.15s;
}
.mtf-ov-card-notes:hover { background: #fff; transform: translateY(-1px); }
.mtf-ov-card-notes.has-tasks { color: #b25e00; box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4); }
.mtf-ov-notes-count {
    background: #6b7280; color: #fff; border-radius: 999px;
    padding: 1px 6px; font-size: 10px; font-weight: 700; min-width: 14px; text-align: center;
}
.mtf-ov-card-notes.has-tasks .mtf-ov-notes-count { background: #f59e0b; }

/* Kundebilleder badge (non-admin users) */
.mtf-ov-card-photos {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 6px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    color: #1a1a1a;
    font-size: 11px;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    z-index: 4;
}
.mtf-ov-photos-stack { display: flex; }
.mtf-ov-photos-stack img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    object-fit: cover;
    margin-left: -6px;
}
.mtf-ov-photos-stack img:first-child { margin-left: 0; }
.mtf-ov-photos-label { color: #1a1a1a; font-weight: 600; }
.mtf-ov-photos-more {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    background: #f3f4f6;
    color: #1a1a1a;
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -6px;
}

.mtf-ov-tasks-widget { position: fixed; right: 24px; bottom: 100px; z-index: 9999; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.mtf-ov-tasks-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: #1a1a1a; color: #fff; border: none; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); transition: transform 0.15s, background-color 0.15s; }
.mtf-ov-tasks-toggle:hover { background: #333; transform: translateY(-1px); }
.mtf-ov-tasks-badge { background: #f59e0b; color: #1a1a1a; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 800; min-width: 18px; text-align: center; }
.mtf-ov-tasks-panel { position: absolute; right: 0; bottom: calc(100% + 10px); width: 380px; max-height: 70vh; display: flex; flex-direction: column; background: #fff; border-radius: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25); overflow: hidden; }
.mtf-ov-tasks-panel[hidden] { display: none; }
.mtf-ov-tasks-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #ececec; font-weight: 600; font-size: 14px; }
.mtf-ov-tasks-close { background: transparent; border: none; font-size: 20px; cursor: pointer; color: #888; line-height: 1; padding: 0 4px; }
.mtf-ov-tasks-close:hover { color: #1a1a1a; }
.mtf-ov-tasks-hint { padding: 6px 16px; font-size: 11px; color: #888; background: #f9fafb; }
.mtf-ov-tasks-list { padding: 6px; overflow-y: auto; flex: 1; outline: none; }
.mtf-ov-tasks-empty { padding: 24px; text-align: center; color: #999; font-style: italic; }
.mtf-ov-task-item { display: block; width: 100%; text-align: left; padding: 10px 12px; background: transparent; border: none; border-radius: 6px; cursor: pointer; font-family: inherit; transition: background-color 0.1s; }
.mtf-ov-task-item:hover { background: #f3f4f6; }
.mtf-ov-task-item.is-active { background: #fff7ed; outline: 2px solid #f59e0b; outline-offset: -2px; }
.mtf-ov-task-text { font-size: 13px; color: #1a1a1a; margin-bottom: 4px; word-break: break-word; }
.mtf-ov-task-meta { font-size: 10px; color: #888; }
.mtf-ov-card.is-jump-target { animation: mtfJumpFlash 1.5s ease; }
@keyframes mtfJumpFlash { 0% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); } 20% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.7); } 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); } }

/* Edited macro pending admin approval — red frame on card image, Ctrl+click swatch to approve */
.mtf-ov-card.mtf-pf-edited-unapproved {
    box-shadow: 0 0 0 3px #e74c3c, 0 8px 28px rgba(231, 76, 60, 0.25) !important;
    border-color: #e74c3c !important;
}
.mtf-ov-card.mtf-pf-edited-unapproved .mtf-ov-card-swatch {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px #e74c3c, 0 2px 8px rgba(231, 76, 60, 0.4);
    cursor: help;
}
.mtf-ov-card.mtf-pf-edited-unapproved .mtf-ov-card-swatch::after {
    content: 'Alt+klik for at godkende';
    position: absolute;
    bottom: -28px; right: 0;
    background: #1a1a1a; color: #fff;
    padding: 4px 8px; border-radius: 6px;
    font-size: 10px; white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity 0.15s;
}
.mtf-ov-card.mtf-pf-edited-unapproved:hover .mtf-ov-card-swatch::after { opacity: 1; }
