/* =========================================================================
   AW.BY — Карточки запчастей (главная страница)
   Единый стиль с карточками объявлений
   ========================================================================= */

.awby-parts-grid {
    display: grid;
    grid-template-columns: repeat(var(--awby-parts-cols, 4), minmax(0, 1fr));
    gap: 20px;
    margin: 20px 0 30px;
}
@media (max-width: 1024px) { .awby-parts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .awby-parts-grid { grid-template-columns: 1fr; } }

.awby-parts-empty {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 15px;
}

/* --- Карточка --- */
.awby-part-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(42, 74, 106, .06);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.awby-part-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(42, 74, 106, .15);
    border-color: #719DE4;
}

/* --- Фото / плейсхолдер --- */
.awby-part-card__photo {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f4f7fb, #eaf0f7);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.awby-part-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.awby-part-card:hover .awby-part-card__img { transform: scale(1.06); }

.awby-part-card__placeholder {
    font-size: 52px;
    line-height: 1;
    opacity: .7;
    transition: transform .35s ease;
}
.awby-part-card:hover .awby-part-card__placeholder { transform: scale(1.1); }

/* --- Бейдж категории --- */
.awby-part-card__cat {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(42, 74, 106, .85);
    color: #fff;
    backdrop-filter: blur(4px);
    letter-spacing: .2px;
    z-index: 2;
}

/* --- Тело карточки --- */
.awby-part-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
    flex: 1;
}

.awby-part-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #2a4a6a;
    margin: 0;
    line-height: 1.3;
    /* Ограничение в 2 строки */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.awby-part-card__desc {
    font-size: 12px;
    color: #888;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.awby-part-card__bottom {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.awby-part-card__price {
    font-size: 18px;
    font-weight: 800;
    color: #ff0000;
    white-space: nowrap;
}
.awby-part-card__price--na {
    font-size: 13px;
    color: #888;
    font-weight: 600;
}
/* Сброс WooCommerce-разметки внутри цены */
.awby-part-card__price .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; color: inherit; }
.awby-part-card__price .woocommerce-Price-currencySymbol { font-size: .85em; }

.awby-part-card__sku {
    font-size: 11px;
    color: #9aa5b1;
    font-weight: 500;
    white-space: nowrap;
}
