/*
 * v2 page styles.
 * Header and footer live in main.css.
 * Requirements for every v2 page:
 * - Bootstrap 5 markup
 * - jQuery 3 behavior
 * - Font Awesome 7.3.1 (/fonts/fontawesome-7.3.1-web)
 * - data only from ModelCache, no database queries
 */

.npc-v2-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 14px 14px 12px;
    border: 1px solid var(--npc-line);
    border-radius: 14px;
    background: #fff;
}

.npc-v2-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    margin-bottom: 10px;
}

.npc-v2-card__media img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.npc-v2-card.is-out .npc-v2-card__media img {
    opacity: 0.55;
}

.npc-v2-card__stock {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 16px);
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--npc-badge, #f03d3d);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    pointer-events: none;
}

.npc-v2-card__stock i {
    font-size: 12px;
}

.npc-v2-card__badge {
    align-self: flex-start;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #ffe8ea;
    color: #e23b4a;
    font-size: 12px;
    font-weight: 700;
}

.npc-v2-card__name {
    flex: 1 1 auto;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.npc-v2-card__foot {
    margin-top: auto;
}

.npc-v2-card__name a {
    color: var(--npc-ink);
    text-decoration: none;
}

.npc-v2-card__name a:hover {
    color: var(--npc-logo);
}

.npc-v2-card__price {
    min-height: 27px;
    margin-bottom: 12px;
    color: var(--npc-accent);
    font-size: 18px;
    font-weight: 700;
}

.npc-v2-card__ask {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 27px;
    margin-bottom: 12px;
    color: var(--npc-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.npc-v2-card__ask i {
    color: var(--npc-accent);
    font-size: 15px;
}

.npc-v2-note {
    position: fixed;
    right: 16px;
    bottom: 96px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
    padding: 12px 14px;
    border: 1px solid var(--npc-line);
    border-radius: 12px;
    background: #fff;
    color: var(--npc-ink);
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 12px 30px rgba(16, 36, 72, 0.22);
}

.npc-v2-note a {
    color: var(--npc-btn);
    font-weight: 700;
}

.npc-v2-note.is-error {
    border-color: transparent;
    background: var(--npc-badge);
    color: #fff;
}

.npc-v2-note.is-error a {
    color: #fff;
}

.npc-v2-comparebar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px 10px 16px;
    border-radius: 999px;
    background: var(--npc-ink);
    color: #fff;
    box-shadow: 0 12px 30px rgba(16, 36, 72, 0.22);
    transform: translateX(-50%);
}

.npc-v2-comparebar[hidden] {
    display: none;
}

.npc-v2-comparebar span {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.npc-v2-comparebar a,
.npc-v2-comparebar__clear {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.npc-v2-comparebar a {
    background: var(--npc-btn);
}

.npc-v2-comparebar a:hover {
    background: #025ec0;
    color: #fff;
}

.npc-v2-comparebar__clear:hover {
    background: rgba(255, 255, 255, 0.12);
}

.npc-v2-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.npc-v2 .npc-v2-card__buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: var(--npc-btn);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.npc-v2 .npc-v2-card__buy:hover {
    background: #025ec0;
    color: #fff;
}

.npc-v2-card__fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--npc-line);
    border-radius: 8px;
    background: #fff;
    color: #8b97a8;
    font-size: 16px;
}

.npc-v2-card__fav:hover,
.npc-v2-card__fav.is-active {
    color: #e23b4a;
    border-color: #ffd0d4;
}
