/* ── MOP Projects ── */

#mop-projects-wrap { width:100%; }

/* Topbar */
.mop-proj-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 14px;
    color: #555;
}
#mop-proj-loader { color: #2563eb; font-weight: 600; }

/* Layout: grid left, sidebar right */
.mop-proj-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.mop-proj-grid-wrap { flex: 1 1 0%; min-width: 0; }

/* Grid */
.mop-proj-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    transition: opacity 0.2s;
}
@media (max-width: 1024px) { .mop-proj-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .mop-proj-grid { grid-template-columns: repeat(2, 1fr); } }

/* Card */
.mop-proj-card {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e5;
    transition: box-shadow 0.2s, transform 0.18s;
}
.mop-proj-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.13);
    transform: translateY(-2px);
}
.mop-proj-card-img {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f8f8;
}
.mop-proj-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.mop-proj-card:hover .mop-proj-card-img img { transform: scale(1.04); }
.mop-proj-card-name {
    padding: 8px 10px 10px;
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    font-weight: 500;
}

/* Sidebar */
.mop-proj-sidebar {
    flex: 0 0 260px;
    width: 260px;
    position: sticky;
    top: 80px;
}
@media (max-width: 768px) {
    .mop-proj-layout { flex-direction: column; }
    .mop-proj-sidebar { width: 100%; position: static; }
}

.mop-proj-filter-group {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.mop-proj-filter-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}
.mop-proj-filter-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}
.mop-proj-filter-item input[type="checkbox"] { accent-color: #1e3a8a; flex-shrink:0; }
.mop-proj-filter-item:hover span:first-of-type { color: #2563eb; }
.mop-proj-filter-child { padding-left: 18px; font-size: 12px; color: #555; }
.mop-proj-filter-parent { font-weight: 600; }
.mop-filter-count { color: #999; font-size: 11px; margin-left: auto; }

/* ── Modal ── */
body.mop-modal-open { overflow: hidden; }

#mop-proj-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}
.mop-proj-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}
.mop-proj-modal-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 720px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 28px 28px 24px;
}
.mop-proj-modal-close {
    position: sticky;
    top: 0;
    float: right;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.mop-proj-modal-close:hover { background: #e0e0e0; }

.mop-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a2e;
    padding-right: 36px;
}

.mop-modal-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    justify-content: center;
    color: #333;
    transition: border-color 0.15s;
}
.mop-modal-copy-btn:hover { border-color: #2563eb; color: #2563eb; }

/* Product meta */
.mop-modal-meta {
    background: #f5f8ff;
    border: 1px solid #e0e8f8;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.mop-modal-meta-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
}
.mop-modal-meta-row:last-child { margin-bottom: 0; }
.mop-modal-meta-label {
    font-size: 10px;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.mop-modal-meta-val { font-size: 13px; font-weight: 600; color: #1a1a2e; }
.mop-modal-link { color: #2563eb !important; text-decoration: none; }
.mop-modal-link:hover { text-decoration: underline; }

/* Gallery */
.mop-modal-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}
@media (max-width: 480px) { .mop-modal-gallery { grid-template-columns: repeat(3, 1fr); } }

.mop-modal-gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
    cursor: pointer;
}
.mop-modal-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.mop-modal-gallery-item:hover img { transform: scale(1.05); }

/* Sections */
.mop-modal-section { margin-bottom: 16px; }
.mop-modal-section h4 {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 6px;
}
.mop-modal-section p {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    margin: 0;
}
