/**
 * PageVault-style PDF product cards — scoped component styles only (not full-page theme).
 */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

.pv-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .pv-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem;
    }
}

@media (min-width: 768px) {
    .pv-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 992px) {
    .pv-card-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .pv-card-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 1rem;
    }
}

.pv-card-grid > .pdf-resource-item,
.pv-card-grid > .pv-card {
    min-width: 0;
}

.pv-card-grid > .pdf-resource-item {
    display: flex;
}

.pv-card-grid > .pdf-resource-item > .pv-card {
    flex: 1;
    width: 100%;
}

.pv-card {
    --pv-card-bg: #5c6b7f;
    --pv-card-deep: #4a5668;
    --pv-primary: #003b64;
    --pv-orange: #f97316;
    --pv-orange-hover: #ea580c;
    --pv-text: #f8fafc;
    --pv-muted: rgba(248, 250, 252, 0.78);
    --pv-radius: 12px;

    position: relative;
    display: block;
    background: var(--pv-card-deep);
    border-radius: var(--pv-radius);
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
    aspect-ratio: 5 / 7;
    min-height: 0;
    font-family: 'Inter', system-ui, sans-serif;
}

/* Semi-transparent primary tint — bolder at bottom, fades out above */
.pv-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background: linear-gradient(
        to top,
        rgba(0, 59, 100, 0.78) 0%,
        rgba(0, 59, 100, 0.52) 32%,
        rgba(0, 59, 100, 0.24) 58%,
        rgba(0, 59, 100, 0.08) 78%,
        rgba(0, 59, 100, 0) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.pv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
}

.pv-card.is-premium {
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.15);
}

.pv-card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    background: var(--pv-orange);
    color: #111;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.pv-card-badge.is-free {
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
}

.pv-card-crown {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 3;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--pv-orange);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

.pv-card-cover {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 0.5rem 28%;
    color: rgba(255, 255, 255, 0.35);
}

.pv-card-cover.has-image {
    padding: 0;
    background: transparent;
}

.pv-card-cover.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pv-card-cover.is-icon-cover {
    background: linear-gradient(165deg, #6b7c92 0%, #4a5668 55%, #3d4654 100%);
    color: rgba(255, 255, 255, 0.42);
}

.pv-card-cover.is-icon-cover i {
    font-size: clamp(2rem, 6vw, 3rem);
}

.pv-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 0.4rem 0.55rem 0.55rem;
    background: transparent;
}

.pv-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(0.68rem, 1.8vw, 0.82rem);
    font-weight: 700;
    color: var(--pv-text);
    margin: 0 0 0.15rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pv-card-author {
    font-size: 0.62rem;
    color: var(--pv-muted);
    margin: 0 0 0.35rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pv-card-action-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex-shrink: 1;
}

.pv-card-foot-count {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--pv-text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    opacity: 0.92;
}

.pv-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pv-btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pv-orange);
    color: #111;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    line-height: 1.2;
}

.pv-btn-buy:hover {
    background: var(--pv-orange-hover);
    color: #111;
    transform: scale(1.03);
}

.pv-btn-buy.is-success {
    background: #10b981;
    color: #fff;
}

.pv-btn-buy.is-success:hover {
    background: #059669;
    color: #fff;
}

.pv-btn-buy.is-pending {
    background: rgba(251, 191, 36, 0.92);
    color: #111;
}

.pv-card-price {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(0.78rem, 2vw, 0.95rem);
    font-weight: 700;
    color: var(--pv-orange);
    white-space: nowrap;
    line-height: 1;
}

.pv-card-price small {
    font-family: 'Inter', sans-serif;
    font-size: 0.52rem;
    font-weight: 600;
}

.pv-card-meta {
    font-size: 0.55rem;
    color: var(--pv-muted);
    text-align: right;
}

.pv-card-status {
    position: absolute;
    bottom: 6px;
    left: 6px;
    z-index: 3;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.45);
    color: #fcd34d;
}

.pv-card-admin-actions {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
}

.pv-card-admin-actions .btn {
    font-size: 0.55rem;
    padding: 0.18rem 0.35rem;
    border-radius: 5px;
    line-height: 1;
}

.pv-card-showcase {
    width: 100%;
    max-width: 220px;
    margin: 0 auto 1rem;
    aspect-ratio: 5 / 7;
    min-height: 0;
}

.pdf-resource-item.hidden {
    display: none !important;
}
