.amazon-grid-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    max-width: 420px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.amazon-grid-title {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 700;
    color: #111111;
}

html[dir="rtl"] .amazon-grid-title {
    text-align: right;
}

.amazon-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.amazon-grid-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.amazon-grid-item:hover {
    transform: translateY(-2px);
}

.amazon-item-img-wrap {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    background-color: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amazon-item-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.amazon-grid-item:hover .amazon-item-img-wrap img {
    transform: scale(1.05);
}

.amazon-item-title {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #111111;
    text-align: right;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animations */
.amazon-grid-item.fade-out {
    opacity: 0;
}

.amazon-grid-item.fade-in {
    animation: amazonFadeIn 0.3s ease forwards;
}

@keyframes amazonFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 767px) {
    .amazon-grid-container {
        padding: 15px;
    }
    .amazon-grid-wrapper {
        gap: 10px;
    }
    .amazon-item-title {
        font-size: 12px;
    }
}
