/* ---------- Catalog listing header (count of entries above the grid) ---------- */
.px-section-title {
    color: var(--px-muted);
}

/* ---------- Card shell ---------- */
.product-listing-item .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.px-catalog-card {
    position: relative;
}

.px-catalog-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* ---------- Media: the image plus its index tab ---------- */
.px-catalog-card-media {
    position: relative;
    overflow: hidden;
}

.px-catalog-card-media .card-img-top {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
    transition: transform .4s ease;
}

.px-catalog-card:hover .px-catalog-card-media .card-img-top {
    transform: scale(1.04);
}

/* Third scale of the site's signature notched tab (eyebrow, logomark, this)
   — files a product under the category it belongs to, like a catalog card
   peeking out of its drawer. */
.px-catalog-card-tab {
    position: absolute;
    top: 14px;
    left: 0;
    max-width: calc(100% - 24px);
    background: linear-gradient(135deg, var(--px-accent), var(--px-accent-dark));
    color: var(--px-ink);
    font-family: var(--px-font-mono);
    font-weight: 600;
    font-size: .68rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .32rem .9rem .32rem .65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 10px rgba(var(--px-shadow-rgb), .18);
    clip-path: polygon(0 0, calc(100% - var(--px-tab-notch)) 0, 100% 50%, calc(100% - var(--px-tab-notch)) 100%, 0 100%);
    transition: transform .18s ease;
}

html[data-px-theme="night"] .px-catalog-card-tab {
    color: var(--px-bg);
}

html[data-px-theme="field"] .px-catalog-card-tab {
    color: var(--px-surface);
}

.px-catalog-card:hover .px-catalog-card-tab {
    transform: translateX(4px);
}

/* ---------- Body: call-number line, title, description ---------- */
.px-catalog-card-meta {
    font-family: var(--px-font-mono);
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--px-muted);
    margin: 0 0 .4rem;
}

.px-catalog-card-meta-sep {
    margin: 0 .35em;
}

.px-catalog-card .card-title {
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: .5rem;
}

.px-catalog-card-desc {
    color: var(--px-ink-soft);
    font-size: .92rem;
    line-height: 1.55;
    max-height: 4.3em;
    overflow: hidden;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* ---------- Footer: price (with optional sale treatment) + entry link ---------- */
.px-catalog-card-footer {
    margin-top: auto;
    padding-top: .85rem;
    border-top: 1px solid var(--px-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem .75rem;
}

.px-catalog-card-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0;
}

.px-catalog-card-cta {
    font-family: var(--px-font-body);
    font-weight: 600;
    font-size: .85rem;
    color: var(--px-accent-2);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: gap .15s ease, color .15s ease;
}

.px-catalog-card:hover .px-catalog-card-cta {
    gap: .5rem;
    color: var(--px-accent-dark);
}

/* ---------- Responsive grid gutters (unchanged geometry) ---------- */
@media (max-width: 767.98px) {
    .product-listing-item .col-12.p-spacers-3 {
        padding-left: 0.25rem !important;
        padding-right: 0rem !important;
    }
}

@media (min-width: 992px) {
    .product-listing-item .row > .col-lg-4:nth-child(3n+1) {
        margin-left: 0rem !important;
        padding-left: 0rem !important;
    }
    .product-listing-item .row > .col-lg-4:nth-child(3n) {
        margin-right: 0rem !important;
        padding-right: 0rem !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .product-listing-item .row > .col-md-6:nth-child(2n+1) {
        margin-left: 0rem !important;
        padding-left: 0.25rem !important;
    }
    .product-listing-item .row > .col-md-6:nth-child(2n) {
        margin-right: 0rem !important;
        padding-right: 0rem !important;
    }
}
