/* いいねボタンのスタイル */
.product-image {
    position: relative;
    overflow: hidden;
}

.like-button {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background-color: transparent; /* 背景色を透明に */
}

.like-button:hover {
    transform: scale(1.1);
}

/* いいねボタンといいね数のコンテナ */
.like-container {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 2;
    /* PC表示時はマウスオーバー時のみ表示 */
    opacity: 0;
}

/* PCでのマウスオーバー表示 */
@media (min-width: 768px) {
    .grid-item:hover .like-container {
        opacity: 1;
    }
}

/* モバイルでは常に表示 */
@media (max-width: 767px) {
    .like-container {
        opacity: 1;
    }
}

/* いいね済みボタンのスタイル */
.like-button.liked {
    /* 背景色は不要 */
}

.like-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #999; /* 灰色線で表示 */
    stroke-width: 2;
    transition: all 0.3s ease;
}

.like-button.liked svg {
    fill: #999; /* いいね済みは灰色塗り */
    stroke: #999;
    transform: scale(1.1);
}

/* いいねアニメーション中のスタイル */
.like-button.animate svg {
    fill: #ff6b6b; /* アニメーション中はピンク塗り */
    stroke: #ff6b6b;
}

.like-count {
    position: relative;
    font-size: 12px;
    font-weight: bold;
    color: #555;
    padding: 0 4px;
    /* 背景と枠は不要 */
    background-color: transparent;
}

/* いいねアニメーション */
@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes colorChange {
    0% { fill: none; stroke: #999; }
    20% { fill: #ff6b6b; stroke: #ff6b6b; }
    100% { fill: #999; stroke: #999; }
}

.like-button.animate svg {
    animation: heartbeat 0.4s ease-in-out, colorChange 0.8s ease-in-out forwards;
}
