/*
 * PartsPars Catalogs front-end styles.
 * All selectors are scoped to the plugin to prevent Woodmart/Elementor/theme
 * grid and typography rules from collapsing the catalog into a single column.
 */
.ppc-catalog,
.ppc-catalog-index {
    --ppc-green: #075b2a;
    --ppc-green-dark: #063b20;
    --ppc-red: #ee2948;
    --ppc-text: #151a20;
    --ppc-muted: #65707c;
    --ppc-border: #e5e7eb;
    display: block !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    float: none !important;
    clear: both;
    align-self: stretch;
    justify-self: stretch;
    margin: 0 !important;
    color: var(--ppc-text);
    font-family: inherit;
    text-align: initial;
}

.ppc-catalog *,
.ppc-catalog *::before,
.ppc-catalog *::after,
.ppc-catalog-index *,
.ppc-catalog-index *::before,
.ppc-catalog-index *::after {
    box-sizing: border-box;
}

.ppc-catalog--page,
.ppc-catalog-index--page {
    padding: 34px 0 70px !important;
    background: #fff;
}

/* Woodmart's content wrapper is a 12-column grid. The plugin must span it all. */
.partspars-catalogs-page #main-content > .ppc-catalog,
.partspars-catalogs-page #main-content > .ppc-catalog-index,
.partspars-catalogs-page .wd-content-layout > .ppc-catalog,
.partspars-catalogs-page .wd-content-layout > .ppc-catalog-index,
.partspars-catalogs-page .content-layout-wrapper > .ppc-catalog,
.partspars-catalogs-page .content-layout-wrapper > .ppc-catalog-index {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.ppc-container {
    display: block !important;
    width: calc(100% - 32px) !important;
    max-width: 1480px !important;
    min-width: 0 !important;
    margin-inline: auto !important;
    padding: 0 !important;
}

.ppc-cover {
    position: relative;
    display: block;
    width: 100%;
    min-height: 300px;
    margin: 0;
    border-radius: 6px;
    overflow: hidden;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .14);
}

.ppc-cover--fallback {
    background: radial-gradient(circle at 75% 20%, #18884a 0, #0a6634 32%, #063b20 100%);
}

.ppc-cover__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(4, 61, 28, .82), rgba(2, 62, 29, .56), rgba(1, 45, 22, .76));
}

.ppc-cover__content {
    position: absolute;
    z-index: 1;
    inset-inline: 44px;
    bottom: 38px;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 26px;
    width: auto;
    color: #fff;
    text-align: left;
}

.ppc-cover__icon {
    display: grid !important;
    place-items: center;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    margin: 0;
}

.ppc-cover__icon img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.ppc-default-catalog-icon {
    display: block;
    width: 100%;
    height: 100%;
    color: #fff;
}

.ppc-cover__titles {
    min-width: 0;
    text-align: left;
}

.ppc-cover__subtitle {
    margin: 0 0 4px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    opacity: .96;
    unicode-bidi: plaintext;
}

.ppc-cover__title {
    margin: 0 !important;
    padding: 0;
    color: #fff !important;
    font-size: clamp(27px, 3vw, 40px) !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    letter-spacing: -.02em;
    text-transform: none;
    unicode-bidi: plaintext;
}

.ppc-files {
    display: block !important;
    width: 100%;
    min-width: 0;
    padding: 28px 0 0;
    margin: 0;
    text-align: left;
}

.ppc-letter-group {
    display: grid !important;
    grid-template-columns: 86px minmax(0, 1fr) !important;
    align-items: start;
    gap: 24px;
    width: 100%;
    min-width: 0;
    padding: 17px 44px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid transparent;
    text-align: left;
}

.ppc-letter-group__letter {
    display: block;
    min-width: 0;
    margin: 0 !important;
    padding: 0;
    color: #111827 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-align: left;
    text-transform: none;
}

.ppc-letter-group__items {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 70px;
    row-gap: 18px;
    min-width: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ppc-letter-group__items > li,
.ppc-file-item {
    display: block;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ppc-letter-group__items > li::before,
.ppc-file-item::before {
    display: none !important;
    content: none !important;
}

.ppc-file-item a {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: #17202a !important;
    font-size: 17px !important;
    font-weight: 400;
    line-height: 1.55 !important;
    text-align: left;
    text-decoration: none !important;
    text-transform: none;
    white-space: normal;
    transition: color .2s ease, transform .2s ease;
}

.ppc-file-item a span {
    min-width: 0;
    overflow-wrap: anywhere;
    unicode-bidi: plaintext;
}

.ppc-file-item a:hover,
.ppc-file-item a:focus-visible {
    color: var(--ppc-green) !important;
    transform: translateX(2px);
}

.ppc-pdf-icon {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 24px;
    color: var(--ppc-red);
}

.ppc-empty-state {
    width: 100%;
    margin: 34px 0;
    padding: 28px;
    border: 1px dashed #cdd5df;
    border-radius: 10px;
    color: var(--ppc-muted);
    background: #fafafa;
    text-align: center;
}

.ppc-index-header {
    display: block;
    margin: 0 0 26px;
    padding: 46px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #063b20, #0b7540);
}

.ppc-index-header span {
    color: #fff;
    font-size: 15px;
    opacity: .85;
}

.ppc-index-header h1 {
    margin: 7px 0 0 !important;
    color: #fff !important;
    font-size: 40px !important;
    line-height: 1.2 !important;
}

.ppc-category-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px;
    width: 100%;
    min-width: 0;
}

.ppc-category-card {
    position: relative;
    display: block !important;
    min-width: 0;
    min-height: 220px;
    overflow: hidden;
    border-radius: 9px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 5px 20px rgba(20, 40, 30, .12);
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

.ppc-category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(20, 40, 30, .18);
}

.ppc-category-card--fallback {
    background: linear-gradient(135deg, #0b7540, #063b20);
}

.ppc-category-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 33, 17, .14), rgba(2, 50, 25, .9));
}

.ppc-category-card__content {
    position: absolute;
    z-index: 1;
    inset-inline: 24px;
    bottom: 24px;
    display: flex !important;
    align-items: center;
    gap: 15px;
    color: #fff;
}

.ppc-category-card__icon {
    display: grid !important;
    place-items: center;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
}

.ppc-category-card__icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    filter: brightness(0) invert(1);
}

.ppc-category-card__text {
    display: grid !important;
    min-width: 0;
}

.ppc-category-card__text small,
.ppc-category-card__text strong {
    color: #fff !important;
    unicode-bidi: plaintext;
}

.ppc-category-card__text small {
    font-size: 13px;
    opacity: .82;
}

.ppc-category-card__text strong {
    font-size: 23px;
    line-height: 1.3;
}

.ppc-catalog--embedded,
.ppc-catalog-index--embedded {
    padding: 0 !important;
}

.ppc-catalog--embedded .ppc-container,
.ppc-catalog-index--embedded .ppc-container {
    width: 100% !important;
    max-width: none !important;
}

@media (max-width: 900px) {
    .ppc-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .ppc-cover {
        min-height: 250px;
    }

    .ppc-cover__content {
        inset-inline: 28px;
        bottom: 30px;
    }

    .ppc-letter-group {
        grid-template-columns: 60px minmax(0, 1fr) !important;
        padding-inline: 24px;
    }

    .ppc-letter-group__items {
        column-gap: 34px;
    }

    .ppc-file-item a {
        font-size: 16px !important;
    }
}

@media (max-width: 620px) {
    .ppc-catalog--page,
    .ppc-catalog-index--page {
        padding-top: 18px !important;
    }

    .ppc-container {
        width: calc(100% - 22px) !important;
    }

    .ppc-cover {
        min-height: 220px;
        border-radius: 7px;
    }

    .ppc-cover__content {
        inset-inline: 20px;
        bottom: 24px;
        gap: 16px;
    }

    .ppc-cover__icon {
        flex-basis: 56px;
        width: 56px;
        height: 56px;
    }

    .ppc-cover__subtitle {
        font-size: 13px;
    }

    .ppc-cover__title {
        font-size: 26px !important;
    }

    .ppc-files {
        padding-top: 20px;
    }

    .ppc-letter-group {
        grid-template-columns: 34px minmax(0, 1fr) !important;
        gap: 13px;
        padding: 15px 8px;
    }

    .ppc-letter-group__letter {
        font-size: 17px !important;
    }

    .ppc-letter-group__items {
        grid-template-columns: 1fr !important;
        row-gap: 13px;
    }

    .ppc-file-item a {
        gap: 9px;
        font-size: 15px !important;
    }

    .ppc-pdf-icon {
        flex-basis: 18px;
        width: 18px;
        height: 21px;
    }

    .ppc-category-grid {
        grid-template-columns: 1fr !important;
    }

    .ppc-index-header {
        padding: 32px 24px;
    }

    .ppc-index-header h1 {
        font-size: 32px !important;
    }

    .ppc-category-card {
        min-height: 190px;
    }
}

@media print {
    .ppc-cover {
        min-height: 170px;
    }

    .ppc-category-card {
        box-shadow: none;
    }

    .ppc-file-item a {
        color: #000 !important;
        text-decoration: none !important;
    }

    .ppc-catalog--page {
        padding: 0 !important;
    }
}
