@keyframes mpReveal   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mpFloat    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes mpTileIn   { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes mpPulse    { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes mpTagIn    { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mpGlowPulse { 0%, 100% { opacity: .5; } 50% { opacity: .85; } }

/* ===== MARKETPLACE PAGE ===== */

.mp-page { width: 100%; overflow-x: clip; }

.mp-wrap {
    max-width: var(--site-max-w, 1760px);
    margin: 0 auto;
    padding: 0 var(--site-pad-x, 40px);
}

/* ================================================
   HERO
   ================================================ */
.mp-hero {
    background: linear-gradient(150deg, #0a0520 0%, #111036 28%, #1b1560 60%, #1e2f9e 82%, #2a4fd6 100%);
    color: #fff;
    position: relative;
    width: 100%;
}

/* Radial glows — amber bottom-left, violet top-right */
.mp-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(ellipse 65% 70% at 3% 95%, rgba(251,146,60,.42) 0%, transparent 55%),
        radial-gradient(ellipse 55% 60% at 95% 5%, rgba(139,92,246,.36) 0%, transparent 50%),
        radial-gradient(ellipse 45% 45% at 58% 48%, rgba(99,102,241,.18) 0%, transparent 60%),
        radial-gradient(ellipse 30% 40% at 30% 15%, rgba(59,130,246,.14) 0%, transparent 60%);
    pointer-events: none;
}

/* Crosshatch texture */
.mp-hero::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,.018) 40px, rgba(255,255,255,.018) 41px),
        repeating-linear-gradient(-45deg, transparent, transparent 40px, rgba(255,255,255,.018) 40px, rgba(255,255,255,.018) 41px);
    pointer-events: none;
}

.mp-hero-inner {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
    padding-top: clamp(52px, 6vw, 96px);
    padding-bottom: clamp(60px, 7vw, 108px);
}
@media (max-width: 1100px) { .mp-hero-inner { grid-template-columns: 1fr; } }
@media (max-width: 640px)  { .mp-hero-inner { padding-top: 40px; padding-bottom: 48px; } }

.mp-hero-left { min-width: 0; }

.mp-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(251,146,60,.14);
    border: 1px solid rgba(251,146,60,.32);
    color: rgba(255,255,255,.88);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 24px;
    animation: mpReveal .5s ease both;
}
.mp-hero-eyebrow i { color: #fb923c; }

.mp-hero h1 {
    font-size: clamp(26px, 3.2vw, 52px);
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 20px;
    letter-spacing: -.5px;
    animation: mpReveal .6s .1s ease both;
}
.mp-hero h1 em {
    font-style: normal;
    color: #f59e0b;
}

.mp-hero-lead {
    font-size: clamp(14px, 1.05vw, 16px);
    opacity: .78;
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 36px;
    animation: mpReveal .6s .2s ease both;
}

.mp-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all .2s;
    animation: mpReveal .6s .4s ease both;
    box-shadow: 0 4px 24px rgba(249,115,22,.4);
}
.mp-hero-cta:hover { opacity: .9; transform: translateY(-2px); color: #fff; box-shadow: 0 8px 32px rgba(249,115,22,.55); }

/* Glowing separator line at hero bottom */
.mp-hero-sep {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(245,158,11,.6) 20%,
        rgba(99,102,241,.7) 50%,
        rgba(139,92,246,.6) 80%,
        transparent 100%
    );
    animation: mpGlowPulse 3s ease-in-out infinite;
}

/* ================================================
   HERO RIGHT: Category Widget
   ================================================ */
.mp-cat-widget {
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.12);
    border-top: 2px solid rgba(245,158,11,.5);
    border-radius: 22px;
    padding: 20px;
    animation: mpReveal .7s .3s ease both, mpFloat 6s ease-in-out 1.2s infinite;
}

.mp-cat-widget-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: .55;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.mp-cat-widget-title i { color: #f59e0b; font-size: 11px; }

/* Icon mosaic — 3x3 grid of colored icon squares */
.mp-cat-mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}
.mp-cat-mosaic-item {
    aspect-ratio: 1;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    opacity: 0;
    animation: mpTileIn .45s ease both;
}
.mp-cat-mosaic-item:nth-child(1) { background: rgba(59,130,246,.3);  color: #93c5fd; animation-delay: .55s; }
.mp-cat-mosaic-item:nth-child(2) { background: rgba(16,185,129,.3);  color: #6ee7b7; animation-delay: .65s; }
.mp-cat-mosaic-item:nth-child(3) { background: rgba(245,158,11,.3);  color: #fcd34d; animation-delay: .75s; }
.mp-cat-mosaic-item:nth-child(4) { background: rgba(139,92,246,.3);  color: #c4b5fd; animation-delay: .85s; }
.mp-cat-mosaic-item:nth-child(5) { background: rgba(239,68,68,.25);  color: #fca5a5; animation-delay: .95s; }
.mp-cat-mosaic-item:nth-child(6) { background: rgba(6,182,212,.25);  color: #67e8f9; animation-delay: 1.05s; }

/* Divider */
.mp-cat-widget-divider {
    height: 1px;
    background: rgba(255,255,255,.1);
    margin-bottom: 16px;
}

/* Category rows */
.mp-cat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    opacity: 0;
    animation: mpReveal .5s ease both;
    text-decoration: none;
    color: inherit;
    transition: background .15s, padding-left .15s;
    border-radius: 8px;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}
.mp-cat-row:hover { background: rgba(255,255,255,.08); padding-left: 14px; color: inherit; text-decoration: none; }
.mp-cat-row:last-child { border-bottom: none; }
.mp-cat-row:nth-child(1) { animation-delay: 1.0s; }
.mp-cat-row:nth-child(2) { animation-delay: 1.1s; }
.mp-cat-row:nth-child(3) { animation-delay: 1.2s; }


.mp-cat-row-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.mp-cat-row-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: .88;
}
.mp-cat-row-cnt {
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,.15);
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

/* ================================================
   CONTENT AREA
   ================================================ */
.mp-content-area {
    padding: 36px 0 64px;
}

/* MOBILE SIDEBAR TOGGLE */
.mp-sidebar-mobile-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 11px 16px;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    color: #374151;
}
.mp-sidebar-mobile-toggle:hover { background: #f8f9fc; }
.mp-sidebar-mobile-toggle .bi-chevron-right { margin-left: auto; opacity: .5; }

/* SIDEBAR OVERLAY */
.mp-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1039;
    backdrop-filter: blur(2px);
}
.mp-sidebar-overlay.is-visible { display: block; }

/* LAYOUT GRID */
.mp-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}
/* Wrapper around sidebar needed for sticky inside grid */
.mp-sidebar-col {
    align-self: stretch;
}

/* ================================================
   MOBILE CATEGORY BAR
   ================================================ */
.mp-cat-bar {
    display: none;
    position: sticky;
    top: 58px;
    z-index: 200;
    background: #fff;
    border-bottom: 1px solid #e5e9f0;
    box-shadow: 0 2px 8px rgba(13,27,42,.06);
}
.mp-cat-bar-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px;
    scrollbar-width: none;
}
.mp-cat-bar-scroll::-webkit-scrollbar { display: none; }
.mp-cat-bar-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #e5e9f0;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.mp-cat-bar-btn.is-active {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
}
.mp-cat-bar-btn i { font-size: 12px; }

/* ================================================
   SIDEBAR
   ================================================ */
.mp-sidebar {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dde3ee transparent;
}
.mp-sidebar::-webkit-scrollbar { width: 4px; }
.mp-sidebar::-webkit-scrollbar-track { background: transparent; }
.mp-sidebar::-webkit-scrollbar-thumb { background: #dde3ee; border-radius: 99px; }

.mp-sidebar-inner {
    background: #fff;
    border: 1px solid #e5e9f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(13,27,42,.07);
}
.mp-sidebar-hd {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7280;
    background: #f8f9fc;
    border-bottom: 1px solid #e5e9f0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mp-sidebar-hd i { font-size: 12px; }
.mp-sidebar-nav { padding: 6px 0; }

.mp-sidebar-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px 8px 12px;
    text-decoration: none;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
    line-height: 1.35;
}
.mp-sidebar-item:hover {
    background: #f0f4fb;
    color: #1a2f4a;
    text-decoration: none;
}
.mp-sidebar-item.is-active {
    border-left-color: #f97316;
    background: #fff7ed;
    color: #c2410c;
    font-weight: 600;
}
.mp-sidebar-item i {
    font-size: 13px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    opacity: .55;
    transition: opacity .12s;
}
.mp-sidebar-item:hover i,
.mp-sidebar-item.is-active i { opacity: 1; }

.mp-sidebar-item-lbl {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mp-si-cnt {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    background: #f1f5f9;
    padding: 1px 7px;
    border-radius: 999px;
    flex-shrink: 0;
    transition: background .12s, color .12s;
}
.mp-sidebar-item.is-active .mp-si-cnt {
    background: #fed7aa;
    color: #c2410c;
}

/* ================================================
   MAIN
   ================================================ */
.mp-main { min-width: 0; }

.mp-category-section {
    padding: 32px 0 16px;
    scroll-margin-top: 96px;
}
.mp-category-section + .mp-category-section {
    border-top: 1px solid #f0f2f6;
}

.mp-category-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111827;
}
.mp-category-title i {
    font-size: 16px;
    color: #f97316;
    opacity: .85;
    flex-shrink: 0;
}
.mp-category-count {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 999px;
    margin-left: auto;
}

/* ================================================
   VENDOR GRID & CARDS
   ================================================ */
.mp-vendors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.mp-vendor-card {
    background: #fff;
    border: 1px solid #e8edf4;
    border-radius: 14px;
    padding: 16px;
    transition: box-shadow .2s, transform .2s, border-color .2s;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mp-vendor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13,27,42,.1);
    border-color: #d1dff7;
}
/* Top accent — always visible, brighter on hover */
.mp-vendor-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: #f97316;
    opacity: .3;
    transition: opacity .2s;
    border-radius: 14px 14px 0 0;
}
.mp-vendor-card:hover::before { opacity: 1; }

/* Top row: logo + name/badge */
.mp-vendor-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.mp-vendor-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    flex-shrink: 0;
    background: #1a2f4a;
    color: #fff;
    letter-spacing: -.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.mp-vendor-title { flex: 1; min-width: 0; }
.mp-vendor-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.mp-vendor-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 3px;
}
.mp-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 999px;
}
.mp-badge-popular { color: #7c3aed; background: #f5f3ff; }

.mp-vendor-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    font-size: 12px;
}
.mp-stars { color: #f59e0b; font-size: 11px; letter-spacing: 1px; }
.mp-rating-num { font-weight: 700; color: #111827; }
.mp-rating-count { color: #9ca3af; }

/* Description fills available space, pushes footer down */
.mp-vendor-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.55;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mp-vendor-price {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mp-vendor-price i { color: #d1d5db; font-size: 10px; }

.mp-vendor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f2f6;
    gap: 8px;
    margin-top: auto;
}
.mp-vendor-link {
    font-size: 13px;
    font-weight: 600;
    color: #f97316;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: color .15s;
}
.mp-vendor-link:hover { color: #c2410c; text-decoration: none; }

.mp-vendor-quick {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background: #f1f5f9;
    border: none;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.mp-vendor-quick:hover { background: #e2e8f0; color: #374151; }

/* ================================================
   MODAL
   ================================================ */
#vendorModal .modal-content { border: none; border-radius: var(--radius-lg); }
@media (max-width: 576px) {
    #vendorModal .modal-dialog { margin: 0; max-width: 100%; min-height: 100vh; }
    #vendorModal .modal-content { border-radius: 0 !important; min-height: 100vh; display: flex; flex-direction: column; }
    #vendorModal .modal-body { flex: 1; overflow-y: auto; }
    #vendorModal .modal-header, #vendorModal .modal-footer { flex-shrink: 0; }
}
.mp-modal-logo {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
    background: #1a2f4a;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.mp-modal-link { background: #1a2f4a; border-color: #1a2f4a; }
.mp-modal-link:hover { background: #0d1b2a; border-color: #0d1b2a; color: #fff; }
.mp-modal-name { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.mp-modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.mp-modal-tag { font-size: 12px; color: #6b7280; background: #f1f5f9; padding: 2px 10px; border-radius: 999px; }
.mp-modal-tag-price { font-size: 12px; font-weight: 600; color: #c2410c; background: #fff7ed; padding: 2px 10px; border-radius: 999px; }
.mp-modal-stars { color: #f59e0b; }
.mp-modal-rating-count { color: #6b7280; font-size: 13px; margin-left: 4px; }
.mp-modal-desc { color: #6b7280; font-size: 14px; line-height: 1.65; margin-bottom: 16px; }
.mp-modal-pc-title-pros { font-weight: 700; margin-bottom: 6px; color: #15803d; }
.mp-modal-pc-title-cons { font-weight: 700; margin-bottom: 6px; color: #b91c1c; }
.mp-modal-best-for { margin-top: 16px; font-size: 13px; }
.mp-modal-rating { display: flex; align-items: center; gap: 8px; margin: 8px 0 16px; }
.mp-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.mp-pros-list, .mp-cons-list { list-style: none; padding: 0; margin: 0; }
.mp-pros-list li::before { content: '✓ '; color: #15803d; font-weight: 700; }
.mp-cons-list li::before { content: '✗ '; color: #b91c1c; font-weight: 700; }
.mp-pros-list li, .mp-cons-list li { font-size: 13px; margin-bottom: 4px; }

/* ================================================
   FAQ
   ================================================ */
.mp-faq-section { padding: 48px 0 56px; border-top: 1px solid #e8edf4; margin-top: 16px; }
.mp-faq-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.mp-faq-item { border: 1px solid #e5e9f0 !important; border-radius: 10px !important; margin-bottom: 10px; }
.mp-faq-body { color: #6b7280; font-size: 14px; line-height: 1.65; }

/* EMPTY */
.mp-empty { text-align: center; padding: 80px 20px; color: #6b7280; }
.mp-empty i { font-size: 48px; opacity: .35; display: block; margin-bottom: 16px; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 960px) {
    .mp-wrap { padding: 0 20px; }
    .mp-layout { grid-template-columns: 1fr; }
    .mp-sidebar-mobile-toggle { display: none; }
    .mp-sidebar-overlay { display: none !important; }
    .mp-sidebar { display: none; }
    .mp-cat-bar { display: block; }
    .mp-content-area { padding: 24px 0 48px; }
    .mp-category-section { scroll-margin-top: 106px; }
    .mp-layout { row-gap: 0; }
}

@media (max-width: 768px) {
    .mp-hero h1 { font-size: 26px; }
    .mp-hero-stat { border-right: none; padding-right: 0; margin-right: 16px; }
    .mp-hero-stat-num { font-size: 26px; }
    .mp-vendors-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .mp-pros-cons { grid-template-columns: 1fr; }
    .mp-content-area { padding: 20px 0 40px; }
}

@media (max-width: 480px) {
    .mp-wrap { padding: 0 14px; }
    .mp-vendors-grid { grid-template-columns: 1fr; gap: 8px; }
    .mp-vendor-card { padding: 14px; }
    .mp-vendor-logo { width: 40px; height: 40px; font-size: 15px; border-radius: 9px; }
    .mp-category-title { font-size: 16px; }
    .mp-cat-bar-btn { font-size: 12px; padding: 6px 12px; }
}
