/* =====================================================================
   Crypto Corner Shop — marketplace grid (/shop)
   Scoped to .ccs-market so nothing leaks into the navbar, footer or the
   product page.
   ===================================================================== */

.ccs-market {
    --m-gold: #EBA71A;
    --m-gold-soft: #FFF6E3;
    --m-green: #2F4238;
    --m-green-soft: #EEF3F0;
    --m-ink: #1D2A24;
    --m-muted: #6C7A73;
    --m-line: #E7ECE9;
    --m-card: #FFFFFF;
    --m-bg: #F7F9F8;
    --m-radius: 16px;
    --m-shadow: 0 1px 2px rgba(29,42,36,.04), 0 10px 26px rgba(29,42,36,.06);
    --m-shadow-hi: 0 6px 14px rgba(29,42,36,.08), 0 22px 44px rgba(29,42,36,.10);

    background: var(--m-bg);
    color: var(--m-ink);
    font-family: 'Open Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
}
.ccs-market h1, .ccs-market h2, .ccs-market h3,
.ccs-market h4, .ccs-market h5, .ccs-market h6 {
    font-family: 'Raleway', 'Open Sans', sans-serif;
    color: var(--m-green); font-weight: 800; letter-spacing: -.01em;
}
.ccs-market a { text-decoration: none; }
.ccs-market .min-w-0 { min-width: 0; }
.ccs-market .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- Hero */
.mk-hero { background: #fff; border-bottom: 1px solid var(--m-line); padding: 36px 0 30px; }
.mk-kicker {
    display: inline-flex; align-items: center; gap: 8px; color: #C2900F;
    font-size: .74rem; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; margin-bottom: 10px;
}
.mk-kicker::after { content: ""; width: 26px; height: 2px; background: var(--m-gold); border-radius: 2px; }
.mk-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; margin-bottom: 8px; }
.mk-hero p { color: var(--m-muted); font-size: .94rem; margin: 0; max-width: 560px; }

.mk-searchbar {
    background: #fff; border: 1px solid var(--m-line); border-radius: 999px;
    padding: 5px 5px 5px 18px; display: flex; align-items: center; gap: 10px;
    width: 100%; transition: border-color .18s ease, box-shadow .18s ease;
}
.mk-searchbar:focus-within { border-color: var(--m-gold); box-shadow: 0 0 0 3px rgba(235,167,26,.12); }
.mk-searchbar input {
    border: 0; outline: 0; flex: 1; min-width: 0; padding: 10px 0;
    font-size: .93rem; background: transparent; color: var(--m-ink);
}
.mk-searchbar button {
    border: 0; background: var(--m-gold); color: #fff; border-radius: 999px;
    padding: 10px 22px; font-weight: 700; font-size: .88rem;
}
.mk-searchbar button:hover { background: #d4930f; }

.mk-facts { display: flex; flex-wrap: wrap; gap: 18px 30px; margin-top: 18px; }
.mk-fact .n { font-family: 'Raleway', sans-serif; font-size: 1.2rem; font-weight: 800; color: var(--m-green); line-height: 1; }
.mk-fact .l { font-size: .72rem; color: var(--m-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-top: 4px; }

/* ---------------------------------------------------------- Top sellers */
.mk-top { background: #fff; border-bottom: 1px solid var(--m-line); padding: 26px 0 30px; }
.mk-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.mk-sec-head h2 { font-size: 1.2rem; margin: 0; }
.mk-sec-head p { color: var(--m-muted); font-size: .84rem; margin: 4px 0 0; }

/* ------------------------------------------------------------- Buttons */
.mk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--m-gold, #EBA71A); color: #fff !important;
    border: 1px solid var(--m-gold, #EBA71A);
    padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: .86rem;
    transition: all .18s ease; white-space: nowrap;
}
.mk-btn:hover { background: #d4930f; border-color: #d4930f; color: #fff !important; }
.mk-btn.ghost { background: #fff; color: var(--m-green, #2F4238) !important; border-color: var(--m-line, #E7ECE9); }
.mk-btn.ghost:hover { border-color: var(--m-gold); background: var(--m-gold-soft); color: var(--m-green) !important; }
.mk-btn.sm { padding: 7px 12px; font-size: .79rem; border-radius: 9px; }
.mk-btn.block { width: 100%; }

/* ------------------------------------------------------------ Sidebar */
.mk-filters {
    background: var(--m-card); border: 1px solid var(--m-line);
    border-radius: var(--m-radius); padding: 18px; position: sticky; top: 16px;
}
.mk-fgroup { padding: 14px 0; border-bottom: 1px solid var(--m-line); }
.mk-fgroup:first-of-type { padding-top: 0; }
.mk-fgroup:last-child { border-bottom: 0; padding-bottom: 0; }
.mk-fgroup > h6 {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--m-muted); font-weight: 800; margin-bottom: 10px;
}
.mk-input, .mk-select {
    width: 100%; background: #fff; color: var(--m-ink); border: 1px solid var(--m-line);
    border-radius: 10px; padding: 9px 12px; font-size: .85rem; outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.mk-input:focus, .mk-select:focus { border-color: var(--m-gold); box-shadow: 0 0 0 3px rgba(235,167,26,.12); }
.mk-range { display: flex; align-items: center; gap: 8px; }
.mk-range .mk-input { text-align: center; }
.mk-range span { color: var(--m-muted); font-size: .8rem; }
.mk-check { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--m-ink); margin-bottom: 7px; cursor: pointer; }
.mk-check:last-child { margin-bottom: 0; }
.mk-radio { display: flex; align-items: center; gap: 8px; font-size: .84rem; margin-bottom: 6px; cursor: pointer; }

.mk-locbtn {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; margin-top: 8px; background: var(--m-green-soft); border: 1px solid var(--m-line);
    color: var(--m-green); font-size: .8rem; font-weight: 700; padding: 8px; border-radius: 9px;
}
.mk-locbtn:hover { border-color: var(--m-gold); background: var(--m-gold-soft); }
.mk-locbtn i { color: var(--m-gold); }

/* --------------------------------------------------------- Result bar */
.mk-resultbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.mk-count { font-size: .87rem; color: var(--m-muted); }
.mk-count strong { color: var(--m-ink); }

.mk-active { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mk-pill {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--m-gold-soft); color: #A9760A; border: 1px solid rgba(235,167,26,.35);
    font-size: .77rem; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
.mk-pill button { border: 0; background: none; color: inherit; padding: 0; line-height: 1; }

.mk-seg { display: inline-flex; background: var(--m-green-soft); border-radius: 10px; padding: 3px; gap: 2px; }
.mk-seg button {
    border: 0; background: transparent; color: var(--m-muted);
    padding: 7px 12px; border-radius: 8px; font-size: .82rem; font-weight: 700; transition: all .16s ease;
}
.mk-seg button.on { background: #fff; color: var(--m-green); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* --------------------------------------------------------------- Grid */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.mk-grid.list { grid-template-columns: 1fr; }

.mk-card {
    background: var(--m-card); border: 1px solid var(--m-line); border-radius: 14px;
    overflow: hidden; display: flex; flex-direction: column; height: 100%;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mk-card:hover { transform: translateY(-4px); box-shadow: var(--m-shadow-hi); border-color: #DCE4E0; }

.mk-img { position: relative; aspect-ratio: 1/1; background: var(--m-green-soft); overflow: hidden; display: block; }
.mk-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mk-card:hover .mk-img img { transform: scale(1.05); }

.mk-flag {
    position: absolute; font-size: .67rem; font-weight: 800; padding: 4px 8px;
    border-radius: 6px; letter-spacing: .03em; text-transform: uppercase; z-index: 2;
}
.mk-flag.sale { top: 9px; left: 9px; background: #E53935; color: #fff; }
.mk-flag.rank { top: 9px; left: 9px; background: var(--m-gold); color: #fff; }
.mk-flag.oos  { bottom: 9px; left: 9px; background: rgba(29,42,36,.85); color: #fff; }
.mk-flag.hot  { bottom: 9px; left: 9px; background: rgba(30,122,69,.9); color: #fff; }
.mk-coin {
    position: absolute; top: 9px; right: 9px; z-index: 2;
    background: rgba(255,255,255,.94); color: #A9760A; font-size: .67rem;
    font-weight: 800; padding: 4px 8px; border-radius: 6px; backdrop-filter: blur(4px);
}
.mk-coin small { display: block; font-size: .58rem; font-weight: 700; opacity: .75; }

.mk-body { padding: 12px 13px 13px; display: flex; flex-direction: column; flex: 1; }
.mk-cat { font-size: .68rem; color: var(--m-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 4px; }
.mk-name {
    font-size: .9rem; font-weight: 700; line-height: 1.35; margin: 0 0 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mk-name a { color: var(--m-green); }
.mk-card:hover .mk-name a { color: #C2900F; }
.mk-blurb {
    font-size: .78rem; color: var(--m-muted); line-height: 1.5; margin-bottom: 9px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.mk-store { display: flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--m-muted); margin-bottom: 8px; }
.mk-store a { color: var(--m-muted); }
.mk-store a:hover { color: #C2900F; }
.mk-store i { color: var(--m-gold); }
.mk-stars { color: var(--m-gold); font-size: .72rem; }

.mk-price { margin-top: auto; }
.mk-usd { font-size: 1.02rem; font-weight: 800; color: var(--m-green); font-family: 'Raleway', sans-serif; }
.mk-usd s { font-size: .78rem; font-weight: 600; color: var(--m-muted); margin-left: 6px; }
.mk-crypto { font-size: .73rem; color: #A9760A; font-weight: 700; margin-top: 2px; min-height: 1em; }

.mk-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 9px 0 0; }
.mk-tag {
    background: var(--m-green-soft); color: var(--m-muted);
    font-size: .66rem; font-weight: 700; padding: 3px 7px; border-radius: 5px;
}
.mk-tag.stock-low { background: #FDE7E7; color: #B3261E; }
.mk-tag.sold { background: var(--m-gold-soft); color: #A9760A; }

.mk-foot { display: flex; gap: 6px; margin-top: 11px; }
.mk-foot .mk-btn { flex: 1; }

/* List view */
.mk-grid.list .mk-card { flex-direction: row; }
.mk-grid.list .mk-img { flex: 0 0 210px; aspect-ratio: auto; }
.mk-grid.list .mk-body { flex: 1; }
.mk-grid.list .mk-blurb { -webkit-line-clamp: 3; }

/* ------------------------------------------------------------- States */
.mk-empty { text-align: center; padding: 60px 20px; color: var(--m-muted); grid-column: 1 / -1; }
.mk-empty i { font-size: 2.5rem; color: #CBD6D0; display: block; margin-bottom: 14px; }
.mk-empty h5 { margin-bottom: 8px; }

.mk-skel { background: var(--m-card); border: 1px solid var(--m-line); border-radius: 14px; overflow: hidden; }
.mk-skel .sk { background: linear-gradient(90deg, #EFF3F1 25%, #F7FAF8 50%, #EFF3F1 75%); background-size: 400% 100%; animation: mk-shim 1.3s ease infinite; }
.mk-skel .sk-img { aspect-ratio: 1/1; }
.mk-skel .sk-line { height: 11px; border-radius: 6px; margin: 11px 13px; }
.mk-skel .sk-line.short { width: 55%; }
@keyframes mk-shim { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.mk-pager { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 32px; }
.mk-pager button {
    min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--m-line);
    background: #fff; color: var(--m-green); font-weight: 600; font-size: .88rem; padding: 0 12px;
}
.mk-pager button:hover:not(:disabled) { border-color: var(--m-gold); }
.mk-pager button.on { background: var(--m-green); border-color: var(--m-green); color: #fff; }
.mk-pager button:disabled { opacity: .4; }

/* --------------------------------------------------------- Responsive */
@media (max-width: 1199.98px) { .mk-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
@media (max-width: 991.98px) {
    .mk-filters { position: static; }
    .mk-filter-wrap { display: none; }
    .mk-filter-wrap.open { display: block; margin-bottom: 18px; }
    .mk-grid.list .mk-card { flex-direction: column; }
    .mk-grid.list .mk-img { flex: none; aspect-ratio: 1/1; }
}
@media (max-width: 767.98px) {
    .mk-hero { padding: 24px 0 22px; }
    .mk-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .mk-facts { gap: 14px 22px; }
}


/* =====================================================================
   Searchable select
   The native <select> stays in the DOM as the source of truth and is
   visually replaced by a button + filter panel.
   ===================================================================== */
.mk-combo { position: relative; }
.mk-combo-native {
    position: absolute; opacity: 0; pointer-events: none;
    width: 100%; height: 0; margin: 0; padding: 0; border: 0;
}
.mk-combo-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: #fff; color: var(--m-ink); border: 1px solid var(--m-line);
    border-radius: 10px; padding: 9px 12px; font-size: .85rem; text-align: left;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.mk-combo-toggle:hover { border-color: #D6DFDA; }
.mk-combo.open .mk-combo-toggle { border-color: var(--m-gold); box-shadow: 0 0 0 3px rgba(235,167,26,.12); }
.mk-combo-toggle .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-combo-toggle .lbl.placeholder { color: var(--m-muted); }
.mk-combo-toggle i { font-size: .7rem; color: var(--m-muted); flex: 0 0 auto; transition: transform .18s ease; }
.mk-combo.open .mk-combo-toggle i { transform: rotate(180deg); }

.mk-combo-panel {
    display: none; position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 5px);
    background: #fff; border: 1px solid var(--m-line); border-radius: 12px;
    box-shadow: 0 10px 28px rgba(29,42,36,.14); padding: 8px; max-height: 300px;
}
.mk-combo.open .mk-combo-panel { display: flex; flex-direction: column; }
.mk-combo-search {
    width: 100%; border: 1px solid var(--m-line); border-radius: 8px;
    padding: 8px 10px; font-size: .84rem; outline: none; flex: 0 0 auto;
}
.mk-combo-search:focus { border-color: var(--m-gold); }
.mk-combo-list {
    list-style: none; margin: 6px 0 0; padding: 0; overflow-y: auto; flex: 1 1 auto; max-height: 226px;
}
.mk-combo-list li {
    padding: 8px 10px; border-radius: 8px; font-size: .84rem; color: var(--m-ink); cursor: pointer;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mk-combo-list li:hover { background: var(--m-green-soft); }
.mk-combo-list li.on { background: var(--m-gold-soft); color: #A9760A; font-weight: 700; }
.mk-combo-list li.none { color: var(--m-muted); cursor: default; text-align: center; padding: 14px 10px; }
.mk-combo-list li.none:hover { background: transparent; }


/* Coin badge when a product matched the coin filter through the seller's
   "accepts any coin" setting rather than its own listed currency. */
.mk-coin.alt { background: rgba(30,122,69,.94); color: #fff; }
.mk-coin.alt small { opacity: .85; font-weight: 700; }
.mk-tag.coin { background: #E4F4EA; color: #1E7A45; }

.mk-coinnote {
    background: var(--m-gold-soft); border: 1px solid rgba(235,167,26,.35);
    color: #8A6508; border-radius: 11px; padding: 10px 14px;
    font-size: .82rem; line-height: 1.55; margin-bottom: 14px;
    display: flex; gap: 9px; align-items: flex-start;
}
.mk-coinnote i { color: var(--m-gold); margin-top: 2px; flex: 0 0 auto; }
.mk-coinnote strong { color: #6E5106; }
