/* For Sale cards only. Keep existing breeder and other gallery styles unchanged. */
.ccgm-gallery-grid.ccgm-sale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    align-items: stretch;
    gap: 25px;
    margin-top: 20px;
}

.ccgm-gallery-item.ccgm-sale-card,
.ccgm-gallery-item.ccgm-sale-card * {
    box-sizing: border-box;
}

.ccgm-gallery-item.ccgm-sale-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dedbd4;
    border-radius: 20px;
    background: #fff;
    color: #292929;
    text-align: left;
    box-shadow: 0 14px 34px rgba(36, 32, 26, 0.07);
    transform: none;
    transition: box-shadow 0.2s ease;
}

.ccgm-gallery-item.ccgm-sale-card:hover {
    transform: none;
    box-shadow: 0 16px 36px rgba(36, 32, 26, 0.12);
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__picture {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 3 / 2;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #252525;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    object-position: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    align-self: stretch;
    padding: 24px;
    color: #e6e2da;
    text-align: center;
    font-size: 14px;
    font-weight: 400;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__title {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    color: #252525;
    font-family: inherit;
    font-size: 27px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.6px;
    text-transform: none;
    overflow-wrap: anywhere;
    word-break: normal;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__morphs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 19px;
    padding: 0;
    list-style: none;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__morph {
    display: block;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid #e7d6ad;
    border-radius: 8px;
    background: #f8f3e7;
    color: #74551e;
    list-style: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: normal;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__morph::before {
    content: none;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: auto 0 19px;
    padding: 14px 0;
    border-top: 1px solid #ece9e2;
    border-bottom: 1px solid #ece9e2;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__stats > div {
    flex: 1 1 90px;
    min-width: 0;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__stats dt {
    margin: 0 0 3px;
    color: #68635a;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.2px;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__stats dd {
    margin: 0;
    color: #292929;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__price {
    flex: 1 1 120px;
    min-width: 0;
    color: #252525;
    font-size: 28px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.6px;
    overflow-wrap: anywhere;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-price-tag {
    display: block;
    margin: 0;
    color: #252525;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* Preserve the shared helper's original/discounted prices and red savings label. */
.ccgm-gallery-item.ccgm-sale-card .ccgm-discounted-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: 5px 8px;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-original-price {
    font-size: 0.65em;
    letter-spacing: 0;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-discount-label {
    flex-basis: 100%;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__status {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 100px;
    background: #e7f3e7;
    color: #2d6d3c;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3a874d;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__button {
    display: block;
    width: 100%;
    margin: 21px 0 0;
    padding: 13px 16px;
    border: 1px solid #252525;
    border-radius: 9px;
    background: #252525;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0;
    transition: background-color 0.2s ease;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__button:hover {
    background: #3c3c3c;
    border-color: #3c3c3c;
    color: #fff;
    text-decoration: none;
}

.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__picture:focus-visible,
.ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__button:focus-visible {
    outline: 3px solid #a57f36;
    outline-offset: -4px;
}

@media (max-width: 480px) {
    .ccgm-gallery-grid.ccgm-sale-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__body {
        padding: 20px;
    }

    .ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__title {
        font-size: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ccgm-gallery-item.ccgm-sale-card,
    .ccgm-gallery-item.ccgm-sale-card .ccgm-sale-card__button {
        transition: none;
    }
}
