/* ══════════════════════════════════════════════════════════
   ZM Cards — Металлический шильдик с заклёпками
   ══════════════════════════════════════════════════════════ */

/* ── Сетка карточек ─────────────────────────────────────── */
.zm-cards-grid {
    display: grid;
    gap: 32px;
    margin: 32px 0;
}
.zm-cards-cols-1 { grid-template-columns: 1fr; max-width: 360px; }
.zm-cards-cols-2 { grid-template-columns: repeat(2, 1fr); }
.zm-cards-cols-3 { grid-template-columns: repeat(3, 1fr); }
.zm-cards-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Основная карточка — металлическая пластина ─────────── */
.zm-card {
    position: relative;
    background:
        /* Царапины и текстура металла */
        repeating-linear-gradient(
            92deg,
            transparent 0px,
            transparent 2px,
            rgba(255,255,255,0.015) 2px,
            rgba(255,255,255,0.015) 3px
        ),
        repeating-linear-gradient(
            180deg,
            transparent 0px,
            transparent 4px,
            rgba(0,0,0,0.04) 4px,
            rgba(0,0,0,0.04) 5px
        ),
        /* Металлическое отражение */
        linear-gradient(
            160deg,
            var(--card-shine) 0%,
            var(--card-light) 15%,
            var(--card-base)  35%,
            var(--card-dark)  55%,
            var(--card-base)  70%,
            var(--card-light) 85%,
            var(--card-dark)  100%
        );

    border-radius: 4px;
    padding: 28px 24px 20px;
    box-shadow:
        /* Внешний рельеф */
        0 1px 0   rgba(255,255,255,0.25),
        0 -1px 0  rgba(0,0,0,0.4),
        1px 0 0   rgba(255,255,255,0.15),
        -1px 0 0  rgba(0,0,0,0.3),
        /* Тень */
        0 8px 24px rgba(0,0,0,0.55),
        0 2px 6px  rgba(0,0,0,0.4),
        /* Внутренняя тень (глубина пластины) */
        inset 0 1px 0   rgba(255,255,255,0.2),
        inset 0 -1px 0  rgba(0,0,0,0.35),
        inset 1px 0 0   rgba(255,255,255,0.1),
        inset -1px 0 0  rgba(0,0,0,0.2);

    border: 1px solid rgba(0,0,0,0.5);
    overflow: visible;
    text-decoration: none !important;
    display: block;
    transition: transform .2s, box-shadow .2s;
}

.zm-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow:
        0 1px 0   rgba(255,255,255,0.25),
        0 -1px 0  rgba(0,0,0,0.4),
        1px 0 0   rgba(255,255,255,0.15),
        -1px 0 0  rgba(0,0,0,0.3),
        0 16px 40px rgba(0,0,0,0.65),
        0 4px 10px  rgba(0,0,0,0.5),
        inset 0 1px 0   rgba(255,255,255,0.25),
        inset 0 -1px 0  rgba(0,0,0,0.35),
        inset 1px 0 0   rgba(255,255,255,0.12),
        inset -1px 0 0  rgba(0,0,0,0.2);
}

.zm-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}
.zm-card-link:hover { color: inherit !important; }

/* ── Заклёпки по углам ──────────────────────────────────── */
.zm-rivet {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(255,255,255,0.7) 0%,
            rgba(255,255,255,0.2) 30%,
            var(--card-dark) 50%,
            rgba(0,0,0,0.6) 80%,
            rgba(0,0,0,0.8) 100%
        );
    box-shadow:
        0 2px 4px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.4),
        inset 0 -1px 0 rgba(0,0,0,0.5);
    border: 1px solid rgba(0,0,0,0.4);
    z-index: 2;
}
/* Крестик на заклёпке */
.zm-rivet::before,
.zm-rivet::after {
    content: '';
    position: absolute;
    background: rgba(0,0,0,0.4);
    border-radius: 1px;
}
.zm-rivet::before { width: 6px; height: 1px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.zm-rivet::after  { width: 1px; height: 6px; top: 50%; left: 50%; transform: translate(-50%,-50%); }

.zm-rivet--tl { top: 10px;  left: 10px;  }
.zm-rivet--tr { top: 10px;  right: 10px; }
.zm-rivet--bl { bottom: 10px; left: 10px;  }
.zm-rivet--br { bottom: 10px; right: 10px; }

/* ── Шапка карточки ─────────────────────────────────────── */
.zm-card-header {
    margin-bottom: 12px;
}

.zm-card-bolts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Маленькие болты-шестигранники */
.zm-bolt {
    display: inline-block;
    width: 14px;
    height: 14px;
    background:
        radial-gradient(circle at 40% 35%,
            rgba(255,255,255,0.5) 0%,
            var(--card-light) 25%,
            var(--card-dark) 70%,
            rgba(0,0,0,0.5) 100%
        );
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.zm-bolt--lg {
    width: 16px;
    height: 16px;
}

/* Бейдж с типом техники */
.zm-badge {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    padding: 2px 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.3);
}

/* ── Основная пластина с названием ─────────────────────── */
.zm-card-nameplate {
    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,0.35) 0%,
            rgba(0,0,0,0.5)  50%,
            rgba(0,0,0,0.35) 100%
        );
    border: 1px solid rgba(0,0,0,0.4);
    border-top-color: rgba(0,0,0,0.6);
    border-bottom-color: rgba(255,255,255,0.08);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.4),
        inset 0 -1px 0 rgba(255,255,255,0.06),
        0 1px 0 rgba(255,255,255,0.1);
    padding: 12px 16px;
    margin: 0 4px 14px;
    text-align: center;
    border-radius: 2px;
}

.zm-card-model {
    font-family: 'Oswald', 'Impact', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8e3dc;
    text-shadow:
        0 1px 0 rgba(255,255,255,0.15),
        0 -1px 0 rgba(0,0,0,0.6),
        0 2px 8px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.zm-card-year {
    font-family: 'PT Sans', sans-serif;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.12em;
    margin-top: 3px;
}

/* ── Декоративный ряд шестерён ──────────────────────────── */
.zm-card-gears {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0 0 14px;
}

.zm-gear {
    display: inline-block;
    width: 16px;
    height: 16px;
    background:
        radial-gradient(circle at 40% 35%,
            rgba(255,255,255,0.35) 0%,
            var(--card-light) 20%,
            var(--card-base)  45%,
            var(--card-dark)  100%
        );
    /* Шестерня через clip-path с зубьями */
    clip-path: polygon(
        50% 0%, 61% 11%, 74% 6%, 78% 19%,
        91% 22%, 88% 36%, 100% 44%, 92% 56%,
        100% 67%, 87% 72%, 84% 86%, 70% 83%,
        61% 94%, 50% 88%, 39% 94%, 30% 83%,
        16% 86%, 13% 72%, 0% 67%, 8% 56%,
        0% 44%, 12% 36%, 9% 22%, 22% 19%,
        26% 6%, 39% 11%
    );
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    opacity: 0.7;
}
.zm-gear--sm {
    width: 11px;
    height: 11px;
    opacity: 0.5;
}

/* ── Технические характеристики ─────────────────────────── */
.zm-card-specs {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(0,0,0,0.3);
    border-top-color: rgba(0,0,0,0.5);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    padding: 10px 14px;
    margin: 0 4px 12px;
    border-radius: 2px;
}

.zm-spec-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-family: 'PT Sans', sans-serif;
    font-size: 0.78rem;
    line-height: 1.3;
}
.zm-spec-row:last-child { border-bottom: none; }

.zm-spec-label {
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.zm-spec-dots {
    flex: 1;
    border-bottom: 1px dotted rgba(255,255,255,0.12);
    margin-bottom: 3px;
    min-width: 10px;
}

.zm-spec-val {
    color: rgba(255,255,255,0.75);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

/* ── Описание ───────────────────────────────────────────── */
.zm-card-desc {
    font-family: 'PT Serif', serif;
    font-size: 0.78rem;
    font-style: italic;
    color: rgba(255,255,255,0.35);
    text-align: center;
    line-height: 1.5;
    padding: 0 8px 10px;
}

/* ── Подвал шильдика ────────────────────────────────────── */
.zm-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.3);
}

.zm-serial {
    font-family: 'Courier New', monospace;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.12em;
    text-shadow: none;
}

/* ── Адаптив ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .zm-cards-cols-3,
    .zm-cards-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .zm-cards-cols-2,
    .zm-cards-cols-3,
    .zm-cards-cols-4 { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}
