:root {
    --mk-green: #0d7a4a;
    --mk-green-light: #e8f5ef;
    --mk-green-dark: #065f37;
    --mk-orange: #e67e22;
    --mk-orange-light: #fff4e8;
    --mk-bg: #f6f8f7;
    --mk-surface: #ffffff;
    --mk-border: #d5e0db;
    --mk-border-strong: #b8c9c0;
    --mk-text: #142820;
    --mk-muted: #3d5248;
    --mk-radius: 14px;
    --mk-shadow: 0 4px 24px rgba(13, 122, 74, 0.08);
    --mk-header-h: 118px;
    --mk-font: 'DM Sans', system-ui, sans-serif;
    --mk-font-base: 1.25rem;
    --mk-font-body: 1.125rem;
    --mk-font-label: 1.125rem;
    --mk-font-sm: 1rem;
    --mk-font-xs: 0.9375rem;
    --mk-control-h: 3.25rem;
    --mk-touch-min: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Content-only styles — header/nav from main header.php */
.mk-content,
body.wp-market-page .mk-content {
    font-family: var(--mk-font);
    font-size: var(--mk-font-base);
    color: var(--mk-text);
    line-height: 1.55;
}

a { color: var(--mk-green); text-decoration: none; }
a:hover { color: var(--mk-green-dark); }

.mk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--mk-touch-min);
    padding: 12px 22px;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    font-size: var(--mk-font-body);
    letter-spacing: 0.01em;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, color .2s, box-shadow .2s;
}

.mk-btn-primary {
    background: var(--mk-orange);
    color: #fff;
}

.mk-btn-primary:hover {
    background: #d35400;
    color: #fff;
}

.mk-btn-ghost {
    background: transparent;
    color: var(--mk-text);
    border: 1px solid var(--mk-border);
}

.mk-btn-ghost:hover { background: var(--mk-green-light); }

.mk-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mk-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.mk-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 18px;
    padding-left: 16px;
    border-left: 5px solid var(--mk-orange);
    line-height: 1.3;
}

.mk-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.mk-pills::-webkit-scrollbar { display: none; }

.mk-pill {
    padding: 10px 20px;
    border-radius: 24px;
    background: var(--mk-surface);
    border: 1px solid var(--mk-border-strong);
    font-size: var(--mk-font-body);
    font-weight: 600;
    color: var(--mk-muted);
    cursor: pointer;
    white-space: nowrap;
    min-height: var(--mk-touch-min);
    transition: all .2s;
}

.mk-pill.is-active,
.mk-pill:hover {
    background: var(--mk-orange);
    border-color: var(--mk-orange);
    color: #fff;
}

/* Listing grid */
.mk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.mk-card-wrap {
    position: relative;
}

.mk-card-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.mk-card-toolbar .wp-post-menu-btn {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.mk-card-wrap.wp-card-dismissing {
    transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease;
    overflow: hidden;
}

.mk-detail-wrap.wp-card-dismissing {
    transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease;
    overflow: hidden;
}

.mk-card {
    background: var(--mk-surface);
    border-radius: var(--mk-radius);
    overflow: hidden;
    box-shadow: var(--mk-shadow);
    border: 1px solid var(--mk-border);
    transition: transform .2s, box-shadow .2s;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.mk-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(13, 122, 74, 0.12);
}

.mk-card-img {
    position: relative;
    height: 190px;
    background: #eef2ef;
}

.mk-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mk-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: var(--mk-font-xs);
    padding: 4px 10px;
    border-radius: 20px;
}

.mk-card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mk-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mk-card-price {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--mk-green);
}

.mk-card-price s {
    font-size: var(--mk-font-sm);
    color: var(--mk-muted);
    font-weight: 500;
    margin-left: 6px;
}

.mk-card-desc {
    font-size: var(--mk-font-body);
    color: var(--mk-muted);
    margin: 8px 0 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mk-card-cta {
    display: block;
    text-align: center;
    padding: 12px 14px;
    background: var(--mk-orange-light);
    color: var(--mk-orange);
    font-weight: 700;
    font-size: var(--mk-font-body);
    border-radius: 10px;
    margin-top: auto;
    min-height: var(--mk-touch-min);
    line-height: 1.4;
}

.mk-card:hover .mk-card-cta {
    background: var(--mk-orange);
    color: #fff;
}

.mk-loader {
    text-align: center;
    padding: 24px;
    color: var(--mk-muted);
    font-size: var(--mk-font-body);
}

.mk-divider {
    border: none;
    border-top: 1px solid var(--mk-border);
    margin: 40px 0;
}

.mk-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--mk-muted);
    font-size: var(--mk-font-body);
    background: var(--mk-surface);
    border-radius: var(--mk-radius);
    border: 1px dashed var(--mk-border);
}

/* Detail page */
.mk-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--mk-font-body);
    color: var(--mk-muted);
    margin-bottom: 20px;
}

.mk-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

@media (max-width: 768px) {
    .mk-detail-grid { grid-template-columns: 1fr; }
}

.mk-detail-gallery {
    background: var(--mk-surface);
    border-radius: var(--mk-radius);
    overflow: hidden;
    border: 1px solid var(--mk-border);
}

.mk-detail-gallery img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #f0f0f0;
}

.mk-detail-panel {
    background: var(--mk-surface);
    border-radius: var(--mk-radius);
    padding: 28px;
    border: 1px solid var(--mk-border);
    box-shadow: var(--mk-shadow);
}

.mk-detail-panel h1 {
    font-size: 2rem;
    margin: 0 0 14px;
    line-height: 1.3;
}

.mk-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.mk-detail-head .mk-detail-meta {
    margin-bottom: 0;
    flex: 1;
}

.mk-detail-head .mk-listing-menu {
    flex-shrink: 0;
}

.mk-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mk-tag {
    font-size: var(--mk-font-sm);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--mk-green-light);
    color: var(--mk-green);
}

.mk-detail-price {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--mk-green);
    margin-bottom: 18px;
}

.mk-detail-desc {
    color: var(--mk-muted);
    font-size: var(--mk-font-body);
    line-height: 1.65;
    margin-bottom: 24px;
}

.mk-contact-box {
    background: var(--mk-green-light);
    border-radius: 12px;
    padding: 16px;
    font-size: var(--mk-font-body);
    white-space: pre-line;
}

/* Wizard */
.mk-wizard {
    max-width: 780px;
    margin: 0 auto;
}

.mk-wizard-hero {
    text-align: center;
    margin-bottom: 32px;
    padding: 0 8px;
}

.mk-wizard-hero h1 {
    font-size: 2.125rem;
    margin: 0 0 10px;
    line-height: 1.25;
}

.mk-wizard-hero p {
    margin: 0;
    color: var(--mk-muted);
    font-size: var(--mk-font-body);
    line-height: 1.55;
    max-width: 36ch;
    margin-inline: auto;
}

.mk-timeline {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
    padding: 0 4px;
}

.mk-timeline::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: var(--mk-border);
    z-index: 0;
}

.mk-timeline-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 112px;
}

.mk-timeline-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--mk-surface);
    border: 2px solid var(--mk-border-strong);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--mk-font-sm);
    font-weight: 700;
    color: var(--mk-muted);
    transition: all .25s;
}

.mk-timeline-step.is-active .mk-timeline-dot {
    border-color: var(--mk-orange);
    background: var(--mk-orange);
    color: #fff;
    box-shadow: 0 0 0 4px var(--mk-orange-light);
}

.mk-timeline-step.is-done .mk-timeline-dot {
    border-color: var(--mk-green);
    background: var(--mk-green);
    color: #fff;
}

.mk-timeline-label {
    display: block;
    font-size: var(--mk-font-sm);
    font-weight: 700;
    color: var(--mk-muted);
    line-height: 1.25;
}

.mk-timeline-step.is-active .mk-timeline-label { color: var(--mk-orange); }
.mk-timeline-step.is-done .mk-timeline-label { color: var(--mk-green); }

.mk-wizard-card {
    background: var(--mk-surface);
    border-radius: calc(var(--mk-radius) + 2px);
    padding: 32px 34px 28px;
    border: 1px solid var(--mk-border-strong);
    box-shadow: var(--mk-shadow);
}

.mk-wizard-panel { display: none; }
.mk-wizard-panel.is-active { display: block; }

.mk-wizard-panel h2 {
    font-size: 1.625rem;
    margin: 0 0 10px;
    line-height: 1.3;
    color: var(--mk-text);
}

.mk-wizard-panel .mk-hint {
    color: var(--mk-muted);
    font-size: var(--mk-font-body);
    line-height: 1.6;
    margin: 0 0 24px;
    padding: 14px 16px;
    background: var(--mk-bg);
    border: 1px solid var(--mk-border);
    border-left: 4px solid var(--mk-green);
    border-radius: 12px;
}

.mk-field {
    margin-bottom: 24px;
}

.mk-field > label:not(.mk-upload-zone) {
    display: block;
    font-size: var(--mk-font-label);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--mk-text);
    line-height: 1.35;
}

.mk-field label .req {
    color: #c0392b;
    font-weight: 800;
}

.mk-field label small,
.mk-field > label:not(.mk-upload-zone) small {
    font-size: var(--mk-font-sm);
    font-weight: 600;
    color: var(--mk-muted);
}

.mk-field-help {
    margin: -4px 0 10px;
    font-size: var(--mk-font-sm);
    color: var(--mk-muted);
    line-height: 1.5;
}

.mk-field input,
.mk-field select,
.mk-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--mk-border-strong);
    border-radius: 12px;
    font: inherit;
    font-size: var(--mk-font-body);
    color: var(--mk-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.mk-field input,
.mk-field select {
    min-height: var(--mk-control-h);
}

.mk-field textarea {
    min-height: 7.5rem;
    line-height: 1.55;
    resize: vertical;
}

.mk-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233d5248' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 42px;
    cursor: pointer;
}

.mk-field input::placeholder,
.mk-field textarea::placeholder {
    color: #7a8f84;
    opacity: 1;
}

.mk-field input:focus,
.mk-field select:focus,
.mk-field textarea:focus {
    outline: none;
    border-color: var(--mk-green);
    box-shadow: 0 0 0 4px var(--mk-green-light);
    background: #fff;
}

.mk-field input:invalid:not(:placeholder-shown):not(:focus),
.mk-field textarea:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #e0a8a8;
}

.mk-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 560px) {
    .mk-field-row { grid-template-columns: 1fr; }
}

.mk-upload-zone {
    display: block;
    border: 2px dashed var(--mk-border-strong);
    border-radius: 14px;
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
    background: var(--mk-bg);
    transition: border-color .2s, background .2s, box-shadow .2s;
    margin-top: 4px;
}

.mk-upload-zone > div {
    font-size: var(--mk-font-body);
    font-weight: 700;
    color: var(--mk-text);
    line-height: 1.45;
    margin-bottom: 6px;
}

.mk-upload-zone:hover,
.mk-upload-zone.is-uploaded {
    border-color: var(--mk-green);
    background: var(--mk-green-light);
    box-shadow: 0 0 0 4px rgba(13, 122, 74, 0.08);
}

.mk-upload-zone input { display: none; }

.mk-upload-preview {
    margin-top: 14px;
    max-height: 200px;
    border-radius: 12px;
    object-fit: contain;
}

.mk-upload-status {
    display: inline-block;
    margin-top: 10px;
    font-size: var(--mk-font-sm);
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 24px;
}

.mk-upload-status.pending { background: #eee; color: #666; }
.mk-upload-status.uploading { background: #fff3cd; color: #856404; }
.mk-upload-status.done { background: var(--mk-green-light); color: var(--mk-green); }
.mk-upload-status.error { background: #fde8e8; color: #c0392b; }

.mk-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.mk-gallery-thumbs img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--mk-border-strong);
}

.mk-review-list {
    list-style: none;
    padding: 4px 0 0;
    margin: 0;
    background: var(--mk-bg);
    border: 1px solid var(--mk-border);
    border-radius: 12px;
    overflow: hidden;
}

.mk-review-list li {
    padding: 16px 18px;
    border-bottom: 1px solid var(--mk-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    font-size: var(--mk-font-body);
    line-height: 1.5;
}

.mk-review-list li:last-child {
    border-bottom: none;
}

.mk-review-list li strong {
    color: var(--mk-muted);
    font-weight: 700;
    flex-shrink: 0;
    min-width: 38%;
    max-width: 42%;
}

.mk-review-list li span,
.mk-review-list li em {
    color: var(--mk-text);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.mk-wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--mk-border-strong);
}

.mk-wizard-nav .mk-btn {
    flex: 1;
    max-width: 220px;
}

.mk-wizard-nav .mk-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mk-alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: var(--mk-font-body);
    line-height: 1.55;
    margin-bottom: 20px;
}

.mk-alert-error {
    background: #fde8e8;
    color: #922b21;
    border: 1px solid #f5b7b1;
}

.mk-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.mk-modal-overlay.is-open { display: flex; }

.mk-modal {
    background: var(--mk-surface);
    border-radius: var(--mk-radius);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.mk-modal h3 {
    margin: 12px 0 8px;
    font-size: 1.5rem;
}

.mk-modal p {
    color: var(--mk-muted);
    font-size: var(--mk-font-body);
    line-height: 1.55;
    margin: 0 0 20px;
}

@media (max-width: 640px) {
    .mk-wizard-card {
        padding: 24px 18px 20px;
    }

    .mk-wizard-hero h1 {
        font-size: 1.75rem;
    }

    .mk-wizard-panel h2 {
        font-size: 1.4rem;
    }

    .mk-timeline-label {
        font-size: var(--mk-font-xs);
    }

    .mk-wizard-nav {
        flex-direction: column-reverse;
    }

    .mk-wizard-nav .mk-btn {
        max-width: none;
        width: 100%;
    }

    .mk-review-list li {
        flex-direction: column;
        gap: 6px;
    }

    .mk-review-list li strong {
        min-width: 0;
        max-width: none;
    }

    .mk-review-list li span,
    .mk-review-list li em {
        text-align: left;
    }
}

.mk-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

