/* ============================================================
   Marketplace · Browse
   Light, clean catalog  +  dark modern hero section
   Scoped under .mkt  ·  prefix .mkt-  ·  separate from marketplace.css
   ============================================================ */

.mkt{
    --bg:#FFFFFF;
    --bg-soft:#F7F7F8;
    --ink:#1D1D1F;
    --ink-2:#5F6168;
    --ink-3:#9498A0;
    --line:#EAEAEC;
    --line-strong:#DADCE0;
    --accent:#7034FF;
    --accent-press:#5A22E0;
    --accent-soft:#F2ECFF;
    --star:#FFB400;
    --radius:16px;
    --shadow-card:0 1px 2px rgba(20,20,30,.05);
    --shadow-hover:0 14px 30px -12px rgba(20,20,40,.18);
    --ease:cubic-bezier(.22,.61,.25,1);
    --sans:'gordita','Roboto',-apple-system,BlinkMacSystemFont,sans-serif;

    background:var(--bg);
    color:var(--ink);
    font-family:var(--sans);
    -webkit-font-smoothing:antialiased;
}
.mkt *{box-sizing:border-box;}
.mkt-wrap{
    max-width:1350px;
    margin:0 auto;
    /* start padding lands on the visible logo wordmark, not the logo's
       transparent PNG edge (~17px inset); end matches the header's 20px */
    padding-inline-start:37px;
    padding-inline-end:20px;
}

/* ============================================================
   HERO  —  split layout + category tiles
   ============================================================ */
.mkt-hero{
    background:var(--bg);
    border-bottom:1px solid var(--line);
}
.mkt-hero-grid{
    display:grid;
    grid-template-columns:1.08fr .92fr;
    gap:clamp(34px,5vw,64px);
    align-items:center;
    padding-top:clamp(104px,12vh,126px);
    padding-bottom:clamp(46px,6vh,64px);
}
.mkt-hero-lead{min-width:0;}
.mkt-eyebrow{
    display:block;
    font-size:.76rem;
    font-weight:700;
    letter-spacing:.16em;
    text-transform:uppercase;
    color:var(--accent);
    animation:mkt-up .55s var(--ease) both;
}
.mkt-hero-title{
    margin:13px 0 0;
    font-size:clamp(1.85rem,3.3vw,2.55rem);
    font-weight:700;
    letter-spacing:-.03em;
    line-height:1.1;
    color:var(--ink);
    animation:mkt-up .55s var(--ease) .05s both;
}
.mkt-hero-sub{
    margin:12px 0 0;
    max-width:40ch;
    font-size:1rem;
    line-height:1.55;
    color:var(--ink-2);
    animation:mkt-up .55s var(--ease) .1s both;
}
.mkt-search{
    display:flex;
    align-items:center;
    gap:7px;
    max-width:430px;
    margin:24px 0 0;
    padding:6px 6px 6px 18px;
    background:var(--bg);
    border:1px solid var(--line-strong);
    border-radius:999px;
    box-shadow:var(--shadow-card);
    transition:border-color .2s var(--ease),box-shadow .2s var(--ease);
    animation:mkt-up .55s var(--ease) .15s both;
}
.mkt-search:focus-within{
    border-color:var(--accent);
    box-shadow:0 0 0 4px var(--accent-soft);
}
.mkt-search-input{
    flex:1;
    min-width:0;
    border:0;
    background:transparent;
    font-family:var(--sans);
    font-size:.96rem;
    color:var(--ink);
    outline:none;
}
.mkt-search-input::placeholder{color:var(--ink-3);}
.mkt-search-btn{
    flex-shrink:0;
    width:42px;height:42px;
    padding:0;
    border:0;
    border-radius:50%;
    background:var(--ink);
    color:#fff;
    display:grid;
    place-items:center;
    cursor:pointer;
    transition:background .18s var(--ease),transform .18s var(--ease);
}
.mkt-search-btn:hover{background:#000;transform:scale(1.06);}
.mkt-search-btn svg{width:17px;height:17px;}

/* category tiles */
.mkt-tiles{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}
.mkt-tile{
    display:flex;
    align-items:center;
    gap:13px;
    padding:16px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--bg);
    text-decoration:none;
    animation:mkt-up .55s var(--ease) both;
    transition:border-color .16s var(--ease),transform .16s var(--ease),box-shadow .16s var(--ease);
}
.mkt-tile:nth-child(2){animation-delay:.05s;}
.mkt-tile:nth-child(3){animation-delay:.1s;}
.mkt-tile:nth-child(4){animation-delay:.15s;}
.mkt-tile:hover{
    border-color:var(--accent);
    transform:translateY(-3px);
    box-shadow:0 14px 26px -16px rgba(112,52,255,.45);
}
.mkt-tile-ic{
    width:42px;height:42px;
    flex-shrink:0;
    border-radius:11px;
    background:var(--accent-soft);
    color:var(--accent);
    display:grid;place-items:center;
}
.mkt-tile-ic svg{width:20px;height:20px;}
.mkt-tile-name{
    font-size:.94rem;
    font-weight:600;
    color:var(--ink);
}

@keyframes mkt-up{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:translateY(0);}}

/* compact hero — category pages */
.mkt-hero-compact{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:32px;
    padding-top:clamp(96px,11vh,114px);
    padding-bottom:clamp(22px,3vh,32px);
}
.mkt-compact-head{min-width:0;}
.mkt-eyebrow a{
    color:inherit;
    text-decoration:none;
    transition:color .15s var(--ease);
}
.mkt-eyebrow a:hover{color:var(--accent-press);}
.mkt-eyebrow-sep{margin:0 5px;opacity:.45;}
.mkt-hero--compact .mkt-hero-title{
    margin:7px 0 0;
    font-size:clamp(1.5rem,2.6vw,1.95rem);
}
.mkt-hero--compact .mkt-search{
    margin:0;
    flex-shrink:0;
    width:clamp(250px,32vw,360px);
}
@media (max-width:680px){
    .mkt-hero-compact{
        flex-direction:column;
        align-items:flex-start;
        gap:18px;
    }
    .mkt-hero--compact .mkt-search{width:100%;max-width:none;}
}

/* ============================================================
   FILTER BAR  —  light, sticky
   ============================================================ */
.mkt-bar{
    position:sticky;
    top:78px;
    z-index:20;
    background:rgba(255,255,255,.92);
    backdrop-filter:saturate(180%) blur(10px);
    -webkit-backdrop-filter:saturate(180%) blur(10px);
    border-bottom:1px solid var(--line);
}
.mkt-bar-inner{
    display:flex;
    align-items:center;
    gap:16px;
    padding-block:13px;
}
.mkt-cats{
    flex:1;
    min-width:0;
    display:flex;
    align-items:center;
    gap:8px;
    overflow-x:auto;
    scrollbar-width:none;
}
.mkt-cats::-webkit-scrollbar{display:none;}
.mkt-pill{
    flex-shrink:0;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 15px 8px 12px;
    border:1px solid var(--line);
    border-radius:999px;
    background:var(--bg);
    font-size:.875rem;
    font-weight:500;
    color:var(--ink-2);
    text-decoration:none;
    white-space:nowrap;
    transition:border-color .18s var(--ease),color .18s var(--ease),background .18s var(--ease);
    animation:mkt-fade .4s var(--ease) both;
}
.mkt-pill svg{
    width:16px;height:16px;
    flex-shrink:0;
    color:var(--ink-3);
    transition:color .18s var(--ease),transform .25s var(--ease);
}
.mkt-pill:hover{
    border-color:var(--accent);
    background:var(--accent-soft);
    color:var(--accent);
}
.mkt-pill:hover svg{color:var(--accent);transform:scale(1.14);}
.mkt-pill.active{
    background:var(--ink);
    border-color:var(--ink);
    color:#fff;
}
.mkt-pill.active svg{color:#fff;}
.mkt-cats .mkt-pill:nth-child(1){animation-delay:0s;}
.mkt-cats .mkt-pill:nth-child(2){animation-delay:.04s;}
.mkt-cats .mkt-pill:nth-child(3){animation-delay:.08s;}
.mkt-cats .mkt-pill:nth-child(4){animation-delay:.12s;}
.mkt-cats .mkt-pill:nth-child(5){animation-delay:.16s;}
.mkt-cats .mkt-pill:nth-child(6){animation-delay:.2s;}
.mkt-cats .mkt-pill:nth-child(7){animation-delay:.24s;}
.mkt-cats .mkt-pill:nth-child(8){animation-delay:.28s;}
@keyframes mkt-fade{from{opacity:0;}to{opacity:1;}}
.mkt-tools{
    flex-shrink:0;
    display:flex;
    align-items:center;
    gap:9px;
}
.mkt-filters{position:relative;}
.mkt-filters>summary{
    position:relative;
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:center;
    width:40px;height:40px;
    border:1px solid var(--line-strong);
    border-radius:10px;
    background:var(--bg);
    color:var(--ink-2);
    cursor:pointer;
    user-select:none;
    transition:border-color .15s var(--ease),color .15s var(--ease),background .15s var(--ease);
}
.mkt-filters>summary::-webkit-details-marker{display:none;}
.mkt-filters>summary:hover{border-color:var(--ink);color:var(--ink);}
.mkt-filters[open]>summary{
    border-color:var(--accent);
    background:var(--accent-soft);
    color:var(--accent);
}
.mkt-filters summary svg{width:17px;height:17px;}
.mkt-fdot{
    position:absolute;
    top:-3px;
    inset-inline-end:-3px;
    width:9px;height:9px;
    border-radius:50%;
    background:var(--accent);
    border:2px solid var(--bg);
}
.mkt-filters[open]>summary .mkt-fdot{border-color:var(--accent-soft);}
.mkt-panel{
    position:absolute;
    top:calc(100% + 9px);
    inset-inline-end:0;
    width:296px;
    background:var(--bg);
    border:1px solid var(--line);
    border-radius:14px;
    padding:18px;
    box-shadow:0 22px 48px -16px rgba(20,20,40,.26);
    animation:mkt-pop .18s var(--ease) both;
}
@keyframes mkt-pop{from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:translateY(0);}}
/* sort dropdown menu */
.mkt-panel--menu{width:212px;padding:7px;}
.mkt-menu-item{
    display:block;
    padding:9px 12px;
    border-radius:8px;
    font-size:.86rem;
    font-weight:500;
    color:var(--ink-2);
    text-decoration:none;
    transition:background .14s var(--ease),color .14s var(--ease);
}
.mkt-menu-item:hover{background:var(--bg-soft);color:var(--ink);}
.mkt-menu-item.active{background:var(--accent-soft);color:var(--accent);font-weight:600;}
.mkt-fgroup+.mkt-fgroup{margin-top:18px;padding-top:18px;border-top:1px solid var(--line);}
.mkt-fhead{
    display:block;
    margin-bottom:11px;
    font-size:.8rem;
    font-weight:700;
    color:var(--ink);
}
.mkt-frow{display:flex;flex-wrap:wrap;gap:8px;}
.mkt-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 13px;
    border:1px solid var(--line-strong);
    border-radius:999px;
    font-size:.83rem;
    font-weight:500;
    color:var(--ink-2);
    text-decoration:none;
    transition:border-color .14s var(--ease),color .14s var(--ease),background .14s var(--ease);
}
.mkt-chip:hover{border-color:var(--ink);color:var(--ink);}
.mkt-chip.active{background:var(--accent);border-color:var(--accent);color:#fff;}
.mkt-chip-stars{color:var(--star);letter-spacing:.5px;}
.mkt-chip.active .mkt-chip-stars{color:#fff;}

/* ============================================================
   RESULTS  —  light
   ============================================================ */
.mkt-results{
    padding-top:30px;
    padding-bottom:clamp(64px,9vh,104px);
}
.mkt-results-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:22px;
}
.mkt-count{font-size:.95rem;color:var(--ink-2);}
.mkt-count b{font-weight:700;color:var(--ink);}
.mkt-clear{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:.875rem;
    font-weight:600;
    color:var(--accent);
    text-decoration:none;
}
.mkt-clear:hover{color:var(--accent-press);}

/* card styles live in marketplace.css (.mp-card-*) — shared with storefront */

/* pagination */
.mkt-pager{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    margin-top:56px;
}
.mkt-pager a,.mkt-pager span{
    min-width:40px;height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 9px;
    border-radius:10px;
    font-size:.9rem;
    font-weight:600;
    color:var(--ink-2);
    text-decoration:none;
}
.mkt-pager a{border:1px solid var(--line);}
.mkt-pager a:hover{border-color:var(--ink);color:var(--ink);}
.mkt-pager .is-current{background:var(--ink);border-color:var(--ink);color:#fff;}
.mkt-pager .is-gap{min-width:22px;color:var(--ink-3);}
.mkt-pager .is-disabled{opacity:.4;pointer-events:none;}
.mkt-pager svg{width:15px;height:15px;}

/* empty */
.mkt-empty{
    text-align:center;
    padding:clamp(56px,9vh,100px) 24px;
}
.mkt-empty-ic{
    width:64px;height:64px;
    margin:0 auto 20px;
    border-radius:50%;
    background:var(--bg-soft);
    color:var(--ink-3);
    display:grid;place-items:center;
}
.mkt-empty-ic svg{width:28px;height:28px;}
.mkt-empty h3{
    margin:0;
    font-size:1.3rem;
    font-weight:700;
    color:var(--ink);
}
.mkt-empty p{
    max-width:42ch;
    margin:9px auto 22px;
    font-size:.96rem;
    line-height:1.55;
    color:var(--ink-2);
}
.mkt-empty-btn{
    display:inline-block;
    padding:12px 24px;
    border-radius:11px;
    background:var(--accent);
    color:#fff;
    font-size:.9rem;
    font-weight:600;
    text-decoration:none;
    transition:background .18s var(--ease);
}
.mkt-empty-btn:hover{background:var(--accent-press);}

/* mobile drawer */
.mkt-mob-filters{display:none;}
.mkt-scrim{
    position:fixed;inset:0;z-index:120;
    background:rgba(20,20,30,.4);
    opacity:0;visibility:hidden;
    transition:opacity .26s var(--ease),visibility .26s;
}
.mkt-scrim.open{opacity:1;visibility:visible;}
.mkt-drawer{
    position:fixed;
    inset-block:0;
    inset-inline-end:0;
    z-index:121;
    width:min(360px,88vw);
    background:var(--bg);
    padding:22px;
    overflow-y:auto;
    transform:translateX(100%);
    transition:transform .3s var(--ease);
}
[dir="rtl"] .mkt-drawer{transform:translateX(-100%);}
.mkt-drawer.open{transform:translateX(0);}
.mkt-drawer-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:20px;
    padding-bottom:15px;
    border-bottom:1px solid var(--line);
}
.mkt-drawer-head h3{margin:0;font-size:1.15rem;font-weight:700;}
.mkt-drawer-x{
    width:34px;height:34px;
    border:1px solid var(--line-strong);
    border-radius:9px;
    background:transparent;
    font-size:19px;line-height:1;
    color:var(--ink);
    cursor:pointer;
}
.mkt-drawer-x:hover{border-color:var(--ink);}

/* ---- Responsive ------------------------------------------- */
@media (max-width:1024px){
    .mkt-wrap{padding-inline:24px;}
    .mkt-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:22px 18px;}
}
@media (max-width:680px){
    .mkt-wrap{padding-inline:18px;}
    .mkt-filters{display:none;}
    .mkt-mob-filters{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:40px;height:40px;
        border:1px solid var(--line-strong);
        border-radius:10px;
        background:var(--bg);
        color:var(--ink-2);
        cursor:pointer;
    }
    .mkt-mob-filters svg{width:17px;height:17px;}
    .mkt-grid{grid-template-columns:repeat(2,1fr);gap:18px 14px;}
    .mkt-card-title{font-size:.94rem;}
    .mkt-results-head{margin-bottom:16px;}
}
@media (max-width:420px){
    .mkt-grid{grid-template-columns:1fr;}
    .mkt-card{max-width:380px;margin-inline:auto;width:100%;}
}
@media (max-width:880px){
    .mkt-hero-grid{
        grid-template-columns:1fr;
        gap:32px;
        padding-top:clamp(100px,11vh,116px);
        padding-bottom:44px;
    }
    .mkt-search{max-width:480px;}
}

/* ---- RTL / motion ----------------------------------------- */
[dir="rtl"] .mkt-pager svg{transform:scaleX(-1);}
@media (prefers-reduced-motion:reduce){
    .mkt-card,.mkt-eyebrow,.mkt-hero-title,.mkt-hero-sub,.mkt-search,.mkt-tile{
        opacity:1;transform:none;animation:none;
    }
    .mkt *{transition-duration:.001ms!important;animation-duration:.001ms!important;}
}
