﻿.item-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #000;
    display: flex;
    flex-direction: column;
    width: 9.5rem;
    height: 12rem;
    border-radius: 1rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card-original-content {
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.item-name {
    font-size: 0.8rem;
    text-align: center;
    margin-top: 0.2rem;
    margin-bottom: 0;
    padding: 0 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    line-height: 1.1rem;
}

.img-container {
    width: 100%;
    height: 120px;
    position: relative;
    overflow: hidden;
}

.item-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    max-width: 100%;
    object-fit: contain;
}

.item-updatetime {
    font-size: 0.5rem;
    color: #888;
    text-align: right;
    padding-right: 0.5rem;
}

.item-info {
    display: flex;
    width: 100%; 
    border-top: 1px solid #666;
    padding-top: 0.75rem;
}

.count-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding-left: 0.5rem;
}

.price-container {
    display: flex;
    flex-direction: column;
    margin-left: 1rem;
    padding-right: 0.5rem;
}

.card-count {
    font-size: 0.65rem;
    margin: 0;
    text-align: left;
}

.count-title {
    font-size: 0.5rem;
    margin: 0.1rem 0 0 0;
    color: #666;
}

.item-price {
    font-size: 0.65rem;
    margin: 0;
    text-align: right;
}

.price-title {
    font-size: 0.5rem;
    margin: 0.1rem 0 0 0;
    color: #666;
    text-align: right;
}

.card-hover-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.8rem;
}

.card-action-btn {
    padding: 0.5rem 1rem;
    background: #ac0000;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
}

    .card-action-btn:hover {
        transform: scale(1.05);
    }

.item-card:hover .card-original-content {
    opacity: 0;
}

.item-card:hover .card-hover-layer {
    opacity: 1;
}

.card-hover-layer {
    display: flex;
    flex-direction: column; 
    gap: 10px;
    padding: 10px;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .card-hover-layer {
    opacity: 1;
}

.card-action-btn {
    width: 80%;
    padding: 8px 12px;
    background: #ac0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .card-action-btn:hover {
        background: #8d0101;
    }