/* ======================================= */
/* ========== ТОРГОВЦЫ (КОМПАКТНО) ========== */
/* ======================================= */

/* Сетка карточек */
.npcs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

/* Карточка */
.npc-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.npc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Шапка карточки — уменьшена */
.npc-card-header {
    background: linear-gradient(135deg, #4a4a8a 0%, #2c3e50 100%);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.npc-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.npc-title {
    flex: 1;
}

.npc-title h3 {
    margin: 0;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.3;
}

/* Тело карточки — без лишних отступов */
.npc-card-body {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.npc-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 2px 0;
    border-bottom: none;
    font-size: 1.0em;
}

.info-label {
    color: #666;
    font-weight: 500;
    font-size: 1.0em;
}

.info-value {
    font-weight: 700;
    color: #333;
    font-size: 1.0em;
}

.list-count {
    color: #4a4a8a;
    font-size: 1.0em;
}

.price-set {
    color: #e67e22;
}

/* Бейджик локации — компактно */
.map-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    background: #6c757d;
    color: white;
    white-space: nowrap;
}

/* Цвета карт (оставляем как есть, но шрифт меньше) */
.map-badge.acretia,
.map-badge.neutrala,
.map-badge.neutralas1,
.map-badge.neutralas2 {
    background: linear-gradient(135deg, #dc3545, #a71d2a);
}
.map-badge.bellato,
.map-badge.neutralb,
.map-badge.neutralbs1,
.map-badge.neutralbs2 {
    background: linear-gradient(135deg, #990, #970);
}
.map-badge.cora,
.map-badge.neutralc,
.map-badge.neutralcs1,
.map-badge.neutralcs2 {
    background: linear-gradient(135deg, #090, #092);
}
.map-badge.platform01 {
    background: linear-gradient(135deg, #00FFFF, #0000FF);
}
.map-badge.resources {
    background: linear-gradient(135deg, #808080, #A9A9A9);
}
.map-badge.sette {
    background: linear-gradient(135deg, #FF4500, #DAA520);
}
.map-badge.mountain_beast {
    background: linear-gradient(135deg, #696969, #008000);
}
.map-badge.medicallab,
.map-badge.medicallab2 {
    background: linear-gradient(135deg, #6c757d, #000080);
}
.map-badge.exile_land {
    background: linear-gradient(135deg, #D2691E, #800000);
}
.map-badge.elan {
    background: linear-gradient(135deg, #ADFF2F, #008000);
}
.map-badge.bellagsd,
.map-badge.bellagsp,
.map-badge.coragsd,
.map-badge.coragsp,
.map-badge.accgsd,
.map-badge.accgsp {
    background: linear-gradient(135deg, #9400D3, #9400D3);
}

/* Кнопки НПС — компактно */
.npc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #e0e0e0;
}

.npc-button {
    display: inline-block;
    padding: 2px 6px;
    background: #4a4a8a;
    color: white;
    font-size: 0.65em;
    font-weight: 500;
    border-radius: 10px;
    white-space: nowrap;
    cursor: default;
}

.npc-button.no-buttons {
    background: #6c757d;
    opacity: 0.7;
}

/* Если нет товаров или множителя — не создаём лишней высоты */
.npc-info-row:empty {
    display: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .npcs-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .npc-card-header {
        padding: 6px 10px;
    }
    
    .npc-avatar {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .npc-title h3 {
        font-size: 0.85em;
    }
    
    .npc-card-body {
        padding: 6px 10px;
        gap: 4px;
    }
    
    .npc-info-row {
        font-size: 0.7em;
    }
    
    .npc-button {
        padding: 2px 5px;
        font-size: 0.6em;
    }
}

/* ======================================= */
/* ========== ДЕТАЛЬНАЯ СТРАНИЦА (оставляем как есть, можно не трогать) ========== */
/* ======================================= */

/* ... остальные стили для детальной страницы торговца ... */
/* ======================================= */
/* ========== ДЕТАЛЬНАЯ СТРАНИЦА ТОРГОВЦА ========== */
/* ======================================= */

.npc-detail-header {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #4a4a8a 0%, #2c3e50 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.npc-detail-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.npc-detail-title {
    flex: 1;
}

.npc-detail-title h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
}

.npc-detail-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.price-multiplier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    background: rgba(255,255,255,0.2);
    color: #ffc107;
}

/* Секции предметов */
.items-section {
    margin: 30px 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.items-section h2 {
    color: #4a4a8a;
    font-size: 1.3em;
    margin-bottom: 15px;
    border-bottom: 2px solid #4a4a8a;
    padding-bottom: 8px;
}

.items-count-note,
.refresh-note {
    background: #e3f2fd;
    padding: 6px 12px;
    border-radius: 8px;
    color: #1565c0;
    font-weight: 500;
    margin-bottom: 15px;
    display: inline-block;
    font-size: 0.85em;
}

.refresh-note {
    background: #fff3e0;
    color: #e65100;
}

/* Сетка предметов */
.items-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px 16px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.item-card-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    padding: 5px;
}

.item-card-icon img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}

.item-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-card-name {
    font-weight: 700;
    color: #333;
    font-size: 0.95em;
}

.item-card-quantity {
    font-size: 0.8em;
    color: #e67e22;
    font-weight: 600;
}

.item-card-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.price-value {
    font-weight: 700;
    color: #28a745;
    font-size: 0.9em;
}

.price-currency {
    font-size: 0.7em;
    color: #666;
}

.price-free {
    color: #999;
    font-style: italic;
    font-size: 0.8em;
}

.limited-card {
    border-left: 4px solid #e67e22;
}

.limited-card .item-card-quantity {
    color: #e67e22;
}
/* ======================================= */
/* ========== ПАГИНАЦИЯ ========== */
/* ======================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    background: #1a1a2e;
    border: 1px solid #4a4a8a;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #4a4a8a;
    color: white;
    border-color: #6a6aaa;
}

.pagination a.active {
    background: #4a4a8a;
    color: white;
    font-weight: bold;
    border-color: #6a6aaa;
}
/* ======================================= */
/* ========== КНОПКИ НПС ========== */
/* ======================================= */

.npc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.npc-button {
    display: inline-block;
    padding: 4px 10px;
    background: #4a4a8a;
    color: white;
    font-size: 0.7em;
    font-weight: 500;
    border-radius: 15px;
    white-space: nowrap;
    cursor: default;
}

.npc-button.no-buttons {
    background: #6c757d;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .npc-button {
        font-size: 0.65em;
        padding: 3px 8px;
    }
    
    .npc-buttons {
        gap: 6px;
    }
}
/* Адаптивность */
@media (max-width: 768px) {
    .npc-detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .npc-detail-meta {
        justify-content: center;
    }
    
    .items-grid {
        justify-content: center;
    }
    
    .item-card {
        width: 100%;
        max-width: 280px;
    }
}
/* Адаптивность */
@media (max-width: 768px) {
    .npcs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .npc-card-header {
        padding: 12px;
    }
    
    .npc-avatar {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    
    .npc-title h3 {
        font-size: 1em;
    }
    
    .npc-card-body {
        padding: 12px;
    }
    
    .info-label,
    .info-value {
        font-size: 0.85em;
    }
}