/* Marketplace + shop profile pages (marketplace.php, shop.php). Loaded after pages.css. */
.mk-sec { padding: 40px 0; }
.mk-sec + .mk-sec { padding-top: 0; }
.mk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.mk-head h2 { margin: 0; font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.mk-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.mk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 700 14px 'Montserrat', sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.mk-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.mk-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.mk-btn-primary:hover { background: var(--brand-dark); color: #fff; }
.mk-btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.mk-btn-wa:hover { background: #1ebe5b; color: #fff; border-color: #1ebe5b; }
.mk-btn-sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 10px; }

/* hero */
.mk-hero { color: #fff; background: radial-gradient(80% 120% at 100% 0%, #1fa83c 0%, transparent 55%), linear-gradient(135deg, #008a00, #004f00); }
.mk-hero .wrap { padding: 44px 0 40px; display: grid; gap: 22px; }
.mk-hero h1 { margin: 0; font-size: clamp(28px, 4.6vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.mk-hero h1 em { font-style: normal; color: var(--yellow); }
.mk-hero p { margin: 10px 0 0; max-width: 560px; font-size: 16px; color: rgba(255,255,255,.86); }
.mk-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.mk-hero-stats span { padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 13px; font-weight: 600; }
.mk-hero-stats b { font-size: 18px; font-weight: 800; margin-right: 4px; }
.mk-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.mk-hero .mk-btn { border-color: transparent; }
.mk-hero .mk-btn-light { background: #fff; color: var(--brand-dark); }
.mk-hero .mk-btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
.mk-hero .mk-btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }

/* filter bar */
.mk-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.mk-filter input, .mk-filter select { height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 0 14px; font: 600 14px 'Montserrat', sans-serif; color: var(--ink); outline: none; min-width: 0; }
.mk-filter input { flex: 1 1 260px; }
.mk-filter select { flex: 1 1 160px; max-width: 240px; min-width: 140px; }
@media (max-width: 560px) { .mk-filter select { max-width: none; flex-basis: calc(50% - 5px); } }
.mk-filter input:focus, .mk-filter select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,138,0,.1); }

/* shop cards */
.mk-shops { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.mk-shop { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.mk-shop:hover { transform: translateY(-2px); border-color: #cfe5cf; box-shadow: var(--shadow); }
.mk-shop-cover { height: 84px; background: linear-gradient(135deg, #e7f6e7, #c9ebc9); background-size: cover; background-position: center; }
.mk-shop-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mk-logo { width: 64px; height: 64px; border-radius: 16px; background: #fff; border: 3px solid #fff; box-shadow: 0 4px 14px -6px rgba(15,23,42,.35); overflow: hidden; display: grid; place-items: center; font-weight: 800; font-size: 22px; color: var(--brand-dark); flex-shrink: 0; }
.mk-logo img { width: 100%; height: 100%; object-fit: cover; }
.mk-shop .mk-logo { margin-top: -32px; }
.mk-shop h3 { margin: 4px 0 0; font-size: 16px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.mk-shop h3 .fa-circle-check, .mk-verified { color: #1d9bf0; }
.mk-shop p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-shop-meta { margin-top: auto; padding-top: 8px; display: flex; gap: 12px; font-size: 12px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.mk-shop-meta i { color: var(--brand); margin-right: 4px; }

/* product cards */
.mk-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
@media (min-width: 640px) { .mk-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; } }
.mk-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.mk-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mk-card-link { position: absolute; inset: 0; z-index: 1; }
.mk-card-img { position: relative; aspect-ratio: 1; background: var(--soft); overflow: hidden; }
.pg .mk-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.mk-card-img .mk-tag { z-index: 1; }
.mk-card.is-out .mk-card-img img { opacity: .5; }
.mk-tag { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 99px; background: #0f172a; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.mk-tag-hot { background: #ef4444; }
.mk-tag-out { left: auto; right: 10px; background: #64748b; }
.mk-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mk-card-shop { position: relative; z-index: 2; font-size: 11.5px; font-weight: 700; color: var(--brand-dark); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-card-shop:hover { text-decoration: underline; }
.mk-card h3 { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-price { margin: auto 0 0; padding-top: 6px; font-size: 15px; font-weight: 800; color: var(--ink); }
.mk-price s { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 4px; }

.mk-empty { padding: 40px 20px; text-align: center; border: 1.5px dashed var(--line); border-radius: 18px; color: var(--muted); }
.mk-empty i { font-size: 28px; color: #cbd5e1; display: block; margin-bottom: 10px; }
.mk-more { display: flex; justify-content: center; margin-top: 22px; }

/* seller call-to-action */
.mk-cta { border-radius: 24px; padding: 30px 24px; background: var(--brand-soft); border: 1px solid #cfe8cf; display: grid; gap: 16px; align-items: center; }
.mk-cta h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); }
.mk-cta p { margin: 6px 0 0; font-size: 14px; color: var(--body); }
@media (min-width: 760px) { .mk-cta { grid-template-columns: 1fr auto; padding: 34px 36px; } }

/* shop profile */
.sp-cover { height: clamp(140px, 24vw, 260px); background: linear-gradient(135deg, #008a00, #004f00); background-size: cover; background-position: center; }
.sp-cover.is-plain { height: clamp(110px, 14vw, 150px); background: radial-gradient(80% 140% at 100% 0%, #1fa83c 0%, transparent 55%), linear-gradient(135deg, #008a00, #004f00); }
.sp-top { position: relative; display: grid; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.sp-id { display: flex; gap: 16px; align-items: flex-end; margin-top: -48px; }
.sp-id > div:last-child { padding-top: 58px; }
.sp-id .mk-logo { width: 104px; height: 104px; border-radius: 24px; border-width: 4px; font-size: 34px; }
.sp-id h1 { margin: 0 0 4px; font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.15; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-id h1 .mk-verified { font-size: .7em; }
.sp-tagline { margin: 0; font-size: 14.5px; color: var(--muted); font-weight: 600; }
.sp-facts { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--body); }
.sp-facts i { color: var(--brand); margin-right: 5px; }
.sp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-about { display: grid; gap: 18px; padding: 24px 0 8px; }
.sp-about p { margin: 0; white-space: pre-line; font-size: 14.5px; }
.sp-social { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-social a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--ink); text-decoration: none; font-size: 16px; border: 1px solid var(--line); }
.sp-social a:hover { background: var(--brand-soft); color: var(--brand-dark); border-color: #cfe5cf; }
.sp-notice { margin: 18px 0 0; padding: 12px 16px; border-radius: 14px; background: #fffaeb; border: 1px solid #fde9a8; color: #7a5a00; font-size: 13.5px; font-weight: 600; }
@media (min-width: 900px) {
    .sp-top { grid-template-columns: 1fr auto; align-items: end; }
    .sp-about { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .sp-id { flex-direction: column; align-items: flex-start; margin-top: -44px; gap: 10px; }
    .sp-id .mk-logo { width: 88px; height: 88px; }
    .sp-id > div:last-child { padding-top: 0; }
    .sp-actions .mk-btn { flex: 1 1 auto; }
}

/* share sheet */
.sh-back { position: fixed; inset: 0; z-index: 300; background: rgba(15,23,42,.45); display: none; align-items: flex-end; justify-content: center; padding: 16px; }
.sh-back.open { display: flex; }
.sh { width: min(440px, 100%); background: #fff; border-radius: 22px; padding: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
@media (min-width: 600px) { .sh-back { align-items: center; } }
.sh h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--ink); }
.sh > p { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.sh-link { display: flex; gap: 8px; margin-bottom: 14px; }
.sh-link input { flex: 1; min-width: 0; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; font: 600 13px 'Montserrat', sans-serif; color: var(--ink); background: var(--soft); }
.sh-nets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sh-nets a, .sh-nets button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font: 700 11.5px 'Montserrat', sans-serif; cursor: pointer; }
.sh-nets i { font-size: 20px; }
.sh-nets a:hover, .sh-nets button:hover { background: var(--soft); }
.sh-close { margin-top: 14px; width: 100%; }

/* order on WhatsApp (product cards) */
.mk-wa { position: relative; z-index: 2; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px; border-radius: 10px; background: #25d366; color: #fff; font: 700 12.5px 'Montserrat', sans-serif; text-decoration: none; transition: background .15s; }
.mk-wa:hover { background: #1ebe5b; color: #fff; }
.mk-wa i { font-size: 15px; }
.mk-price { margin-top: auto; }

/* paid featured shops */
.mk-feat { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: #ffbf00; color: #3b2f00; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 6px 14px -8px rgba(0,0,0,.4); }

/* ── 2026-11 refinements ── */
.mk-hero-search { position: relative; display: flex; gap: 8px; max-width: 640px; background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 18px 40px -20px rgba(0,0,0,.45); }
.mk-hero-search i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.mk-hero-search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; padding: 0 10px 0 40px; font: 600 15px 'Montserrat', sans-serif; color: var(--ink); background: transparent; }
.mk-hero-search .mk-btn { background: var(--brand); color: #fff; }
.mk-hero-search .mk-btn:hover { background: var(--brand-dark); color: #fff; }
.mk-hero-stats a { padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 13px; font-weight: 600; color: #fff; text-decoration: none; transition: background .15s; }
.mk-hero-stats a:hover { background: rgba(255,255,255,.22); }
.mk-hero-stats a.is-hot { background: #ffbf00; border-color: #ffbf00; color: #3b2f00; }
.mk-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); }
.mk-trust i { color: var(--yellow); margin-right: 6px; }

.mk-deals { padding-bottom: 8px; }
.mk-deals h2 i { color: #ef4444; }
.mk-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 220px); gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.mk-row > .mk-card { scroll-snap-align: start; }

.mk-filter-shop { margin: 0; flex: 0 1 340px; }
.mk-filter-shop input { width: 100%; }
.mk-search { position: relative; flex: 1 1 260px; display: flex; }
.mk-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 14px; pointer-events: none; }
.mk-filter .mk-search input { flex: 1; padding-left: 38px; }
.mk-filter select { cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center; }
.mk-toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-toggle { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: 700 13px 'Montserrat', sans-serif; color: var(--body); cursor: pointer; user-select: none; }
.mk-filter .mk-toggle input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; padding: 0; border: 0; flex: none; box-shadow: none; }
.mk-toggle i { color: var(--muted); font-size: 12px; }
.mk-toggle:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.mk-toggle:has(input:checked) i { color: var(--brand); }
.mk-toggle:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(0,138,0,.2); }

.mk-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 6px; margin: -6px 0 16px; scrollbar-width: none; }
.mk-chips::-webkit-scrollbar { display: none; }
.mk-chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--body); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.mk-chips a span { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 99px; padding: 1px 7px; }
.mk-chips a:hover { border-color: var(--brand); color: var(--brand-dark); }
.mk-chips a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.mk-chips a.on span { background: rgba(255,255,255,.2); color: #fff; }

.mk-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -4px 0 16px; }
.mk-pills a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; background: var(--brand-soft); border: 1px solid #cfe8cf; color: var(--brand-dark); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.mk-pills a:hover { border-color: var(--brand); }
.mk-pills a.mk-pills-clear { background: none; border-color: transparent; color: var(--muted); text-decoration: underline; }

.mk-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 26px; }
.mk-pager .mk-btn { min-width: 40px; padding: 0 12px; }
.mk-gap { color: var(--muted); font-weight: 700; padding: 0 2px; }

.mk-save { margin: 0; font-size: 12px; font-weight: 700; color: #b91c1c; }
.mk-low { margin: 0; font-size: 11.5px; font-weight: 700; color: #b45309; }
.mk-low i { margin-right: 3px; }

.mk-shop.is-main { border-color: #cfe8cf; }
.mk-shop.is-main .mk-shop-cover { background: radial-gradient(80% 140% at 100% 0%, #1fa83c 0%, transparent 55%), linear-gradient(135deg, #008a00, #004f00); }
.mk-shop.is-main .mk-logo img { object-fit: contain; padding: 6px; }
.mk-feat-main { background: #fff; color: var(--brand-dark); box-shadow: 0 4px 12px -6px rgba(0,0,0,.4); }
.mk-shop.is-new .mk-shop-cover { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); }
.mk-soon { color: #64748b; }
.mk-soon i { color: #94a3b8 !important; }
.mk-shop-go { margin-top: 10px; font-size: 12.5px; font-weight: 800; color: var(--brand-dark); }
.mk-shop-go i { font-size: 11px; margin-left: 4px; transition: transform .15s; }
.mk-shop:hover .mk-shop-go i { transform: translateX(3px); }
.mk-empty a { color: var(--brand-dark); font-weight: 700; }

.mk-steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; font-weight: 700; color: var(--ink); }
.mk-steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11.5px; }

@media (max-width: 560px) {
    .mk-hero-search .mk-btn { padding: 0 14px; }
    .mk-toggles { flex-basis: 100%; }
    .mk-toggle { flex: 1; justify-content: center; }
    .mk-filter-shop { flex-basis: 100%; }
    .mk-row { grid-auto-columns: 46%; }
    .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .mk-card-body { padding: 10px 10px 12px; }
    .mk-wa { font-size: 11.5px; gap: 5px; }
}
