/* Keep the NFT list in normal flow when infinite scrolling appends cards.
   Legacy Masonry writes a fixed height and absolute positions into this flex list. */
body.page-template-template-marketplace #ShowNFT #main > .king-posts {
    display: flex;
    flex-wrap: wrap;
    height: auto !important;
}
body.page-template-template-marketplace #ShowNFT #main > .king-posts > .grid-sizer {
    display: none;
}
body.page-template-template-marketplace #ShowNFT #main > .king-posts > .king-post-item {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* Three tabs fit without the legacy forced horizontal and vertical scrollbars. */
body.page-template-template-marketplace .king-3rd-nav > span {
    display: flex;
    width: min(408px, calc(100% - 24px));
    max-width: 100%;
    overflow: visible;
    gap: 4px;
    padding: 5px;
    border-radius: 22px;
}
body.page-template-template-marketplace .king-3rd-nav > span > div[data-type] {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 17px;
}

/* Marketplace cards share the homepage's dark panels and purple accents. */
body.page-template-template-marketplace #ShowNFT #primary {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
body.page-template-template-marketplace #ShowNFT #main > .king-posts {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px; margin: 0; padding: 0;
}
body.page-template-template-marketplace #ShowNFT #main > .king-posts > .king-post-item {
    width: auto !important; min-width: 0; margin: 0; padding: 0;
}
body.page-template-template-marketplace #ShowNFT .king-post-item article {
    height: 100%; border: 1px solid rgba(205,169,255,.18);
    border-radius: 22px; background: #13131b; overflow: hidden;
}
body.page-template-template-marketplace #ShowNFT .entry-image-link { display: block; position: relative; }
body.page-template-template-marketplace #ShowNFT .entry-image {
    height: auto !important; aspect-ratio: 1; margin: 0; border-radius: 0; background: #0c0c12;
}
body.page-template-template-marketplace #ShowNFT .king-box-bg { background-size: contain; background-repeat: no-repeat; background-position: center; border-radius: 0; }
body.page-template-template-marketplace #ShowNFT .article-meta {
    position: relative; inset: auto; width: 100%; height: auto; margin: 0; padding: 18px;
    opacity: 1 !important; visibility: visible !important; transform: none !important;
    background: transparent; color: #b6b4c6; text-align: left;
}
body.page-template-template-marketplace #ShowNFT .article-meta::before { display: none; }
body.page-template-template-marketplace #ShowNFT .article-meta-head { padding: 0; margin: 0; }
body.page-template-template-marketplace #ShowNFT .entry-header { padding: 0; margin: 0 !important; }
body.page-template-template-marketplace #ShowNFT .entry-title { margin: 8px 0 14px; font-size: 20px; font-weight: 800; line-height: 1.35; font-style: normal; }
body.page-template-template-marketplace #ShowNFT .entry-title a { color: #f7f7fb; white-space: normal; overflow-wrap: anywhere; }
body.page-template-template-marketplace #ShowNFT .cat-links a { color: #cda9ff; font-size: 12px; }
body.page-template-template-marketplace #ShowNFT .entry-content { display: none; }
body.page-template-template-marketplace #ShowNFT .price_button { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
body.page-template-template-marketplace #ShowNFT .nftMillix { display: flex; align-items: center; gap: 8px; min-width: 0; }
body.page-template-template-marketplace #ShowNFT .nftMillix .price { margin: 0; color: #f7f7fb; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
body.page-template-template-marketplace #ShowNFT .buyNFT .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 12px; background: #cda9ff; color: #171020; font-weight: 800; }
body.page-template-template-marketplace #ShowNFT .buyNFT .button:hover { background: #dfcaff; }
body.page-template-template-marketplace #ShowNFT .entry-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 0; margin-top: 16px; border-top: 1px solid rgba(205,169,255,.14); background: transparent !important; }
body.page-template-template-marketplace #ShowNFT .entry-meta span { color: #b6b4c6; font-size: 11px; }
body.page-template-template-marketplace #ShowNFT :is(a,button,input,select):focus-visible { outline: 3px solid #cda9ff; outline-offset: 3px; }
@media (max-width: 900px) {
    body.page-template-template-marketplace #ShowNFT #main > .king-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 560px) {
    body.page-template-template-marketplace #ShowNFT #primary { padding: 0 12px; }
    body.page-template-template-marketplace #ShowNFT #main > .king-posts { grid-template-columns: minmax(0, 1fr); }
}
body.page-template-template-marketplace #ShowNFT .entry-title a {
    height: auto; max-height: none; line-height: 1.35; overflow: visible; text-overflow: clip;
}
body.page-template-template-marketplace #ShowNFT .entry-meta span,
body.page-template-template-marketplace #ShowNFT .entry-meta i { color: #b6b4c6 !important; opacity: 1; }
body.page-template-template-marketplace #ShowNFT .entry-title,
body.page-template-template-marketplace #ShowNFT .entry-title a {
    display: block !important; height: auto !important; max-height: none !important;
    -webkit-line-clamp: unset; overflow: visible !important; white-space: normal !important;
}
