/* Widen past Astra’s default container on desktop NFT pages */
@media (min-width: 922px) {
    body.post-type-archive-panda_nft .ast-container,
    body.tax-panda_trait .ast-container,
    body.single-panda_nft .ast-container,
    body.post-type-archive-panda_nft .site-content > .ast-container,
    body.tax-panda_trait .site-content > .ast-container,
    body.single-panda_nft .site-content > .ast-container {
        max-width: 1400px;
        width: 100%;
    }

    /* Some Astra layouts nest content under #content / .entry-content */
    body.post-type-archive-panda_nft #content,
    body.tax-panda_trait #content,
    body.single-panda_nft #content {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
}

.panda-nft-archive,
.panda-nft-single {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 24px 60px;
    width: 100%;
    box-sizing: border-box;
}

/* Match theme title styling (Astra .entry-title) */
.panda-nft-archive-header {
    text-align: center;
    margin-bottom: 32px;
}
.panda-nft-archive-header .entry-title,
.panda-nft-single-title.entry-title {
    margin-top: 0;
}
.panda-nft-archive-sub { color: #6c6c6c; margin: 0; }

/* Avoid double titles when Astra also prints a page header */
body.single-panda_nft .entry-header:not(.panda-nft-archive-header),
body.post-type-archive-panda_nft .ast-archive-description,
body.single-panda_nft .ast-single-entry-banner {
    display: none;
}

.panda-nft-sort {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.panda-nft-sort-link {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    color: #27242D;
    background: #eee;
}
.panda-nft-sort-link.is-active {
    background: #27242D;
    color: #fff;
}

.panda-nft-card-date {
    margin-top: 8px;
    font-size: 0.8em;
    color: #6c6c6c;
}

.panda-nft-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin: 4px 0 18px;
    font-size: 0.9em;
    color: #6c6c6c;
}
.panda-nft-date { white-space: nowrap; }

.panda-nft-grid {
    display: grid;
    grid-template-columns: repeat(var(--panda-cols, 3), minmax(0, 1fr));
    gap: 28px;
}
@media (max-width: 900px) { .panda-nft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 560px) { .panda-nft-grid { grid-template-columns: 1fr; gap: 18px; } }

.panda-nft-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform .18s ease, box-shadow .18s ease;
}
.panda-nft-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,0.12); }
.panda-nft-card-link { text-decoration: none; color: inherit; display: block; }
.panda-nft-card-img {
    aspect-ratio: 1 / 1;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.panda-nft-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.panda-nft-placeholder { font-size: 3em; }
.panda-nft-placeholder-lg {
    font-size: 5em;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f3f3;
}

.panda-nft-card-body { padding: 16px 18px 20px; }
.panda-nft-card-title { margin: 0 0 10px; font-size: 1.12em; color: #27242D; line-height: 1.3; }
.panda-nft-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }

.panda-nft-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f0f0f0;
    font-size: 0.78em;
    font-weight: 600;
    color: #444;
}
.panda-nft-chip-eth { background: #27242D; color: #fff; }

.panda-nft-single-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.panda-nft-single-media {
    width: 100%;
}
.panda-nft-single-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.panda-nft-single-info {
    width: 100%;
}
.panda-nft-opensea-btn {
    display: inline-block;
    background: #2081e2;
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
}
.panda-nft-opensea-btn:hover { opacity: 0.9; color: #fff; }

.panda-nft-single-title {
    margin-bottom: 14px;
}
.panda-nft-single-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.panda-nft-story { color: #333; line-height: 1.7; margin-bottom: 26px; max-width: none; }
.panda-nft-story p { margin: 0 0 14px; }

.panda-nft-section-title { font-size: 1.15em; color: #27242D; margin: 22px 0 12px; }

.panda-nft-traits { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 900px) { .panda-nft-traits { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .panda-nft-traits { grid-template-columns: 1fr; } }
.panda-nft-trait {
    border: 1px solid #ececec; border-radius: 10px; padding: 10px 12px; background: #fafafa;
}
.panda-nft-trait-label { display: block; font-size: 0.72em; text-transform: uppercase; letter-spacing: .04em; color: #999; margin-bottom: 3px; }
.panda-nft-trait-value { font-weight: 600; color: #27242D; text-decoration: none; }
a.panda-nft-trait-value:hover { text-decoration: underline; }

.panda-nft-location { color: #444; }
.panda-nft-copyright { color: #999; font-size: 0.85em; margin-top: 20px; }
.panda-nft-back { margin-top: 26px; }
.panda-nft-back a { color: #2081e2; text-decoration: none; font-weight: 600; }

.panda-nft-pagination { margin-top: 32px; text-align: center; }
.panda-nft-pagination .page-numbers {
    display: inline-block; padding: 6px 12px; margin: 0 3px; border: 1px solid #ddd; border-radius: 8px;
    text-decoration: none; color: #27242D;
}
.panda-nft-pagination .page-numbers.current { background: #27242D; color: #fff; border-color: #27242D; }
.panda-nft-empty { text-align: center; color: #888; padding: 40px 0; }
