/* ==========================================================
   MARKETPLACE (γύρος 75) — αγγελίες τύπου car.gr / xe.gr
   Mobile first · ανοιχτό θέμα με σκούρο από το σύστημα · χωρίς inline styles.
   ========================================================== */
.mk {
  --mk-bg: #f4f6fb; --mk-card: #ffffff; --mk-line: #e3e7ef; --mk-text: #172033; --mk-muted: #667085;
  --mk-accent: #ff6a13; --mk-accent-2: #1463ff; --mk-ok: #16a34a; --mk-err: #dc2626; --mk-hl: #fff6e5; --mk-radius: 14px;
  --mk-shadow: 0 6px 24px rgba(16, 24, 40, .07);
  margin: 0; background: var(--mk-bg); color: var(--mk-text); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.5;
  min-height: 100vh; display: flex; flex-direction: column;
}
@media (prefers-color-scheme: dark) {
  .mk { --mk-bg: #0e131d; --mk-card: #161d2b; --mk-line: #26324a; --mk-text: #e8edf6; --mk-muted: #98a2b3; --mk-hl: #2a2111; --mk-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
}
.mk a { color: inherit; }
.mk img { max-width: 100%; }
.mk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mk-small { color: var(--mk-muted); font-size: 13px; }
.mk-h1 { font-size: 24px; margin: 6px 0 14px; }

/* ---------- κεφαλίδα ---------- */
.mk-top { background: var(--mk-card); border-bottom: 1px solid var(--mk-line); position: sticky; top: 0; z-index: 30; }
.mk-top-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand links" "search search"; gap: 10px; align-items: center; }
.mk-brand { grid-area: brand; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; text-decoration: none; color: var(--mk-text); }
.mk-brand i { color: var(--mk-accent); font-size: 22px; }
.mk-top-search { grid-area: search; display: flex; }
.mk-top-search input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--mk-line); border-right: 0; border-radius: 10px 0 0 10px; padding: 0 12px; background: var(--mk-bg); color: var(--mk-text); font-size: 15px; }
.mk-top-search button { width: 48px; border: 0; border-radius: 0 10px 10px 0; background: var(--mk-accent); color: #fff; font-size: 16px; cursor: pointer; }
.mk-top-links { grid-area: links; display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.mk-top-links a { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; }
.mk-top-links a:hover { background: var(--mk-bg); }
.mk-btn-new { background: var(--mk-accent); color: #fff !important; }
.mk-btn-new:hover { filter: brightness(1.05); }
.mk-msgs { position: relative; }
.mk-dot { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--mk-err); color: #fff; font-size: 11px; align-items: center; justify-content: center; }
.mk-msgs .mk-dot { position: absolute; top: 2px; right: 0; }
.mk-lang { font-size: 12px !important; border: 1px solid var(--mk-line); }
.mk-hide-sm { display: none; }
/* γύρος 79: με το «Αρχική» η μπάρα χωράει και στα 360–420px */
@media (max-width: 420px) {
  .mk-top-in { gap: 8px; }
  .mk-brand { font-size: 16px; gap: 6px; }
  .mk-top-links { gap: 2px; }
  .mk-top-links a { padding: 0 7px; }
}
@media (min-width: 760px) {
  .mk-top-in { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search links"; gap: 18px; }
  .mk-hide-sm { display: inline; }
}

/* ---------- γενικά ---------- */
.mk-main { max-width: 1240px; width: 100%; margin: 0 auto; padding: 14px 16px 40px; flex: 1; box-sizing: border-box; }
.mk-foot { border-top: 1px solid var(--mk-line); padding: 18px 16px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; color: var(--mk-muted); font-size: 13px; }
.mk-note { padding: 12px 14px; border-radius: 10px; margin: 0 0 14px; font-weight: 600; background: #e8f0ff; color: #173c8c; }
.mk-note.ok { background: #e7f8ee; color: #11683a; }
.mk-note.err { background: #fdecec; color: #9b1c1c; }
@media (prefers-color-scheme: dark) { .mk-note { background: #16264a; color: #cfe0ff; } .mk-note.ok { background: #103322; color: #b7f0cf; } .mk-note.err { background: #3a1616; color: #ffc9c9; } }
.mk-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--mk-muted); margin-bottom: 12px; }
.mk-crumbs a { text-decoration: none; }
.mk-crumbs a:hover { color: var(--mk-accent); }
.mk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--mk-accent-2);
          color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.mk-btn:hover { filter: brightness(1.07); }
.mk-btn:disabled { opacity: .45; cursor: not-allowed; }
.mk-btn.ghost { background: transparent; color: var(--mk-text); border: 1px solid var(--mk-line); }
.mk-btn.danger { background: transparent; color: var(--mk-err); border: 1px solid rgba(220, 38, 38, .35); }
.mk-btn.promo { background: linear-gradient(135deg, #ff9a13, #ff4d13); }
.mk-btn.big { min-height: 50px; font-size: 16px; padding: 0 22px; }
.mk-btn.wide { width: 100%; }
.mk-btn.sm { min-height: 36px; padding: 0 10px; font-size: 13px; }
.mk-link { color: var(--mk-muted); font-size: 14px; }
.mk-box { background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--mk-shadow); }
.mk-box h2 { font-size: 17px; margin: 0 0 12px; }
.mk-empty { text-align: center; padding: 50px 16px; color: var(--mk-muted); }
.mk-empty i { font-size: 42px; margin-bottom: 10px; opacity: .6; }

/* ---------- αρχική ---------- */
.mk-hero { background: linear-gradient(135deg, #1f3b8f, #1463ff 55%, #ff6a13); color: #fff; border-radius: 18px; padding: 26px 18px; margin-bottom: 18px; }
.mk-hero h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
.mk-hero p { margin: 0 0 16px; opacity: .92; }
.mk-hero-form { display: grid; gap: 8px; grid-template-columns: 1fr; }
.mk-hero-form input, .mk-hero-form select { height: 48px; border: 0; border-radius: 10px; padding: 0 12px; font-size: 15px; background: #fff; color: #172033; min-width: 0; }
.mk-hero-form button { height: 48px; border: 0; border-radius: 10px; background: var(--mk-accent); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; }
@media (min-width: 760px) {
  .mk-hero { padding: 40px 34px; }
  .mk-hero h1 { font-size: 34px; }
  .mk-hero-form { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
  .mk-hero-form button { padding: 0 24px; }
}
.mk-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-bottom: 22px; }
.mk-cat { background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 14px 8px; text-align: center; text-decoration: none;
          display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .15s, border-color .15s; }
.mk-cat:hover { transform: translateY(-2px); border-color: var(--mk-accent); }
.mk-cat i { font-size: 24px; color: var(--mk-accent-2); }
.mk-cat span { font-weight: 700; font-size: 13px; line-height: 1.25; }
.mk-cat small { color: var(--mk-muted); font-size: 12px; }
.mk-block { margin-bottom: 24px; }
.mk-block h2 { font-size: 19px; margin: 0 0 12px; }
.mk-block h2 .fa-star { color: #f5a300; }
.mk-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mk-block-head a { color: var(--mk-accent-2); text-decoration: none; font-weight: 600; font-size: 14px; }

/* ---------- κάρτες ---------- */
.mk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .mk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1020px) { .mk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mk-card { position: relative; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--mk-shadow); }
.mk-card.is-hl { border: 2px solid #f5a300; background: var(--mk-hl); }
.mk-card-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--mk-bg); }
.mk-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-badge { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; background: #f5a300; }
.mk-badge.sold { left: auto; right: 8px; background: #111827; }
.mk-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.mk-card-title { font-weight: 700; text-decoration: none; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mk-card-title:hover { color: var(--mk-accent-2); }
.mk-card-price { font-weight: 800; font-size: 17px; color: var(--mk-accent); }
.mk-card-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--mk-muted); font-size: 12px; }
.mk-fav { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #98a2b3; cursor: pointer; font-size: 15px; }
.mk-fav.on { color: #e11d48; }
.mk-fav.big { position: static; width: auto; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--mk-line); background: transparent; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--mk-text); }
.mk-fav.big.on i { color: #e11d48; }

/* ---------- αποτελέσματα ---------- */
.mk-results { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .mk-results { grid-template-columns: 270px minmax(0, 1fr); align-items: start; } .mk-filters { position: sticky; top: 76px; } }
.mk-filters details { background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 12px 14px; }
.mk-filters summary { font-weight: 800; cursor: pointer; min-height: 30px; }
.mk-filter-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.mk-filter-form label, .mk-range { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.mk-range { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mk-range span { grid-column: 1 / -1; }
.mk input:not([type=checkbox]):not([type=radio]):not([type=file]), .mk select, .mk textarea {
  height: 42px; border: 1px solid var(--mk-line); border-radius: 10px; padding: 0 10px; background: var(--mk-card); color: var(--mk-text); font-size: 15px; width: 100%; box-sizing: border-box; min-width: 0; }
.mk textarea { height: auto; padding: 10px; font-family: inherit; resize: vertical; }
.mk input:focus, .mk select:focus, .mk textarea:focus { outline: 2px solid rgba(20, 99, 255, .35); border-color: var(--mk-accent-2); }
.mk-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mk-list-head h1 { font-size: 20px; margin: 0; overflow-wrap: anywhere; }
.mk-list-head small { color: var(--mk-muted); font-weight: 500; font-size: 13px; }
.mk-sort label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.mk-sort select { width: auto; }
.mk-pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.mk-pager a, .mk-pager span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--mk-line); text-decoration: none; background: var(--mk-card); }
.mk-pager .on { background: var(--mk-accent-2); color: #fff; border-color: var(--mk-accent-2); }

/* ---------- αγγελία ---------- */
.mk-item { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-bottom: 16px; }
@media (min-width: 900px) { .mk-item { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.mk-gallery-main { position: relative; background: #0b1020; border-radius: var(--mk-radius); overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.mk-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.mk-gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #111; cursor: pointer; }
.mk-gal-nav.prev { left: 10px; } .mk-gal-nav.next { right: 10px; }
.mk-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; }
.mk-thumbs button { flex: 0 0 72px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.mk-thumbs button.on { border-color: var(--mk-accent); }
.mk-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.mk-item-side { display: flex; flex-direction: column; gap: 12px; }
.mk-item-head, .mk-seller, .mk-owner { background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 16px; box-shadow: var(--mk-shadow); }
.mk-item-head h1 { font-size: 22px; margin: 0 0 6px; line-height: 1.25; overflow-wrap: anywhere; }
.mk-item-price { font-size: 28px; font-weight: 900; color: var(--mk-accent); margin-bottom: 8px; }
.mk-item-price small { font-size: 13px; color: var(--mk-muted); font-weight: 600; }
.mk-item-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--mk-muted); font-size: 13px; margin-bottom: 10px; }
.mk-seller { display: flex; gap: 12px; align-items: center; }
.mk-seller div { display: flex; flex-direction: column; min-width: 0; }
.mk-seller small { color: var(--mk-muted); }
.mk-seller a { color: var(--mk-accent-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.mk-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.mk-owner { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-owner form { margin: 0; }
.mk-attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.mk-attrs div { background: var(--mk-bg); border-radius: 10px; padding: 10px 12px; }
.mk-attrs dt { font-size: 12px; color: var(--mk-muted); }
.mk-attrs dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.mk-desc { overflow-wrap: anywhere; }
.mk-desc a { color: var(--mk-accent-2); }
.mk-form-inline { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.mk-report { margin-bottom: 16px; color: var(--mk-muted); }
.mk-report summary { cursor: pointer; min-height: 32px; }
.mk-report form { display: flex; flex-direction: column; gap: 8px; max-width: 420px; margin-top: 8px; }
.mk-report label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }

/* ---------- φόρμα ---------- */
.mk-form { max-width: 820px; margin: 0 auto; }
.mk-form h1 { font-size: 24px; margin: 0 0 12px; }
.mk-form label { display: block; font-weight: 700; font-size: 13px; margin: 10px 0 5px; }
.mk-form-grid { display: grid; gap: 0 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .mk-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mk-check { display: flex !important; gap: 8px; align-items: center; font-weight: 600 !important; }
.mk-check input { width: 20px; height: 20px; }
.mk-photo-edit, .mk-photo-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.mk-photo-edit label { margin: 0; font-weight: 500; font-size: 12px; }
.mk-photo-edit img, .mk-photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.mk-photo-edit span { display: flex; gap: 4px; align-items: center; margin-top: 4px; }
.mk-form-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ---------- ο λογαριασμός μου ---------- */
.mk-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.mk-tabs a { flex: 0 0 auto; display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--mk-line); background: var(--mk-card); text-decoration: none; font-weight: 600; font-size: 14px; }
.mk-tabs a.on { background: var(--mk-accent-2); color: #fff; border-color: var(--mk-accent-2); }
.mk-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mk-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 10px; }
.mk-row.is-hl { border: 2px solid #f5a300; }
.mk-row-img img { width: 92px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.mk-row-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mk-row-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mk-row-actions form { margin: 0; }
@media (min-width: 760px) { .mk-row { grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; } .mk-row-img img { width: 120px; height: 90px; } .mk-row-actions { grid-column: auto; } }
.mk-state { display: inline-block; padding: 1px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; background: var(--mk-bg); }
.st-active, .pay-completed { background: #dcfce7; color: #166534; }
.st-pending, .pay-created { background: #fef9c3; color: #854d0e; }
.st-rejected, .st-expired, .pay-failed, .pay-cancelled { background: #fee2e2; color: #991b1b; }
.st-sold { background: #e5e7eb; color: #111827; }
.st-top { background: #fff1c2; color: #8a5a00; }
.mk-table-wrap { overflow-x: auto; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); }
.mk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mk-table th, .mk-table td { padding: 10px 12px; border-bottom: 1px solid var(--mk-line); text-align: left; white-space: nowrap; }
.mk-msgs-wrap { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .mk-msgs-wrap { grid-template-columns: 320px minmax(0, 1fr); } }
.mk-convs { list-style: none; margin: 0; padding: 0; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); overflow: hidden; }
.mk-convs li { border-bottom: 1px solid var(--mk-line); }
.mk-convs li.mk-small { padding: 14px; }
.mk-convs a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; text-decoration: none; }
.mk-convs li.on a { background: var(--mk-bg); }
.mk-convs li.unread b { color: var(--mk-accent-2); }
.mk-convs small, .mk-convs span { color: var(--mk-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-thread { background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 14px; }
.mk-thread h2 { font-size: 16px; margin: 0 0 12px; overflow-wrap: anywhere; }
.mk-bubbles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 60vh; overflow-y: auto; }
.mk-bubble { align-self: flex-start; max-width: 85%; background: var(--mk-bg); border-radius: 14px 14px 14px 4px; padding: 8px 12px; overflow-wrap: anywhere; }
.mk-bubble.me { align-self: flex-end; background: var(--mk-accent-2); color: #fff; border-radius: 14px 14px 4px 14px; }
.mk-bubble p { margin: 0; }
.mk-bubble small { opacity: .7; font-size: 11px; }
.mk-bubble.me a { color: #fff; }

/* ---------- προβολή ---------- */
.mk-packages { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.mk-package { background: var(--mk-card); border: 2px solid var(--mk-line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 8px; text-align: center; align-items: center; margin: 0; }
.mk-package.k-top { border-color: #f5a300; }
.mk-package-ico { font-size: 30px; color: var(--mk-accent); }
.mk-package h2 { margin: 0; font-size: 18px; }
.mk-package p { margin: 0; color: var(--mk-muted); font-size: 13px; }
.mk-package-price { font-size: 30px; font-weight: 900; margin: 6px 0; }
